diff --git a/.changeset/brave-pans-create.md b/.changeset/brave-pans-create.md new file mode 100644 index 0000000000..0411cdfa59 --- /dev/null +++ b/.changeset/brave-pans-create.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Update to beta.4 diff --git a/.changeset/brown-breads-begin.md b/.changeset/brown-breads-begin.md new file mode 100644 index 0000000000..0c54b09096 --- /dev/null +++ b/.changeset/brown-breads-begin.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Fix two related issues with HeadContent in solid-router diff --git a/.changeset/bump-solid-query-beta-5.md b/.changeset/bump-solid-query-beta-5.md new file mode 100644 index 0000000000..270f7bf30f --- /dev/null +++ b/.changeset/bump-solid-query-beta-5.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router-ssr-query': patch +--- + +Upgrade `@tanstack/solid-query` to `6.0.0-beta.5` diff --git a/.changeset/clever-apples-jog.md b/.changeset/clever-apples-jog.md new file mode 100644 index 0000000000..279c5ab8d2 --- /dev/null +++ b/.changeset/clever-apples-jog.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router': patch +--- + +fix: move HydrationScript to HeadContent diff --git a/.changeset/clever-bears-stand.md b/.changeset/clever-bears-stand.md new file mode 100644 index 0000000000..1d4eb2d164 --- /dev/null +++ b/.changeset/clever-bears-stand.md @@ -0,0 +1,7 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Upgrade to Solid 2.0.0-beta.5 diff --git a/.changeset/clever-vans-yawn.md b/.changeset/clever-vans-yawn.md new file mode 100644 index 0000000000..2f2ad97772 --- /dev/null +++ b/.changeset/clever-vans-yawn.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +build: bundle packages with rolldown diff --git a/.changeset/cruel-tips-shine.md b/.changeset/cruel-tips-shine.md new file mode 100644 index 0000000000..b282563a90 --- /dev/null +++ b/.changeset/cruel-tips-shine.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Upgrade to solidjs beta 14 diff --git a/.changeset/cuddly-drinks-count.md b/.changeset/cuddly-drinks-count.md new file mode 100644 index 0000000000..d02d0893b2 --- /dev/null +++ b/.changeset/cuddly-drinks-count.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +chore: sync main to pre-release branch diff --git a/.changeset/curly-times-sip.md b/.changeset/curly-times-sip.md new file mode 100644 index 0000000000..a7f13c676d --- /dev/null +++ b/.changeset/curly-times-sip.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Upgrade to Solid v2.0.0-beta.6 diff --git a/.changeset/cyan-otters-notice.md b/.changeset/cyan-otters-notice.md new file mode 100644 index 0000000000..c2b84d53fd --- /dev/null +++ b/.changeset/cyan-otters-notice.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Upgrade to solid v2 beta 10 diff --git a/.changeset/evil-parrots-end.md b/.changeset/evil-parrots-end.md new file mode 100644 index 0000000000..6f7116a6c4 --- /dev/null +++ b/.changeset/evil-parrots-end.md @@ -0,0 +1,6 @@ +--- +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Bump to solid js 2.0.0-beta.3 diff --git a/.changeset/fuzzy-peas-sneeze.md b/.changeset/fuzzy-peas-sneeze.md new file mode 100644 index 0000000000..95bd1c048d --- /dev/null +++ b/.changeset/fuzzy-peas-sneeze.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +Update to solid v2 beta 8 diff --git a/.changeset/hot-pillows-bathe.md b/.changeset/hot-pillows-bathe.md new file mode 100644 index 0000000000..f6b3bf8463 --- /dev/null +++ b/.changeset/hot-pillows-bathe.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +chore: bump solid 2 to beta.7 diff --git a/.changeset/modern-islands-enjoy.md b/.changeset/modern-islands-enjoy.md new file mode 100644 index 0000000000..2d8953740d --- /dev/null +++ b/.changeset/modern-islands-enjoy.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +fix: pin solid 2 beta.6 due to server range with -experimental tag diff --git a/.changeset/petite-icons-press.md b/.changeset/petite-icons-press.md new file mode 100644 index 0000000000..b33b9eda69 --- /dev/null +++ b/.changeset/petite-icons-press.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router-ssr-query': patch +--- + +chore: bump solid-query to 6.0.0-alpha.1 diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000000..967ecb9c58 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,87 @@ +{ + "mode": "pre", + "tag": "beta", + "initialVersions": { + "@tanstack/arktype-adapter": "1.166.7", + "@tanstack/eslint-plugin-router": "1.161.4", + "@tanstack/history": "1.161.4", + "@tanstack/nitro-v2-vite-plugin": "1.154.7", + "@tanstack/react-router": "1.166.7", + "@tanstack/react-router-devtools": "1.166.7", + "@tanstack/react-router-ssr-query": "1.166.7", + "@tanstack/react-start": "1.166.8", + "@tanstack/react-start-client": "1.166.7", + "@tanstack/react-start-server": "1.166.7", + "@tanstack/router-cli": "1.166.7", + "@tanstack/router-core": "1.166.7", + "@tanstack/router-devtools": "1.166.7", + "@tanstack/router-devtools-core": "1.166.7", + "@tanstack/router-generator": "1.166.7", + "@tanstack/router-plugin": "1.166.7", + "@tanstack/router-ssr-query-core": "1.166.7", + "@tanstack/router-utils": "1.161.4", + "@tanstack/router-vite-plugin": "1.166.7", + "@tanstack/solid-router": "1.166.7", + "@tanstack/solid-router-devtools": "1.166.7", + "@tanstack/solid-router-ssr-query": "1.166.7", + "@tanstack/solid-start": "1.166.8", + "@tanstack/solid-start-client": "1.166.7", + "@tanstack/solid-start-server": "1.166.7", + "@tanstack/start-client-core": "1.166.7", + "@tanstack/start-fn-stubs": "1.161.4", + "@tanstack/start-plugin-core": "1.166.8", + "@tanstack/start-server-core": "1.166.7", + "@tanstack/start-static-server-functions": "1.166.8", + "@tanstack/start-storage-context": "1.166.7", + "@tanstack/valibot-adapter": "1.166.7", + "@tanstack/virtual-file-routes": "1.161.4", + "@tanstack/vue-router": "1.166.7", + "@tanstack/vue-router-devtools": "1.166.7", + "@tanstack/vue-router-ssr-query": "1.166.7", + "@tanstack/vue-start": "1.166.8", + "@tanstack/vue-start-client": "1.166.7", + "@tanstack/vue-start-server": "1.166.7", + "@tanstack/zod-adapter": "1.166.7", + "@tanstack/eslint-plugin-start": "0.1.0", + "@tanstack/react-start-rsc": "0.1.17" + }, + "changesets": [ + "brave-pans-create", + "brown-breads-begin", + "bump-solid-query-beta-5", + "clever-apples-jog", + "clever-bears-stand", + "clever-vans-yawn", + "cruel-tips-shine", + "cuddly-drinks-count", + "curly-times-sip", + "cyan-otters-notice", + "evil-parrots-end", + "fuzzy-peas-sneeze", + "hot-pillows-bathe", + "modern-islands-enjoy", + "petite-icons-press", + "proxy-free-link-props", + "quiet-shrimps-jam", + "shaky-tools-think", + "silent-streets-camp", + "smooth-swans-ask", + "social-mails-sort", + "social-rules-fold", + "solid-js-beta-15", + "solid-js-beta-17", + "solid-js-beta-18", + "solid-js-beta-19", + "solid-js-beta-20", + "solid-js-beta-21", + "solid-kings-help", + "solid-match-suspend-ssr-only", + "tall-horses-repair", + "tame-lions-hunt", + "three-carrots-return", + "tiny-beds-tan", + "tired-pants-eat", + "violet-turkeys-cross", + "wicked-olives-poke" + ] +} diff --git a/.changeset/proxy-free-link-props.md b/.changeset/proxy-free-link-props.md new file mode 100644 index 0000000000..e0f5879cc3 --- /dev/null +++ b/.changeset/proxy-free-link-props.md @@ -0,0 +1,23 @@ +--- +'@tanstack/solid-router': patch +--- + +perf(solid-router): make `useLinkProps` proxy-free in the spread hot path + +`useLinkProps` previously layered four proxies (`merge` for defaults, two +`splitProps`/`omit` proxies, and a final `merge` of spreadable props with the +resolved props memo). Solid's `spread()` re-enumerated all of them through V8 +proxy traps on every navigation, for every `Link`, which showed up in CodSpeed +profiles as a large unattributed "NodeJS internals" cost. + +`useLinkProps` now returns a plain object with a stable key set whose +reactivity lives in property getters backed by fine-grained memos. Values that +no longer apply resolve to `undefined`, which `spread()` treats as attribute +removal. The built-location memo also gained href-based equality so downstream +memos skip work when a navigation doesn't change a link's target. + +This makes the client-side navigation benchmark ~30% faster. + +Note: keys returned by `activeProps`/`inactiveProps` functions are discovered +once at setup — functions that later return brand-new keys (beyond the initial +set plus `class`/`style`) won't have those keys applied. diff --git a/.changeset/quiet-shrimps-jam.md b/.changeset/quiet-shrimps-jam.md new file mode 100644 index 0000000000..240815ab5c --- /dev/null +++ b/.changeset/quiet-shrimps-jam.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router-ssr-query': patch +--- + +fix: use solid v2 compatible solid-query diff --git a/.changeset/rsbuild-manifest-module-chunks-once.md b/.changeset/rsbuild-manifest-module-chunks-once.md deleted file mode 100644 index 02febd9d84..0000000000 --- a/.changeset/rsbuild-manifest-module-chunks-once.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -Rsbuild: the Start manifest pass that runs after every client compilation (builds and each dev update) reads an imported module's chunks once per compilation and counts the module once per importing chunk, instead of once per import connection. The manifest is unchanged; the pass takes about 40 % less time (on a 333-route app, tens of milliseconds less per HMR update). diff --git a/.changeset/rsbuild-manifest-own-chunks.md b/.changeset/rsbuild-manifest-own-chunks.md deleted file mode 100644 index 04e8e29928..0000000000 --- a/.changeset/rsbuild-manifest-own-chunks.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -Rsbuild: a route's client manifest entry lists only its own chunks and CSS. When two routes shared a module in a chunk of its own, each route's entry also listed the other route's chunk as a preload and its stylesheet. diff --git a/.changeset/rsbuild-rule-use-falsy-loaders.md b/.changeset/rsbuild-rule-use-falsy-loaders.md deleted file mode 100644 index a84a054fbd..0000000000 --- a/.changeset/rsbuild-rule-use-falsy-loaders.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -fix: the Rsbuild RSC integration skips falsy entries in a rule's `use` array (Rspack's conditionally disabled loaders) instead of treating them as loaders. diff --git a/.changeset/rsbuild-virtual-modules-build.md b/.changeset/rsbuild-virtual-modules-build.md deleted file mode 100644 index 01a0c5ee6e..0000000000 --- a/.changeset/rsbuild-virtual-modules-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -Rsbuild: fix the Rsbuild plugin build after two changes to its virtual modules crossed. Without this fix the package does not build, so no release could ship it. The Rsbuild dev manifest is written to its virtual module under the app's root. diff --git a/.changeset/rsbuild-virtual-modules-root.md b/.changeset/rsbuild-virtual-modules-root.md deleted file mode 100644 index 427043a712..0000000000 --- a/.changeset/rsbuild-virtual-modules-root.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -Rsbuild: Start writes its virtual modules under the app's root, not the working directory. An app built or served from another directory (`rsbuild build --root ` from a monorepo root) no longer fails with "Module not found" on the packages they import, such as RSC's serialization adapters. diff --git a/.changeset/rsc-security-floor.md b/.changeset/rsc-security-floor.md deleted file mode 100644 index 9c828f13b3..0000000000 --- a/.changeset/rsc-security-floor.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@tanstack/react-start-rsc': patch ---- - -Raise the minimum RSC bundler peer dependencies to versions with the React Server Components fixes for GHSA-xqc2-xf4c-x3h3 (CVE-2026-126187, unauthenticated RCE) and GHSA-h3gv-c5rc-p453 (server function DoS): - -- `@vitejs/plugin-rsc` to `>=0.5.38` (GHSA-59pf-q495-3c99), which vendors a fixed `react-server-dom-webpack`. -- `react-server-dom-rspack` to `>=0.1.1`, the first release built from React sources that include the fix. diff --git a/.changeset/shaky-tools-think.md b/.changeset/shaky-tools-think.md new file mode 100644 index 0000000000..2218cdd8d4 --- /dev/null +++ b/.changeset/shaky-tools-think.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router-ssr-query': patch +--- + +chore: bump solid-query to 6.0.0-alpha.2 diff --git a/.changeset/silent-streets-camp.md b/.changeset/silent-streets-camp.md new file mode 100644 index 0000000000..e2d8144dd7 --- /dev/null +++ b/.changeset/silent-streets-camp.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +fix: adjust pre-release ranges diff --git a/.changeset/smooth-swans-ask.md b/.changeset/smooth-swans-ask.md new file mode 100644 index 0000000000..bf7ecda35a --- /dev/null +++ b/.changeset/smooth-swans-ask.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +fix: add vite 8 compat diff --git a/.changeset/social-mails-sort.md b/.changeset/social-mails-sort.md new file mode 100644 index 0000000000..77309d35a0 --- /dev/null +++ b/.changeset/social-mails-sort.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': major +'@tanstack/solid-router-devtools': major +'@tanstack/solid-start-client': major +'@tanstack/solid-start-server': major +'@tanstack/solid-router': major +'@tanstack/solid-start': major +--- + +solid v2 pre-release for solid-router and start diff --git a/.changeset/social-rules-fold.md b/.changeset/social-rules-fold.md new file mode 100644 index 0000000000..62c77ee9cd --- /dev/null +++ b/.changeset/social-rules-fold.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +chore: bump solid-query and vite-plugin-solid diff --git a/.changeset/solid-js-beta-15.md b/.changeset/solid-js-beta-15.md new file mode 100644 index 0000000000..93e0d17c2a --- /dev/null +++ b/.changeset/solid-js-beta-15.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.15` diff --git a/.changeset/solid-js-beta-17.md b/.changeset/solid-js-beta-17.md new file mode 100644 index 0000000000..bfa0012943 --- /dev/null +++ b/.changeset/solid-js-beta-17.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.17` diff --git a/.changeset/solid-js-beta-18.md b/.changeset/solid-js-beta-18.md new file mode 100644 index 0000000000..be50246023 --- /dev/null +++ b/.changeset/solid-js-beta-18.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.18` diff --git a/.changeset/solid-js-beta-19.md b/.changeset/solid-js-beta-19.md new file mode 100644 index 0000000000..9f488348bc --- /dev/null +++ b/.changeset/solid-js-beta-19.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.19` and `vite-plugin-solid` to `3.0.0-next.11` diff --git a/.changeset/solid-js-beta-20.md b/.changeset/solid-js-beta-20.md new file mode 100644 index 0000000000..2f531e0c6a --- /dev/null +++ b/.changeset/solid-js-beta-20.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.20` diff --git a/.changeset/solid-js-beta-21.md b/.changeset/solid-js-beta-21.md new file mode 100644 index 0000000000..aeb66b6f90 --- /dev/null +++ b/.changeset/solid-js-beta-21.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.21` diff --git a/.changeset/solid-js-beta-25.md b/.changeset/solid-js-beta-25.md new file mode 100644 index 0000000000..934dd8661e --- /dev/null +++ b/.changeset/solid-js-beta-25.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-start': patch +--- + +Upgrade `solid-js` and `@solidjs/web` to `2.0.0-beta.25` diff --git a/.changeset/solid-kings-help.md b/.changeset/solid-kings-help.md new file mode 100644 index 0000000000..b638658e9b --- /dev/null +++ b/.changeset/solid-kings-help.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router': patch +--- + +Upgrade solid refresh, fix deep equal for promises diff --git a/.changeset/solid-match-suspend-ssr-only.md b/.changeset/solid-match-suspend-ssr-only.md new file mode 100644 index 0000000000..c83ea61355 --- /dev/null +++ b/.changeset/solid-match-suspend-ssr-only.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router': patch +--- + +Suspend on the match `loadPromise` only during SSR. On the client, suspending on the pending match kept a live async source in the tree, which since `solid-js@2.0.0-beta.16` routed signal writes into a transition hold and broke synchronous write-then-load flows such as `invalidate()` on a `notFound` match. diff --git a/.changeset/start-server-fn-custom-id-check.md b/.changeset/start-server-fn-custom-id-check.md deleted file mode 100644 index 384f0ade06..0000000000 --- a/.changeset/start-server-fn-custom-id-check.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@tanstack/start-plugin-core': minor ---- - -A server function id that a custom `serverFns.generateFunctionId` returns and that never worked over HTTP now fails the build, with an error naming the file, the function and the id: whitespace, a control or non-ASCII character, any of `"`, `#`, `/`, `<`, `>`, `?`, `\`, `^`, `` ` ``, `{`, `}`, the ids `.` and `..`, and a percent-encoding the server reads as another id (`%41`, lowercase hex, `%2E`) or rejects. The client puts the id in the URL unencoded, so a `#` or `?` ended the path and a `/` cut the id short (the call silently ran another server function of the file or none), and the other characters reached the server percent-encoded and matched no function. An id embedding a non-ASCII `functionName` is one of these. One case did work and now fails the build: such an id on a server function only SSR code called. - -Ids with `%` or the other characters URLs allow (such as `:`, `@`, `+`, `=`, `,`, `;`, `!`, `*`, `(`, `)`, `&`, `'`, `|`, `[`, `]`) still build and reach their handler, with a deprecation warning (from the Vite plugin; the Rsbuild plugin does not print compiler warnings yet): the next major version rejects them, since proxies and servers may decode or rewrite them (hash the inputs instead, as the documented example does). An id with `'` no longer breaks the server bundle. diff --git a/.changeset/start-vite-root-library-discovery.md b/.changeset/start-vite-root-library-discovery.md deleted file mode 100644 index d4e8221c59..0000000000 --- a/.changeset/start-vite-root-library-discovery.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/start-plugin-core': patch ---- - -Vite: Start finds the Start libraries it bundles in the SSR build from Vite's root, not the working directory. A `vite build ` run from another directory (a monorepo root, a script) no longer leaves them external and uncompiled, where their server fns returned `undefined`. diff --git a/.changeset/tall-horses-repair.md b/.changeset/tall-horses-repair.md new file mode 100644 index 0000000000..295b9e819d --- /dev/null +++ b/.changeset/tall-horses-repair.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +fix: use TSR_DEFERRED_PROMISE diff --git a/.changeset/tame-lions-hunt.md b/.changeset/tame-lions-hunt.md new file mode 100644 index 0000000000..d54795134a --- /dev/null +++ b/.changeset/tame-lions-hunt.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router': patch +--- + +Fix hydration desync by resolving `defaultNotFoundComponent` at render time instead of lazily mutating the boundary route's `options.notFoundComponent`. Route objects are module singletons shared across server requests, so once the server handled any 404, later SSRs of valid URLs wrapped the match in a `CatchNotFound` boundary the client didn't render, shifting hydration keys and leaving the subtree inert. diff --git a/.changeset/three-carrots-return.md b/.changeset/three-carrots-return.md new file mode 100644 index 0000000000..bd8daa172e --- /dev/null +++ b/.changeset/three-carrots-return.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +bump to alpha.1 diff --git a/.changeset/tiny-beds-tan.md b/.changeset/tiny-beds-tan.md new file mode 100644 index 0000000000..fb8bca1450 --- /dev/null +++ b/.changeset/tiny-beds-tan.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +sync main diff --git a/.changeset/tired-pants-eat.md b/.changeset/tired-pants-eat.md new file mode 100644 index 0000000000..d4a071c298 --- /dev/null +++ b/.changeset/tired-pants-eat.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-start': patch +--- + +fix: better rollupOptions/rolldownOptions handling diff --git a/.changeset/violet-turkeys-cross.md b/.changeset/violet-turkeys-cross.md new file mode 100644 index 0000000000..b095b45e58 --- /dev/null +++ b/.changeset/violet-turkeys-cross.md @@ -0,0 +1,10 @@ +--- +'@tanstack/solid-router-ssr-query': patch +'@tanstack/solid-router-devtools': patch +'@tanstack/solid-start-client': patch +'@tanstack/solid-start-server': patch +'@tanstack/solid-router': patch +'@tanstack/solid-start': patch +--- + +chore: sync main branch with store refactor diff --git a/.changeset/wicked-olives-poke.md b/.changeset/wicked-olives-poke.md new file mode 100644 index 0000000000..479ea10d53 --- /dev/null +++ b/.changeset/wicked-olives-poke.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-router-ssr-query': patch +--- + +fix: use solid-query 6.0.0-alpha.0 diff --git a/.coderabbit.yaml b/.coderabbit.yaml deleted file mode 100644 index 21d884dbeb..0000000000 --- a/.coderabbit.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json - -reviews: - request_changes_workflow: false - slop_detection: - enabled: true - -knowledge_base: - code_guidelines: - enabled: true - filePatterns: - - 'CONTRIBUTING.md' diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9dd0def7bd..a33150af03 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -4,14 +4,6 @@ body: - type: markdown attributes: value: | - - Thank you for reporting an issue :pray:. This issue tracker is for reporting bugs found in TanStack Router and/or Start. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index a5ef10f1ff..0000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,22 +0,0 @@ -## 🎯 Changes - - - -## ✅ Checklist - -- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/router/blob/main/CONTRIBUTING.md). -- [ ] I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request. -- [ ] I fully understand the code in this pull request, including any code generated with AI assistance. - -## 🚀 Release Impact - -- [ ] This change affects published code, and I have generated a [changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). -- [ ] This change is docs/CI/dev-only (no release). - - diff --git a/.github/renovate.json b/.github/renovate.json index 6fd5aa1c86..01be1ce5c2 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -21,6 +21,7 @@ "@types/node", "@types/react", "@types/react-dom", + "h3", "node", "react", "react-dom", diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index 51ffa28e4c..d0deda36a7 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -8,19 +8,11 @@ on: paths: - 'packages/**' - 'benchmarks/**' - - 'scripts/benchmarks/bundle-size/**' - - '.nvmrc' - - 'package.json' - - 'pnpm-lock.yaml' push: branches: [main] paths: - 'packages/**' - 'benchmarks/**' - - 'scripts/benchmarks/bundle-size/**' - - '.nvmrc' - - 'package.json' - - 'pnpm-lock.yaml' workflow_dispatch: concurrency: @@ -51,7 +43,7 @@ jobs: uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main - name: Measure Bundle Size - run: pnpm benchmark:bundle-size --outputStyle=stream --skipRemoteCache + run: pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache - name: Capture Benchmark Outputs id: capture @@ -109,8 +101,6 @@ jobs: cat benchmarks/bundle-size/results/pr-comment.md - name: Upsert Sticky PR Comment - # Fork PRs have a read-only GITHUB_TOKEN, so they cannot update comments. - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -120,7 +110,7 @@ jobs: benchmark-main: name: Publish Bundle Size History - if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && github.repository_owner == 'TanStack' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'TanStack' runs-on: ubuntu-latest permissions: contents: write @@ -135,7 +125,7 @@ jobs: uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main - name: Measure Bundle Size - run: pnpm benchmark:bundle-size --outputStyle=stream --skipRemoteCache + run: pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache - name: Publish Benchmark Dashboard uses: benchmark-action/github-action-benchmark@52576c92bccf6ac60c8223ec7eb2565637cae9ba # v1.22.1 with: diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/client-nav-benchmarks.yml similarity index 88% rename from .github/workflows/benchmarks.yml rename to .github/workflows/client-nav-benchmarks.yml index bbc3a1fa24..a56bb70334 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/client-nav-benchmarks.yml @@ -18,18 +18,9 @@ on: pull_request: paths: - 'packages/**' - - '!packages/**/tests/**' - - '!packages/**/__tests__/**' - - '!packages/**/*.test.*' - 'benchmarks/**' - - '.nvmrc' workflow_dispatch: -concurrency: - group: benchmarks-${{ github.ref }} - cancel-in-progress: false - queue: single - permissions: contents: read # required for actions/checkout id-token: write # required for OIDC authentication with CodSpeed @@ -81,8 +72,7 @@ jobs: @benchmarks/${{ matrix.benchmark }}:build:${{ matrix.framework }} - name: Run ${{ matrix.benchmark }}:${{ matrix.framework }} CodSpeed benchmark - uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1 - timeout-minutes: 20 + uses: CodSpeedHQ/action@9d332c4d90b43981c3e55ae8e38e68709996240f # v4.17.0 with: mode: ${{ matrix.mode }} run: >- diff --git a/.github/workflows/compiler-platforms.yml b/.github/workflows/compiler-platforms.yml deleted file mode 100644 index ad70e39bb6..0000000000 --- a/.github/workflows/compiler-platforms.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Compiler Platforms - -# The main PR workflow only runs on Linux x64 (glibc). The compilers load a -# native Yuku binary per platform and handle platform-specific paths, so run -# their unit tests and a Vite and Rsbuild production build on the other -# platforms we ship to. - -on: - pull_request: - paths: - - 'packages/router-utils/**' - - 'packages/router-generator/**' - - 'packages/router-plugin/**' - - 'packages/start-plugin-core/**' - - 'pnpm-lock.yaml' - - '.github/workflows/compiler-platforms.yml' - schedule: - # Weekly, to catch new Yuku releases and runner image updates - - cron: '0 6 * * 1' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -env: - NX_DAEMON: 'false' - NX_NO_CLOUD: 'true' - -defaults: - run: - shell: bash - -jobs: - compiler: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - # actions/setup-node only ships glibc builds, so musl uses Alpine's Node image - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - include: - - name: Windows x64 - os: windows-latest - - name: macOS arm64 - os: macos-latest - - name: Linux arm64 - os: ubuntu-24.04-arm - - name: Linux x64 musl - os: ubuntu-latest - container: node:24.8.0-alpine3.22@sha256:3e843c608bb5232f39ecb2b25e41214b958b0795914707374c8acc28487dea17 - steps: - - name: Install system packages - if: ${{ matrix.container }} - shell: sh - run: apk add --no-cache bash git - - name: Keep LF line endings - # Snapshots are stored with LF. Windows runners check out CRLF by default, - # and with `* text=auto` disabling autocrlf alone still uses the native eol - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: Setup pnpm - if: ${{ !matrix.container }} - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1 - - name: Setup Node - if: ${{ !matrix.container }} - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version-file: .nvmrc - package-manager-cache: false - - name: Setup pnpm (container) - if: ${{ matrix.container }} - run: npm install --global "$(node -p "require('./package.json').packageManager")" - - name: Install dependencies - run: >- - pnpm install --frozen-lockfile - --filter . - --filter "@tanstack/router-utils..." - --filter "@tanstack/router-generator..." - --filter "@tanstack/router-plugin..." - --filter "@tanstack/start-plugin-core..." - --filter "tanstack-react-start-e2e-basic..." - - name: Unit tests - run: >- - pnpm nx run-many --targets=test:unit - --projects=@tanstack/router-utils,@tanstack/router-generator,@tanstack/router-plugin,@tanstack/start-plugin-core - --skip-nx-cache --outputStyle=static - - name: Production builds - run: >- - pnpm nx run-many --targets=build:vite:ssr,build:rsbuild:ssr - --projects=tanstack-react-start-e2e-basic - --skip-nx-cache --outputStyle=static diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index fde1100409..d8c779b170 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,8 +9,6 @@ permissions: jobs: labeler: - # Fork PRs have a read-only GITHUB_TOKEN, so they cannot update labels. - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ubuntu-latest steps: - name: Labeller diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ae19b4f0d2..71026a0a92 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,13 +10,6 @@ concurrency: env: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} SERVER_PRESET: 'node-server' - # Enable dynamic task packing for distributed CI. - NX_CLOUD_AGENT_TASK_QUEUE: true - NX_CLOUD_AUTO_TASK_PACKING: true - NX_CLOUD_AGENT_UNCAPPED_GROUP_WORK: true - NX_CLOUD_PACKING_MEM_MULTIPLIER: 1.5 - NX_CLOUD_BUFFER_TASK_COMPLETIONS: true - NX_CLOUD_CONTINUOUS_ASSIGNMENT: true permissions: contents: read @@ -33,8 +26,8 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Start Nx Workers - run: npx nx-cloud start-workers + - name: Start Nx Agents + run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" - name: Setup Tools uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main - name: Get base and head commits for `nx affected` @@ -43,9 +36,9 @@ jobs: main-branch-name: main - name: Run Checks run: pnpm run test:pr --parallel=3 - - name: Stop Nx Workers + - name: Stop Nx Agents if: ${{ always() }} - run: npx nx-cloud stop-all-workers + run: npx nx-cloud stop-all-agents preview: name: Preview runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 70028b2860..1699592784 100644 --- a/.gitignore +++ b/.gitignore @@ -66,7 +66,6 @@ nx-cloud.env .nx/workspace-data .nx/polygraph .nx/self-healing -.nx/migrate-runs gpt/db.json diff --git a/.nvmrc b/.nvmrc index 63f87c20ef..b404027604 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -26.12.1 +24.8.0 diff --git a/.nx/ci-config.yaml b/.nx/ci-config.yaml deleted file mode 100644 index 2f0783feb4..0000000000 --- a/.nx/ci-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -dte: - distribute-on: - small-changeset: 6 linux-medium-js - medium-changeset: 12 linux-medium-js - large-changeset: 18 linux-medium-js diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml new file mode 100644 index 0000000000..786111053d --- /dev/null +++ b/.nx/workflows/dynamic-changesets.yaml @@ -0,0 +1,4 @@ +distribute-on: + small-changeset: 4 linux-medium-js + medium-changeset: 8 linux-medium-js + large-changeset: 14 linux-medium-js diff --git a/.nx/workflows/ultracache-config.yaml b/.nx/workflows/ultracache-config.yaml deleted file mode 100644 index b3ed223621..0000000000 --- a/.nx/workflows/ultracache-config.yaml +++ /dev/null @@ -1,124 +0,0 @@ -ignore-reads: - - e2e/.gitignore - - '**/src/routeTree.gen.ts' -ignore-writes: - - '**/src/routeTree.gen.ts' -task-exclusions: - - target: test:build - ignore-reads: - - LICENSE - # HMR tests edit these inputs in place and restore their original contents. - # Keep them out of cached outputs so cache replay never overwrites source. - - project: tanstack-react-start-e2e-deferred-hydration - target: test:e2e - ignore-writes: - - e2e/react-start/deferred-hydration/src/routes/components.tsx - - project: tanstack-react-start-e2e-hmr - target: test:e2e - ignore-writes: &hmr-source-writes - - e2e/react-start/hmr/src/components/AliasedRouteImportChildPanel.tsx - - e2e/react-start/hmr/src/components/AliasedRouteImportParentPanel.tsx - - e2e/react-start/hmr/src/hmr/server-fn-hmr-factory.ts - - e2e/react-start/hmr/src/routes/__root.tsx - - e2e/react-start/hmr/src/routes/child.tsx - - e2e/react-start/hmr/src/routes/component-hmr-inline-error-split.tsx - - e2e/react-start/hmr/src/routes/component-hmr-inline-nosplit.tsx - - e2e/react-start/hmr/src/routes/component-hmr-inline-split.tsx - - e2e/react-start/hmr/src/routes/component-hmr-lowercase-named-split.tsx - - e2e/react-start/hmr/src/routes/component-hmr-named-error-split.tsx - - e2e/react-start/hmr/src/routes/component-hmr-named-nosplit.tsx - - e2e/react-start/hmr/src/routes/component-hmr-named-split.tsx - - e2e/react-start/hmr/src/routes/index.tsx - - e2e/react-start/hmr/src/routes/inputs.tsx - - project: tanstack-react-start-e2e-hmr - target: test:e2e--vite-ssr - ignore-writes: *hmr-source-writes - - project: tanstack-react-start-e2e-hmr - target: test:e2e--vite-ssr--bundled-dev - ignore-writes: *hmr-source-writes - - project: tanstack-react-start-e2e-hmr - target: test:e2e--rsbuild-ssr - ignore-writes: *hmr-source-writes - - project: tanstack-react-start-e2e-rsbuild - target: test:e2e--rsbuild-ssr - ignore-writes: - - e2e/react-start/rsbuild/src/routes/index.tsx - - project: tanstack-react-start-e2e-server-functions - target: test:e2e - ignore-writes: - - e2e/react-start/server-functions/src/routes/consistent.tsx - # Scaffolding tests deliberately populate tracked empty route fixtures. - - project: '@tanstack/router-generator' - target: test:unit - ignore-writes: - - packages/router-generator/tests/generator/custom-scaffolding/routes/__root.tsx - - packages/router-generator/tests/generator/custom-scaffolding/routes/api/bar.tsx - - packages/router-generator/tests/generator/custom-scaffolding/routes/foo.lazy.tsx - - packages/router-generator/tests/generator/custom-scaffolding/routes/index.tsx - # These reads are of scratch files created by the same test invocation. - - project: tanstack-solid-start-e2e-basic-auth - target: test:e2e - ignore-reads: - - e2e/solid-start/basic-auth/.tmp/dev.db - - project: tanstack-vue-start-e2e-basic-auth - target: test:e2e - ignore-reads: - - e2e/vue-start/basic-auth/.tmp/dev.db - - project: '@tanstack/router-generator' - target: test:unit - ignore-reads: - - packages/router-generator/tests/generator/file-modification/routes/[(]test[)]/initiallyEmpty.tsx - - packages/router-generator/tests/generator/file-modification/routes/[(]test[)]/initiallyEmpty.lazy.tsx - # Mutable counters are scratch state, not artifacts to replay from cache. - - project: tanstack-react-start-e2e-basic-tsr-config - target: test:e2e - ignore-reads: - - e2e/react-start/basic-tsr-config/count.txt - ignore-writes: - - e2e/react-start/basic-tsr-config/count.txt - - project: tanstack-solid-start-e2e-basic-tsr-config - target: test:e2e - ignore-reads: - - e2e/solid-start/basic-tsr-config/count.txt - ignore-writes: - - e2e/solid-start/basic-tsr-config/count.txt - - project: tanstack-vue-start-e2e-basic-tsr-config - target: test:e2e - ignore-reads: - - e2e/vue-start/basic-tsr-config/count.txt - ignore-writes: - - e2e/vue-start/basic-tsr-config/count.txt - # Paraglide downloads compiler plugins from the URLs in settings.json. - # Ignore warm-cache reads; the settings remain inputs and cache files outputs. - - project: tanstack-react-start-e2e-i18n-paraglide - target: build - ignore-reads: - - e2e/react-start/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-router-e2e-react-i18n-paraglide - target: build - ignore-reads: - - e2e/react-router/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-react-start-e2e-i18n-paraglide - target: test:e2e - ignore-reads: - - e2e/react-start/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-router-e2e-react-i18n-paraglide - target: test:e2e - ignore-reads: - - e2e/react-router/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-router-i18n-paraglide - target: build - ignore-reads: - - examples/react/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-start-i18n-paraglide - target: build - ignore-reads: - - examples/react/start-i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-router-solid-i18n-paraglide - target: build - ignore-reads: - - examples/solid/i18n-paraglide/project.inlang/cache/plugins/* - - project: tanstack-solid-start-i18n-paraglide - target: build - ignore-reads: - - examples/solid/start-i18n-paraglide/project.inlang/cache/plugins/* diff --git a/.nxignore b/.nxignore new file mode 100644 index 0000000000..867e529a65 --- /dev/null +++ b/.nxignore @@ -0,0 +1,23 @@ +# Solid v2 migration: temporarily excluded apps. +# +# These apps depend on third-party packages that do not yet support SolidJS v2 +# (solid-js@2.x). They cannot build against the v2 catalog and are excluded from +# the Nx graph (build + e2e) until the upstream deps ship Solid v2 support. +# Re-include each one by deleting its line once its blocking dep is Solid-2 ready. + +# solid-motionone (peer solid-js ^1.8.0, no Solid 2 release) +examples/solid/with-framer-motion + +# convex-solidjs@0.0.3 (peer solid-js ^1.6.0, imports solid-js/web) +examples/solid/start-convex-better-auth + +# @tanstack/solid-virtual (no Solid 2 release; imports solid-js/store) +examples/solid/scroll-restoration +e2e/solid-router/basic-scroll-restoration + +# @tanstack/solid-devtools@0.7.0 (devtools shell, peer solid-js >=1.9.7) +examples/solid/start-bun +examples/solid/start-i18n-paraglide + +# @sentry/solid@10.x (imports splitProps from solid-js) +e2e/solid-router/sentry-integration diff --git a/.prettierignore b/.prettierignore index de501452ad..65991e1964 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,4 @@ node_modules /.nx/workspace-data **/src/routeTree.gen.ts packages/router-plugin/tests/**/test-files/** -.nx/self-healing - -# Preserve the pinned upstream URL fixtures byte for byte. -packages/router-core/tests/fixtures/wpt-url/urltestdata*.json +.nx/self-healing \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index f47b5103e1..490cb691d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,41 +1,177 @@ # AGENTS.md -## Scope +## Project overview -- Read applicable nested `AGENTS.md` files before editing or testing a subtree. -- Shared routing belongs in `packages/router-core`; check React, Solid, and Vue bindings for shared changes. Shared Start runtime/build logic lives in `packages/start-*-core`. +TanStack Router is a type-safe router with built-in caching and URL state management for React and Solid applications. This monorepo contains two main products: -## Work and validation +- **TanStack Router** - Core routing library with type-safe navigation, search params, and path params +- **TanStack Start** - Full-stack framework built on top of TanStack Router -- Start bug fixes with a failing regression test that uses only public APIs to reproduce and assert user- or developer-visible behavior. Do not manufacture bugs by mutating internals. Establish whether real usage can reach the failing state before adding runtime handling; simplify handling of states proven unreachable. -- When removing an API, option, or behavior, delete its tests. Never add tests that assert the removed thing is gone, such as `not.toHaveProperty('oldName')`, a type error for the old call, or a runtime throw. -- For suspected dependency issues, verify the upstream root cause, then propose an upstream fix to the user, including for other `@tanstack/*` packages. **Never implement a workaround in this repository unless the user explicitly authorizes it.** -- During debugging/prototyping, keep fixes aligned with the PR's intended architecture. If making a test pass requires another flag, counter, copied deadline, or duplicate completion authority, stop and consolidate state and ownership. Remove superseded paths instead of accumulating patches and bundle growth. -- Use Node from `.nvmrc` and pnpm from root `package.json`. Install at the root with `CI=1 pnpm install --frozen-lockfile`. -- For sandbox-blocked registry/store access, escalate the same command; report the blocker if unavailable. Do not change stores, delete dependencies/lockfiles, use `--force`/`--ignore-scripts`, or weaken workspace trust/build policies to bypass it. -- Never manually edit `pnpm-lock.yaml` or any `routeTree.gen.ts`. Regenerate the lockfile with `pnpm install --no-frozen-lockfile` after intentional dependency changes; regenerate route trees through app builds/dev servers or the generator fixture harness. -- Always use control-flow braces. Run `pnpm format` before validation. -- Use Nx: workspace imports consume built packages, so direct runners can test stale dependencies. Inspect resolved targets with `pnpm nx show project --json`; some are inferred. -- Run finite validation through `run-many` with explicit projects and targets, including a single project/target. Nx automatically selects `summary` output when it detects an AI agent: omit `--outputStyle` for normal runs. Read the reported full log files for failures; use `--outputStyle=summary` if agent detection is unavailable. -- Use `--outputStyle=static` or `pnpm nx run :` only when diagnosing a task and its full output is needed. Continuous/watch targets may use live output. +## Setup commands -```sh -CI=1 NX_DAEMON=false pnpm nx run-many -p -t --skipRemoteCache -``` +- Install deps: `pnpm install` +- Setup e2e testing: `pnpm exec playwright install` +- Build packages: `pnpm build` (affected) or `pnpm build:all` (force all) +- Start dev server: `pnpm dev` +- Run tests: `pnpm test` -- Run one Nx command at a time. For a ~20-second startup/graph stall, stop, run `pnpm nx reset`, and retry once, then escalate. Do not apply that timeout to running tests. -- For code changes, run affected packages' `test:unit`, `test:types`, and `test:eslint` where available, including affected consumers; use `test:e2e` for browser/app behavior and `test:build` for exports/build changes. Root `pnpm test` includes the full e2e suite. Published-code changes require `pnpm changeset`. +## Code style -## Runtime rules +- TypeScript strict mode with extensive type safety +- Framework-agnostic core logic separated from React/Solid bindings +- Type-safe routing with search params and path params +- Use workspace protocol for internal dependencies (`workspace:*`) +- Always use curly braces for `if`, `else`, loops, and similar control statements. Never write one-line bodies like `if (foo) x = 1`. -- Import `isServer` from `@tanstack/router-core/isServer`. Conditional exports select: `development` → `undefined`; server (`workerd`, `worker`, `deno`, `node`, `bun`) → `true` except `NODE_ENV=test` → `undefined`; browser/fallback → `false`. `development` wins; `NODE_ENV=development` alone does not select it. -- Keep `isServer ?? router.isServer` directly in each branch condition for dead-code elimination; negate the whole expression for client branches. Never extract it into a variable (e.g. `const serverRendering = isServer ?? router.isServer`) or helper. Without a router, inline `isServer ?? typeof window === 'undefined'` (or the existing `document` check). Keep the constant first and use `??`, never `||`. -- **Never create UI/router reactivity on the server, including development/tests.** Branch before reactive setup; use direct reads and core non-reactive stores. Required transport listeners are allowed only with request-scoped lifetimes and cleanup. -- Shared route definitions/build metadata must not acquire request/user data. Keep it on the request's Router, context, or QueryClient. -- HMR can replace code while caches and pending work survive. Invalidate derived state or bypass caching in development; reject stale async results while preserving intentional HMR identities/state. -- Gate developer diagnostics and message construction with direct `process.env.NODE_ENV !== 'production'` checks. Preserve required validation/throws in production (e.g. detailed development error, compact `invariant()` failure). `!== 'development'` also enables the guarded code in tests; preserve existing dev-server mode gates. +## Dev environment tips -## Performance and final bundle pass +- This is a pnpm workspace monorepo with packages organized by functionality +- Nx provides caching, affected testing, targeting, and parallel execution for efficiency +- Use `pnpm nx show projects` to list all available packages +- Target specific packages: `pnpm nx run @tanstack/react-router:test:unit` +- Target multiple packages: `pnpm nx run-many --target=test:eslint --projects=@tanstack/history,@tanstack/router-core` +- Run affected tests only: `pnpm nx affected --target=test:unit` +- Exclude patterns: `pnpm nx run-many --target=test:unit --exclude="examples/**,e2e/**"` +- Navigate to examples and run `pnpm dev` to test changes: `cd examples/react/basic && pnpm dev` +- **Granular unit testing through Nx (recommended):** + - Specific files: `pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx tests/Scripts.test.tsx` + - Test patterns: `pnpm nx run @tanstack/react-router:test:unit -- tests/ClientOnly.test.tsx -t "should render fallback"` + - Name patterns: `pnpm nx run @tanstack/react-router:test:unit -- -t "navigation"` (all tests with "navigation" in name) + - Exclude patterns: `pnpm nx run @tanstack/react-router:test:unit -- --exclude="**/*link*" tests/` + - List tests: `pnpm nx run @tanstack/react-router:test:unit -- list tests/link.test.tsx` (or `-- list` for all) +- **Available test targets per package:** `test:unit`, `test:types`, `test:eslint`, `test:build`, `test:perf`, `build` +- **Testing strategy:** Package level (nx) → File-level args via nx → Test-level args (`-t`) via nx → Pattern-level args (`--exclude`) via nx +- **Agent execution guardrails (important):** + - Always prefer `pnpm nx ...` over `npx nx ...`. + - Prefer Nx targets over direct test runners so task dependencies (including required builds) remain in the graph. + - In sandbox, run Nx with `CI=1 NX_DAEMON=false pnpm nx run : --outputStyle=stream --skipRemoteCache` + - Run only one Nx command at a time. + - If an Nx command shows no output for ~20 seconds, stop, run `pnpm nx reset` once, and retry once. + - Do not loop retries indefinitely. If it still hangs or sandbox blocks graph/daemon behavior, request escalation immediately. -- For runtime/memory changes, compare identical baseline/candidate workloads using the relevant [benchmark guide](benchmarks/AGENTS.md): client navigation, Start SSR, or memory. Add coverage for unmeasured mechanisms. -- **Last phase for every change affecting emitted client JavaScript**, including core/build transforms: complete the full [bundle-size-optimization skill](.agents/skills/bundle-size-optimization/SKILL.md) after correctness and performance validation. The full workflow is mandatory. +## Testing instructions + +- **Critical**: Always run unit and type tests during development - do not proceed if they fail +- **Test types:** `pnpm test:unit`, `pnpm test:types`, `pnpm test:eslint`, `pnpm test:e2e`, `pnpm test:build` +- **Full CI suite:** `pnpm test:ci` +- **Fix formatting:** `pnpm format` +- **Efficient targeted testing workflow:** + 1. **Affected only:** `pnpm nx affected --target=test:unit` (compares to main branch) + 2. **Specific packages:** `pnpm nx run @tanstack/react-router:test:unit` + 3. **Specific files:** `pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx` + 4. **Specific patterns:** `pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx -t "preloading"` +- **Pro tips:** + - Use `pnpm nx run @tanstack/react-router:test:unit -- list` to explore available tests before running + - Use `-t "pattern"` to focus on specific functionality during development + - Use `--exclude` patterns to skip unrelated tests + - Keep all test filtering arguments behind `pnpm nx run ... -- ...` for maximum precision while preserving task dependencies +- **Example workflow:** `pnpm nx run @tanstack/react-router:test:unit` → `pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx` → `pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx -t "preloading"` + +## PR instructions + +- Always run `pnpm test:eslint`, `pnpm test:types`, and `pnpm test:unit` before committing +- Test changes in relevant example apps: `cd examples/react/basic && pnpm dev` +- Update corresponding documentation in `docs/` directory when adding features +- Add or update tests for any code changes +- Use internal docs links relative to `docs/` folder (e.g., `./guide/data-loading`) + +## Package structure + +**Core packages:** + +- `packages/router-core/` - Framework-agnostic core router logic +- `packages/react-router/`, `packages/solid-router/` - React/Solid bindings and components +- `packages/history/` - Browser history management + +**Tooling:** + +- `packages/router-cli/` - CLI tools for code generation +- `packages/router-generator/` - Route generation utilities +- `packages/router-plugin/` - Universal bundler plugins (Vite, Webpack, ESBuild, Rspack) +- `packages/virtual-file-routes/` - Virtual file routing system + +**Developer experience:** + +- `packages/router-devtools/`, `packages/*-router-devtools/` - Development tools +- `packages/eslint-plugin-router/` - ESLint rules for router + +**Validation adapters:** + +- `packages/zod-adapter/`, `packages/valibot-adapter/`, `packages/arktype-adapter/` + +**Start framework:** + +- `packages/*-start/`, `packages/start-*/` - Full-stack framework packages + +**Examples & testing:** + +- `examples/react/`, `examples/solid/` - Example applications (test changes here) +- `e2e/` - End-to-end tests (requires Playwright) +- `docs/router/`, `docs/start/` - Documentation with React/Solid subdirectories + +**Dependencies:** Uses workspace protocol (`workspace:*`) - core → framework → start packages + +## Common development tasks + +**Adding new routes:** + +- Use file-based routing in `src/routes/` directories +- Or use code-based routing with route definitions +- Run route generation with CLI tools + +**Testing changes:** + +- Build packages: `pnpm build` or `pnpm dev` (watch mode) +- Run example apps to test functionality +- Use devtools for debugging router state + +**Documentation updates:** + +- Update relevant docs in `docs/` directory +- Ensure examples reflect documentation changes +- Test documentation links and references +- Use relative links to `docs/` folder format + +## Framework-specific notes + +**React:** + +- Uses React Router components and hooks +- Supports React Server Components (RSC) +- Examples include React Query integration +- Package: `@tanstack/react-router` + +**Solid:** + +- Uses Solid Router components and primitives +- Supports Solid Start for full-stack applications +- Examples include Solid Query integration +- Package: `@tanstack/solid-router` + +## Environment requirements + +- **Node.js** - Required for development +- **pnpm** - Package manager (required for workspace features) +- **Playwright** - Required for e2e tests (`pnpm exec playwright install`) + +## Key architecture patterns + +- **Type Safety**: Extensive TypeScript for type-safe routing +- **Framework Agnostic**: Core logic separated from framework bindings +- **Plugin Architecture**: Universal bundler plugins using unplugin +- **File-based Routing**: Support for both code-based and file-based routing +- **Search Params**: First-class support for type-safe search parameters + +## Development workflow + +1. **Setup**: `pnpm install` and `pnpm exec playwright install` +2. **Build**: `pnpm build:all` or `pnpm dev` for watch mode +3. **Test**: Make changes and run relevant tests (use nx for targeted testing) +4. **Examples**: Navigate to examples and run `pnpm dev` to test changes +5. **Quality**: Run `pnpm test:eslint`, `pnpm test:types`, `pnpm test:unit` before committing + +## References + +- **Documentation**: https://tanstack.com/router +- **GitHub**: https://github.com/TanStack/router +- **Discord Community**: https://discord.com/invite/WrRKjPJ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b6e808af1..c28d01241b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,95 +1,30 @@ -# Contributing to TanStack Router +# Contributing -TanStack Router is a community project. Contributions to both TanStack Router and TanStack Start are welcome. - -## Setup - -1. Clone the repository: - - ```sh - gh repo clone TanStack/router - ``` - -2. Install [Node.js](https://nodejs.org/en/) and [pnpm](https://pnpm.io/installation). This repository requires pnpm `11.x.x` or newer. -3. Install dependencies: - - ```sh - pnpm install - ``` - - This installs dependencies for the entire monorepo, including examples. Workspace dependencies are linked automatically. - -4. Install the Playwright browsers if you will run end-to-end tests: - - ```sh - pnpm exec playwright install - ``` - -5. Create a branch for your changes: - - ```sh - git checkout -b my-new-branch - ``` - -## Before you start - -- Search the [open and closed issues](https://github.com/TanStack/router/issues?q=is%3Aissue) before reporting a bug. If it has not already been reported, use the [bug report template](https://github.com/TanStack/router/issues/new?template=bug_report.yml). -- Search the [open and closed pull requests](https://github.com/TanStack/router/pulls?q=is%3Apr) before starting work to avoid duplicating an existing contribution. -- Pull requests that require API changes must first be proposed as an issue and receive maintainer sign-off before implementation begins. - -## Pull request guidelines - -Every pull request must follow the [TanStack Router pull request template](.github/pull_request_template.md). Complete its description and checklist without removing or bypassing the required sections. - -- Keep each pull request focused on one change or topic. Pull requests that combine unrelated changes will be closed with a request to split them into separately reviewable contributions. -- Write a concise description that clearly explains what changed and why. Follow the sections in the pull request template; a long, unstructured description makes a contribution harder to review. -- Every change that affects a published package must include a changeset. Create it with `pnpm changeset`; documentation, CI, examples, and development-only changes do not require one. - -## Development - -- `pnpm build:all` builds all packages. -- `pnpm build` runs the cached Nx build for affected packages. -- `pnpm dev` builds the packages and starts the development watcher. - -To run an example application, move into its directory and start its development server. For example: - -```sh -cd examples/react/basic -pnpm dev -``` - -## Testing and linting - -Run the checks relevant to your changes while developing: - -- `pnpm test:eslint` checks linting for affected packages. -- `pnpm test:types` checks types for affected packages. -- `pnpm test:unit` runs unit tests for affected packages. -- `pnpm test:build` checks builds for affected packages. -- `pnpm test:e2e` runs end-to-end tests and requires the Playwright browsers. - -Before opening a pull request, run at least: - -```sh -pnpm test:eslint -pnpm test:types -pnpm test:unit -``` - -To run the full CI test suite, use `pnpm test:ci`. For faster feedback, use an Nx target for a specific package or pass a test file or test name after `--`. For example: - -```sh -pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx -pnpm nx run @tanstack/react-router:test:unit -- tests/link.test.tsx -t "preloading" -``` - -Add appropriate unit tests for isolated behavior and end-to-end tests for browser or application workflows. Test relevant example applications when the change affects them. - -## Documentation - -Update the relevant documentation for user-facing changes. Documentation lives in the `docs/` directory, with separate sections for Router and Start. Use relative links within the `docs/` directory, such as `./guide/data-loading`. - -The documentation sites are hosted on [tanstack.com](https://tanstack.com), which is a [TanStack Start application](https://github.com/TanStack/tanstack.com). To preview documentation changes locally, clone both repositories as siblings: +- Clone the repo + - `gh repo clone TanStack/router` +- Ensure `node` is installed + - https://nodejs.org/en/ +- Ensure `pnpm` is installed + - https://pnpm.io/installation + - Why? We use `pnpm` to manage workspace dependencies. It's easily the best monorepo/workspace experience available as of when this was written. +- Install dependencies + - `pnpm install` + - This installs dependencies for all of the packages in the monorepo, even examples! + - Dependencies inside of the packages and examples are automatically linked together as local/dynamic dependencies. +- Install test dependencies + - `pnpm exec playwright install` (required for e2e tests) +- Run the build or dev watcher + - `pnpm build:all` (build all packages) or + - `pnpm build` (cached build with [nx affected](https://nx.dev/nx-api/nx/documents/affected)) or + - `pnpm dev` +- Navigate to an example + - `cd examples/react/basic` +- Run the example + - `pnpm dev` +- Make changes to the code + - If you ran `pnpm dev` the dev watcher will automatically rebuild the code that has changed +- Editing the docs locally and previewing the changes + - The documentations for all the TanStack projects are hosted on [tanstack.com](https://tanstack.com), which is a TanStack Start application (https://github.com/TanStack/tanstack.com). You need to run this app locally to preview your changes in the `TanStack/router` docs. > [!NOTE] > The website fetches the doc pages from GitHub in production, and searches for them at `../router/docs` in development. Your local clone of `TanStack/router` needs to be in the same directory as the local clone of `TanStack/tanstack.com`. @@ -118,7 +53,7 @@ git clone git@github.com:TanStack/tanstack.com.git --depth=1 --single-branch --b > [!NOTE] > Your `tanstack` directory should look like this: > -> ```text +> ``` > tanstack/ > | > +-- router/ (<-- this directory cannot be called anything else!) @@ -140,21 +75,6 @@ pnpm dev > [!WARNING] > You will need to update the `docs/(router or start)config.json` file (in `TanStack/router`) if you add a new documentation page! -## AI-assisted contributions +You can see the whole process in the screen capture below: - - -AI tools can be useful for exploring the codebase, drafting changes, and writing tests. They do not replace the contributor's responsibility for the result. - -1. **Keep the contribution in your own voice**. Review and rewrite generated code comments, issue reports, and pull request descriptions so they reflect what you actually mean. -2. **Keep ownership of technical decisions**. Understand every change, verify its behavior with the appropriate tests and documentation, and be ready to explain it during review. -3. **Do not paste LLM output verbatim into the codebase or a contribution**. Treat generated text and code as a draft: check its claims, adapt it to the repository, and remove anything you cannot justify. Issues or pull requests that appear to contain unreviewed LLM output may be closed without further review. -4. **Do not mass-submit unrelated or low-quality AI-generated pull requests**. We treat that behavior as spam and may close the pull requests, block the contributor, and report the GitHub account. - -AI-assisted contributions follow the same standards for correctness, testing, documentation, and review as every other contribution. +https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af275f7a269b diff --git a/README.md b/README.md index 736715b12a..8dd7deef41 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,10 @@ - - - - TanStack Router - + ## TanStack Router @@ -33,20 +23,10 @@ A modern router designed for type safety, data‑driven navigation, and seamless - - - - TanStack Start - + ## TanStack Start diff --git a/_artifacts/domain_map.yaml b/_artifacts/domain_map.yaml index 0b2672f0c6..4b5d6f8386 100644 --- a/_artifacts/domain_map.yaml +++ b/_artifacts/domain_map.yaml @@ -147,15 +147,13 @@ skills: context types to not flow into loader. wrong_pattern: | createFileRoute('/posts')({ - loader: ({ context }) => - context.queryClient.query({ ...postsQuery, staleTime: 'static' }), + loader: ({ context }) => context.queryClient.ensureQueryData(postsQuery), beforeLoad: ({ context }) => ({ queryClient: context.queryClient }), }) correct_pattern: | createFileRoute('/posts')({ beforeLoad: ({ context }) => ({ queryClient: context.queryClient }), - loader: ({ context }) => - context.queryClient.query({ ...postsQuery, staleTime: 'static' }), + loader: ({ context }) => context.queryClient.ensureQueryData(postsQuery), }) source: 'docs/router/eslint/create-route-property-order.md' priority: HIGH @@ -538,7 +536,7 @@ skills: - '@tanstack/react-router-ssr-query' covers: - External cache coordination pattern - - "queryClient.query with staleTime: 'static' in loader" + - queryClient.ensureQueryData in loader - useSuspenseQuery in components - setupRouterSsrQueryIntegration - defaultPreloadStaleTime @@ -581,11 +579,11 @@ skills: priority: HIGH status: active - - mistake: 'Awaiting a fire-and-forget query in loader blocks rendering' + - mistake: 'Awaiting prefetchQuery in loader blocks rendering' mechanism: >- - For streaming/deferred patterns, start a query without awaiting - it and handle failures with catch(noop) — it starts fetching on - the server and streams without blocking. Awaiting defeats the purpose. + For streaming/deferred patterns, prefetchQuery should NOT + be awaited in the loader — it starts fetching on server + and streams without blocking. Awaiting defeats the purpose. source: 'docs/router/integrations/query.md' priority: MEDIUM status: active diff --git a/_artifacts/skill_spec.md b/_artifacts/skill_spec.md index 7eb9554a42..4503afb48a 100644 --- a/_artifacts/skill_spec.md +++ b/_artifacts/skill_spec.md @@ -83,11 +83,11 @@ TanStack Router is a type-safe router for React and Solid applications with buil ### external-data-loading (3 failure modes) -| # | Mistake | Priority | Source | Cross-skill? | -| --- | ----------------------------------------------------------- | -------- | -------------------------------- | ------------ | -| 1 | Not setting defaultPreloadStaleTime to 0 | HIGH | docs/guide/external-data-loading | — | -| 2 | Creating QueryClient outside createRouter for SSR | HIGH | docs/guide/external-data-loading | — | -| 3 | Awaiting a fire-and-forget query in loader blocks rendering | MEDIUM | docs/integrations/query | — | +| # | Mistake | Priority | Source | Cross-skill? | +| --- | ------------------------------------------------- | -------- | -------------------------------- | ------------ | +| 1 | Not setting defaultPreloadStaleTime to 0 | HIGH | docs/guide/external-data-loading | — | +| 2 | Creating QueryClient outside createRouter for SSR | HIGH | docs/guide/external-data-loading | — | +| 3 | Awaiting prefetchQuery in loader blocks rendering | MEDIUM | docs/integrations/query | — | ### auth-and-guards (3 failure modes) diff --git a/_artifacts/skill_tree.yaml b/_artifacts/skill_tree.yaml index 6f7c4c8742..b5ce76f547 100644 --- a/_artifacts/skill_tree.yaml +++ b/_artifacts/skill_tree.yaml @@ -135,6 +135,7 @@ skills: for auth state. requires: - 'router-core' + - 'router-core/data-loading' sources: - 'TanStack/router:docs/router/guide/authenticated-routes.md' - 'TanStack/router:docs/router/how-to/setup-authentication.md' @@ -246,7 +247,7 @@ skills: package: 'packages/react-router' description: >- Integrating TanStack Router with TanStack Query: queryClient - in router context, static queries and fire-and-forget queries in loaders, + in router context, ensureQueryData/prefetchQuery in loaders, useSuspenseQuery in components, defaultPreloadStaleTime: 0, setupRouterSsrQueryIntegration for SSR dehydration/hydration and streaming, per-request QueryClient isolation. diff --git a/benchmarks/AGENTS.md b/benchmarks/AGENTS.md deleted file mode 100644 index 9d56a2411a..0000000000 --- a/benchmarks/AGENTS.md +++ /dev/null @@ -1,15 +0,0 @@ -# Benchmarks - -Read the relevant README before running benchmarks. Compare baseline and candidate with the same workload and production builds; add a focused case when existing scenarios miss the changed mechanism. Keep workloads and benchmark names stable for historical comparisons. - -| Changed behavior | Guide | Nx project | -| ------------------------------------------ | ---------------------------------- | -------------------------------------------------------- | -| Standalone Router navigation/rendering CPU | [client-nav](client-nav/README.md) | `@benchmarks/client-nav` | -| Start request/SSR CPU | [ssr](ssr/README.md) | `@benchmarks/ssr` | -| Client/server retention and allocations | [memory](memory/README.md) | `@benchmarks/memory-client`, `@benchmarks/memory-server` | - -Use `test:perf:` through Nx. Plain memory runs only smoke-test; memory metrics require CodSpeed. Client navigation benchmarks do not cover Start hydration or client server-function calls. - -Run `vitest bench` directly only with `--mode benchmark`, as the Nx targets do. Vitest 5 otherwise uses Vite's `test` mode, where vite-plugin-solid injects a jest-dom setup file that benchmark packages cannot resolve. - -For bundle-size work, follow the full optimization skill required by the root guide. Full API fixtures are maintained manually: when public hooks/components change, update matching `bundle-size/scenarios/*-full/src/routes/__root.tsx` fixtures. Save baseline results separately because each run overwrites `bundle-size/results/current.json`; report final gzip deltas and explain remaining growth. diff --git a/benchmarks/README.md b/benchmarks/README.md deleted file mode 100644 index 94d2f31802..0000000000 --- a/benchmarks/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# CPU simulation benchmarks - -`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 - -Every CPU benchmark project includes `cpuSimulationExecArgv()` from -[`cpu-simulation.ts`](./cpu-simulation.ts). It augments CodSpeed's worker flags -only during CPU simulation, including the legacy `instrumentation` mode. - -The pinned CodSpeed integration supplies `--no-opt`. In Node 24 this is an alias -for `--no-turbofan`, so Maglev can still optimize and inline hot functions. The -additional `--no-maglev` keeps the optimizing compiler out of the simulation. -`--always-sparkplug` compiles baseline code on first use, so warmup does not leave -functions approaching a later tier-up or batch-compilation threshold. The worker -regression test checks that even a once-called function receives baseline code. -The integration also omits the old `--no-scavenge-task` flag on Node 20 and -newer, where V8 renamed it to `--no-minor-gc-task`. Supplying the renamed flag -keeps minor GC tied to allocation pressure instead of scheduled foreground -tasks. Both flags follow the fixes in -[CodSpeed's Node 24 support](https://github.com/CodSpeedHQ/codspeed-node/commit/e3224e7872). - -`--initial-old-space-size=512` fixes the initial/minimum old-generation -allocation budget at 512 MiB. Removing only this override after worker isolation -left two Vue SSR scenarios with same-commit spreads above 2% in five full-suite -repetitions. The paired default-heap comparison with stock incremental-marking -tasks also exceeded 2%. Runtime comparisons and tested alternatives are recorded in -[PR #8248](https://github.com/TanStack/router/pull/8248). - -This is a GC-policy tradeoff. Minor collections and allocation work remain -measured, and CodSpeed still explicitly collects before measurement. However, -V8 can skip automatic full collections below this old-generation budget, so the -benchmark can omit some eventual full-GC CPU cost from increased object -retention. Repeatability does not establish representative production GC -frequency. The flag does not preallocate 512 MiB; the existing 4096 MiB maximum -remains. See [V8's initial/minimum heap configuration](https://github.com/nodejs/node/blob/v24.8.0/deps/v8/src/heap/heap.cc#L5071). - -The configuration preserves CodSpeed's incremental-marking task settings; the -additional `--no-incremental-marking-task` from the initial stabilization proposal -has been removed. - -The flags are intentionally absent from ordinary Vitest timing and walltime runs. - -Changing simulation compiler settings changes the measurement baseline. Compare -repeatability within each configuration before interpreting performance changes -between configurations as router improvements or regressions. - -## Worker isolation - -Keep one SSR workload in each `speed*.bench.ts` file. These projects explicitly -enable Vitest isolation; CodSpeed uses the forks pool, so every file receives a -fresh worker. Multiple workloads in one file share the worker's runtime state, -even though CodSpeed collects before each measurement. Later control cases -remained noisy after the runtime flag corrections. Running the React plain -dehydration and linked-CSS controls alone reduced their observed three-run spreads -to 0.09% and 0.02% respectively. - -Variant files keep their workload names, request counts, concurrency, payloads -and assertions. CodSpeed includes the file path in a benchmark's identity, so -moved variants start a new history. The first workload keeps `speed.bench.ts`; -the additional variants have descriptive file names alongside it. Type-check -includes cover all of these files. - -## Streaming workload - -Deferred payloads in the SSR streaming scenario resolve after two task turns on -Node. A real 1 ms timer lets elapsed host time decide which concurrent requests -resolve together. Counted turns preserve the initial loading render and deferred -payloads; the existing HTML assertions check both. These benchmarks execute in -Node and use `setImmediate` directly. - -## Repeatability checks - -Dispatch the existing `Benchmarks` workflow against an unchanged branch: - -```sh -gh workflow run 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 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/bundle-size/.gitignore b/benchmarks/bundle-size/.gitignore index bd05a98cee..d5ced39aa3 100644 --- a/benchmarks/bundle-size/.gitignore +++ b/benchmarks/bundle-size/.gitignore @@ -6,6 +6,4 @@ scenarios/*/src/routeTree.gen.ts results/*.json results/*.md results/*.js -results/*.log -results/runs/ !results/.gitkeep diff --git a/benchmarks/bundle-size/README.md b/benchmarks/bundle-size/README.md index 2185d6b43f..4d4d3dc2d3 100644 --- a/benchmarks/bundle-size/README.md +++ b/benchmarks/bundle-size/README.md @@ -29,102 +29,29 @@ Each package has `minimal` and `full` scenarios: ## Local Run ```bash -pnpm benchmark:bundle-size:run +pnpm nx run @benchmarks/bundle-size:build ``` Run one or more scenarios during local optimization: ```bash -pnpm benchmark:bundle-size:run --scenario react-router.minimal -pnpm benchmark:bundle-size:run --scenario react-router.minimal,react-router.full +pnpm nx run @benchmarks/bundle-size:build -- --scenario react-router.minimal +pnpm nx run @benchmarks/bundle-size:build -- --scenario react-router.minimal,react-router.full ``` -The runner calls `measure.mjs`, which builds the selected package projects through Nx. Full runs build the package projects for all scenarios. -`pnpm benchmark:bundle-size` uses the Nx build cache for the full benchmark, then generates `current.json` with the current commit, branch, dirty status, and report timestamp. CI uses this command as well. - -Nx caches the bundles, `measurements.json`, and `benchmark-action.json`. Git metadata does not affect the build cache. The report preserves the original `measuredAt` and build duration when measurements come from cache; `generatedAt` records when the report was generated. Running `pnpm nx run @benchmarks/bundle-size:measure` directly produces only the cacheable outputs; run `node scripts/benchmarks/bundle-size/report.mjs` afterward to refresh `current.json`. - -If the required packages are already built and unchanged, skip that step: +Filtered runs build only the package projects needed by selected scenarios. Full runs build all package projects needed by all scenarios. If the required packages are already built and unchanged, skip that step: ```bash -pnpm benchmark:bundle-size:run --scenario react-router.minimal --skip-package-builds +pnpm nx run @benchmarks/bundle-size:build -- --scenario react-router.minimal --skip-package-builds ``` This writes: -- `benchmarks/bundle-size/results/measurements.json` - `benchmarks/bundle-size/results/current.json` - `benchmarks/bundle-size/results/benchmark-action.json` -- `benchmarks/bundle-size/results/measure.log` `current.json` includes run status, selected package build projects, per-scenario totals, per-file sizes, and the emitted JS files used for measurement. Dist paths use `scenarioDir`/`outDir`, e.g. `react-router.minimal` maps to `benchmarks/bundle-size/dist/react-router-minimal/`. -The runner sets `CI=1` and `NX_DAEMON=false`. Successful runs print log locations and the existing `query` or `diff` summary. -If a step fails, the runner stops with a nonzero exit code. It prints the last 40 log lines, limited to 8,000 characters. -Full stdout and stderr stay in the log files. A positive bundle-size delta does not cause failure. - -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: - -```bash -pnpm benchmark:bundle-size:run --name baseline --scenario react-router.minimal,react-router.full -``` - -After you change the implementation, compare a candidate against that baseline: - -```bash -pnpm benchmark:bundle-size:run --name candidate --baseline baseline \ - --scenario react-router.minimal,react-router.full \ - --test-projects @tanstack/router-core,@tanstack/react-router \ - -- tests/path.test.ts tests/link.test.tsx -``` - -`--test-projects` runs the selected Nx unit-test targets before measurement. Arguments after `--` go only to those tests. -Tests and measurement run sequentially. Failed tests stop the runner before measurement, so old results cannot produce a misleading diff. -Without `--test-projects`, the runner only measures bundles. Type tests, performance benchmarks, and e2e tests remain separate commands. - -Named runs store their metrics and logs in `benchmarks/bundle-size/results/runs//`. Existing named results cannot be overwritten. -Without `--name`, runs replace `current.json` and the logs for the steps they run. -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. - -For command reference, run: - -```bash -pnpm benchmark:bundle-size:run --help -``` - ## Local Query Tools ```bash @@ -133,22 +60,18 @@ 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 -pnpm benchmark:bundle-size:run --scenario react-router.minimal --analysis +pnpm nx run @benchmarks/bundle-size:build -- --scenario react-router.minimal --analysis pnpm benchmark:bundle-size:analyze --id react-router.minimal --top-sources 30 ``` -For a named run, pass `--current benchmarks/bundle-size/results/runs//current.json` to `query`, `diff`, or `analyze`. - ## CI Reporting - PR workflow generates a sticky comment with: - - current gzip, initial gzip, raw, and Brotli values - - per-metric deltas from the `main` baseline + - current gzip values + - baseline delta - inline sparkline trend - Pushes to `main` publish historical chart data to GitHub Pages via `benchmark-action/github-action-benchmark`. diff --git a/benchmarks/bundle-size/package.json b/benchmarks/bundle-size/package.json index ca34cd6cd7..373ae09aaa 100644 --- a/benchmarks/bundle-size/package.json +++ b/benchmarks/bundle-size/package.json @@ -3,35 +3,16 @@ "private": true, "type": "module", "scripts": { - "measure": "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 ../../scripts/benchmarks/bundle-size/compress.test.mjs ../../scripts/benchmarks/bundle-size/timings.test.mjs" + "build": "node ../../scripts/benchmarks/bundle-size/measure.mjs --skip-package-builds" }, "nx": { "targets": { - "measure": { - "cache": true, - "inputs": [ - "buildProduction", - "^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" - } - ], - "outputs": [ - "{projectRoot}/dist", - "{projectRoot}/results/measurements.json", - "{projectRoot}/results/benchmark-action.json" - ], + "build": { + "cache": false, "dependsOn": [ { "projects": [ "@tanstack/react-router", - "@tanstack/react-router-ssr-query", "@tanstack/react-start", "@tanstack/router-plugin", "@tanstack/solid-router", @@ -42,33 +23,24 @@ "target": "build" } ] - }, - "test:unit": { - "dependsOn": [], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/scripts/benchmarks/bundle-size/*.mjs" - ] } } }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tanstack/react-router": "workspace:^", - "@tanstack/react-router-ssr-query": "workspace:^", - "@tanstack/solid-router": "workspace:^", - "@tanstack/vue-router": "workspace:^", "@tanstack/react-start": "workspace:^", + "@tanstack/solid-router": "workspace:^", "@tanstack/solid-start": "workspace:^", + "@tanstack/vue-router": "workspace:^", "@tanstack/vue-start": "workspace:^", - "@tanstack/react-query": "catalog:", "react": "^19.0.0", "react-dom": "^19.0.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "vue": "^3.5.16" }, "devDependencies": { - "@rsbuild/core": "^2.3.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tanstack/router-plugin": "workspace:^", "@types/react": "^19.0.8", @@ -76,9 +48,8 @@ "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/benchmarks/bundle-size/scenarios/react-start-full/rsbuild.config.ts b/benchmarks/bundle-size/scenarios/react-start-full/rsbuild.config.ts index 349e11bec1..641de56234 100644 --- a/benchmarks/bundle-size/scenarios/react-start-full/rsbuild.config.ts +++ b/benchmarks/bundle-size/scenarios/react-start-full/rsbuild.config.ts @@ -6,7 +6,7 @@ const outDir = process.env.BUNDLE_SIZE_DIST_DIR ?? 'dist-rsbuild' export default defineConfig({ logLevel: 'silent', - plugins: [pluginReact(), tanstackStart()], + plugins: [pluginReact({ splitChunks: false }), tanstackStart()], output: { distPath: { root: outDir, diff --git a/benchmarks/bundle-size/scenarios/react-start-minimal/rsbuild.config.ts b/benchmarks/bundle-size/scenarios/react-start-minimal/rsbuild.config.ts index 7d27421d4d..78752d0190 100644 --- a/benchmarks/bundle-size/scenarios/react-start-minimal/rsbuild.config.ts +++ b/benchmarks/bundle-size/scenarios/react-start-minimal/rsbuild.config.ts @@ -16,7 +16,7 @@ const startOptions = clientOutput export default defineConfig({ logLevel: 'silent', - plugins: [pluginReact(), tanstackStart(startOptions)], + plugins: [pluginReact({ splitChunks: false }), tanstackStart(startOptions)], output: { distPath: { root: outDir, diff --git a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/router.tsx b/benchmarks/bundle-size/scenarios/react-start-query-integration/src/router.tsx deleted file mode 100644 index 93b95f3148..0000000000 --- a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/router.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { QueryClient } from '@tanstack/react-query' -import { createRouter } from '@tanstack/react-router' -import { setupRouterSsrQueryIntegration } from '@tanstack/react-router-ssr-query' -import { routeTree } from './routeTree.gen' - -export function getRouter() { - const queryClient = new QueryClient() - const router = createRouter({ - routeTree, - context: { queryClient }, - scrollRestoration: true, - }) - - setupRouterSsrQueryIntegration({ router, queryClient }) - - return router -} diff --git a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/__root.tsx b/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/__root.tsx deleted file mode 100644 index ff1da4c304..0000000000 --- a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/__root.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { - HeadContent, - Outlet, - Scripts, - createRootRoute, -} from '@tanstack/react-router' - -export const Route = createRootRoute({ - component: RootComponent, -}) - -function RootComponent() { - return ( - - - - - - - - - - ) -} diff --git a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/index.tsx b/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/index.tsx deleted file mode 100644 index 76fb363538..0000000000 --- a/benchmarks/bundle-size/scenarios/react-start-query-integration/src/routes/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - component: IndexComponent, -}) - -function IndexComponent() { - return
hello world
-} diff --git a/benchmarks/bundle-size/scenarios/react-start-query-integration/vite.config.ts b/benchmarks/bundle-size/scenarios/react-start-query-integration/vite.config.ts deleted file mode 100644 index d4e4cd980d..0000000000 --- a/benchmarks/bundle-size/scenarios/react-start-query-integration/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import viteReact from '@vitejs/plugin-react' -import { tanstackStart } from '@tanstack/react-start/plugin/vite' - -export default defineConfig({ - plugins: [tanstackStart(), viteReact()], -}) diff --git a/benchmarks/bundle-size/scenarios/solid-router-full/src/main.tsx b/benchmarks/bundle-size/scenarios/solid-router-full/src/main.tsx index 505f79aee0..eaa48dd6c1 100644 --- a/benchmarks/bundle-size/scenarios/solid-router-full/src/main.tsx +++ b/benchmarks/bundle-size/scenarios/solid-router-full/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' diff --git a/benchmarks/bundle-size/scenarios/solid-router-minimal/src/main.tsx b/benchmarks/bundle-size/scenarios/solid-router-minimal/src/main.tsx index 210120b3f1..f7c0b4bc7f 100644 --- a/benchmarks/bundle-size/scenarios/solid-router-minimal/src/main.tsx +++ b/benchmarks/bundle-size/scenarios/solid-router-minimal/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' diff --git a/benchmarks/bundle-size/scenarios/vue-router-full/src/routes/__root.tsx b/benchmarks/bundle-size/scenarios/vue-router-full/src/routes/__root.tsx index 0ff40aebfc..d696063083 100644 --- a/benchmarks/bundle-size/scenarios/vue-router-full/src/routes/__root.tsx +++ b/benchmarks/bundle-size/scenarios/vue-router-full/src/routes/__root.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Asset, Await, @@ -46,151 +45,143 @@ import { useTags, } from '@tanstack/vue-router' -const RootComponent = defineComponent({ - setup() { - const router = useRouter() - const [awaited] = useAwaited({ promise: Promise.resolve('ready') }) - const linkProps = useLinkProps({ to: '/' } as any) - const matchRoute = useMatchRoute() - const matches = useMatches() - const parentMatches = useParentMatches() - const childMatches = useChildMatches() - const match = useMatch({ strict: false, shouldThrow: false } as any) - const loaderDeps = useLoaderDeps({ strict: false } as any) - const loaderData = useLoaderData({ strict: false } as any) - const params = useParams({ strict: false } as any) - const search = useSearch({ strict: false } as any) - const routeContext = useRouteContext({ strict: false } as any) - const routerState = useRouterState({ - select: (state) => state.status, - } as any) - const location = useLocation() - const canGoBack = useCanGoBack() - const navigate = useNavigate() - const scrollEntry = useElementScrollRestoration({ id: 'root-scroll' }) - const tags = useTags() - - useBlocker({ - shouldBlockFn: () => false, - disabled: true, - withResolver: false, - }) - - const linkFactoryResult = linkOptions({ to: '/' } as any) - const routeMatchResult = matchRoute({ to: '/' } as any) - const SvgLink = createLink('svg') - - const hooksAndComponents = [ - useAwaited, - useLinkProps, - useMatchRoute, - useMatches, - useParentMatches, - useChildMatches, - useMatch, - useLoaderDeps, - useLoaderData, - useBlocker, - useNavigate, - useParams, - useSearch, - useRouteContext, - useRouter, - useRouterState, - useLocation, - useCanGoBack, - useElementScrollRestoration, - useTags, - Await, - CatchBoundary, - CatchNotFound, - ClientOnly, - DefaultGlobalNotFound, - ErrorComponent, - Link, - Match, - MatchRoute, - Matches, - Navigate, - Outlet, - RouterContextProvider, - ScrollRestoration, - Block, - ScriptOnce, - Asset, - HeadContent, - Scripts, - Body, - Html, - ] - - ;(globalThis as any).__TANSTACK_BUNDLE_SIZE_KEEP__ = { - hooksAndComponents, - } - - return () => { - void awaited - void linkFactoryResult - void matches.value - void parentMatches.value - void childMatches.value - void match.value - void loaderDeps.value - void loaderData.value - void params.value - void search.value - void routeContext.value - void routerState.value - void location.value - void canGoBack.value - void navigate - void scrollEntry - void tags() - void routeMatchResult.value - - return ( - <> - - {'window.__tsr_bundle_size = true'} - - home - - - - - {() => } - - }> - - - } - /> - false} disabled withResolver={false}> - {() => } - - }> - - - - - - - - -
-
hello world
-
- - ) - } - }, -}) - export const Route = createRootRoute({ component: RootComponent, }) + +function RootComponent() { + const router = useRouter() + const [awaited] = useAwaited({ promise: Promise.resolve('ready') }) + const linkProps = useLinkProps({ to: '/' } as any) + const matchRoute = useMatchRoute() + const matches = useMatches() + const parentMatches = useParentMatches() + const childMatches = useChildMatches() + const match = useMatch({ strict: false, shouldThrow: false } as any) + const loaderDeps = useLoaderDeps({ strict: false } as any) + const loaderData = useLoaderData({ strict: false } as any) + const params = useParams({ strict: false } as any) + const search = useSearch({ strict: false } as any) + const routeContext = useRouteContext({ strict: false } as any) + const routerState = useRouterState({ select: (state) => state.status } as any) + const location = useLocation() + const canGoBack = useCanGoBack() + const navigate = useNavigate() + const scrollEntry = useElementScrollRestoration({ id: 'root-scroll' }) + const tags = useTags() + + useBlocker({ + shouldBlockFn: () => false, + disabled: true, + withResolver: false, + }) + + const linkFactoryResult = linkOptions({ to: '/' } as any) + const routeMatchResult = matchRoute({ to: '/' } as any) + const SvgLink = createLink('svg') + + const hooksAndComponents = [ + useAwaited, + useLinkProps, + useMatchRoute, + useMatches, + useParentMatches, + useChildMatches, + useMatch, + useLoaderDeps, + useLoaderData, + useBlocker, + useNavigate, + useParams, + useSearch, + useRouteContext, + useRouter, + useRouterState, + useLocation, + useCanGoBack, + useElementScrollRestoration, + useTags, + Await, + CatchBoundary, + CatchNotFound, + ClientOnly, + DefaultGlobalNotFound, + ErrorComponent, + Link, + Match, + MatchRoute, + Matches, + Navigate, + Outlet, + RouterContextProvider, + ScrollRestoration, + Block, + ScriptOnce, + Asset, + HeadContent, + Scripts, + Body, + Html, + ] + + ;(globalThis as any).__TANSTACK_BUNDLE_SIZE_KEEP__ = { + hooksAndComponents, + } + + void awaited + void linkFactoryResult + void matches.value + void parentMatches.value + void childMatches.value + void match.value + void loaderDeps.value + void loaderData.value + void params.value + void search.value + void routeContext.value + void routerState.value + void location.value + void canGoBack.value + void navigate + void scrollEntry + void tags() + void routeMatchResult.value + + return ( + <> + + {'window.__tsr_bundle_size = true'} + + home + + + + {() => } + }> + + + } + /> + false} disabled withResolver={false}> + {() => } + + }> + + + + + + + + +
+
hello world
+
+ + ) +} diff --git a/benchmarks/bundle-size/scenarios/vue-start-full/src/routes/__root.tsx b/benchmarks/bundle-size/scenarios/vue-start-full/src/routes/__root.tsx index 8e8870a2ce..aa0539fa1a 100644 --- a/benchmarks/bundle-size/scenarios/vue-start-full/src/routes/__root.tsx +++ b/benchmarks/bundle-size/scenarios/vue-start-full/src/routes/__root.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Asset, Await, @@ -69,159 +68,151 @@ const helloServerFn = createServerFn({ method: 'GET' }) return 'hello from server fn' }) -const RootComponent = defineComponent({ - setup() { - const router = useRouter() - const [awaited] = useAwaited({ promise: Promise.resolve('ready') }) - const linkProps = useLinkProps({ to: '/' } as any) - const matchRoute = useMatchRoute() - const matches = useMatches() - const parentMatches = useParentMatches() - const childMatches = useChildMatches() - const match = useMatch({ strict: false, shouldThrow: false } as any) - const loaderDeps = useLoaderDeps({ strict: false } as any) - const loaderData = useLoaderData({ strict: false } as any) - const params = useParams({ strict: false } as any) - const search = useSearch({ strict: false } as any) - const routeContext = useRouteContext({ strict: false } as any) - const routerState = useRouterState({ - select: (state) => state.status, - } as any) - const location = useLocation() - const canGoBack = useCanGoBack() - const navigate = useNavigate() - const scrollEntry = useElementScrollRestoration({ id: 'root-scroll' }) - const tags = useTags() - const invokeServerFn = useServerFn(helloServerFn) - - useBlocker({ - shouldBlockFn: () => false, - disabled: true, - withResolver: false, - }) - - const linkFactoryResult = linkOptions({ to: '/' } as any) - const routeMatchResult = matchRoute({ to: '/' } as any) - const SvgLink = createLink('svg') - - const startSurface = [createMiddleware, createServerFn, useServerFn] - const hooksAndComponents = [ - useAwaited, - useLinkProps, - useMatchRoute, - useMatches, - useParentMatches, - useChildMatches, - useMatch, - useLoaderDeps, - useLoaderData, - useBlocker, - useNavigate, - useParams, - useSearch, - useRouteContext, - useRouter, - useRouterState, - useLocation, - useCanGoBack, - useElementScrollRestoration, - useTags, - Await, - CatchBoundary, - CatchNotFound, - ClientOnly, - DefaultGlobalNotFound, - ErrorComponent, - Link, - Match, - MatchRoute, - Matches, - Navigate, - Outlet, - RouterContextProvider, - ScrollRestoration, - Block, - ScriptOnce, - Asset, - HeadContent, - Scripts, - Body, - Html, - ] - - ;(globalThis as any).__TANSTACK_BUNDLE_SIZE_KEEP__ = { - hooksAndComponents, - startSurface, - } - - return () => { - void awaited - void linkFactoryResult - void matches.value - void parentMatches.value - void childMatches.value - void match.value - void loaderDeps.value - void loaderData.value - void params.value - void search.value - void routeContext.value - void routerState.value - void location.value - void canGoBack.value - void navigate - void scrollEntry - void tags() - void routeMatchResult.value - void invokeServerFn - - return ( - - - - - - {'window.__tsr_bundle_size = true'} - - home - - - - - {() => } - - }> - - - } - /> - false} disabled withResolver={false}> - {() => } - - }> - - - - - - - - -
-
hello world
-
- - - ) - } - }, -}) - export const Route = createRootRoute({ component: RootComponent, }) + +function RootComponent() { + const router = useRouter() + const [awaited] = useAwaited({ promise: Promise.resolve('ready') }) + const linkProps = useLinkProps({ to: '/' } as any) + const matchRoute = useMatchRoute() + const matches = useMatches() + const parentMatches = useParentMatches() + const childMatches = useChildMatches() + const match = useMatch({ strict: false, shouldThrow: false } as any) + const loaderDeps = useLoaderDeps({ strict: false } as any) + const loaderData = useLoaderData({ strict: false } as any) + const params = useParams({ strict: false } as any) + const search = useSearch({ strict: false } as any) + const routeContext = useRouteContext({ strict: false } as any) + const routerState = useRouterState({ select: (state) => state.status } as any) + const location = useLocation() + const canGoBack = useCanGoBack() + const navigate = useNavigate() + const scrollEntry = useElementScrollRestoration({ id: 'root-scroll' }) + const tags = useTags() + const invokeServerFn = useServerFn(helloServerFn) + + useBlocker({ + shouldBlockFn: () => false, + disabled: true, + withResolver: false, + }) + + const linkFactoryResult = linkOptions({ to: '/' } as any) + const routeMatchResult = matchRoute({ to: '/' } as any) + const SvgLink = createLink('svg') + + const startSurface = [createMiddleware, createServerFn, useServerFn] + const hooksAndComponents = [ + useAwaited, + useLinkProps, + useMatchRoute, + useMatches, + useParentMatches, + useChildMatches, + useMatch, + useLoaderDeps, + useLoaderData, + useBlocker, + useNavigate, + useParams, + useSearch, + useRouteContext, + useRouter, + useRouterState, + useLocation, + useCanGoBack, + useElementScrollRestoration, + useTags, + Await, + CatchBoundary, + CatchNotFound, + ClientOnly, + DefaultGlobalNotFound, + ErrorComponent, + Link, + Match, + MatchRoute, + Matches, + Navigate, + Outlet, + RouterContextProvider, + ScrollRestoration, + Block, + ScriptOnce, + Asset, + HeadContent, + Scripts, + Body, + Html, + ] + + ;(globalThis as any).__TANSTACK_BUNDLE_SIZE_KEEP__ = { + hooksAndComponents, + startSurface, + } + + void awaited + void linkFactoryResult + void matches.value + void parentMatches.value + void childMatches.value + void match.value + void loaderDeps.value + void loaderData.value + void params.value + void search.value + void routeContext.value + void routerState.value + void location.value + void canGoBack.value + void navigate + void scrollEntry + void tags() + void routeMatchResult.value + void invokeServerFn + + return ( + + + + + + {'window.__tsr_bundle_size = true'} + + home + + + + {() => } + }> + + + } + /> + false} disabled withResolver={false}> + {() => } + + }> + + + + + + + + +
+
hello world
+
+ + + ) +} diff --git a/benchmarks/client-nav/README.md b/benchmarks/client-nav/README.md index ec34ecc0c1..6179c7f0b8 100644 --- a/benchmarks/client-nav/README.md +++ b/benchmarks/client-nav/README.md @@ -9,11 +9,10 @@ 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 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`. +> **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`. ## Layout @@ -39,7 +38,7 @@ scenarios/// routes/ ``` -Navigation scenario apps use file-based routing (`@tanstack/router-plugin`) with a +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 @@ -58,11 +57,9 @@ 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. | -| `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. | +| `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. | | `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). | @@ -71,14 +68,10 @@ 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. - Setup runs one warm-up lap through the sequence and asserts each step's observable output (e.g. `document.title`), so a scenario that silently stops doing its work fails instead of reporting a fast time. -- Apps are mounted and disposed outside timing by `benchLifecycle` (`benchmarks/cpu-simulation.ts`): CodSpeed measures a single invocation, so every invocation gets a freshly mounted app; plain `vitest bench` keeps one app per warmup/run phase. Bench functions must be `async` functions, because CodSpeed's Vitest 5 provider awaits only `AsyncFunction`s. - Determinism: no wall-clock timers (async work is resolved promises or counted `setTimeout(0)` hops), `staleTime`/`gcTime` only ever `0` or effectively-infinite, no `Math.random`/`Date.now` in the measured loop. Scroll restoration uses `getScrollRestorationKey: (location) => location.pathname` so its cache stays bounded (the default random per-entry key grows one cache entry per push navigation). The `mount` scenario opts out of `scrollRestoration` entirely and destroys its history on unmount — both register page-lifetime globals that would leak across its mount/unmount loop. - Push-only step laps grow jsdom's session-history entry list over a run (jsdom never truncates entries behind the current index). Per-push cost stays O(1) so timings are unaffected; only the `history` scenario needs — and has — a lap that is depth-stationary. - Calibration: pick per-iteration step counts so a bench's `vitest bench` run stays roughly between 8 and 30 seconds (long enough to average out, short enough for CI). @@ -103,7 +96,7 @@ Run a single scenario app manually (after building it through Nx): ```bash CI=1 NX_DAEMON=false pnpm nx run @benchmarks/client-nav--:build:client --outputStyle=stream --skipRemoteCache -cd benchmarks/client-nav && NODE_ENV=production vitest bench --mode benchmark --config ./scenarios///vite.config.ts +cd benchmarks/client-nav && NODE_ENV=production vitest bench --config ./scenarios///vite.config.ts ``` Run framework-specific flame benchmarks (10 second loop, profiled with `@platformatic/flame`, forced to `NODE_ENV=production`): @@ -122,186 +115,3 @@ Typecheck benchmark sources (baseline + scenarios): ```bash 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. The window's `performance.now()` is frozen, so React's - scheduler yields only to paint after commits, not after 5 ms of wall time, which CPU - instrumentation stretches by a runner-dependent factor. Each sample therefore - uses the same number of scheduler tasks. `Date.now()` is unchanged. A - 60-second watchdog fails a sample that never settles. -- **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. - -The bench's own `beforeEach`/`afterEach` hooks prepare and dispose every -sample outside timing, in both CodSpeed and ordinary Vitest runs. Per-phase -setup would let later iterations reuse an already hydrated document. The -hydration unit tests cover repeated fresh-state setup. - -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 -construction. `scenarios/mount` includes construction but also rendering and -loading. To isolate initialization, use the core construction benchmark: - -```bash -CI=1 NX_DAEMON=false pnpm nx run @tanstack/router-core:test:unit --outputStyle=stream --skipRemoteCache -- bench tests/route-tree-construction.bench.ts --run --testNamePattern=1000.routes --reporter=json --outputFile=/tmp/route-tree-construction.json -``` - -It covers 100, 1,000, and 10,000 static, dynamic, nested, or mixed routes. -The processing-only case creates fresh route objects in an untimed -`beforeEach`, then measures `processRouteTree` and `route.init`. A separate -case includes route-object creation. Neither case measures first interpolation -or navigation. Remove the name filter to run all sizes. Compare identical -benchmark sources in separate checkouts and repeat fresh processes; a cached -router or repeatedly initialized tree is not a construction baseline. - -## Opt-in React Link performance suite - -`link-performance/` contains additional client-navigation and SSR workloads for -focused Link work. They are **not included** in the regular client-nav/SSR -aggregate projects or their CodSpeed build dependencies; they only run through -the dedicated `@benchmarks/react-link-performance` targets below. Use `-t` to -narrow a run to specific cases. - -```bash -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:perf:client --outputStyle=stream --skipRemoteCache -- --run -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:perf:ssr --outputStyle=stream --skipRemoteCache -- --run - -# Select a feature and save the normal Vitest JSON report. -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:perf:client --outputStyle=stream --skipRemoteCache -- --run -t "updater|optional|splat" --reporter=json --outputFile=/tmp/link-perf.json -``` - -The cases cover repeated versus unique destination params, updater functions, -relative/inherited values, search middleware chains, param stringification, -optional and splat segments, encoding, masks, basepath/rewrites, and active -props with structured search. These exercise different costs: cache hits and -misses, parameter cloning, callbacks, middleware traversal, URI encoding, -building masked/public locations, active-state comparisons, and prop merging. -Existing preload, mount, and route-tree-scale scenarios remain responsible for -those separate workloads. - -- **Client:** 200 persistent measured Links, four control Links, and eight - completed navigations per timed batch. The existing client harness checks - hrefs and active state during its untimed warm-up lap. Control navigations - replace the history entry, keeping history size constant. Post-measurement - assertions also check that the measured anchors stayed mounted. -- **SSR:** four fresh-router requests per timed batch, each rendering 200 - measured Links through `RouterProvider` and `renderToString`. Router creation, - `router.load()`, rendering, and history cleanup are included. This isolates - Router SSR Link work, not Start HTTP handling, dehydration, or streaming. - HTML assertions run outside the timed batch. -- Both use the same code-based workload definitions and production JSX/library - builds. The regular Vitest entry points use at least 100 warm-up iterations, - one second of warm-up time, and five-second measurement windows. The client - and server bundles assert their resolved `isServer` environment. React and - React DOM remain external so comparisons can share the same renderer runtime. - These bundles are Node-hosted (jsdom for client mode), not browser deployments. - -Run the gate tests and typecheck separately: - -```bash -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:unit --outputStyle=stream --skipRemoteCache -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:types --outputStyle=stream --skipRemoteCache -``` - -For before/after comparisons, use identical benchmark files and dependencies -on both refs, build each ref through its Nx targets, and alternate fresh -Vitest processes. Report the actual refs, per-case means and relative margins -of error; rerun noisy or borderline results with `-t` rather than interpreting -a small difference as a proven speedup. Client and SSR times have different -batch units and should not be compared directly. - -### Stable paired comparisons - -For regression decisions, prefer the paired runner over a whole-file Vitest -run. It starts a fresh process for every case and repetition, avoiding JIT -feedback from earlier cases. Inside each process, both revisions share the -same production React installation but have separate router/app modules and -router instances. Initialization order alternates between repetitions. -Built snapshots are staged under `node_modules/.cache` so the TypeScript -harness loader does not transpile their emitted JavaScript a second time. - -```bash -# Build the baseline using these same benchmark sources in its own checkout. -# --baseline points to that checkout's link-performance/dist directory. -pnpm nx run @benchmarks/react-link-performance:test:perf:stable -- \ - --baseline /path/to/baseline/benchmarks/client-nav/link-performance/dist \ - --outputJson /tmp/paired-links.json - -# Narrow a comparison, or increase independent process repetitions. -pnpm nx run @benchmarks/react-link-performance:test:perf:stable -- \ - --baseline /path/to/baseline/benchmarks/client-nav/link-performance/dist \ - --mode ssr -t "middleware|unique-params" --repeats 6 \ - --outputJson /tmp/paired-links-ssr.json -``` - -The runner requires Node with `process.threadCpuUsage` (Node 24 works). -It fixes V8 random/hash seeds, warms each variant for at least two seconds -and 100 batches, then alternates ABBA/BAAB blocks calibrated to roughly 500 ms. -Both variants do exactly the same number of batches per block. It records -main-thread CPU time, wall time, and whole-process CPU time; GC during -measurement is not disabled or discarded. - -The default is four independent process repetitions. Reported 95% intervals -use their paired log-ratios, not the many correlated batches as independent -samples. A faster/slower verdict requires CPU and wall intervals to agree. -Intervals overlapping zero or disagreeing metrics are inconclusive; narrow -intervals entirely inside +/-2% are reported separately. - -An A/A calibration uses the current `dist` directory as `--baseline`. Its -intervals should contain zero before trusting similarly sized A/B differences. -Shared-machine contention can still make small changes unresolved. Do not -interpret a point estimate alone, or an inconclusive result, as proof that -a workload is unchanged. diff --git a/benchmarks/client-nav/link-performance/cases.ts b/benchmarks/client-nav/link-performance/cases.ts deleted file mode 100644 index a25eac563b..0000000000 --- a/benchmarks/client-nav/link-performance/cases.ts +++ /dev/null @@ -1,360 +0,0 @@ -export const LINK_CASES = [ - { - id: 'shared-params', - label: 'Shared string params', - description: '200 persistent Links reuse 40 string parameter values.', - }, - { - id: 'unique-params', - label: 'Unique string params', - description: '200 distinct parameter values exceed the 128-result cache.', - }, - { - id: 'param-updaters', - label: 'Parameter updaters', - description: 'Parameter functions derive destinations from current params.', - }, - { - id: 'location-updaters', - label: 'Search, hash and state updaters', - description: - 'Functions derive search, hash and history state from the source.', - }, - { - id: 'relative', - label: 'Relative targets', - description: 'Parent and child targets inherit current params and search.', - }, - { - id: 'middleware', - label: 'Search middleware chain', - description: - 'Retain a tenant, strip a default page and normalize a filter.', - }, - { - id: 'numeric-params', - label: 'Numeric params', - description: 'Parse numbers, update them numerically and stringify them.', - }, - { - id: 'optional-params', - label: 'Optional segments', - description: 'Set, inherit and explicitly clear an optional path segment.', - }, - { - id: 'splats', - label: 'Splat params', - description: 'Empty, multi-segment and encoded splat values.', - }, - { - id: 'encoding', - label: 'Allowed path characters', - description: 'Preserve allowed @, : and + while encoding other characters.', - }, - { - id: 'masks', - label: 'Explicit route masks', - description: - 'Build a different public path and search for each destination.', - }, - { - id: 'rewrites', - label: 'Basepath and rewrites', - description: 'Compose /app with input/output locale path rewrites.', - }, - { - id: 'active', - label: 'Active props and structured search', - description: - 'Exact, fuzzy and search matching with props and render children.', - }, -] as const - -export type LinkCaseId = (typeof LINK_CASES)[number]['id'] - -export const LINK_COUNT = 200 -export const NAVIGATION_STATES = [1, 2, 3, 0] as const -export const LOCALES = ['en', 'fr', 'de', 'es'] as const - -export interface Filter { - tag: string - flags: { open: boolean } - tags: Array -} - -export interface LinkSearch { - page?: number - tenant?: string - filter?: Filter -} - -export function sourceFilter(index: number): Filter { - return { - tag: `group-${index}`, - flags: { open: index % 2 === 0 }, - tags: ['links', `state-${index}`], - } -} - -export function sourceSearch( - caseId: LinkCaseId, - stateIndex: number, -): Partial { - switch (caseId) { - case 'location-updaters': - case 'relative': - case 'middleware': - case 'active': - return { - page: stateIndex + 1, - tenant: `tenant-${stateIndex}`, - filter: sourceFilter(stateIndex), - } - case 'rewrites': - return { tenant: LOCALES[stateIndex] } - default: - return {} - } -} - -export function optionalCategory(stateIndex: number) { - return stateIndex % 2 === 0 ? `category-${stateIndex}` : undefined -} - -export function splatValue(index: number) { - switch (index % 4) { - case 0: - return '' - case 1: - return `folder/sub/file-${index % 40}` - case 2: - return 'a b/100%/caf\u00e9?#' - default: - return 'literal%2F/\u{1f680}' - } -} - -export function encodedValue(index: number) { - return `user-${index % 40}@mail.test:tag+value /?#% caf\u00e9` -} - -function url(pathname: string, search: Partial = {}, hash = '') { - const result = new URL(pathname, 'http://localhost') - for (const [key, value] of Object.entries( - search, - )) { - if (value !== undefined) { - result.searchParams.set( - key, - typeof value === 'object' ? JSON.stringify(value) : String(value), - ) - } - } - result.hash = hash - return result.pathname + result.search + result.hash -} - -function sourcePath(caseId: LinkCaseId, stateIndex: number) { - switch (caseId) { - case 'relative': - return `/teams/team-${stateIndex}/item-${stateIndex}` - case 'numeric-params': - return `/numbers/${stateIndex}` - case 'optional-params': { - const category = optionalCategory(stateIndex) - return `/optional/${category ? `${category}/` : ''}item-${stateIndex}` - } - case 'splats': - return `/files/source/state-${stateIndex}` - case 'encoding': - return `/encoded/source-${stateIndex}` - case 'active': - return `/items/item-${stateIndex}/details` - default: - return `/items/item-${stateIndex}` - } -} - -export function getSourceUrl(caseId: LinkCaseId, stateIndex: number): string { - if (!Number.isInteger(stateIndex) || stateIndex < 0 || stateIndex > 3) { - throw new Error(`Invalid Link performance state: ${stateIndex}`) - } - const pathname = sourcePath(caseId, stateIndex) - if (caseId === 'rewrites') { - return `/app/${LOCALES[stateIndex]}${pathname}` - } - return url( - pathname, - sourceSearch(caseId, stateIndex), - caseId === 'location-updaters' ? `source-${stateIndex}` : '', - ) -} - -// These expectations use fixture values and platform encoding, not router APIs. -function expectedHref(caseId: LinkCaseId, stateIndex: number, index: number) { - const itemId = `item-${index % 40}` - switch (caseId) { - case 'shared-params': - return `/items/${itemId}` - case 'unique-params': - return `/items/item-${index}` - case 'param-updaters': - return `/items/item-${stateIndex}-related-${index % 40}` - case 'location-updaters': - return url( - `/items/item-${stateIndex}`, - { - ...sourceSearch(caseId, stateIndex), - page: stateIndex + 2 + (index % 5), - }, - `source-${stateIndex}-link-${index % 5}`, - ) - case 'relative': - return url( - index % 2 === 0 - ? `/teams/team-${stateIndex}` - : `/teams/team-${stateIndex}/item-${stateIndex}/details`, - sourceSearch(caseId, stateIndex), - ) - case 'middleware': - return url(`/filtered/${itemId}`, { - tenant: `tenant-${stateIndex}`, - page: index % 2 === 0 ? undefined : 2, - filter: { ...sourceFilter(index % 4), tag: `LABEL-${index % 40}` }, - }) - case 'numeric-params': - return `/numbers/${stateIndex + (index % 40)}` - case 'optional-params': { - const category = - index % 3 === 0 - ? 'fixed' - : index % 3 === 1 - ? optionalCategory(stateIndex) - : undefined - return `/optional/${category ? `${category}/` : ''}${itemId}` - } - case 'splats': { - const value = splatValue(index) - return `/files${value ? `/${value.split('/').map(encodeURIComponent).join('/')}` : ''}` - } - case 'encoding': { - const value = encodeURIComponent(encodedValue(index)) - .replaceAll('%40', '@') - .replaceAll('%3A', ':') - .replaceAll('%2B', '+') - return `/encoded/${value}` - } - case 'masks': - return url(`/public/display-${index % 40}`, { - tenant: `mask-${index % 4}`, - }) - case 'rewrites': - return url(`/app/${LOCALES[index % 4]}/items/${itemId}`, { - page: (index % 3) + 1, - }) - case 'active': { - const item = Math.floor(index / 5) - const variant = index % 5 - const search = - variant < 3 - ? { filter: sourceFilter(item % 4) } - : { - ...sourceSearch('active', item % 4), - ...(variant === 4 ? { filter: undefined } : {}), - } - return url(`/items/item-${item}${variant < 2 ? '' : '/details'}`, search) - } - } -} - -function assertUrl( - actualHref: string | null, - expectedHref: string, - label: string, -) { - if (actualHref === null) { - throw new Error(`${label}: missing href`) - } - const actual = new URL(actualHref, 'http://localhost') - const expected = new URL(expectedHref, 'http://localhost') - // Query ordering and the platform's '+' versus '%20' are immaterial here. - const query = (value: URL) => - JSON.stringify([...value.searchParams.entries()].sort()) - if ( - actual.origin !== expected.origin || - actual.pathname !== expected.pathname || - actual.hash !== expected.hash || - query(actual) !== query(expected) - ) { - throw new Error( - `${label}: expected ${expectedHref}, received ${actualHref}`, - ) - } -} - -export function assertScenario( - caseId: LinkCaseId, - stateIndex: number, - root: ParentNode, -): void { - const source = root.querySelector('[data-testid="source-path"]') - if (source?.textContent !== sourcePath(caseId, stateIndex)) { - throw new Error( - `${caseId}/${stateIndex}: unexpected source path ${source?.textContent}`, - ) - } - const links = root.querySelectorAll('a[data-perf-link]') - if (links.length !== LINK_COUNT) { - throw new Error( - `${caseId}: expected ${LINK_COUNT} Links, got ${links.length}`, - ) - } - for (const [index, link] of links.entries()) { - const label = `${caseId}/${stateIndex}/link-${index}` - if (link.getAttribute('data-perf-link') !== String(index)) { - throw new Error(`${label}: unexpected Link order`) - } - assertUrl( - link.getAttribute('href'), - expectedHref(caseId, stateIndex, index), - label, - ) - let active: boolean | undefined - if (caseId === 'shared-params') { - active = index % 40 === stateIndex - } else if (caseId === 'unique-params') { - active = index === stateIndex - } else if (caseId === 'active') { - active = - Math.floor(index / 5) === stateIndex && [0, 2, 3].includes(index % 5) - if ( - link.textContent !== `${index}:${active ? 'active' : 'inactive'}` || - link.getAttribute('title') !== (active ? 'active' : 'inactive') || - !link.classList.contains(active ? 'perf-active' : 'perf-inactive') || - link.style.color !== (active ? 'green' : 'gray') || - link.style.opacity !== '0.8' - ) { - throw new Error( - `${label}: active props or render children are incorrect`, - ) - } - } - if ( - active !== undefined && - (link.getAttribute('data-status') === 'active') !== active - ) { - throw new Error(`${label}: expected active=${active}`) - } - } - for (let state = 0; state < 4; state++) { - const control = root.querySelector(`[data-testid="go-state-${state}"]`) - if (!control || control.hasAttribute('data-perf-link')) { - throw new Error(`${caseId}: missing or measured control Link ${state}`) - } - assertUrl( - control.getAttribute('href'), - getSourceUrl(caseId, state), - `${caseId}/control-${state}`, - ) - } -} diff --git a/benchmarks/client-nav/link-performance/client.bench.ts b/benchmarks/client-nav/link-performance/client.bench.ts deleted file mode 100644 index f819fab52b..0000000000 --- a/benchmarks/client-nav/link-performance/client.bench.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../cpu-simulation' -import { LINK_CASES } from './cases' -import { createClientScenario, samplingOptions } from './scenario' -import type * as App from './src/client' - -const appModulePath = './dist/client/app.js' -const app: typeof App = await import(/* @vite-ignore */ appModulePath) -if (app.serverEnvironment !== false) { - throw new Error('Link client benchmarks must use the production client build') -} - -for (const { id, label } of LINK_CASES) { - test(label, async ({ bench }) => { - const scenario = createClientScenario(app, id) - function finish() { - try { - scenario.check() - } finally { - scenario.teardown() - } - } - - await bench( - `client Links: ${id}`, - benchLifecycle({ before: scenario.setup, after: finish }), - scenario.batch, - ).run(samplingOptions) - }) -} diff --git a/benchmarks/client-nav/link-performance/config.test.ts b/benchmarks/client-nav/link-performance/config.test.ts deleted file mode 100644 index 1a468a3169..0000000000 --- a/benchmarks/client-nav/link-performance/config.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { afterEach, describe, expect, test, vi } from 'vitest' -import { createLinkPerformanceConfig } from './config' - -afterEach(() => vi.unstubAllEnvs()) - -describe.each(['client', 'ssr'] as const)('%s configuration', (target) => { - test('discovers only the requested suite', () => { - const config = createLinkPerformanceConfig(target) - expect(config.test?.benchmark?.include).toEqual([`${target}.bench.ts`]) - }) - - test('builds production code for the correct environment', () => { - const config = createLinkPerformanceConfig(target) - expect(config.define?.['process.env.NODE_ENV']).toBe('"production"') - expect(config.resolve?.conditions).toContain( - target === 'ssr' ? 'node' : 'browser', - ) - expect(config.build?.ssr).toBe(target === 'ssr') - expect(config.build?.outDir).toBe(`./dist/${target}`) - expect(config.build?.rolldownOptions?.platform).toBe('node') - expect(config.build?.rolldownOptions?.external).toEqual([ - 'node:module', - 'module', - /^react(?:\/|$)/, - /^react-dom(?:\/|$)/, - ]) - }) - - test('does not retransform built bundles in the test environment', () => { - vi.stubEnv('VITEST', 'true') - const config = createLinkPerformanceConfig(target) - expect(config.ssr?.noExternal).toBeUndefined() - expect(config.test?.server?.deps?.external).toEqual([ - /\/link-performance\/dist\//, - ]) - }) - - test('bundles router dependencies when building app snapshots', () => { - vi.stubEnv('VITEST', undefined) - expect(createLinkPerformanceConfig(target).ssr?.noExternal).toBe(true) - }) -}) diff --git a/benchmarks/client-nav/link-performance/config.ts b/benchmarks/client-nav/link-performance/config.ts deleted file mode 100644 index 416b027057..0000000000 --- a/benchmarks/client-nav/link-performance/config.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { fileURLToPath } from 'node:url' -import react from '@vitejs/plugin-react' -import codspeedPlugin from '@codspeed/vitest-plugin' -import type { UserConfig } from 'vite' - -const root = fileURLToPath(new URL('.', import.meta.url)) - -export function createLinkPerformanceConfig( - target: 'client' | 'ssr', -): UserConfig { - const server = target === 'ssr' - - return { - root, - define: { - 'process.env.NODE_ENV': JSON.stringify('production'), - }, - plugins: [ - !!(process.env.VITEST && process.env.WITH_INSTRUMENTATION) && - codspeedPlugin(), - react(), - ], - resolve: { - conditions: [server ? 'node' : 'browser', 'production'], - }, - ssr: { - noExternal: process.env.VITEST ? undefined : true, - resolve: { - conditions: ['node', 'production'], - }, - }, - build: { - outDir: `./dist/${target}`, - emptyOutDir: true, - minify: false, - ssr: server, - lib: { - entry: `${root}src/${target}.tsx`, - formats: ['es'], - fileName: 'app', - }, - rolldownOptions: { - platform: 'node', - external: [ - 'node:module', - 'module', - /^react(?:\/|$)/, - /^react-dom(?:\/|$)/, - ], - output: { entryFileNames: 'app.js' }, - }, - }, - test: { - name: `react-link-performance-${target}`, - watch: false, - environment: server ? 'node' : 'jsdom', - setupFiles: server ? [] : ['../vitest.setup.ts'], - server: { - deps: { - external: [/\/link-performance\/dist\//], - }, - }, - include: [], - benchmark: { - include: [`${target}.bench.ts`], - }, - }, - } -} diff --git a/benchmarks/client-nav/link-performance/project.json b/benchmarks/client-nav/link-performance/project.json deleted file mode 100644 index fd1751c081..0000000000 --- a/benchmarks/client-nav/link-performance/project.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "@benchmarks/react-link-performance", - "projectType": "application", - "tags": ["optional-benchmark"], - "targets": { - "build:client": { - "executor": "nx:run-commands", - "cache": false, - "dependsOn": [ - { - "projects": ["@tanstack/react-router"], - "target": "build" - } - ], - "options": { - "command": "NODE_ENV=production vite build --config ./link-performance/vite.client.config.ts", - "cwd": "benchmarks/client-nav" - } - }, - "build:ssr": { - "executor": "nx:run-commands", - "cache": false, - "dependsOn": [ - { - "projects": ["@tanstack/react-router"], - "target": "build" - } - ], - "options": { - "command": "NODE_ENV=production vite build --config ./link-performance/vite.ssr.config.ts", - "cwd": "benchmarks/client-nav" - } - }, - "test:perf:client": { - "executor": "nx:run-commands", - "cache": false, - "dependsOn": ["build:client"], - "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./link-performance/vite.client.config.ts", - "cwd": "benchmarks/client-nav" - } - }, - "test:perf:ssr": { - "executor": "nx:run-commands", - "cache": false, - "dependsOn": ["build:ssr"], - "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./link-performance/vite.ssr.config.ts", - "cwd": "benchmarks/client-nav" - } - }, - "test:perf:stable": { - "executor": "nx:run-commands", - "cache": false, - "dependsOn": ["build:client", "build:ssr"], - "options": { - "command": "NODE_ENV=production node --import=@swc-node/register/esm-register benchmarks/client-nav/link-performance/stable-runner.ts" - } - }, - "test:unit": { - "executor": "nx:run-commands", - "inputs": [ - "...", - "{workspaceRoot}/benchmarks/client-nav/scenarios/harness.ts", - "{workspaceRoot}/benchmarks/client-nav/scenarios/links/shared.ts", - "{workspaceRoot}/benchmarks/client-nav/setup-helpers.ts", - "{workspaceRoot}/benchmarks/client-nav/tsconfig.json" - ], - "dependsOn": [ - { - "projects": ["@tanstack/history"], - "target": "build" - } - ], - "options": { - "command": "vitest run --config ./link-performance/vitest.config.ts", - "cwd": "benchmarks/client-nav" - } - }, - "test:types": { - "executor": "nx:run-commands", - "inputs": [ - "...", - "{workspaceRoot}/benchmarks/client-nav/jsdom.ts", - "{workspaceRoot}/benchmarks/client-nav/scenarios/harness.ts", - "{workspaceRoot}/benchmarks/client-nav/scenarios/links/shared.ts", - "{workspaceRoot}/benchmarks/client-nav/setup-helpers.ts", - "{workspaceRoot}/benchmarks/client-nav/tsconfig.json", - "{workspaceRoot}/benchmarks/client-nav/vitest.setup.ts" - ], - "dependsOn": [ - { - "projects": ["@tanstack/react-router"], - "target": "build" - } - ], - "options": { - "command": "tsc -p ./link-performance/tsconfig.json --noEmit", - "cwd": "benchmarks/client-nav" - } - } - } -} diff --git a/benchmarks/client-nav/link-performance/scenario.ts b/benchmarks/client-nav/link-performance/scenario.ts deleted file mode 100644 index f1a3fb6df7..0000000000 --- a/benchmarks/client-nav/link-performance/scenario.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { JSDOM } from 'jsdom' -import { createScenarioSetup } from '../scenarios/harness' -import { ticksPerIteration } from '../scenarios/links/shared' -import { NAVIGATION_STATES, assertScenario, getSourceUrl } from './cases' -import type { LinkCaseId } from './cases' -import type * as ClientApp from './src/client' -import type * as SsrApp from './src/ssr' - -export interface LinkScenario { - setup: () => Promise - batch: () => Promise - check: () => void - teardown: () => void -} - -export const samplingOptions = { - warmupIterations: 100, - warmupTime: 1_000, - time: 5_000, - throws: true, -} - -export function createClientScenario( - app: typeof ClientApp, - id: LinkCaseId, -): LinkScenario { - let mounted: ReturnType | undefined - let container: HTMLElement | undefined - let anchors: Array = [] - const test = createScenarioSetup({ - frameworkLabel: 'React', - mount: (element, history) => { - container = element - mounted = app.mountTestApp(element, history, id) - return mounted - }, - initialUrl: getSourceUrl(id, 0), - steps: NAVIGATION_STATES.map((state) => `go-state-${state}`), - assertAfterStep: (index, element) => { - assertScenario(id, NAVIGATION_STATES[index]!, element) - if (!mounted) { - throw new Error('Link benchmark app was not mounted') - } - mounted.assertStateUpdates() - }, - }) - - return { - async setup() { - await test.before() - if (!container) { - throw new Error('Link benchmark container was not created') - } - anchors = [...container.querySelectorAll('a[data-perf-link]')] - }, - async batch() { - for (let index = 0; index < ticksPerIteration; index++) { - await test.tick() - } - await test.finishBatch() - }, - check() { - if (!container || !mounted) { - throw new Error('Link benchmark app was not mounted') - } - assertScenario(id, 0, container) - mounted.assertStateUpdates() - if (mounted.router.history.length !== 1) { - throw new Error('Link benchmark history must remain bounded') - } - const current = container.querySelectorAll('a[data-perf-link]') - if (anchors.some((anchor, index) => current[index] !== anchor)) { - throw new Error('Measured Links must stay mounted across navigations') - } - }, - teardown: test.after, - } -} - -export function createSsrScenario( - app: typeof SsrApp, - id: LinkCaseId, -): LinkScenario { - let html = '' - let state = 0 - function check() { - const dom = new JSDOM(html) - try { - assertScenario(id, state, dom.window.document) - } finally { - dom.window.close() - } - } - - return { - async setup() { - for (const nextState of NAVIGATION_STATES) { - state = nextState - html = await app.renderScenario(id, state, true) - check() - } - }, - async batch() { - for (const nextState of NAVIGATION_STATES) { - state = nextState - html = await app.renderScenario(id, state) - } - }, - check, - teardown() { - html = '' - }, - } -} diff --git a/benchmarks/client-nav/link-performance/src/client.tsx b/benchmarks/client-nav/link-performance/src/client.tsx deleted file mode 100644 index a187ee8c15..0000000000 --- a/benchmarks/client-nav/link-performance/src/client.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { RouterProvider } from '@tanstack/react-router' -import { isServer } from '@tanstack/router-core/isServer' -import { createRoot } from 'react-dom/client' -import { assertStateUpdates, createLinkRouter } from './workload' -import type { LinkRouter } from './workload' -import type { RouterHistory } from '@tanstack/history' -import type { LinkCaseId } from '../cases' - -export const serverEnvironment: boolean | undefined = isServer - -export function mountTestApp( - container: HTMLElement, - history: RouterHistory, - caseId: LinkCaseId, -): { - router: LinkRouter - unmount: () => void - assertStateUpdates: () => void -} { - const router = createLinkRouter(caseId, history, false) - const root = createRoot(container) - root.render() - - return { - router, - unmount: () => root.unmount(), - assertStateUpdates: () => assertStateUpdates(router), - } -} diff --git a/benchmarks/client-nav/link-performance/src/ssr.tsx b/benchmarks/client-nav/link-performance/src/ssr.tsx deleted file mode 100644 index 491191b1f9..0000000000 --- a/benchmarks/client-nav/link-performance/src/ssr.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { RouterProvider, createMemoryHistory } from '@tanstack/react-router' -import { isServer } from '@tanstack/router-core/isServer' -import { renderToString } from 'react-dom/server' -import { getSourceUrl } from '../cases' -import { assertStateUpdates, createLinkRouter } from './workload' -import type { LinkCaseId } from '../cases' - -export const serverEnvironment: boolean | undefined = isServer - -export async function renderScenario( - caseId: LinkCaseId, - stateIndex: number, - verify = false, -) { - const history = createMemoryHistory({ - initialEntries: [getSourceUrl(caseId, stateIndex)], - }) - const router = createLinkRouter(caseId, history, true) - try { - await router.load() - const html = renderToString() - if (verify) { - assertStateUpdates(router) - } - return html - } finally { - history.destroy() - } -} diff --git a/benchmarks/client-nav/link-performance/src/workload.tsx b/benchmarks/client-nav/link-performance/src/workload.tsx deleted file mode 100644 index 8315b85b8b..0000000000 --- a/benchmarks/client-nav/link-performance/src/workload.tsx +++ /dev/null @@ -1,506 +0,0 @@ -import { - Link, - Outlet, - createRootRouteWithContext, - createRoute, - createRouter, - linkOptions, - retainSearchParams, - stripSearchParams, - useLocation, -} from '@tanstack/react-router' -import { - LINK_COUNT, - LOCALES, - encodedValue, - optionalCategory, - sourceFilter, - sourceSearch, - splatValue, -} from '../cases' -import type { RouterHistory } from '@tanstack/history' -import type { SearchSchemaInput } from '@tanstack/react-router' -import type { Filter, LinkCaseId, LinkSearch } from '../cases' - -interface StateUpdates { - calls: number - verifiedCalls: number - input: number - output: number - offset: number -} - -interface WorkloadContext { - caseId: LinkCaseId - stateUpdates: StateUpdates -} - -function isFilter(value: unknown): value is Filter { - return ( - typeof value === 'object' && - value !== null && - 'tag' in value && - typeof value.tag === 'string' && - 'flags' in value && - typeof value.flags === 'object' && - value.flags !== null && - 'open' in value.flags && - typeof value.flags.open === 'boolean' && - 'tags' in value && - Array.isArray(value.tags) && - value.tags.every((tag: unknown) => typeof tag === 'string') - ) -} - -const rootRoute = createRootRouteWithContext()({ - validateSearch: ( - search: Record & SearchSchemaInput, - ): LinkSearch => ({ - page: typeof search.page === 'number' ? search.page : undefined, - tenant: typeof search.tenant === 'string' ? search.tenant : undefined, - filter: isFilter(search.filter) ? search.filter : undefined, - }), - component: RootLayout, -}) - -const itemsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'items/$itemId', -}) -const detailsRoute = createRoute({ - getParentRoute: () => itemsRoute, - path: 'details', -}) -const teamRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'teams/$teamId', -}) -const teamItemRoute = createRoute({ - getParentRoute: () => teamRoute, - path: '$itemId', -}) -const teamDetailsRoute = createRoute({ - getParentRoute: () => teamItemRoute, - path: 'details', -}) -const filteredRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'filtered/$itemId', - search: { - middlewares: [ - retainSearchParams(['tenant']), - stripSearchParams({ page: 1 }), - ({ search, next }) => { - const result = next(search) - return { - ...result, - filter: result.filter - ? { ...result.filter, tag: result.filter.tag.trim().toUpperCase() } - : undefined, - } - }, - ], - }, -}) -const numericRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'numbers/$number', - params: { - parse: ({ number }) => { - const value = Number(number) - if (!Number.isFinite(value)) { - throw new Error(`Invalid number: ${number}`) - } - return { number: value } - }, - stringify: ({ number }) => ({ number: String(number) }), - }, -}) -const optionalRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'optional/{-$category}/$itemId', -}) -const splatRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'files/$', -}) -const encodedRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'encoded/$value', -}) -const publicRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'public/$itemId', -}) - -const routeTree = rootRoute.addChildren([ - itemsRoute.addChildren([detailsRoute]), - teamRoute.addChildren([teamItemRoute.addChildren([teamDetailsRoute])]), - filteredRoute, - numericRoute, - optionalRoute, - splatRoute, - encodedRoute, - publicRoute, -]) - -const localeRewrite = { - input: ({ url }: { url: URL }) => { - const match = /^\/(en|fr|de|es)(\/.*)$/.exec(url.pathname) - if (match) { - url.pathname = match[2]! - url.searchParams.set('tenant', match[1]!) - } - return url - }, - output: ({ url }: { url: URL }) => { - const locale = url.searchParams.get('tenant') - if (locale) { - url.searchParams.delete('tenant') - url.pathname = `/${locale}${url.pathname}` - } - return url - }, -} - -export function createLinkRouter( - caseId: LinkCaseId, - history: RouterHistory, - isServer: boolean, -) { - const context: WorkloadContext = { - caseId, - stateUpdates: { - calls: 0, - verifiedCalls: 0, - input: 0, - output: 0, - offset: 0, - }, - } - return createRouter({ - routeTree, - history, - isServer, - context, - scrollRestoration: false, - defaultPreload: false, - trailingSlash: 'never', - pathParamsAllowedCharacters: - caseId === 'encoding' ? ['@', ':', '+'] : undefined, - ...(caseId === 'rewrites' - ? { basepath: '/app', rewrite: localeRewrite } - : {}), - }) -} - -export type LinkRouter = ReturnType - -declare module '@tanstack/react-router' { - interface Register { - router: LinkRouter - } -} - -declare module '@tanstack/history' { - interface HistoryState { - linkPerfState?: number - } -} - -// Call alongside DOM assertions, outside the timed loop, after each sample. -export function assertStateUpdates(router: LinkRouter): void { - const { caseId, stateUpdates } = router.options.context - if (caseId !== 'location-updaters') { - return - } - const input = router.state.location.state.linkPerfState ?? 0 - if ( - stateUpdates.calls - stateUpdates.verifiedCalls < LINK_COUNT || - stateUpdates.input !== input || - stateUpdates.output !== input + stateUpdates.offset || - stateUpdates.offset < 1 || - stateUpdates.offset > 40 - ) { - throw new Error( - 'Link history-state updaters did not run with current state', - ) - } - stateUpdates.verifiedCalls = stateUpdates.calls -} - -function sourceOptions(caseId: LinkCaseId, stateIndex: number) { - const itemId = `item-${stateIndex}` - const common = { - search: sourceSearch(caseId, stateIndex), - hash: caseId === 'location-updaters' ? `source-${stateIndex}` : '', - state: { linkPerfState: stateIndex + 10 }, - } - switch (caseId) { - case 'relative': - return linkOptions({ - ...common, - to: '/teams/$teamId/$itemId', - params: { teamId: `team-${stateIndex}`, itemId }, - }) - case 'numeric-params': - return linkOptions({ - ...common, - to: '/numbers/$number', - params: { number: stateIndex }, - }) - case 'optional-params': - return linkOptions({ - ...common, - to: '/optional/{-$category}/$itemId', - params: { category: optionalCategory(stateIndex), itemId }, - }) - case 'splats': - return linkOptions({ - ...common, - to: '/files/$', - params: { _splat: `source/state-${stateIndex}` }, - }) - case 'encoding': - return linkOptions({ - ...common, - to: '/encoded/$value', - params: { value: `source-${stateIndex}` }, - }) - case 'active': - return linkOptions({ - ...common, - to: '/items/$itemId/details', - params: { itemId }, - }) - default: - return linkOptions({ - ...common, - to: '/items/$itemId', - params: { itemId }, - }) - } -} - -const indexes = Array.from({ length: LINK_COUNT }, (_, index) => index) -const controls = [0, 1, 2, 3] as const - -function SourcePath() { - const pathname = useLocation({ select: (location) => location.pathname }) - return {pathname} -} - -function RootLayout() { - const context = rootRoute.useRouteContext() - return ( - <> - - -
- {indexes.map((index) => measuredLink(context, index))} -
- - - ) -} - -function measuredLink( - { caseId, stateUpdates }: WorkloadContext, - index: number, -) { - const common = { - key: index, - 'data-perf-link': index, - preload: false, - children: `Link ${index}`, - } as const - const itemId = `item-${index % 40}` - switch (caseId) { - case 'shared-params': - case 'unique-params': - return ( - - ) - case 'param-updaters': - return ( - ({ - itemId: `${previous.itemId}-related-${index % 40}`, - })} - /> - ) - case 'location-updaters': - return ( - ({ - ...previous, - page: (previous.page ?? 1) + 1 + (index % 5), - })} - hash={(previous) => `${previous}-link-${index % 5}`} - state={(previous) => { - const input = previous.linkPerfState ?? 0 - const offset = (index % 40) + 1 - const output = input + offset - stateUpdates.calls++ - stateUpdates.input = input - stateUpdates.output = output - stateUpdates.offset = offset - return { ...previous, linkPerfState: output } - }} - /> - ) - case 'relative': - return ( - - ) - case 'middleware': - return ( - - ) - case 'numeric-params': - return ( - ({ number: previous.number + (index % 40) })} - /> - ) - case 'optional-params': - return ( - - ) - case 'splats': - return ( - - ) - case 'encoding': - return ( - - ) - case 'masks': - return ( - - ) - case 'rewrites': - return ( - - ) - case 'active': { - const item = Math.floor(index / 5) - const variant = index % 5 - return ( - ({ - className: 'perf-active', - title: 'active', - style: { color: 'green' }, - })} - inactiveProps={() => ({ - className: 'perf-inactive', - title: 'inactive', - style: { color: 'gray' }, - })} - > - {({ isActive }) => `${index}:${isActive ? 'active' : 'inactive'}`} - - ) - } - } -} diff --git a/benchmarks/client-nav/link-performance/ssr.bench.ts b/benchmarks/client-nav/link-performance/ssr.bench.ts deleted file mode 100644 index c30084e510..0000000000 --- a/benchmarks/client-nav/link-performance/ssr.bench.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../cpu-simulation' -import { LINK_CASES } from './cases' -import { createSsrScenario, samplingOptions } from './scenario' -import type * as App from './src/ssr' - -const appUrl = new URL('./dist/ssr/app.js', import.meta.url).href -const app: typeof App = await import(/* @vite-ignore */ appUrl) -if (app.serverEnvironment !== true) { - throw new Error('Link SSR benchmarks must use the production server build') -} - -for (const { id, label } of LINK_CASES) { - test(label, async ({ bench }) => { - const scenario = createSsrScenario(app, id) - function finish() { - try { - scenario.check() - } finally { - scenario.teardown() - } - } - - await bench( - `SSR Links: ${id}`, - benchLifecycle({ before: scenario.setup, after: finish }), - scenario.batch, - ).run(samplingOptions) - }) -} diff --git a/benchmarks/client-nav/link-performance/stable-runner.ts b/benchmarks/client-nav/link-performance/stable-runner.ts deleted file mode 100644 index 59ccfa3cb4..0000000000 --- a/benchmarks/client-nav/link-performance/stable-runner.ts +++ /dev/null @@ -1,269 +0,0 @@ -import { fork } from 'node:child_process' -import { createHash } from 'node:crypto' -import { - copyFileSync, - mkdirSync, - readFileSync, - rmSync, - writeFileSync, -} from 'node:fs' -import { dirname, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -import { parseArgs } from 'node:util' -import { LINK_CASES } from './cases' -import { createStagingDirectory } from './staging' -import { classify, mean, summarizeRatios } from './statistics' -import type { LinkCaseId } from './cases' -import type { - BlockSample, - Mode, - Variant, - WorkerRequest, - WorkerResponse, -} from './worker-protocol' - -const projectRoot = fileURLToPath(new URL('.', import.meta.url)) -const workspaceRoot = resolve(projectRoot, '../../..') - -function startWorker() { - const child = fork( - fileURLToPath(new URL('./stable-worker.ts', import.meta.url)), - { - cwd: workspaceRoot, - env: { ...process.env, NODE_ENV: 'production' }, - execArgv: [ - '--import=@swc-node/register/esm-register', - '--random-seed=42', - '--hash-seed=42', - ], - stdio: ['ignore', 'ignore', 'pipe', 'ipc'], - }, - ) - let stderr = '' - child.stderr?.on('data', (data: Buffer) => { - stderr = (stderr + data.toString()).slice(-4_096) - }) - - function request(message: WorkerRequest): Promise { - return new Promise((resolveResponse, reject) => { - const timeout = setTimeout(() => { - finish( - new Error(`Sampling worker timed out: ${message.kind}\n${stderr}`), - ) - }, 60_000) - const onExit = (code: number | null) => - finish(new Error(`Sampling worker exited (${code})\n${stderr}`)) - const onError = (error: Error) => finish(error) - const onMessage = (response: WorkerResponse) => { - if (response.kind === 'error') { - finish(new Error(response.message)) - } else { - finish(undefined, response) - } - } - function finish(error?: Error, response?: WorkerResponse) { - clearTimeout(timeout) - child.off('message', onMessage) - child.off('error', onError) - child.off('exit', onExit) - if (error) { - reject(error) - } else if (response) { - resolveResponse(response) - } - } - child.once('message', onMessage) - child.once('error', onError) - child.once('exit', onExit) - child.send(message, (error) => { - if (error) { - finish(error) - } - }) - }) - } - - return { - request, - kill: () => child.kill(), - } -} - -async function sampleReplica( - mode: Mode, - caseId: LinkCaseId, - baseline: string, - current: string, - replica: number, -) { - const worker = startWorker() - const samples: Array> = [[], []] - const ratios: Array<{ cpu: number; wall: number }> = [] - try { - const starts: Array = [] - // Balance module initialization and which variant finishes warming last. - const startupOrder: Array = replica % 2 ? [1, 0] : [0, 1] - for (const index of startupOrder) { - const ready = await worker.request({ - kind: 'init', - mode, - caseId, - bundle: index === 0 ? baseline : current, - variant: index, - }) - if (ready.kind !== 'ready') { - throw new Error('Expected a ready sampling worker') - } - starts[index] = ready.batchMs - } - const iterations = Math.max(1, Math.ceil(500 / Math.min(...starts))) - for (let round = 0; round < 2; round++) { - const block: Array> = [[], []] - const order: Array = - (round + replica) % 2 ? [1, 0, 0, 1] : [0, 1, 1, 0] - for (const index of order) { - const result = await worker.request({ - kind: 'measure', - iterations, - variant: index, - }) - if (result.kind !== 'sample') { - throw new Error('Expected a block measurement') - } - samples[index]!.push(result.sample) - block[index]!.push(result.sample) - } - ratios.push({ - cpu: - mean(block[1]!.map((s) => s.cpuMs)) / - mean(block[0]!.map((s) => s.cpuMs)), - wall: - mean(block[1]!.map((s) => s.wallMs)) / - mean(block[0]!.map((s) => s.wallMs)), - }) - } - const response = await worker.request({ kind: 'stop' }) - if (response.kind !== 'stopped') { - throw new Error('Expected successful post-measurement assertions') - } - return { - iterations, - baseline: samples[0]!, - current: samples[1]!, - cpuRatio: Math.exp(mean(ratios.map((r) => Math.log(r.cpu)))), - wallRatio: Math.exp(mean(ratios.map((r) => Math.log(r.wall)))), - } - } finally { - worker.kill() - } -} - -async function main() { - const { values } = parseArgs({ - options: { - baseline: { type: 'string' }, - current: { type: 'string', default: resolve(projectRoot, 'dist') }, - mode: { type: 'string', default: 'all' }, - repeats: { type: 'string', default: '4' }, - outputJson: { type: 'string' }, - testNamePattern: { type: 'string', short: 't' }, - }, - }) - if (!values.baseline || !values.outputJson) { - throw new Error( - 'Specify --baseline and --outputJson ', - ) - } - const repeats = Number(values.repeats) - if (!Number.isInteger(repeats) || repeats < 3 || repeats > 11) { - throw new Error('--repeats must be an integer between 3 and 11') - } - if (!['all', 'client', 'ssr'].includes(values.mode)) { - throw new Error('--mode must be all, client, or ssr') - } - const modes: Array = - values.mode === 'all' - ? ['client', 'ssr'] - : values.mode === 'client' - ? ['client'] - : ['ssr'] - const pattern = values.testNamePattern - ? new RegExp(values.testNamePattern) - : undefined - const cases = LINK_CASES.filter( - (c) => !pattern || pattern.test(`${c.label} ${c.id}`), - ) - if (!cases.length) { - throw new Error('No Link workloads match the requested pattern') - } - const report: { - protocol: string - node: string - complete: boolean - results: Array<{ - mode: Mode - caseId: LinkCaseId - baselineSha256: string - currentSha256: string - replicas: Array>> - cpu: ReturnType - wall: ReturnType - verdict: ReturnType - }> - } = { - protocol: - 'fresh process per case/replica; shared React runtime; separately loaded router variants; 2 ABBA/BAAB rounds; ~500ms calibrated fixed-work blocks; >=2s/100 batches warmup; main-thread CPU and wall time; fixed V8 random/hash seeds', - node: process.version, - complete: false, - results: [], - } - const output = resolve(values.outputJson) - mkdirSync(dirname(output), { recursive: true }) - const staging = createStagingDirectory() - try { - for (const mode of modes) { - const baselineInput = resolve(values.baseline, mode, 'app.js') - const currentInput = resolve(values.current, mode, 'app.js') - // Both snapshots resolve React from the same package installation. - const baseline = resolve(staging, `baseline-${mode}.mjs`) - const current = resolve(staging, `current-${mode}.mjs`) - copyFileSync(baselineInput, baseline) - copyFileSync(currentInput, current) - const digest = (file: string) => - createHash('sha256').update(readFileSync(file)).digest('hex') - const baselineSha256 = digest(baseline) - const currentSha256 = digest(current) - for (const { id } of cases) { - const replicas = [] - for (let replica = 0; replica < repeats; replica++) { - replicas.push( - await sampleReplica(mode, id, baseline, current, replica), - ) - } - const cpu = summarizeRatios(replicas.map((r) => r.cpuRatio)) - const wall = summarizeRatios(replicas.map((r) => r.wallRatio)) - const verdict = classify(cpu, wall) - report.results.push({ - mode, - caseId: id, - baselineSha256, - currentSha256, - replicas, - cpu, - wall, - verdict, - }) - writeFileSync(output, JSON.stringify(report, null, 2)) - console.log( - `${mode} ${id}: CPU ${cpu.changePercent.toFixed(2)}% [${cpu.low95.toFixed(2)}, ${cpu.high95.toFixed(2)}], wall ${wall.changePercent.toFixed(2)}% [${wall.low95.toFixed(2)}, ${wall.high95.toFixed(2)}] ${verdict}`, - ) - } - } - report.complete = true - writeFileSync(output, JSON.stringify(report, null, 2)) - } finally { - rmSync(staging, { recursive: true }) - } -} - -await main() diff --git a/benchmarks/client-nav/link-performance/stable-worker.test.ts b/benchmarks/client-nav/link-performance/stable-worker.test.ts deleted file mode 100644 index 087b32414a..0000000000 --- a/benchmarks/client-nav/link-performance/stable-worker.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { fork } from 'node:child_process' -import { rmdirSync, unlinkSync, writeFileSync } from 'node:fs' -import { join } from 'node:path' -import { fileURLToPath } from 'node:url' -import { expect, test } from 'vitest' -import { createStagingDirectory } from './staging' -import type { WorkerResponse } from './worker-protocol' - -test('loads emitted JavaScript without retranspiling it through SWC', async () => { - const directory = createStagingDirectory() - const bundle = join(directory, 'app.mjs') - const definition = 'function untouched ( ) { return 1 }' - writeFileSync( - bundle, - `${definition}\nawait Promise.resolve()\nthrow new Error(untouched.toString())`, - ) - const worker = fork( - fileURLToPath(new URL('./stable-worker.ts', import.meta.url)), - { - cwd: fileURLToPath(new URL('../../../', import.meta.url)), - execArgv: ['--import=@swc-node/register/esm-register'], - env: { ...process.env, NODE_ENV: 'production' }, - stdio: ['ignore', 'ignore', 'pipe', 'ipc'], - }, - ) - let stderr = '' - worker.stderr?.on('data', (data: Buffer) => { - stderr += data.toString() - }) - let timeout: ReturnType | undefined - try { - const result = new Promise((resolve, reject) => { - worker.once('message', (message: WorkerResponse) => resolve(message)) - worker.once('error', reject) - worker.once('exit', (code) => { - reject(new Error(`Worker exited (${code}): ${stderr}`)) - }) - timeout = setTimeout(() => { - reject(new Error(`Worker timed out: ${stderr}`)) - }, 5_000) - }) - worker.send({ - kind: 'init', - mode: 'ssr', - caseId: 'shared-params', - bundle, - variant: 0, - }) - const response = await result - expect(response.kind).toBe('error') - if (response.kind === 'error') { - expect(response.message).toContain(`Error: ${definition}`) - } - } finally { - clearTimeout(timeout) - worker.kill() - unlinkSync(bundle) - rmdirSync(directory) - } -}) diff --git a/benchmarks/client-nav/link-performance/stable-worker.ts b/benchmarks/client-nav/link-performance/stable-worker.ts deleted file mode 100644 index d98679dc15..0000000000 --- a/benchmarks/client-nav/link-performance/stable-worker.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { pathToFileURL } from 'node:url' -import { createClientScenario, createSsrScenario } from './scenario' -import type { LinkScenario } from './scenario' -import type { WorkerRequest, WorkerResponse } from './worker-protocol' -import type * as ClientApp from './src/client' -import type * as SsrApp from './src/ssr' - -const scenarios: Array = [] -const creationOrder: Array = [] -let closeWindow = () => {} - -function reply(response: WorkerResponse) { - if (!process.send) { - throw new Error('The Link sampling worker requires an IPC parent') - } - process.send(response) -} - -async function handle(request: WorkerRequest) { - if (request.kind === 'init') { - if (typeof process.threadCpuUsage !== 'function') { - throw new Error( - 'Stable sampling requires Node.js with process.threadCpuUsage', - ) - } - if (scenarios[request.variant]) { - throw new Error('A worker must only initialize each variant once') - } - let scenario: LinkScenario - const bundleUrl = pathToFileURL(request.bundle) - bundleUrl.searchParams.set('linkPerfVariant', String(request.variant)) - if (request.mode === 'client') { - const { window } = await import('../jsdom') - closeWindow = () => window.close() - const app: typeof ClientApp = await import(bundleUrl.href) - if (app.serverEnvironment !== false) { - throw new Error('Expected a production client bundle') - } - scenario = createClientScenario(app, request.caseId) - } else { - const app: typeof SsrApp = await import(bundleUrl.href) - if (app.serverEnvironment !== true) { - throw new Error('Expected a production SSR bundle') - } - scenario = createSsrScenario(app, request.caseId) - } - scenarios[request.variant] = scenario - creationOrder.push(scenario) - await scenario.setup() - const start = performance.now() - let iterations = 0 - do { - await scenario.batch() - iterations++ - } while (iterations < 100 || performance.now() - start < 2_000) - reply({ - kind: 'ready', - batchMs: (performance.now() - start) / iterations, - }) - return - } - if (request.kind === 'measure') { - const scenario = scenarios[request.variant] - if (!scenario) { - throw new Error('The sampling worker has not been initialized') - } - if (!Number.isInteger(request.iterations) || request.iterations < 1) { - throw new Error('Expected a positive batch count') - } - const cpuStart = process.threadCpuUsage() - const processStart = process.cpuUsage() - const start = performance.now() - for (let index = 0; index < request.iterations; index++) { - await scenario.batch() - } - const wallMs = performance.now() - start - const cpu = process.threadCpuUsage(cpuStart) - const processCpu = process.cpuUsage(processStart) - reply({ - kind: 'sample', - sample: { - iterations: request.iterations, - wallMs: wallMs / request.iterations, - cpuMs: (cpu.user + cpu.system) / 1_000 / request.iterations, - processCpuMs: - (processCpu.user + processCpu.system) / 1_000 / request.iterations, - }, - }) - return - } - try { - for (const scenario of creationOrder) { - scenario.check() - } - } finally { - for (const scenario of creationOrder.reverse()) { - scenario.teardown() - } - closeWindow() - } - reply({ kind: 'stopped' }) -} - -process.on('message', (request: WorkerRequest) => { - void handle(request).catch((error: unknown) => { - reply({ - kind: 'error', - message: - error instanceof Error ? error.stack || error.message : String(error), - }) - }) -}) diff --git a/benchmarks/client-nav/link-performance/staging.ts b/benchmarks/client-nav/link-performance/staging.ts deleted file mode 100644 index ac07d34c29..0000000000 --- a/benchmarks/client-nav/link-performance/staging.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { mkdirSync, mkdtempSync } from 'node:fs' -import { resolve } from 'node:path' -import { fileURLToPath } from 'node:url' - -export function createStagingDirectory() { - // SWC skips node_modules, leaving the emitted benchmark JavaScript intact. - const root = fileURLToPath(new URL('./node_modules/.cache/', import.meta.url)) - mkdirSync(root, { recursive: true }) - return mkdtempSync(resolve(root, 'link-performance-')) -} diff --git a/benchmarks/client-nav/link-performance/statistics.test.ts b/benchmarks/client-nav/link-performance/statistics.test.ts deleted file mode 100644 index 8f5f37413b..0000000000 --- a/benchmarks/client-nav/link-performance/statistics.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { expect, test } from 'vitest' -import { classify, mean, summarizeRatios } from './statistics' - -test('summarizes multiplicative paired changes across process replicas', () => { - const result = summarizeRatios([0.9, 0.9, 0.9, 0.9]) - expect(result.changePercent).toBeCloseTo(-10) - expect(result.low95).toBeCloseTo(-10) - expect(result.high95).toBeCloseTo(-10) - expect(result.replicas).toBe(4) -}) - -test('does not turn opposite noisy runs into a conclusive result', () => { - const result = summarizeRatios([0.9, 1.1, 0.95, 1.05]) - expect(result.low95).toBeLessThan(0) - expect(result.high95).toBeGreaterThan(0) - expect(classify(result, result)).toBe('inconclusive') -}) - -test('requires CPU and wall time to corroborate a direction', () => { - const slower = summarizeRatios([1.08, 1.09, 1.08, 1.09]) - const faster = summarizeRatios([0.9, 0.91, 0.9, 0.91]) - expect(classify(slower, slower)).toBe('slower') - expect(classify(faster, faster)).toBe('faster') - expect(classify(slower, faster)).toBe('inconclusive') - expect(classify(summarizeRatios([1, 1, 1]), summarizeRatios([1, 1, 1]))).toBe( - 'within-2%', - ) -}) - -test('rejects incomplete or invalid sampling data', () => { - expect(() => summarizeRatios([1])).toThrow() - expect(() => summarizeRatios([0, 1])).toThrow() - expect(() => summarizeRatios([NaN, 1])).toThrow() - expect(() => mean([])).toThrow() - expect(() => mean([Infinity])).toThrow() -}) diff --git a/benchmarks/client-nav/link-performance/statistics.ts b/benchmarks/client-nav/link-performance/statistics.ts deleted file mode 100644 index 469bdaf65a..0000000000 --- a/benchmarks/client-nav/link-performance/statistics.ts +++ /dev/null @@ -1,57 +0,0 @@ -const critical95 = [ - 12.7062, 4.3027, 3.1824, 2.7764, 2.5706, 2.4469, 2.3646, 2.306, 2.2622, - 2.2281, -] - -export function mean(values: ReadonlyArray) { - if (!values.length || values.some((value) => !Number.isFinite(value))) { - throw new Error('Expected finite, nonempty samples') - } - return values.reduce((sum, value) => sum + value, 0) / values.length -} - -export function summarizeRatios(ratios: ReadonlyArray) { - if ( - ratios.length < 2 || - ratios.length > 11 || - ratios.some((value) => value <= 0) - ) { - throw new Error('Expected 2-11 independent positive process-replica ratios') - } - const logs = ratios.map(Math.log) - const center = mean(logs) - const variance = - logs.reduce((sum, value) => sum + (value - center) ** 2, 0) / - (logs.length - 1) - // Replicas, not the many correlated batches inside a worker, are the samples. - const margin = - critical95[logs.length - 2]! * Math.sqrt(variance / logs.length) - const percent = (value: number) => (Math.exp(value) - 1) * 100 - return { - changePercent: percent(center), - low95: percent(center - margin), - high95: percent(center + margin), - replicas: ratios.length, - } -} - -export function classify( - cpu: ReturnType, - wall: ReturnType, -) { - if (cpu.low95 > 0 && wall.low95 > 0) { - return 'slower' - } - if (cpu.high95 < 0 && wall.high95 < 0) { - return 'faster' - } - if ( - cpu.low95 >= -2 && - cpu.high95 <= 2 && - wall.low95 >= -2 && - wall.high95 <= 2 - ) { - return 'within-2%' - } - return 'inconclusive' -} diff --git a/benchmarks/client-nav/link-performance/tsconfig.json b/benchmarks/client-nav/link-performance/tsconfig.json deleted file mode 100644 index fbf230c977..0000000000 --- a/benchmarks/client-nav/link-performance/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "react", - "types": ["node", "vite/client", "vitest/globals"] - }, - "include": [ - "./**/*.ts", - "./**/*.tsx", - "../scenarios/harness.ts", - "../setup-helpers.ts", - "../vitest.setup.ts" - ] -} diff --git a/benchmarks/client-nav/link-performance/vite.client.config.ts b/benchmarks/client-nav/link-performance/vite.client.config.ts deleted file mode 100644 index 1cd45fc45e..0000000000 --- a/benchmarks/client-nav/link-performance/vite.client.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { createLinkPerformanceConfig } from './config' - -export default createLinkPerformanceConfig('client') diff --git a/benchmarks/client-nav/link-performance/vite.ssr.config.ts b/benchmarks/client-nav/link-performance/vite.ssr.config.ts deleted file mode 100644 index f59148eaf6..0000000000 --- a/benchmarks/client-nav/link-performance/vite.ssr.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { createLinkPerformanceConfig } from './config' - -export default createLinkPerformanceConfig('ssr') diff --git a/benchmarks/client-nav/link-performance/vitest.config.ts b/benchmarks/client-nav/link-performance/vitest.config.ts deleted file mode 100644 index f8454c819d..0000000000 --- a/benchmarks/client-nav/link-performance/vitest.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { fileURLToPath } from 'node:url' -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - root: fileURLToPath(new URL('.', import.meta.url)), - test: { - watch: false, - environment: 'node', - include: ['*.test.ts'], - }, -}) diff --git a/benchmarks/client-nav/link-performance/worker-protocol.ts b/benchmarks/client-nav/link-performance/worker-protocol.ts deleted file mode 100644 index 474858a529..0000000000 --- a/benchmarks/client-nav/link-performance/worker-protocol.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { LinkCaseId } from './cases' - -export type Mode = 'client' | 'ssr' -export type Variant = 0 | 1 - -export type WorkerRequest = - | { - kind: 'init' - mode: Mode - caseId: LinkCaseId - bundle: string - variant: Variant - } - | { kind: 'measure'; iterations: number; variant: Variant } - | { kind: 'stop' } - -export interface BlockSample { - wallMs: number - cpuMs: number - processCpuMs: number - iterations: number -} - -export type WorkerResponse = - | { kind: 'ready'; batchMs: number } - | { kind: 'sample'; sample: BlockSample } - | { kind: 'stopped' } - | { kind: 'error'; message: string } diff --git a/benchmarks/client-nav/package.json b/benchmarks/client-nav/package.json index 1f878adc67..9fdd1186dc 100644 --- a/benchmarks/client-nav/package.json +++ b/benchmarks/client-nav/package.json @@ -9,43 +9,39 @@ "test:flame:react": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./react/speed.flame.ts", "test:flame:solid": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./solid/speed.flame.ts", "test:flame:vue": "NODE_ENV=production flame run --md-format=detailed --delay=none --node-options=\"--stack-size=65500\" ./vue/speed.flame.ts", - "test:perf": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.config.ts", - "test:perf:react": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.react.config.ts", - "test:perf:solid": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.solid.config.ts", - "test:perf:vue": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.vue.config.ts", + "test:perf": "NODE_ENV=production vitest bench --config ./vitest.config.ts", + "test:perf:react": "NODE_ENV=production vitest bench --config ./vitest.react.config.ts", + "test:perf:solid": "NODE_ENV=production vitest bench --config ./vitest.solid.config.ts", + "test:perf:vue": "NODE_ENV=production vitest bench --config ./vitest.vue.config.ts", "test:types": "pnpm run test:types:react && pnpm run test:types:solid && pnpm run test:types:vue", "test:types:react": "tsc -p ./react/tsconfig.json --noEmit", "test:types:solid": "tsc -p ./solid/tsconfig.json --noEmit", "test:types:vue": "tsc -p ./vue/tsconfig.json --noEmit" }, "dependencies": { - "@tanstack/history": "workspace:^", + "@solidjs/web": "2.0.0-beta.25", "@tanstack/react-router": "workspace:^", "@tanstack/router-core": "workspace:^", "@tanstack/solid-router": "workspace:^", "@tanstack/vue-router": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "vue": "^3.5.16" }, "devDependencies": { + "@codspeed/vitest-plugin": "^5.5.0", "@platformatic/flame": "^1.6.0", - "@codspeed/vitest-plugin": "^6.0.1", "@tanstack/router-plugin": "workspace:^", "@testing-library/react": "^16.2.0", + "@types/jsdom": "28.0.0", "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "@types/jsdom": "28.0.0", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@typescript/native": "npm:typescript@^7.0.2", - "jsdom": "^29.1.1", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11", - "vitest": "catalog:" + "vite-plugin-solid": "^3.0.0-next.16", + "vitest": "^4.1.4" }, "nx": { "targets": { @@ -64,8 +60,6 @@ "@benchmarks/client-nav-control-flow-react", "@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,8 +88,6 @@ "@benchmarks/client-nav-control-flow-solid", "@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", @@ -124,7 +116,6 @@ "@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", @@ -183,13 +174,7 @@ ] }, "test:types": { - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "{workspaceRoot}/benchmarks/cpu-simulation.ts", - "dependentTaskOutputs" - ], + "cache": false, "dependsOn": [ "^build", { @@ -206,13 +191,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-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/react/speed.bench.ts b/benchmarks/client-nav/react/speed.bench.ts index 944f182734..fcc15b5fbc 100644 --- a/benchmarks/client-nav/react/speed.bench.ts +++ b/benchmarks/client-nav/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { setup } from './setup' -test('client-nav', async ({ bench }) => { - const scenario = setup() +describe('client-nav', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-side navigation loop (react)', - { beforeAll: scenario.before, afterAll: scenario.after }, async () => { for (let i = 0; i < 10; i++) { - await scenario.tick() + await test.tick() } }, - ).run({ - warmupIterations: 100, - time: 10_000, - }) + { + warmupIterations: 100, + time: 10_000, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/react/vite.config.ts b/benchmarks/client-nav/react/vite.config.ts index 7df3f80e71..adc31ddd64 100644 --- a/benchmarks/client-nav/react/vite.config.ts +++ b/benchmarks/client-nav/react/vite.config.ts @@ -2,7 +2,6 @@ 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' // Anchor the project root to the package directory so this config resolves // identically when run directly and as part of an aggregate `projects` config. @@ -29,11 +28,9 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav (react)', watch: false, environment: 'jsdom', setupFiles: [`${rootDir}vitest.setup.ts`], - benchmark: { include: ['react/speed.bench.ts'] }, }, }) diff --git a/benchmarks/client-nav/scenarios/async-pipeline/react/speed.bench.ts b/benchmarks/client-nav/scenarios/async-pipeline/react/speed.bench.ts index 65dab0781e..68c5f97c2f 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-async-pipeline', async ({ bench }) => { - const scenario = setup() +describe('client-async-pipeline', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-async-pipeline navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/async-pipeline/react/src/main.tsx b/benchmarks/client-nav/scenarios/async-pipeline/react/src/main.tsx index cab86a1272..4b141859e6 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/async-pipeline/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -24,8 +22,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/async-pipeline/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/async-pipeline/react/src/routeTree.gen.ts index 9c79bab826..2b3336859a 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/react/src/routeTree.gen.ts @@ -9,25 +9,25 @@ // 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 IndexRouteImport } from './routes/index' import { Route as NestedRouteImport } from './routes/nested' -import { Route as CtxIdRouteImport } from './routes/ctx.$id' -import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as SlowIdRouteImport } from './routes/slow.$id' +import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as CtxIdRouteImport } from './routes/ctx.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const NestedRoute = NestedRouteImport.update({ id: '/nested', path: '/nested', getParentRoute: () => rootRouteImport, } as any) -const CtxIdRoute = CtxIdRouteImport.update({ - id: '/ctx/$id', - path: '/ctx/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const SlowIdRoute = SlowIdRouteImport.update({ + id: '/slow/$id', + path: '/slow/$id', getParentRoute: () => rootRouteImport, } as any) const NestedIdRoute = NestedIdRouteImport.update({ @@ -35,9 +35,9 @@ const NestedIdRoute = NestedIdRouteImport.update({ path: '/$id', getParentRoute: () => NestedRoute, } as any) -const SlowIdRoute = SlowIdRouteImport.update({ - id: '/slow/$id', - path: '/slow/$id', +const CtxIdRoute = CtxIdRouteImport.update({ + id: '/ctx/$id', + path: '/ctx/$id', getParentRoute: () => rootRouteImport, } as any) @@ -80,13 +80,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/nested': { id: '/nested' path: '/nested' @@ -94,11 +87,18 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof NestedRouteImport parentRoute: typeof rootRouteImport } - '/ctx/$id': { - id: '/ctx/$id' - path: '/ctx/$id' - fullPath: '/ctx/$id' - preLoaderRoute: typeof CtxIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/slow/$id': { + id: '/slow/$id' + path: '/slow/$id' + fullPath: '/slow/$id' + preLoaderRoute: typeof SlowIdRouteImport parentRoute: typeof rootRouteImport } '/nested/$id': { @@ -108,11 +108,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof NestedIdRouteImport parentRoute: typeof NestedRoute } - '/slow/$id': { - id: '/slow/$id' - path: '/slow/$id' - fullPath: '/slow/$id' - preLoaderRoute: typeof SlowIdRouteImport + '/ctx/$id': { + id: '/ctx/$id' + path: '/ctx/$id' + fullPath: '/ctx/$id' + preLoaderRoute: typeof CtxIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/async-pipeline/react/vite.config.ts b/benchmarks/client-nav/scenarios/async-pipeline/react/vite.config.ts index e36a5244b1..7161c9a13d 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav async-pipeline (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/async-pipeline/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/async-pipeline/solid/speed.bench.ts index acef710469..d1f620f447 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-async-pipeline', async ({ bench }) => { - const scenario = setup() +describe('client-async-pipeline', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-async-pipeline navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/async-pipeline/solid/src/main.tsx b/benchmarks/client-nav/scenarios/async-pipeline/solid/src/main.tsx index 4c6d49f501..c9268ec31c 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/async-pipeline/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -24,8 +22,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/async-pipeline/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/async-pipeline/solid/src/routeTree.gen.ts index 27b9498b11..7c15baf4e9 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/solid/src/routeTree.gen.ts @@ -9,25 +9,25 @@ // 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 IndexRouteImport } from './routes/index' import { Route as NestedRouteImport } from './routes/nested' -import { Route as CtxIdRouteImport } from './routes/ctx.$id' -import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as SlowIdRouteImport } from './routes/slow.$id' +import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as CtxIdRouteImport } from './routes/ctx.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const NestedRoute = NestedRouteImport.update({ id: '/nested', path: '/nested', getParentRoute: () => rootRouteImport, } as any) -const CtxIdRoute = CtxIdRouteImport.update({ - id: '/ctx/$id', - path: '/ctx/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const SlowIdRoute = SlowIdRouteImport.update({ + id: '/slow/$id', + path: '/slow/$id', getParentRoute: () => rootRouteImport, } as any) const NestedIdRoute = NestedIdRouteImport.update({ @@ -35,9 +35,9 @@ const NestedIdRoute = NestedIdRouteImport.update({ path: '/$id', getParentRoute: () => NestedRoute, } as any) -const SlowIdRoute = SlowIdRouteImport.update({ - id: '/slow/$id', - path: '/slow/$id', +const CtxIdRoute = CtxIdRouteImport.update({ + id: '/ctx/$id', + path: '/ctx/$id', getParentRoute: () => rootRouteImport, } as any) @@ -80,13 +80,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/nested': { id: '/nested' path: '/nested' @@ -94,11 +87,18 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof NestedRouteImport parentRoute: typeof rootRouteImport } - '/ctx/$id': { - id: '/ctx/$id' - path: '/ctx/$id' - fullPath: '/ctx/$id' - preLoaderRoute: typeof CtxIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/slow/$id': { + id: '/slow/$id' + path: '/slow/$id' + fullPath: '/slow/$id' + preLoaderRoute: typeof SlowIdRouteImport parentRoute: typeof rootRouteImport } '/nested/$id': { @@ -108,11 +108,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof NestedIdRouteImport parentRoute: typeof NestedRoute } - '/slow/$id': { - id: '/slow/$id' - path: '/slow/$id' - fullPath: '/slow/$id' - preLoaderRoute: typeof SlowIdRouteImport + '/ctx/$id': { + id: '/ctx/$id' + path: '/ctx/$id' + fullPath: '/ctx/$id' + preLoaderRoute: typeof CtxIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/async-pipeline/solid/tsconfig.json b/benchmarks/client-nav/scenarios/async-pipeline/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/async-pipeline/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/async-pipeline/solid/vite.config.ts b/benchmarks/client-nav/scenarios/async-pipeline/solid/vite.config.ts index 214da8042e..5107c1f056 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav async-pipeline (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/async-pipeline/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/async-pipeline/vue/speed.bench.ts index f0fd3e58df..eeb568323c 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-async-pipeline', async ({ bench }) => { - const scenario = setup() +describe('client-async-pipeline', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-async-pipeline navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/async-pipeline/vue/src/main.tsx b/benchmarks/client-nav/scenarios/async-pipeline/vue/src/main.tsx index e1bfa5965f..d8e659fb09 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/async-pipeline/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -24,8 +22,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/async-pipeline/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/async-pipeline/vue/src/routeTree.gen.ts index 66b9efd7aa..ce26dc62d1 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/vue/src/routeTree.gen.ts @@ -9,25 +9,25 @@ // 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 IndexRouteImport } from './routes/index' import { Route as NestedRouteImport } from './routes/nested' -import { Route as CtxIdRouteImport } from './routes/ctx.$id' -import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as SlowIdRouteImport } from './routes/slow.$id' +import { Route as NestedIdRouteImport } from './routes/nested.$id' +import { Route as CtxIdRouteImport } from './routes/ctx.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const NestedRoute = NestedRouteImport.update({ id: '/nested', path: '/nested', getParentRoute: () => rootRouteImport, } as any) -const CtxIdRoute = CtxIdRouteImport.update({ - id: '/ctx/$id', - path: '/ctx/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const SlowIdRoute = SlowIdRouteImport.update({ + id: '/slow/$id', + path: '/slow/$id', getParentRoute: () => rootRouteImport, } as any) const NestedIdRoute = NestedIdRouteImport.update({ @@ -35,9 +35,9 @@ const NestedIdRoute = NestedIdRouteImport.update({ path: '/$id', getParentRoute: () => NestedRoute, } as any) -const SlowIdRoute = SlowIdRouteImport.update({ - id: '/slow/$id', - path: '/slow/$id', +const CtxIdRoute = CtxIdRouteImport.update({ + id: '/ctx/$id', + path: '/ctx/$id', getParentRoute: () => rootRouteImport, } as any) @@ -80,13 +80,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/nested': { id: '/nested' path: '/nested' @@ -94,11 +87,18 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof NestedRouteImport parentRoute: typeof rootRouteImport } - '/ctx/$id': { - id: '/ctx/$id' - path: '/ctx/$id' - fullPath: '/ctx/$id' - preLoaderRoute: typeof CtxIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/slow/$id': { + id: '/slow/$id' + path: '/slow/$id' + fullPath: '/slow/$id' + preLoaderRoute: typeof SlowIdRouteImport parentRoute: typeof rootRouteImport } '/nested/$id': { @@ -108,11 +108,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof NestedIdRouteImport parentRoute: typeof NestedRoute } - '/slow/$id': { - id: '/slow/$id' - path: '/slow/$id' - fullPath: '/slow/$id' - preLoaderRoute: typeof SlowIdRouteImport + '/ctx/$id': { + id: '/ctx/$id' + path: '/ctx/$id' + fullPath: '/ctx/$id' + preLoaderRoute: typeof CtxIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/async-pipeline/vue/vite.config.ts b/benchmarks/client-nav/scenarios/async-pipeline/vue/vite.config.ts index ce4fa7318a..e16a8ee828 100644 --- a/benchmarks/client-nav/scenarios/async-pipeline/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/async-pipeline/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav async-pipeline (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/control-flow/react/speed.bench.ts b/benchmarks/client-nav/scenarios/control-flow/react/speed.bench.ts index d6f2190be7..55a2224d3a 100644 --- a/benchmarks/client-nav/scenarios/control-flow/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/control-flow/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-control-flow', async ({ bench }) => { - const scenario = setup() +describe('client-control-flow', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-control-flow navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/control-flow/react/src/main.tsx b/benchmarks/client-nav/scenarios/control-flow/react/src/main.tsx index da9e63d293..9a0c3d3b50 100644 --- a/benchmarks/client-nav/scenarios/control-flow/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/control-flow/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() // The scenario intentionally throws loader errors every lap; keep React 19's // default per-caught-error console reporting out of the measured loop. diff --git a/benchmarks/client-nav/scenarios/control-flow/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/control-flow/react/src/routeTree.gen.ts index 7b6db9b237..86edcc8472 100644 --- a/benchmarks/client-nav/scenarios/control-flow/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/control-flow/react/src/routeTree.gen.ts @@ -9,26 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as BrokenRouteImport } from './routes/broken' -import { Route as Hop1RouteImport } from './routes/hop1' -import { Route as Hop2RouteImport } from './routes/hop2' import { Route as TargetRouteImport } from './routes/target' +import { Route as Hop2RouteImport } from './routes/hop2' +import { Route as Hop1RouteImport } from './routes/hop1' +import { Route as BrokenRouteImport } from './routes/broken' +import { Route as IndexRouteImport } from './routes/index' import { Route as MissingIdRouteImport } from './routes/missing.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const BrokenRoute = BrokenRouteImport.update({ - id: '/broken', - path: '/broken', - getParentRoute: () => rootRouteImport, -} as any) -const Hop1Route = Hop1RouteImport.update({ - id: '/hop1', - path: '/hop1', +const TargetRoute = TargetRouteImport.update({ + id: '/target', + path: '/target', getParentRoute: () => rootRouteImport, } as any) const Hop2Route = Hop2RouteImport.update({ @@ -36,9 +26,19 @@ const Hop2Route = Hop2RouteImport.update({ path: '/hop2', getParentRoute: () => rootRouteImport, } as any) -const TargetRoute = TargetRouteImport.update({ - id: '/target', - path: '/target', +const Hop1Route = Hop1RouteImport.update({ + id: '/hop1', + path: '/hop1', + getParentRoute: () => rootRouteImport, +} as any) +const BrokenRoute = BrokenRouteImport.update({ + id: '/broken', + path: '/broken', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -98,25 +98,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/broken': { - id: '/broken' - path: '/broken' - fullPath: '/broken' - preLoaderRoute: typeof BrokenRouteImport - parentRoute: typeof rootRouteImport - } - '/hop1': { - id: '/hop1' - path: '/hop1' - fullPath: '/hop1' - preLoaderRoute: typeof Hop1RouteImport + '/target': { + id: '/target' + path: '/target' + fullPath: '/target' + preLoaderRoute: typeof TargetRouteImport parentRoute: typeof rootRouteImport } '/hop2': { @@ -126,11 +112,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof Hop2RouteImport parentRoute: typeof rootRouteImport } - '/target': { - id: '/target' - path: '/target' - fullPath: '/target' - preLoaderRoute: typeof TargetRouteImport + '/hop1': { + id: '/hop1' + path: '/hop1' + fullPath: '/hop1' + preLoaderRoute: typeof Hop1RouteImport + parentRoute: typeof rootRouteImport + } + '/broken': { + id: '/broken' + path: '/broken' + fullPath: '/broken' + preLoaderRoute: typeof BrokenRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { diff --git a/benchmarks/client-nav/scenarios/control-flow/react/src/routes/broken.tsx b/benchmarks/client-nav/scenarios/control-flow/react/src/routes/broken.tsx index b11bb845bc..2dc4a26486 100644 --- a/benchmarks/client-nav/scenarios/control-flow/react/src/routes/broken.tsx +++ b/benchmarks/client-nav/scenarios/control-flow/react/src/routes/broken.tsx @@ -12,9 +12,5 @@ export const Route = createFileRoute('/broken')({ }) function BrokenError(props: ErrorComponentProps) { - return ( -
- {props.error instanceof Error ? props.error.message : String(props.error)} -
- ) + return
{props.error.message}
} diff --git a/benchmarks/client-nav/scenarios/control-flow/react/vite.config.ts b/benchmarks/client-nav/scenarios/control-flow/react/vite.config.ts index 1eefca0fc3..1aa2c1fa35 100644 --- a/benchmarks/client-nav/scenarios/control-flow/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/control-flow/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav control-flow (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/control-flow/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/control-flow/solid/speed.bench.ts index d803d2a313..abbb85a575 100644 --- a/benchmarks/client-nav/scenarios/control-flow/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/control-flow/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-control-flow', async ({ bench }) => { - const scenario = setup() +describe('client-control-flow', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-control-flow navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/control-flow/solid/src/main.tsx b/benchmarks/client-nav/scenarios/control-flow/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/control-flow/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/control-flow/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/control-flow/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/control-flow/solid/src/routeTree.gen.ts index cd84f99d5d..44d88e9f8d 100644 --- a/benchmarks/client-nav/scenarios/control-flow/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/control-flow/solid/src/routeTree.gen.ts @@ -9,26 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as BrokenRouteImport } from './routes/broken' -import { Route as Hop1RouteImport } from './routes/hop1' -import { Route as Hop2RouteImport } from './routes/hop2' import { Route as TargetRouteImport } from './routes/target' +import { Route as Hop2RouteImport } from './routes/hop2' +import { Route as Hop1RouteImport } from './routes/hop1' +import { Route as BrokenRouteImport } from './routes/broken' +import { Route as IndexRouteImport } from './routes/index' import { Route as MissingIdRouteImport } from './routes/missing.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const BrokenRoute = BrokenRouteImport.update({ - id: '/broken', - path: '/broken', - getParentRoute: () => rootRouteImport, -} as any) -const Hop1Route = Hop1RouteImport.update({ - id: '/hop1', - path: '/hop1', +const TargetRoute = TargetRouteImport.update({ + id: '/target', + path: '/target', getParentRoute: () => rootRouteImport, } as any) const Hop2Route = Hop2RouteImport.update({ @@ -36,9 +26,19 @@ const Hop2Route = Hop2RouteImport.update({ path: '/hop2', getParentRoute: () => rootRouteImport, } as any) -const TargetRoute = TargetRouteImport.update({ - id: '/target', - path: '/target', +const Hop1Route = Hop1RouteImport.update({ + id: '/hop1', + path: '/hop1', + getParentRoute: () => rootRouteImport, +} as any) +const BrokenRoute = BrokenRouteImport.update({ + id: '/broken', + path: '/broken', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -98,25 +98,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/broken': { - id: '/broken' - path: '/broken' - fullPath: '/broken' - preLoaderRoute: typeof BrokenRouteImport - parentRoute: typeof rootRouteImport - } - '/hop1': { - id: '/hop1' - path: '/hop1' - fullPath: '/hop1' - preLoaderRoute: typeof Hop1RouteImport + '/target': { + id: '/target' + path: '/target' + fullPath: '/target' + preLoaderRoute: typeof TargetRouteImport parentRoute: typeof rootRouteImport } '/hop2': { @@ -126,11 +112,25 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof Hop2RouteImport parentRoute: typeof rootRouteImport } - '/target': { - id: '/target' - path: '/target' - fullPath: '/target' - preLoaderRoute: typeof TargetRouteImport + '/hop1': { + id: '/hop1' + path: '/hop1' + fullPath: '/hop1' + preLoaderRoute: typeof Hop1RouteImport + parentRoute: typeof rootRouteImport + } + '/broken': { + id: '/broken' + path: '/broken' + fullPath: '/broken' + preLoaderRoute: typeof BrokenRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { diff --git a/benchmarks/client-nav/scenarios/control-flow/solid/tsconfig.json b/benchmarks/client-nav/scenarios/control-flow/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/control-flow/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/control-flow/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/control-flow/solid/vite.config.ts b/benchmarks/client-nav/scenarios/control-flow/solid/vite.config.ts index f4fa916154..1c6244d3d1 100644 --- a/benchmarks/client-nav/scenarios/control-flow/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/control-flow/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav control-flow (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/control-flow/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/control-flow/vue/speed.bench.ts index 8a019945c7..551b88e68f 100644 --- a/benchmarks/client-nav/scenarios/control-flow/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/control-flow/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-control-flow', async ({ bench }) => { - const scenario = setup() +describe('client-control-flow', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-control-flow navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/control-flow/vue/src/main.tsx b/benchmarks/client-nav/scenarios/control-flow/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/control-flow/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/control-flow/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/control-flow/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/control-flow/vue/src/routeTree.gen.ts index 6b53a6a203..60fc846f89 100644 --- a/benchmarks/client-nav/scenarios/control-flow/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/control-flow/vue/src/routeTree.gen.ts @@ -9,26 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as BrokenRouteImport } from './routes/broken' -import { Route as Hop1RouteImport } from './routes/hop1' -import { Route as Hop2RouteImport } from './routes/hop2' import { Route as TargetRouteImport } from './routes/target' +import { Route as Hop2RouteImport } from './routes/hop2' +import { Route as Hop1RouteImport } from './routes/hop1' +import { Route as BrokenRouteImport } from './routes/broken' +import { Route as IndexRouteImport } from './routes/index' import { Route as MissingIdRouteImport } from './routes/missing.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const BrokenRoute = BrokenRouteImport.update({ - id: '/broken', - path: '/broken', - getParentRoute: () => rootRouteImport, -} as any) -const Hop1Route = Hop1RouteImport.update({ - id: '/hop1', - path: '/hop1', +const TargetRoute = TargetRouteImport.update({ + id: '/target', + path: '/target', getParentRoute: () => rootRouteImport, } as any) const Hop2Route = Hop2RouteImport.update({ @@ -36,9 +26,19 @@ const Hop2Route = Hop2RouteImport.update({ path: '/hop2', getParentRoute: () => rootRouteImport, } as any) -const TargetRoute = TargetRouteImport.update({ - id: '/target', - path: '/target', +const Hop1Route = Hop1RouteImport.update({ + id: '/hop1', + path: '/hop1', + getParentRoute: () => rootRouteImport, +} as any) +const BrokenRoute = BrokenRouteImport.update({ + id: '/broken', + path: '/broken', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -98,25 +98,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/broken': { - id: '/broken' - path: '/broken' - fullPath: '/broken' - preLoaderRoute: typeof BrokenRouteImport - parentRoute: typeof rootRouteImport - } - '/hop1': { - id: '/hop1' - path: '/hop1' - fullPath: '/hop1' - preLoaderRoute: typeof Hop1RouteImport + '/target': { + id: '/target' + path: '/target' + fullPath: '/target' + preLoaderRoute: typeof TargetRouteImport parentRoute: typeof rootRouteImport } '/hop2': { @@ -126,11 +112,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof Hop2RouteImport parentRoute: typeof rootRouteImport } - '/target': { - id: '/target' - path: '/target' - fullPath: '/target' - preLoaderRoute: typeof TargetRouteImport + '/hop1': { + id: '/hop1' + path: '/hop1' + fullPath: '/hop1' + preLoaderRoute: typeof Hop1RouteImport + parentRoute: typeof rootRouteImport + } + '/broken': { + id: '/broken' + path: '/broken' + fullPath: '/broken' + preLoaderRoute: typeof BrokenRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { diff --git a/benchmarks/client-nav/scenarios/control-flow/vue/vite.config.ts b/benchmarks/client-nav/scenarios/control-flow/vue/vite.config.ts index 3c2750d2a6..4694cf69c8 100644 --- a/benchmarks/client-nav/scenarios/control-flow/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/control-flow/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav control-flow (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/harness.ts b/benchmarks/client-nav/scenarios/harness.ts index cf3c39c7e6..7b993d0ed8 100644 --- a/benchmarks/client-nav/scenarios/harness.ts +++ b/benchmarks/client-nav/scenarios/harness.ts @@ -1,9 +1,3 @@ -import { - createBrowserHistory, - createMemoryHistory, - type RouterHistory, -} from '@tanstack/history' -import { JSDOM } from 'jsdom' import { getRequiredLink, waitForRequiredLink } from '../setup-helpers' export interface ScenarioRouter { @@ -82,16 +76,6 @@ async function settle(hops: number) { } const MAX_SETTLE_HOPS = 100 -const BATCH_SETTLE_HOPS = 4 - -/** - * Close the batch at a deterministic macrotask boundary. Four fixed hops give - * framework passive effects and scheduler callbacks time to run without - * changing the amount of navigation work in the batch. - */ -async function finishBatch() { - await settle(BATCH_SETTLE_HOPS) -} async function settleUntil(isSettled: () => boolean, label: string) { for (let i = 0; i < MAX_SETTLE_HOPS; i++) { @@ -117,19 +101,14 @@ async function settleUntil(isSettled: () => boolean, label: string) { * conventions already forbid real-delay timers in measured code; non-zero * delays are passed through untouched. */ -interface TimerWindow { - setTimeout: typeof window.setTimeout - clearTimeout: typeof window.clearTimeout -} - -function patchZeroDelayTimeouts(targetWindow: TimerWindow) { - const originalSetTimeout = targetWindow.setTimeout.bind(targetWindow) - const originalClearTimeout = targetWindow.clearTimeout.bind(targetWindow) +function patchZeroDelayTimeouts() { + const originalSetTimeout = window.setTimeout.bind(window) + const originalClearTimeout = window.clearTimeout.bind(window) const immediates = new Map() // Negative ids cannot collide with real jsdom timer ids. let nextImmediateId = -2 - targetWindow.setTimeout = (( + window.setTimeout = (( handler: (...handlerArgs: Array) => void, delay?: number, ...args: Array @@ -146,9 +125,9 @@ function patchZeroDelayTimeouts(targetWindow: TimerWindow) { return id } return originalSetTimeout(handler, delay, ...args) - }) as typeof targetWindow.setTimeout + }) as typeof window.setTimeout - targetWindow.clearTimeout = ((id: number) => { + window.clearTimeout = ((id: number) => { const immediate = immediates.get(id) if (immediate) { clearImmediate(immediate) @@ -156,119 +135,17 @@ function patchZeroDelayTimeouts(targetWindow: TimerWindow) { return } originalClearTimeout(id) - }) as typeof targetWindow.clearTimeout + }) as typeof window.clearTimeout return () => { - targetWindow.setTimeout = - originalSetTimeout as typeof targetWindow.setTimeout - targetWindow.clearTimeout = - originalClearTimeout as typeof targetWindow.clearTimeout - } -} - -interface ListenerTarget { - addEventListener: ( - type: string, - listener: EventListenerOrEventListenerObject | null, - options?: boolean | AddEventListenerOptions, - ) => void - removeEventListener: ( - type: string, - listener: EventListenerOrEventListenerObject | null, - options?: boolean | EventListenerOptions, - ) => void -} - -/** - * Scroll restoration installs page-lifetime listeners without a public router - * dispose operation. Capture just those listeners while the router is created - * so per-invocation routers do not remain reachable after teardown. - */ -function captureScrollRestorationListeners() { - const captured: Array<{ - target: ListenerTarget - type: string - listener: EventListenerOrEventListenerObject | null - options?: boolean | AddEventListenerOptions - }> = [] - const patches: Array<{ - target: ListenerTarget - addEventListener: ListenerTarget['addEventListener'] - }> = [] - - const patch = (target: ListenerTarget, capturedType: string) => { - const originalAddEventListener = target.addEventListener - patches.push({ target, addEventListener: originalAddEventListener }) - - target.addEventListener = function (type, listener, options) { - if (type === capturedType) { - captured.push({ target, type, listener, options }) - } - originalAddEventListener.call(target, type, listener, options) - } - } - - patch(document as unknown as ListenerTarget, 'scroll') - patch(globalThis as unknown as ListenerTarget, 'pagehide') - - let stopped = false - const stop = () => { - if (stopped) { - return - } - stopped = true - for (const entry of patches) { - entry.target.addEventListener = entry.addEventListener - } - } - - return { - stop, - cleanup() { - stop() - for (const { target, type, listener, options } of captured) { - target.removeEventListener(type, listener, options) - } - }, - } -} - -interface ScenarioHistoryResource { - history: RouterHistory - timeoutWindow?: TimerWindow - dispose: () => void -} - -function createScenarioHistory( - mode: NonNullable, - initialUrl: string, -): ScenarioHistoryResource { - if (mode === 'browser') { - const dom = new JSDOM('', { - url: new URL(initialUrl, 'http://localhost').href, - }) - const history = createBrowserHistory({ window: dom.window }) - - return { - history, - timeoutWindow: dom.window as unknown as TimerWindow, - dispose() { - history.destroy() - dom.window.close() - }, - } - } - - const history = createMemoryHistory({ initialEntries: [initialUrl] }) - return { - history, - dispose: history.destroy, + window.setTimeout = originalSetTimeout as typeof window.setTimeout + window.clearTimeout = originalClearTimeout as typeof window.clearTimeout } } export interface ScenarioSetupOptions { frameworkLabel: string - mount: (container: HTMLElement, history: RouterHistory) => MountedScenarioApp + mount: (container: HTMLElement) => MountedScenarioApp /** * Circular sequence of steps advanced by `tick()`. Link steps must target * links rendered from the start (e.g. in the root layout), no two @@ -279,22 +156,13 @@ export interface ScenarioSetupOptions { */ steps: ReadonlyArray /** Sanity check run once per step during the warm-up lap in `before()`. */ - assertAfterStep?: ( - stepIndex: number, - container: HTMLElement, - history: RouterHistory, - ) => void + assertAfterStep?: (stepIndex: number, container: HTMLElement) => void /** - * URL used to initialize the fresh history before mounting (default '/'). - * Scenarios whose router uses a `basepath` or an input rewrite must start on - * an external URL that maps to their initial route. + * URL the window is reset to before mounting (default '/'). Scenarios whose + * router uses a `basepath` or an input rewrite must start on an external + * URL that maps to their initial route. */ initialUrl?: string - /** - * Browser history is reserved for the scenario that explicitly measures - * browser history traversal. All other scenarios use fresh memory history. - */ - historyMode?: 'memory' | 'browser' } function warnAboutDevMode(frameworkLabel: string) { @@ -317,41 +185,18 @@ export function createScenarioSetup(options: ScenarioSetupOptions) { let unmount: (() => void) | undefined = undefined let unsub = () => {} let restoreTimeouts = () => {} - let cleanupScrollRestorationListeners = () => {} - let historyResource: ScenarioHistoryResource | undefined = undefined let stepIndex = 0 let next: () => Promise = () => Promise.reject(new Error('Benchmark not initialized')) async function before() { stepIndex = 0 - historyResource = createScenarioHistory( - options.historyMode ?? 'memory', - options.initialUrl ?? '/', - ) - - const restoreGlobalTimeouts = patchZeroDelayTimeouts(window) - const restoreHistoryTimeouts = historyResource.timeoutWindow - ? patchZeroDelayTimeouts(historyResource.timeoutWindow) - : () => {} - restoreTimeouts = () => { - restoreHistoryTimeouts() - restoreGlobalTimeouts() - } - + restoreTimeouts = patchZeroDelayTimeouts() + window.history.replaceState(null, '', options.initialUrl ?? '/') container = document.createElement('div') document.body.append(container) - const capturedListeners = captureScrollRestorationListeners() - let mounted: MountedScenarioApp - try { - mounted = options.mount(container, historyResource.history) - } finally { - capturedListeners.stop() - cleanupScrollRestorationListeners = capturedListeners.cleanup - } - - const { router, unmount: dispose } = mounted + const { router, unmount: dispose } = options.mount(container) unmount = dispose let resolveRendered: () => void = () => {} @@ -449,9 +294,8 @@ export function createScenarioSetup(options: ScenarioSetupOptions) { // ending back on the initial route so measurement starts from a known state. for (const [index, step] of options.steps.entries()) { await runStep(step) - options.assertAfterStep?.(index, container, historyResource.history) + options.assertAfterStep?.(index, container) } - await finishBatch() next = () => { const step = options.steps[stepIndex % options.steps.length]! @@ -464,14 +308,10 @@ export function createScenarioSetup(options: ScenarioSetupOptions) { unmount?.() container?.remove() unsub() - cleanupScrollRestorationListeners() restoreTimeouts() - historyResource?.dispose() restoreTimeouts = () => {} - cleanupScrollRestorationListeners = () => {} unmount = undefined container = undefined - historyResource = undefined } function tick() { @@ -481,14 +321,13 @@ export function createScenarioSetup(options: ScenarioSetupOptions) { return { before, tick, - finishBatch, after, } } export interface MountLoopSetupOptions { frameworkLabel: string - mount: (container: HTMLElement, history: RouterHistory) => MountedScenarioApp + mount: (container: HTMLElement) => MountedScenarioApp /** Test id that must appear in the container before a mount counts as done. */ readyTestId: string assertReady?: (container: HTMLElement) => void @@ -503,11 +342,11 @@ export function createMountLoopSetup(options: MountLoopSetupOptions) { warnAboutDevMode(options.frameworkLabel) async function tick() { + window.history.replaceState(null, '', '/') const container = document.createElement('div') document.body.append(container) - const history = createMemoryHistory({ initialEntries: ['/'] }) - const { router, unmount } = options.mount(container, history) + const { router, unmount } = options.mount(container) try { await router.load() @@ -520,7 +359,6 @@ export function createMountLoopSetup(options: MountLoopSetupOptions) { options.assertReady?.(container) } finally { unmount() - history.destroy() container.remove() } } @@ -528,7 +366,6 @@ export function createMountLoopSetup(options: MountLoopSetupOptions) { return { before: async () => {}, tick, - finishBatch, after: () => {}, } } diff --git a/benchmarks/client-nav/scenarios/head/react/speed.bench.ts b/benchmarks/client-nav/scenarios/head/react/speed.bench.ts index d0d731a09f..c71b426c56 100644 --- a/benchmarks/client-nav/scenarios/head/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/head/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-head', async ({ bench }) => { - const scenario = setup() +describe('client-head', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-head navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/head/react/src/main.tsx b/benchmarks/client-nav/scenarios/head/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/head/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/head/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/head/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/head/react/src/routeTree.gen.ts index 88867d9190..5c80a3104e 100644 --- a/benchmarks/client-nav/scenarios/head/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/head/react/src/routeTree.gen.ts @@ -9,15 +9,15 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as DocsRouteImport } from './routes/docs' import { Route as SettingsRouteImport } from './routes/settings' -import { Route as ArticlesIdRouteImport } from './routes/articles.$id' +import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as DocsSectionRouteImport } from './routes/docs.$section' +import { Route as ArticlesIdRouteImport } from './routes/articles.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const SettingsRoute = SettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => rootRouteImport, } as any) const DocsRoute = DocsRouteImport.update({ @@ -25,14 +25,9 @@ const DocsRoute = DocsRouteImport.update({ path: '/docs', getParentRoute: () => rootRouteImport, } as any) -const SettingsRoute = SettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => rootRouteImport, -} as any) -const ArticlesIdRoute = ArticlesIdRouteImport.update({ - id: '/articles/$id', - path: '/articles/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const DocsSectionRoute = DocsSectionRouteImport.update({ @@ -40,6 +35,11 @@ const DocsSectionRoute = DocsSectionRouteImport.update({ path: '/$section', getParentRoute: () => DocsRoute, } as any) +const ArticlesIdRoute = ArticlesIdRouteImport.update({ + id: '/articles/$id', + path: '/articles/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -86,11 +86,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/settings': { + id: '/settings' + path: '/settings' + fullPath: '/settings' + preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } '/docs': { @@ -100,18 +100,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } - '/settings': { - id: '/settings' - path: '/settings' - fullPath: '/settings' - preLoaderRoute: typeof SettingsRouteImport - parentRoute: typeof rootRouteImport - } - '/articles/$id': { - id: '/articles/$id' - path: '/articles/$id' - fullPath: '/articles/$id' - preLoaderRoute: typeof ArticlesIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/docs/$section': { @@ -121,6 +114,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DocsSectionRouteImport parentRoute: typeof DocsRoute } + '/articles/$id': { + id: '/articles/$id' + path: '/articles/$id' + fullPath: '/articles/$id' + preLoaderRoute: typeof ArticlesIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/head/react/vite.config.ts b/benchmarks/client-nav/scenarios/head/react/vite.config.ts index 7c8d6d4c15..086bd60bb4 100644 --- a/benchmarks/client-nav/scenarios/head/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/head/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav head (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/head/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/head/solid/speed.bench.ts index ca156c950b..ea0a5ca818 100644 --- a/benchmarks/client-nav/scenarios/head/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/head/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-head', async ({ bench }) => { - const scenario = setup() +describe('client-head', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-head navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/head/solid/src/main.tsx b/benchmarks/client-nav/scenarios/head/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/head/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/head/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/head/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/head/solid/src/routeTree.gen.ts index b6f217e527..ead6a4436a 100644 --- a/benchmarks/client-nav/scenarios/head/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/head/solid/src/routeTree.gen.ts @@ -9,15 +9,15 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as DocsRouteImport } from './routes/docs' import { Route as SettingsRouteImport } from './routes/settings' -import { Route as ArticlesIdRouteImport } from './routes/articles.$id' +import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as DocsSectionRouteImport } from './routes/docs.$section' +import { Route as ArticlesIdRouteImport } from './routes/articles.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const SettingsRoute = SettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => rootRouteImport, } as any) const DocsRoute = DocsRouteImport.update({ @@ -25,14 +25,9 @@ const DocsRoute = DocsRouteImport.update({ path: '/docs', getParentRoute: () => rootRouteImport, } as any) -const SettingsRoute = SettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => rootRouteImport, -} as any) -const ArticlesIdRoute = ArticlesIdRouteImport.update({ - id: '/articles/$id', - path: '/articles/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const DocsSectionRoute = DocsSectionRouteImport.update({ @@ -40,6 +35,11 @@ const DocsSectionRoute = DocsSectionRouteImport.update({ path: '/$section', getParentRoute: () => DocsRoute, } as any) +const ArticlesIdRoute = ArticlesIdRouteImport.update({ + id: '/articles/$id', + path: '/articles/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -86,11 +86,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/settings': { + id: '/settings' + path: '/settings' + fullPath: '/settings' + preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } '/docs': { @@ -100,18 +100,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } - '/settings': { - id: '/settings' - path: '/settings' - fullPath: '/settings' - preLoaderRoute: typeof SettingsRouteImport - parentRoute: typeof rootRouteImport - } - '/articles/$id': { - id: '/articles/$id' - path: '/articles/$id' - fullPath: '/articles/$id' - preLoaderRoute: typeof ArticlesIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/docs/$section': { @@ -121,6 +114,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DocsSectionRouteImport parentRoute: typeof DocsRoute } + '/articles/$id': { + id: '/articles/$id' + path: '/articles/$id' + fullPath: '/articles/$id' + preLoaderRoute: typeof ArticlesIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/head/solid/tsconfig.json b/benchmarks/client-nav/scenarios/head/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/head/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/head/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/head/solid/vite.config.ts b/benchmarks/client-nav/scenarios/head/solid/vite.config.ts index 986b2de2b0..7b5a1e22b4 100644 --- a/benchmarks/client-nav/scenarios/head/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/head/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav head (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/head/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/head/vue/speed.bench.ts index d188a9dd7a..3630032e44 100644 --- a/benchmarks/client-nav/scenarios/head/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/head/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-head', async ({ bench }) => { - const scenario = setup() +describe('client-head', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-head navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/head/vue/src/main.tsx b/benchmarks/client-nav/scenarios/head/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/head/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/head/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/head/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/head/vue/src/routeTree.gen.ts index 161f99a65c..b115854c26 100644 --- a/benchmarks/client-nav/scenarios/head/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/head/vue/src/routeTree.gen.ts @@ -9,15 +9,15 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as DocsRouteImport } from './routes/docs' import { Route as SettingsRouteImport } from './routes/settings' -import { Route as ArticlesIdRouteImport } from './routes/articles.$id' +import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as DocsSectionRouteImport } from './routes/docs.$section' +import { Route as ArticlesIdRouteImport } from './routes/articles.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const SettingsRoute = SettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => rootRouteImport, } as any) const DocsRoute = DocsRouteImport.update({ @@ -25,14 +25,9 @@ const DocsRoute = DocsRouteImport.update({ path: '/docs', getParentRoute: () => rootRouteImport, } as any) -const SettingsRoute = SettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => rootRouteImport, -} as any) -const ArticlesIdRoute = ArticlesIdRouteImport.update({ - id: '/articles/$id', - path: '/articles/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const DocsSectionRoute = DocsSectionRouteImport.update({ @@ -40,6 +35,11 @@ const DocsSectionRoute = DocsSectionRouteImport.update({ path: '/$section', getParentRoute: () => DocsRoute, } as any) +const ArticlesIdRoute = ArticlesIdRouteImport.update({ + id: '/articles/$id', + path: '/articles/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -86,11 +86,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/settings': { + id: '/settings' + path: '/settings' + fullPath: '/settings' + preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } '/docs': { @@ -100,18 +100,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } - '/settings': { - id: '/settings' - path: '/settings' - fullPath: '/settings' - preLoaderRoute: typeof SettingsRouteImport - parentRoute: typeof rootRouteImport - } - '/articles/$id': { - id: '/articles/$id' - path: '/articles/$id' - fullPath: '/articles/$id' - preLoaderRoute: typeof ArticlesIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/docs/$section': { @@ -121,6 +114,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof DocsSectionRouteImport parentRoute: typeof DocsRoute } + '/articles/$id': { + id: '/articles/$id' + path: '/articles/$id' + fullPath: '/articles/$id' + preLoaderRoute: typeof ArticlesIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/head/vue/vite.config.ts b/benchmarks/client-nav/scenarios/head/vue/vite.config.ts index bb1126d85f..0ad2067925 100644 --- a/benchmarks/client-nav/scenarios/head/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/head/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav head (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/history/react/setup.ts b/benchmarks/client-nav/scenarios/history/react/setup.ts index c26b7ffd08..130583b190 100644 --- a/benchmarks/client-nav/scenarios/history/react/setup.ts +++ b/benchmarks/client-nav/scenarios/history/react/setup.ts @@ -11,7 +11,6 @@ export function setup() { return createScenarioSetup({ frameworkLabel: 'React', mount: mountTestApp, - historyMode: 'browser', steps, assertAfterStep: assertStepResult, }) diff --git a/benchmarks/client-nav/scenarios/history/react/speed.bench.ts b/benchmarks/client-nav/scenarios/history/react/speed.bench.ts index 6ec7031857..df2c951c03 100644 --- a/benchmarks/client-nav/scenarios/history/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/history/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-history', async ({ bench }) => { - const scenario = setup() +describe('client-history', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-history navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/history/react/src/main.tsx b/benchmarks/client-nav/scenarios/history/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/history/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/history/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/history/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/history/react/src/routeTree.gen.ts index 21bb12ba35..61cc83c4c8 100644 --- a/benchmarks/client-nav/scenarios/history/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/history/react/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as GalleryRouteImport } from './routes/gallery' -import { Route as PagesNRouteImport } from './routes/pages.$n' +import { Route as IndexRouteImport } from './routes/index' import { Route as PhotosPhotoIdRouteImport } from './routes/photos.$photoId' +import { Route as PagesNRouteImport } from './routes/pages.$n' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const GalleryRoute = GalleryRouteImport.update({ id: '/gallery', path: '/gallery', getParentRoute: () => rootRouteImport, } as any) -const PagesNRoute = PagesNRouteImport.update({ - id: '/pages/$n', - path: '/pages/$n', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ @@ -34,6 +29,11 @@ const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ path: '/photos/$photoId', getParentRoute: () => rootRouteImport, } as any) +const PagesNRoute = PagesNRouteImport.update({ + id: '/pages/$n', + path: '/pages/$n', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/gallery': { id: '/gallery' path: '/gallery' @@ -85,11 +78,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof GalleryRouteImport parentRoute: typeof rootRouteImport } - '/pages/$n': { - id: '/pages/$n' - path: '/pages/$n' - fullPath: '/pages/$n' - preLoaderRoute: typeof PagesNRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/photos/$photoId': { @@ -99,6 +92,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PhotosPhotoIdRouteImport parentRoute: typeof rootRouteImport } + '/pages/$n': { + id: '/pages/$n' + path: '/pages/$n' + fullPath: '/pages/$n' + preLoaderRoute: typeof PagesNRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/history/react/vite.config.ts b/benchmarks/client-nav/scenarios/history/react/vite.config.ts index bdbde9c668..61a1b2feef 100644 --- a/benchmarks/client-nav/scenarios/history/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/history/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav history (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/history/shared.ts b/benchmarks/client-nav/scenarios/history/shared.ts index be6096cea8..9ddfa6c104 100644 --- a/benchmarks/client-nav/scenarios/history/shared.ts +++ b/benchmarks/client-nav/scenarios/history/shared.ts @@ -8,7 +8,6 @@ * forward tail and the session history never grows past 4 entries. */ import type { ScenarioStep } from '../harness' -import type { RouterHistory } from '@tanstack/history' export const pageIds = ['1', '2', '3'] as const export const maskedPhotoId = '42' @@ -28,7 +27,7 @@ interface HistoryStepExpectation { step: ScenarioStep /** Expected router location pathname (the REAL location, even when masked). */ pathname: string - /** Expected browser-history pathname when it differs (location masking). */ + /** Expected window.location pathname when it differs (location masking). */ windowPathname?: string /** Marker test id that must be present in the container after the step. */ marker?: string @@ -53,11 +52,7 @@ export const stepExpectations: ReadonlyArray = [ export const steps = stepExpectations.map((expectation) => expectation.step) -export function assertStepResult( - stepIndex: number, - container: HTMLElement, - history: RouterHistory, -) { +export function assertStepResult(stepIndex: number, container: HTMLElement) { const expected = stepExpectations[stepIndex]! const loc = container.querySelector('[data-testid="loc"]')?.textContent @@ -68,9 +63,9 @@ export function assertStepResult( } const windowPathname = expected.windowPathname ?? expected.pathname - if (history.location.pathname !== windowPathname) { + if (window.location.pathname !== windowPathname) { throw new Error( - `Expected history.location.pathname to be "${windowPathname}" after step ${stepIndex}, received "${history.location.pathname}"`, + `Expected window.location.pathname to be "${windowPathname}" after step ${stepIndex}, received "${window.location.pathname}"`, ) } diff --git a/benchmarks/client-nav/scenarios/history/solid/setup.ts b/benchmarks/client-nav/scenarios/history/solid/setup.ts index 4adf55d6df..6a46971603 100644 --- a/benchmarks/client-nav/scenarios/history/solid/setup.ts +++ b/benchmarks/client-nav/scenarios/history/solid/setup.ts @@ -11,7 +11,6 @@ export function setup() { return createScenarioSetup({ frameworkLabel: 'Solid', mount: mountTestApp, - historyMode: 'browser', steps, assertAfterStep: assertStepResult, }) diff --git a/benchmarks/client-nav/scenarios/history/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/history/solid/speed.bench.ts index 56af035b2b..8e814bc133 100644 --- a/benchmarks/client-nav/scenarios/history/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/history/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-history', async ({ bench }) => { - const scenario = setup() +describe('client-history', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-history navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/history/solid/src/main.tsx b/benchmarks/client-nav/scenarios/history/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/history/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/history/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/history/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/history/solid/src/routeTree.gen.ts index af253f4a15..a6ab2a4fc8 100644 --- a/benchmarks/client-nav/scenarios/history/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/history/solid/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as GalleryRouteImport } from './routes/gallery' -import { Route as PagesNRouteImport } from './routes/pages.$n' +import { Route as IndexRouteImport } from './routes/index' import { Route as PhotosPhotoIdRouteImport } from './routes/photos.$photoId' +import { Route as PagesNRouteImport } from './routes/pages.$n' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const GalleryRoute = GalleryRouteImport.update({ id: '/gallery', path: '/gallery', getParentRoute: () => rootRouteImport, } as any) -const PagesNRoute = PagesNRouteImport.update({ - id: '/pages/$n', - path: '/pages/$n', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ @@ -34,6 +29,11 @@ const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ path: '/photos/$photoId', getParentRoute: () => rootRouteImport, } as any) +const PagesNRoute = PagesNRouteImport.update({ + id: '/pages/$n', + path: '/pages/$n', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/gallery': { id: '/gallery' path: '/gallery' @@ -85,11 +78,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof GalleryRouteImport parentRoute: typeof rootRouteImport } - '/pages/$n': { - id: '/pages/$n' - path: '/pages/$n' - fullPath: '/pages/$n' - preLoaderRoute: typeof PagesNRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/photos/$photoId': { @@ -99,6 +92,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PhotosPhotoIdRouteImport parentRoute: typeof rootRouteImport } + '/pages/$n': { + id: '/pages/$n' + path: '/pages/$n' + fullPath: '/pages/$n' + preLoaderRoute: typeof PagesNRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/history/solid/tsconfig.json b/benchmarks/client-nav/scenarios/history/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/history/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/history/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/history/solid/vite.config.ts b/benchmarks/client-nav/scenarios/history/solid/vite.config.ts index 4da589ff0e..de0eda543c 100644 --- a/benchmarks/client-nav/scenarios/history/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/history/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav history (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/history/vue/setup.ts b/benchmarks/client-nav/scenarios/history/vue/setup.ts index df689964e4..97b74b3892 100644 --- a/benchmarks/client-nav/scenarios/history/vue/setup.ts +++ b/benchmarks/client-nav/scenarios/history/vue/setup.ts @@ -11,7 +11,6 @@ export function setup() { return createScenarioSetup({ frameworkLabel: 'Vue', mount: mountTestApp, - historyMode: 'browser', steps, assertAfterStep: assertStepResult, }) diff --git a/benchmarks/client-nav/scenarios/history/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/history/vue/speed.bench.ts index 3d36ac4cfa..be2956bd85 100644 --- a/benchmarks/client-nav/scenarios/history/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/history/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-history', async ({ bench }) => { - const scenario = setup() +describe('client-history', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-history navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/history/vue/src/main.tsx b/benchmarks/client-nav/scenarios/history/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/history/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/history/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/history/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/history/vue/src/routeTree.gen.ts index 519aef7c8f..cee1b68870 100644 --- a/benchmarks/client-nav/scenarios/history/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/history/vue/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as GalleryRouteImport } from './routes/gallery' -import { Route as PagesNRouteImport } from './routes/pages.$n' +import { Route as IndexRouteImport } from './routes/index' import { Route as PhotosPhotoIdRouteImport } from './routes/photos.$photoId' +import { Route as PagesNRouteImport } from './routes/pages.$n' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const GalleryRoute = GalleryRouteImport.update({ id: '/gallery', path: '/gallery', getParentRoute: () => rootRouteImport, } as any) -const PagesNRoute = PagesNRouteImport.update({ - id: '/pages/$n', - path: '/pages/$n', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ @@ -34,6 +29,11 @@ const PhotosPhotoIdRoute = PhotosPhotoIdRouteImport.update({ path: '/photos/$photoId', getParentRoute: () => rootRouteImport, } as any) +const PagesNRoute = PagesNRouteImport.update({ + id: '/pages/$n', + path: '/pages/$n', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/gallery': { id: '/gallery' path: '/gallery' @@ -85,11 +78,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof GalleryRouteImport parentRoute: typeof rootRouteImport } - '/pages/$n': { - id: '/pages/$n' - path: '/pages/$n' - fullPath: '/pages/$n' - preLoaderRoute: typeof PagesNRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/photos/$photoId': { @@ -99,6 +92,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PhotosPhotoIdRouteImport parentRoute: typeof rootRouteImport } + '/pages/$n': { + id: '/pages/$n' + path: '/pages/$n' + fullPath: '/pages/$n' + preLoaderRoute: typeof PagesNRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/history/vue/vite.config.ts b/benchmarks/client-nav/scenarios/history/vue/vite.config.ts index c5f1ca9807..58986d6526 100644 --- a/benchmarks/client-nav/scenarios/history/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/history/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav history (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/hydration/react/fixture.ts b/benchmarks/client-nav/scenarios/hydration/react/fixture.ts deleted file mode 100644 index 950c870a1c..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/fixture.ts +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index fbc67c5a08..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/generate-fixture.mjs +++ /dev/null @@ -1,23 +0,0 @@ -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 deleted file mode 100644 index 7e466cbaed..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/hydration.test.ts +++ /dev/null @@ -1,93 +0,0 @@ -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 }) - const schedulerTasks = new Set() - 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() - schedulerTasks.add(scenario.schedulerTasks()) - 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() - } - } - // React yields on its pinned clock, never on wall time spent hydrating. - expect(schedulerTasks.size).toBe(1) -}) - -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 deleted file mode 100644 index ca23838c0f..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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 --mode benchmark --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 deleted file mode 100644 index cc4c09a72d..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/settle.ts +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 7c588af3fd..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/setup.ts +++ /dev/null @@ -1,316 +0,0 @@ -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 -const turn = () => new Promise((resolve) => setImmediate(resolve)) - -// React's scheduler ends a time slice once performance.now() has advanced 5 ms. -// Under CodSpeed's CPU simulation the wall clock advances much further per -// instruction, by a runner-dependent factor, so real time turned identical -// samples into different numbers of yields, scheduler tasks and event-loop -// turns. With a frozen clock React yields only to paint after a commit, as on -// a fast host. 1 s is past React's initial 300 ms fallback throttle. Only the -// window's performance clock is pinned: Date.now(), which the Router uses for -// match timestamps, is unchanged. -const schedulerTime = 1_000 - -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() - const scheduler = { tasks: 0 } - 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 - ) { - scheduler.tasks++ - 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.performance.now = () => schedulerTime - 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, - scheduler, - 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 schedulerTasks() { - if (!current) { - throw new Error('No hydration sample') - } - return current.scheduler.tasks - } - - 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, - schedulerTasks, - } -} diff --git a/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts b/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts deleted file mode 100644 index 643877760e..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/speed.bench.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from 'vitest' -import { setup } from './setup' - -test('client-hydration', async ({ bench }) => { - const scenario = setup() - - await bench( - 'hydrate restored route state and mixed Links (react)', - { beforeEach: scenario.before, afterEach: scenario.after }, - async () => { - await scenario.run() - }, - ).run({ - 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 deleted file mode 100644 index e9797f71fa..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/src/app.tsx +++ /dev/null @@ -1,216 +0,0 @@ -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'} -

- - - - {data.rows.map((row) => ( - - - - - - ))} - -
{row.id}{row.details.score} - - {diagnostics.countRenders - ? () => { - diagnostics.ordinaryRenders++ - return row.label - } - : row.label} - -
- -
Details
- - - ) - } - - 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 deleted file mode 100644 index 42c5a5104e..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/src/client.tsx +++ /dev/null @@ -1,83 +0,0 @@ -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 deleted file mode 100644 index 713b0a77f2..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/src/server.tsx +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 23dd08de8b..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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 deleted file mode 100644 index 62ab87115b..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/vite.config.ts +++ /dev/null @@ -1,36 +0,0 @@ -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 deleted file mode 100644 index fbf6a149b9..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/react/vite.server.config.ts +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 4c86d0e2f4..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/fixture.ts +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 63647e1be7..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/generate-fixture.mjs +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index 4e5f3208ca..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/hydration.test.ts +++ /dev/null @@ -1,81 +0,0 @@ -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('prepares every sample without counting diagnostics', async () => { - const scenario = setup() - for (let iteration = 0; iteration < 2; iteration++) { - await scenario.before() - 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 scenario.after() - } - } -}) - -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 deleted file mode 100644 index 1fa162771b..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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 --mode benchmark --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 deleted file mode 100644 index ebdbc8e9b2..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/setup.ts +++ /dev/null @@ -1,326 +0,0 @@ -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 -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, - } -} diff --git a/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts deleted file mode 100644 index b386cb8215..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/speed.bench.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from 'vitest' -import { setup } from './setup' - -test('client-hydration', async ({ bench }) => { - const scenario = setup() - - await bench( - 'hydrate restored route state and mixed Links (solid)', - { beforeEach: scenario.before, afterEach: scenario.after }, - async () => { - await scenario.run() - }, - ).run({ - 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 deleted file mode 100644 index cb772d6b5b..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/src/app.tsx +++ /dev/null @@ -1,213 +0,0 @@ -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'} -

- - - - - {(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} - -
- -
Details
- - ) - } - - 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 deleted file mode 100644 index ef0f5268d6..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/src/client.tsx +++ /dev/null @@ -1,91 +0,0 @@ -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 deleted file mode 100644 index 6052c48eac..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/src/server.tsx +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index daf27ddf12..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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 deleted file mode 100644 index 16e5ff95aa..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/vite.config.ts +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 9787cbb4e2..0000000000 --- a/benchmarks/client-nav/scenarios/hydration/solid/vite.server.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -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:/], - }, - }, -}) diff --git a/benchmarks/client-nav/scenarios/link-churn/react/project.json b/benchmarks/client-nav/scenarios/link-churn/react/project.json deleted file mode 100644 index 1606b2c456..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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 deleted file mode 100644 index 59221603da..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index ca0b370528..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/speed.bench.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' -import { benchOptions, ticksPerIteration } from '../shared' -import { setup } from './setup' - -test('client-link-churn', async ({ bench }) => { - const scenario = setup() - - await bench( - 'client-link-churn navigation loop (react)', - benchLifecycle(scenario), - async () => { - for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() - } - await scenario.finishBatch() - }, - ).run(benchOptions) -}) diff --git a/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts deleted file mode 100644 index f4a0b4e6ff..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/speed.flame.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 5febd6f795..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/main.tsx +++ /dev/null @@ -1,37 +0,0 @@ -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 deleted file mode 100644 index 4535430b61..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routeTree.gen.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 deleted file mode 100644 index 199cf1ff73..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/__root.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Link, Outlet, createRootRoute } from '@tanstack/react-router' -import { sortedSearch } from '../../../shared' - -export const Route = createRootRoute({ - component: RootComponent, -}) - -function RootComponent() { - return ( - <> - - - - ) -} 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 deleted file mode 100644 index 143cb39a7a..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.detail.$id.tsx +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 5aa37b20a7..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.list.tsx +++ /dev/null @@ -1,65 +0,0 @@ -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 deleted file mode 100644 index ac12eae2da..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/hub.tsx +++ /dev/null @@ -1,64 +0,0 @@ -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 deleted file mode 100644 index 1f146b789f..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/src/routes/other.tsx +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 1d59cbb450..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 deleted file mode 100644 index 344974ebf9..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/react/vite.config.ts +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index d936af35cc..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/shared.ts +++ /dev/null @@ -1,178 +0,0 @@ -/** - * 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 deleted file mode 100644 index 4e46143b32..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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 deleted file mode 100644 index a2a024341d..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 80c4aaa6fd..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/speed.bench.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' -import { benchOptions, ticksPerIteration } from '../shared' -import { setup } from './setup' - -test('client-link-churn', async ({ bench }) => { - const scenario = setup() - - await bench( - 'client-link-churn navigation loop (solid)', - benchLifecycle(scenario), - async () => { - for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() - } - await scenario.finishBatch() - }, - ).run(benchOptions) -}) diff --git a/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts deleted file mode 100644 index f4a0b4e6ff..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/speed.flame.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index fa9d239418..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/main.tsx +++ /dev/null @@ -1,34 +0,0 @@ -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 deleted file mode 100644 index e3cb546963..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routeTree.gen.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 deleted file mode 100644 index a9de4ea356..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/__root.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Link, Outlet, createRootRoute } from '@tanstack/solid-router' -import { sortedSearch } from '../../../shared' - -export const Route = createRootRoute({ - component: RootComponent, -}) - -function RootComponent() { - return ( - <> - - - - ) -} 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 deleted file mode 100644 index 7aca4a9935..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.detail.$id.tsx +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 5796a50b02..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.list.tsx +++ /dev/null @@ -1,68 +0,0 @@ -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 deleted file mode 100644 index 4682f85aae..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/hub.tsx +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 2606089113..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/src/routes/other.tsx +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 98d76ad6b8..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 deleted file mode 100644 index 37718a2d6a..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/solid/vite.config.ts +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index fb890ddfb8..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/project.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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 deleted file mode 100644 index 95cacb9ea8..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index dea511c24c..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/speed.bench.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' -import { benchOptions, ticksPerIteration } from '../shared' -import { setup } from './setup' - -test('client-link-churn', async ({ bench }) => { - const scenario = setup() - - await bench( - 'client-link-churn navigation loop (vue)', - benchLifecycle(scenario), - async () => { - for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() - } - await scenario.finishBatch() - }, - ).run(benchOptions) -}) diff --git a/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts b/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts deleted file mode 100644 index f4a0b4e6ff..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/speed.flame.ts +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index cae9b54f1d..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/main.tsx +++ /dev/null @@ -1,41 +0,0 @@ -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 deleted file mode 100644 index 9327bbc01d..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routeTree.gen.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 deleted file mode 100644 index a4f7985c5a..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/__root.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as Vue from 'vue' -import { Link, Outlet, createRootRoute } from '@tanstack/vue-router' -import { sortedSearch } from '../../../shared' - -const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - <> - - - - ) - }, -}) - -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 deleted file mode 100644 index 4701ab44eb..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.detail.$id.tsx +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 02abd6db1b..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.list.tsx +++ /dev/null @@ -1,74 +0,0 @@ -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 deleted file mode 100644 index 5be17f3350..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/hub.tsx +++ /dev/null @@ -1,69 +0,0 @@ -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 deleted file mode 100644 index 08dec586fa..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/src/routes/other.tsx +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index 7786fc3da9..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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 deleted file mode 100644 index 8f56734e04..0000000000 --- a/benchmarks/client-nav/scenarios/link-churn/vue/vite.config.ts +++ /dev/null @@ -1,44 +0,0 @@ -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'], - }, -}) diff --git a/benchmarks/client-nav/scenarios/links/react/speed.bench.ts b/benchmarks/client-nav/scenarios/links/react/speed.bench.ts index 75f5f725d4..68bb869182 100644 --- a/benchmarks/client-nav/scenarios/links/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/links/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-links', async ({ bench }) => { - const scenario = setup() +describe('client-links', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-links navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/links/react/src/main.tsx b/benchmarks/client-nav/scenarios/links/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/links/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/links/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/links/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/links/react/src/routeTree.gen.ts index 6e0c29ca88..97ec042c1c 100644 --- a/benchmarks/client-nav/scenarios/links/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/links/react/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ItemsIdRouteImport } from './routes/items.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const ItemsIdRoute = ItemsIdRouteImport.update({ id: '/items/$id', path: '/items/$id', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -75,6 +68,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/items/$id': { id: '/items/$id' path: '/items/$id' diff --git a/benchmarks/client-nav/scenarios/links/react/vite.config.ts b/benchmarks/client-nav/scenarios/links/react/vite.config.ts index 69de10b5b7..9e9cd48895 100644 --- a/benchmarks/client-nav/scenarios/links/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/links/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav links (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/links/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/links/solid/speed.bench.ts index fc7f3e71e7..beba86fb6c 100644 --- a/benchmarks/client-nav/scenarios/links/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/links/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-links', async ({ bench }) => { - const scenario = setup() +describe('client-links', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-links navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/links/solid/src/main.tsx b/benchmarks/client-nav/scenarios/links/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/links/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/links/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/links/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/links/solid/src/routeTree.gen.ts index 0da70513e8..b61431e40d 100644 --- a/benchmarks/client-nav/scenarios/links/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/links/solid/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ItemsIdRouteImport } from './routes/items.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const ItemsIdRoute = ItemsIdRouteImport.update({ id: '/items/$id', path: '/items/$id', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -75,6 +68,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/items/$id': { id: '/items/$id' path: '/items/$id' diff --git a/benchmarks/client-nav/scenarios/links/solid/tsconfig.json b/benchmarks/client-nav/scenarios/links/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/links/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/links/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/links/solid/vite.config.ts b/benchmarks/client-nav/scenarios/links/solid/vite.config.ts index e37342ffc3..9a5b3d138b 100644 --- a/benchmarks/client-nav/scenarios/links/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/links/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav links (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/links/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/links/vue/speed.bench.ts index 2ace7a8409..54b99d1273 100644 --- a/benchmarks/client-nav/scenarios/links/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/links/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-links', async ({ bench }) => { - const scenario = setup() +describe('client-links', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-links navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/links/vue/src/main.tsx b/benchmarks/client-nav/scenarios/links/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/links/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/links/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/links/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/links/vue/src/routeTree.gen.ts index 7d2b1e9bbb..cee64be43c 100644 --- a/benchmarks/client-nav/scenarios/links/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/links/vue/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ItemsIdRouteImport } from './routes/items.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const ItemsIdRoute = ItemsIdRouteImport.update({ id: '/items/$id', path: '/items/$id', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -75,6 +68,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/items/$id': { id: '/items/$id' path: '/items/$id' diff --git a/benchmarks/client-nav/scenarios/links/vue/vite.config.ts b/benchmarks/client-nav/scenarios/links/vue/vite.config.ts index ad89a49d70..d1cf9f561d 100644 --- a/benchmarks/client-nav/scenarios/links/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/links/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav links (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/loaders/react/speed.bench.ts b/benchmarks/client-nav/scenarios/loaders/react/speed.bench.ts index 8bcc53b88e..7c44f1a0f7 100644 --- a/benchmarks/client-nav/scenarios/loaders/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/loaders/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-loaders', async ({ bench }) => { - const scenario = setup() +describe('client-loaders', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-loaders navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/loaders/react/src/main.tsx b/benchmarks/client-nav/scenarios/loaders/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/loaders/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/loaders/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/loaders/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/loaders/react/src/routeTree.gen.ts index 35908a225f..50f0a8863b 100644 --- a/benchmarks/client-nav/scenarios/loaders/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/loaders/react/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DepsRouteImport } from './routes/deps' -import { Route as CachedIdRouteImport } from './routes/cached.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as FreshIdRouteImport } from './routes/fresh.$id' +import { Route as CachedIdRouteImport } from './routes/cached.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DepsRoute = DepsRouteImport.update({ id: '/deps', path: '/deps', getParentRoute: () => rootRouteImport, } as any) -const CachedIdRoute = CachedIdRouteImport.update({ - id: '/cached/$id', - path: '/cached/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const FreshIdRoute = FreshIdRouteImport.update({ @@ -34,6 +29,11 @@ const FreshIdRoute = FreshIdRouteImport.update({ path: '/fresh/$id', getParentRoute: () => rootRouteImport, } as any) +const CachedIdRoute = CachedIdRouteImport.update({ + id: '/cached/$id', + path: '/cached/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/deps': { id: '/deps' path: '/deps' @@ -85,11 +78,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DepsRouteImport parentRoute: typeof rootRouteImport } - '/cached/$id': { - id: '/cached/$id' - path: '/cached/$id' - fullPath: '/cached/$id' - preLoaderRoute: typeof CachedIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/fresh/$id': { @@ -99,6 +92,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof FreshIdRouteImport parentRoute: typeof rootRouteImport } + '/cached/$id': { + id: '/cached/$id' + path: '/cached/$id' + fullPath: '/cached/$id' + preLoaderRoute: typeof CachedIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/loaders/react/vite.config.ts b/benchmarks/client-nav/scenarios/loaders/react/vite.config.ts index 818b224130..6fa28bcd35 100644 --- a/benchmarks/client-nav/scenarios/loaders/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/loaders/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav loaders (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/loaders/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/loaders/solid/speed.bench.ts index 953a17b31a..4c97823d11 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/loaders/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-loaders', async ({ bench }) => { - const scenario = setup() +describe('client-loaders', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-loaders navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/loaders/solid/src/main.tsx b/benchmarks/client-nav/scenarios/loaders/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/loaders/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/loaders/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/loaders/solid/src/routeTree.gen.ts index fa5d032141..bdec400237 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/loaders/solid/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DepsRouteImport } from './routes/deps' -import { Route as CachedIdRouteImport } from './routes/cached.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as FreshIdRouteImport } from './routes/fresh.$id' +import { Route as CachedIdRouteImport } from './routes/cached.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DepsRoute = DepsRouteImport.update({ id: '/deps', path: '/deps', getParentRoute: () => rootRouteImport, } as any) -const CachedIdRoute = CachedIdRouteImport.update({ - id: '/cached/$id', - path: '/cached/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const FreshIdRoute = FreshIdRouteImport.update({ @@ -34,6 +29,11 @@ const FreshIdRoute = FreshIdRouteImport.update({ path: '/fresh/$id', getParentRoute: () => rootRouteImport, } as any) +const CachedIdRoute = CachedIdRouteImport.update({ + id: '/cached/$id', + path: '/cached/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/deps': { id: '/deps' path: '/deps' @@ -85,11 +78,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DepsRouteImport parentRoute: typeof rootRouteImport } - '/cached/$id': { - id: '/cached/$id' - path: '/cached/$id' - fullPath: '/cached/$id' - preLoaderRoute: typeof CachedIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/fresh/$id': { @@ -99,6 +92,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof FreshIdRouteImport parentRoute: typeof rootRouteImport } + '/cached/$id': { + id: '/cached/$id' + path: '/cached/$id' + fullPath: '/cached/$id' + preLoaderRoute: typeof CachedIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/cached.$id.tsx b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/cached.$id.tsx index aab6be74dc..4838141b22 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/cached.$id.tsx +++ b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/cached.$id.tsx @@ -15,9 +15,12 @@ export const Route = createFileRoute('/cached/$id')({ const subscriberIndexes = Array.from({ length: 2 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/deps.tsx b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/deps.tsx index 2f23f2d3da..258c7bc23b 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/deps.tsx +++ b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/deps.tsx @@ -25,9 +25,12 @@ export const Route = createFileRoute('/deps')({ const subscriberIndexes = Array.from({ length: 2 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/fresh.$id.tsx b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/fresh.$id.tsx index acd6a9aa27..29bc35a650 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/src/routes/fresh.$id.tsx +++ b/benchmarks/client-nav/scenarios/loaders/solid/src/routes/fresh.$id.tsx @@ -15,9 +15,12 @@ export const Route = createFileRoute('/fresh/$id')({ const subscriberIndexes = Array.from({ length: 2 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/loaders/solid/tsconfig.json b/benchmarks/client-nav/scenarios/loaders/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/loaders/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/loaders/solid/vite.config.ts b/benchmarks/client-nav/scenarios/loaders/solid/vite.config.ts index 90584d3b7e..ea913ac578 100644 --- a/benchmarks/client-nav/scenarios/loaders/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/loaders/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav loaders (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/loaders/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/loaders/vue/speed.bench.ts index 1ae2f89a56..eeb9cefaeb 100644 --- a/benchmarks/client-nav/scenarios/loaders/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/loaders/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-loaders', async ({ bench }) => { - const scenario = setup() +describe('client-loaders', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-loaders navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/loaders/vue/src/main.tsx b/benchmarks/client-nav/scenarios/loaders/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/loaders/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/loaders/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/loaders/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/loaders/vue/src/routeTree.gen.ts index 10cb8f2aca..25a82df477 100644 --- a/benchmarks/client-nav/scenarios/loaders/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/loaders/vue/src/routeTree.gen.ts @@ -9,24 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DepsRouteImport } from './routes/deps' -import { Route as CachedIdRouteImport } from './routes/cached.$id' +import { Route as IndexRouteImport } from './routes/index' import { Route as FreshIdRouteImport } from './routes/fresh.$id' +import { Route as CachedIdRouteImport } from './routes/cached.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DepsRoute = DepsRouteImport.update({ id: '/deps', path: '/deps', getParentRoute: () => rootRouteImport, } as any) -const CachedIdRoute = CachedIdRouteImport.update({ - id: '/cached/$id', - path: '/cached/$id', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const FreshIdRoute = FreshIdRouteImport.update({ @@ -34,6 +29,11 @@ const FreshIdRoute = FreshIdRouteImport.update({ path: '/fresh/$id', getParentRoute: () => rootRouteImport, } as any) +const CachedIdRoute = CachedIdRouteImport.update({ + id: '/cached/$id', + path: '/cached/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -71,13 +71,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/deps': { id: '/deps' path: '/deps' @@ -85,11 +78,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof DepsRouteImport parentRoute: typeof rootRouteImport } - '/cached/$id': { - id: '/cached/$id' - path: '/cached/$id' - fullPath: '/cached/$id' - preLoaderRoute: typeof CachedIdRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/fresh/$id': { @@ -99,6 +92,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof FreshIdRouteImport parentRoute: typeof rootRouteImport } + '/cached/$id': { + id: '/cached/$id' + path: '/cached/$id' + fullPath: '/cached/$id' + preLoaderRoute: typeof CachedIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/loaders/vue/vite.config.ts b/benchmarks/client-nav/scenarios/loaders/vue/vite.config.ts index ecf4cce139..350fadf387 100644 --- a/benchmarks/client-nav/scenarios/loaders/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/loaders/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav loaders (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/mount/react/speed.bench.ts b/benchmarks/client-nav/scenarios/mount/react/speed.bench.ts index 6c3a64b026..8f7967c42c 100644 --- a/benchmarks/client-nav/scenarios/mount/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/mount/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-mount', async ({ bench }) => { - const scenario = setup() +describe('client-mount', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-mount loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/mount/react/src/main.tsx b/benchmarks/client-nav/scenarios/mount/react/src/main.tsx index 4e45ed7ef3..78fe2082aa 100644 --- a/benchmarks/client-nav/scenarios/mount/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/mount/react/src/main.tsx @@ -1,12 +1,19 @@ -import { RouterProvider, createRouter } from '@tanstack/react-router' +import { + RouterProvider, + createBrowserHistory, + createRouter, +} from '@tanstack/react-router' import { createRoot } from 'react-dom/client' import { routeTree } from './routeTree.gen' -import type { RouterHistory } from '@tanstack/history' +import type { RouterHistory } from '@tanstack/react-router' /** * Unlike the other scenarios, this app is mounted and unmounted in a loop, so * it must not register page-lifetime globals that have no dispose path: - * - the harness injects and destroys a fresh memory history per mount; + * - the history is created explicitly and `destroy()`ed on unmount — the + * default per-router `createBrowserHistory()` monkey-patches + * `window.history.pushState`/`replaceState`, chaining one wrapper per + * router and degrading every later mount; * - `scrollRestoration` stays off — enabling it registers per-router * document/window listeners that retain every router ever created. */ @@ -23,7 +30,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { +export function mountTestApp(container: HTMLElement) { + const history = createBrowserHistory() const router = createTestRouter(history) const reactRoot = createRoot(container) @@ -33,6 +41,7 @@ export function mountTestApp(container: HTMLElement, history: RouterHistory) { router, unmount() { reactRoot.unmount() + history.destroy() }, } } diff --git a/benchmarks/client-nav/scenarios/mount/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/mount/react/src/routeTree.gen.ts index f9b7e5c268..a796abe0ec 100644 --- a/benchmarks/client-nav/scenarios/mount/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/mount/react/src/routeTree.gen.ts @@ -9,35 +9,20 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AboutRouteImport } from './routes/about' -import { Route as BlogRouteImport } from './routes/blog' -import { Route as SearchRouteImport } from './routes/search' -import { Route as SettingsRouteImport } from './routes/settings' import { Route as ShopRouteImport } from './routes/shop' -import { Route as BlogIndexRouteImport } from './routes/blog.index' -import { Route as BlogSlugRouteImport } from './routes/blog.$slug' +import { Route as SettingsRouteImport } from './routes/settings' +import { Route as SearchRouteImport } from './routes/search' +import { Route as BlogRouteImport } from './routes/blog' +import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ShopIndexRouteImport } from './routes/shop.index' +import { Route as BlogIndexRouteImport } from './routes/blog.index' import { Route as ShopProductIdRouteImport } from './routes/shop.$productId' +import { Route as BlogSlugRouteImport } from './routes/blog.$slug' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AboutRoute = AboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => rootRouteImport, -} as any) -const BlogRoute = BlogRouteImport.update({ - id: '/blog', - path: '/blog', - getParentRoute: () => rootRouteImport, -} as any) -const SearchRoute = SearchRouteImport.update({ - id: '/search', - path: '/search', +const ShopRoute = ShopRouteImport.update({ + id: '/shop', + path: '/shop', getParentRoute: () => rootRouteImport, } as any) const SettingsRoute = SettingsRouteImport.update({ @@ -45,31 +30,46 @@ const SettingsRoute = SettingsRouteImport.update({ path: '/settings', getParentRoute: () => rootRouteImport, } as any) -const ShopRoute = ShopRouteImport.update({ - id: '/shop', - path: '/shop', +const SearchRoute = SearchRouteImport.update({ + id: '/search', + path: '/search', getParentRoute: () => rootRouteImport, } as any) -const BlogIndexRoute = BlogIndexRouteImport.update({ +const BlogRoute = BlogRouteImport.update({ + id: '/blog', + path: '/blog', + getParentRoute: () => rootRouteImport, +} as any) +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => BlogRoute, -} as any) -const BlogSlugRoute = BlogSlugRouteImport.update({ - id: '/$slug', - path: '/$slug', - getParentRoute: () => BlogRoute, + getParentRoute: () => rootRouteImport, } as any) const ShopIndexRoute = ShopIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ShopRoute, } as any) +const BlogIndexRoute = BlogIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => BlogRoute, +} as any) const ShopProductIdRoute = ShopProductIdRouteImport.update({ id: '/$productId', path: '/$productId', getParentRoute: () => ShopRoute, } as any) +const BlogSlugRoute = BlogSlugRouteImport.update({ + id: '/$slug', + path: '/$slug', + getParentRoute: () => BlogRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -154,32 +154,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutRouteImport - parentRoute: typeof rootRouteImport - } - '/blog': { - id: '/blog' - path: '/blog' - fullPath: '/blog' - preLoaderRoute: typeof BlogRouteImport - parentRoute: typeof rootRouteImport - } - '/search': { - id: '/search' - path: '/search' - fullPath: '/search' - preLoaderRoute: typeof SearchRouteImport + '/shop': { + id: '/shop' + path: '/shop' + fullPath: '/shop' + preLoaderRoute: typeof ShopRouteImport parentRoute: typeof rootRouteImport } '/settings': { @@ -189,26 +168,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } - '/shop': { - id: '/shop' - path: '/shop' - fullPath: '/shop' - preLoaderRoute: typeof ShopRouteImport + '/search': { + id: '/search' + path: '/search' + fullPath: '/search' + preLoaderRoute: typeof SearchRouteImport parentRoute: typeof rootRouteImport } - '/blog/': { - id: '/blog/' - path: '/' - fullPath: '/blog/' - preLoaderRoute: typeof BlogIndexRouteImport - parentRoute: typeof BlogRoute + '/blog': { + id: '/blog' + path: '/blog' + fullPath: '/blog' + preLoaderRoute: typeof BlogRouteImport + parentRoute: typeof rootRouteImport } - '/blog/$slug': { - id: '/blog/$slug' - path: '/$slug' - fullPath: '/blog/$slug' - preLoaderRoute: typeof BlogSlugRouteImport - parentRoute: typeof BlogRoute + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/shop/': { id: '/shop/' @@ -217,6 +203,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ShopIndexRouteImport parentRoute: typeof ShopRoute } + '/blog/': { + id: '/blog/' + path: '/' + fullPath: '/blog/' + preLoaderRoute: typeof BlogIndexRouteImport + parentRoute: typeof BlogRoute + } '/shop/$productId': { id: '/shop/$productId' path: '/$productId' @@ -224,6 +217,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ShopProductIdRouteImport parentRoute: typeof ShopRoute } + '/blog/$slug': { + id: '/blog/$slug' + path: '/$slug' + fullPath: '/blog/$slug' + preLoaderRoute: typeof BlogSlugRouteImport + parentRoute: typeof BlogRoute + } } } diff --git a/benchmarks/client-nav/scenarios/mount/react/vite.config.ts b/benchmarks/client-nav/scenarios/mount/react/vite.config.ts index e197d33a9e..68ee46738a 100644 --- a/benchmarks/client-nav/scenarios/mount/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/mount/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav mount (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/mount/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/mount/solid/speed.bench.ts index 236f875f57..1bce4c6750 100644 --- a/benchmarks/client-nav/scenarios/mount/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/mount/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-mount', async ({ bench }) => { - const scenario = setup() +describe('client-mount', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-mount loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/mount/solid/src/main.tsx b/benchmarks/client-nav/scenarios/mount/solid/src/main.tsx index 2586872f5c..520d8cff89 100644 --- a/benchmarks/client-nav/scenarios/mount/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/mount/solid/src/main.tsx @@ -1,12 +1,19 @@ -import { render } from 'solid-js/web' -import { RouterProvider, createRouter } from '@tanstack/solid-router' +import { render } from '@solidjs/web' +import { + RouterProvider, + createBrowserHistory, + createRouter, +} from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -import type { RouterHistory } from '@tanstack/history' +import type { RouterHistory } from '@tanstack/solid-router' /** * Unlike the other scenarios, this app is mounted and unmounted in a loop, so * it must not register page-lifetime globals that have no dispose path: - * - the harness injects and destroys a fresh memory history per mount; + * - the history is created explicitly and `destroy()`ed on unmount — the + * default per-router `createBrowserHistory()` monkey-patches + * `window.history.pushState`/`replaceState`, chaining one wrapper per + * router and degrading every later mount; * - `scrollRestoration` stays off — enabling it registers per-router * document/window listeners that retain every router ever created. */ @@ -23,7 +30,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { +export function mountTestApp(container: HTMLElement) { + const history = createBrowserHistory() const router = createTestRouter(history) const dispose = render(() => , container) @@ -32,6 +40,7 @@ export function mountTestApp(container: HTMLElement, history: RouterHistory) { router, unmount() { dispose() + history.destroy() }, } } diff --git a/benchmarks/client-nav/scenarios/mount/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/mount/solid/src/routeTree.gen.ts index 30247636dd..dc0acc183d 100644 --- a/benchmarks/client-nav/scenarios/mount/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/mount/solid/src/routeTree.gen.ts @@ -9,35 +9,20 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AboutRouteImport } from './routes/about' -import { Route as BlogRouteImport } from './routes/blog' -import { Route as SearchRouteImport } from './routes/search' -import { Route as SettingsRouteImport } from './routes/settings' import { Route as ShopRouteImport } from './routes/shop' -import { Route as BlogIndexRouteImport } from './routes/blog.index' -import { Route as BlogSlugRouteImport } from './routes/blog.$slug' +import { Route as SettingsRouteImport } from './routes/settings' +import { Route as SearchRouteImport } from './routes/search' +import { Route as BlogRouteImport } from './routes/blog' +import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ShopIndexRouteImport } from './routes/shop.index' +import { Route as BlogIndexRouteImport } from './routes/blog.index' import { Route as ShopProductIdRouteImport } from './routes/shop.$productId' +import { Route as BlogSlugRouteImport } from './routes/blog.$slug' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AboutRoute = AboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => rootRouteImport, -} as any) -const BlogRoute = BlogRouteImport.update({ - id: '/blog', - path: '/blog', - getParentRoute: () => rootRouteImport, -} as any) -const SearchRoute = SearchRouteImport.update({ - id: '/search', - path: '/search', +const ShopRoute = ShopRouteImport.update({ + id: '/shop', + path: '/shop', getParentRoute: () => rootRouteImport, } as any) const SettingsRoute = SettingsRouteImport.update({ @@ -45,31 +30,46 @@ const SettingsRoute = SettingsRouteImport.update({ path: '/settings', getParentRoute: () => rootRouteImport, } as any) -const ShopRoute = ShopRouteImport.update({ - id: '/shop', - path: '/shop', +const SearchRoute = SearchRouteImport.update({ + id: '/search', + path: '/search', getParentRoute: () => rootRouteImport, } as any) -const BlogIndexRoute = BlogIndexRouteImport.update({ +const BlogRoute = BlogRouteImport.update({ + id: '/blog', + path: '/blog', + getParentRoute: () => rootRouteImport, +} as any) +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => BlogRoute, -} as any) -const BlogSlugRoute = BlogSlugRouteImport.update({ - id: '/$slug', - path: '/$slug', - getParentRoute: () => BlogRoute, + getParentRoute: () => rootRouteImport, } as any) const ShopIndexRoute = ShopIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ShopRoute, } as any) +const BlogIndexRoute = BlogIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => BlogRoute, +} as any) const ShopProductIdRoute = ShopProductIdRouteImport.update({ id: '/$productId', path: '/$productId', getParentRoute: () => ShopRoute, } as any) +const BlogSlugRoute = BlogSlugRouteImport.update({ + id: '/$slug', + path: '/$slug', + getParentRoute: () => BlogRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -154,32 +154,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutRouteImport - parentRoute: typeof rootRouteImport - } - '/blog': { - id: '/blog' - path: '/blog' - fullPath: '/blog' - preLoaderRoute: typeof BlogRouteImport - parentRoute: typeof rootRouteImport - } - '/search': { - id: '/search' - path: '/search' - fullPath: '/search' - preLoaderRoute: typeof SearchRouteImport + '/shop': { + id: '/shop' + path: '/shop' + fullPath: '/shop' + preLoaderRoute: typeof ShopRouteImport parentRoute: typeof rootRouteImport } '/settings': { @@ -189,26 +168,33 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } - '/shop': { - id: '/shop' - path: '/shop' - fullPath: '/shop' - preLoaderRoute: typeof ShopRouteImport + '/search': { + id: '/search' + path: '/search' + fullPath: '/search' + preLoaderRoute: typeof SearchRouteImport parentRoute: typeof rootRouteImport } - '/blog/': { - id: '/blog/' - path: '/' - fullPath: '/blog/' - preLoaderRoute: typeof BlogIndexRouteImport - parentRoute: typeof BlogRoute + '/blog': { + id: '/blog' + path: '/blog' + fullPath: '/blog' + preLoaderRoute: typeof BlogRouteImport + parentRoute: typeof rootRouteImport } - '/blog/$slug': { - id: '/blog/$slug' - path: '/$slug' - fullPath: '/blog/$slug' - preLoaderRoute: typeof BlogSlugRouteImport - parentRoute: typeof BlogRoute + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/shop/': { id: '/shop/' @@ -217,6 +203,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ShopIndexRouteImport parentRoute: typeof ShopRoute } + '/blog/': { + id: '/blog/' + path: '/' + fullPath: '/blog/' + preLoaderRoute: typeof BlogIndexRouteImport + parentRoute: typeof BlogRoute + } '/shop/$productId': { id: '/shop/$productId' path: '/$productId' @@ -224,6 +217,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ShopProductIdRouteImport parentRoute: typeof ShopRoute } + '/blog/$slug': { + id: '/blog/$slug' + path: '/$slug' + fullPath: '/blog/$slug' + preLoaderRoute: typeof BlogSlugRouteImport + parentRoute: typeof BlogRoute + } } } diff --git a/benchmarks/client-nav/scenarios/mount/solid/tsconfig.json b/benchmarks/client-nav/scenarios/mount/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/mount/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/mount/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/mount/solid/vite.config.ts b/benchmarks/client-nav/scenarios/mount/solid/vite.config.ts index 5b586dd128..910d332f9c 100644 --- a/benchmarks/client-nav/scenarios/mount/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/mount/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav mount (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/mount/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/mount/vue/speed.bench.ts index d9268ba91b..d2e4b72c84 100644 --- a/benchmarks/client-nav/scenarios/mount/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/mount/vue/speed.bench.ts @@ -1,15 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-mount', async ({ bench }) => { - const scenario = setup() +describe('client-mount', () => { + const test = setup() - await bench('client-mount loop (vue)', benchLifecycle(scenario), async () => { - for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() - } - await scenario.finishBatch() - }).run(benchOptions) + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( + 'client-mount loop (vue)', + async () => { + for (let i = 0; i < ticksPerIteration; i++) { + await test.tick() + } + }, + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/mount/vue/src/main.tsx b/benchmarks/client-nav/scenarios/mount/vue/src/main.tsx index fc493c10a5..6d238e2832 100644 --- a/benchmarks/client-nav/scenarios/mount/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/mount/vue/src/main.tsx @@ -1,12 +1,19 @@ import * as Vue from 'vue' -import { RouterProvider, createRouter } from '@tanstack/vue-router' +import { + RouterProvider, + createBrowserHistory, + createRouter, +} from '@tanstack/vue-router' import { routeTree } from './routeTree.gen' -import type { RouterHistory } from '@tanstack/history' +import type { RouterHistory } from '@tanstack/vue-router' /** * Unlike the other scenarios, this app is mounted and unmounted in a loop, so * it must not register page-lifetime globals that have no dispose path: - * - the harness injects and destroys a fresh memory history per mount; + * - the history is created explicitly and `destroy()`ed on unmount — the + * default per-router `createBrowserHistory()` monkey-patches + * `window.history.pushState`/`replaceState`, chaining one wrapper per + * router and degrading every later mount; * - `scrollRestoration` stays off — enabling it registers per-router * document/window listeners that retain every router ever created. */ @@ -23,7 +30,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { +export function mountTestApp(container: HTMLElement) { + const history = createBrowserHistory() const router = createTestRouter(history) const component = @@ -37,6 +45,7 @@ export function mountTestApp(container: HTMLElement, history: RouterHistory) { router, unmount() { app.unmount() + history.destroy() }, } } diff --git a/benchmarks/client-nav/scenarios/mount/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/mount/vue/src/routeTree.gen.ts index cd27c917e1..98643d63c9 100644 --- a/benchmarks/client-nav/scenarios/mount/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/mount/vue/src/routeTree.gen.ts @@ -9,35 +9,20 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AboutRouteImport } from './routes/about' -import { Route as BlogRouteImport } from './routes/blog' -import { Route as SearchRouteImport } from './routes/search' -import { Route as SettingsRouteImport } from './routes/settings' import { Route as ShopRouteImport } from './routes/shop' -import { Route as BlogIndexRouteImport } from './routes/blog.index' -import { Route as BlogSlugRouteImport } from './routes/blog.$slug' +import { Route as SettingsRouteImport } from './routes/settings' +import { Route as SearchRouteImport } from './routes/search' +import { Route as BlogRouteImport } from './routes/blog' +import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' import { Route as ShopIndexRouteImport } from './routes/shop.index' +import { Route as BlogIndexRouteImport } from './routes/blog.index' import { Route as ShopProductIdRouteImport } from './routes/shop.$productId' +import { Route as BlogSlugRouteImport } from './routes/blog.$slug' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AboutRoute = AboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => rootRouteImport, -} as any) -const BlogRoute = BlogRouteImport.update({ - id: '/blog', - path: '/blog', - getParentRoute: () => rootRouteImport, -} as any) -const SearchRoute = SearchRouteImport.update({ - id: '/search', - path: '/search', +const ShopRoute = ShopRouteImport.update({ + id: '/shop', + path: '/shop', getParentRoute: () => rootRouteImport, } as any) const SettingsRoute = SettingsRouteImport.update({ @@ -45,31 +30,46 @@ const SettingsRoute = SettingsRouteImport.update({ path: '/settings', getParentRoute: () => rootRouteImport, } as any) -const ShopRoute = ShopRouteImport.update({ - id: '/shop', - path: '/shop', +const SearchRoute = SearchRouteImport.update({ + id: '/search', + path: '/search', getParentRoute: () => rootRouteImport, } as any) -const BlogIndexRoute = BlogIndexRouteImport.update({ +const BlogRoute = BlogRouteImport.update({ + id: '/blog', + path: '/blog', + getParentRoute: () => rootRouteImport, +} as any) +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => BlogRoute, -} as any) -const BlogSlugRoute = BlogSlugRouteImport.update({ - id: '/$slug', - path: '/$slug', - getParentRoute: () => BlogRoute, + getParentRoute: () => rootRouteImport, } as any) const ShopIndexRoute = ShopIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ShopRoute, } as any) +const BlogIndexRoute = BlogIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => BlogRoute, +} as any) const ShopProductIdRoute = ShopProductIdRouteImport.update({ id: '/$productId', path: '/$productId', getParentRoute: () => ShopRoute, } as any) +const BlogSlugRoute = BlogSlugRouteImport.update({ + id: '/$slug', + path: '/$slug', + getParentRoute: () => BlogRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -154,32 +154,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutRouteImport - parentRoute: typeof rootRouteImport - } - '/blog': { - id: '/blog' - path: '/blog' - fullPath: '/blog' - preLoaderRoute: typeof BlogRouteImport - parentRoute: typeof rootRouteImport - } - '/search': { - id: '/search' - path: '/search' - fullPath: '/search' - preLoaderRoute: typeof SearchRouteImport + '/shop': { + id: '/shop' + path: '/shop' + fullPath: '/shop' + preLoaderRoute: typeof ShopRouteImport parentRoute: typeof rootRouteImport } '/settings': { @@ -189,26 +168,33 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SettingsRouteImport parentRoute: typeof rootRouteImport } - '/shop': { - id: '/shop' - path: '/shop' - fullPath: '/shop' - preLoaderRoute: typeof ShopRouteImport + '/search': { + id: '/search' + path: '/search' + fullPath: '/search' + preLoaderRoute: typeof SearchRouteImport parentRoute: typeof rootRouteImport } - '/blog/': { - id: '/blog/' - path: '/' - fullPath: '/blog/' - preLoaderRoute: typeof BlogIndexRouteImport - parentRoute: typeof BlogRoute + '/blog': { + id: '/blog' + path: '/blog' + fullPath: '/blog' + preLoaderRoute: typeof BlogRouteImport + parentRoute: typeof rootRouteImport } - '/blog/$slug': { - id: '/blog/$slug' - path: '/$slug' - fullPath: '/blog/$slug' - preLoaderRoute: typeof BlogSlugRouteImport - parentRoute: typeof BlogRoute + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/shop/': { id: '/shop/' @@ -217,6 +203,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ShopIndexRouteImport parentRoute: typeof ShopRoute } + '/blog/': { + id: '/blog/' + path: '/' + fullPath: '/blog/' + preLoaderRoute: typeof BlogIndexRouteImport + parentRoute: typeof BlogRoute + } '/shop/$productId': { id: '/shop/$productId' path: '/$productId' @@ -224,6 +217,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ShopProductIdRouteImport parentRoute: typeof ShopRoute } + '/blog/$slug': { + id: '/blog/$slug' + path: '/$slug' + fullPath: '/blog/$slug' + preLoaderRoute: typeof BlogSlugRouteImport + parentRoute: typeof BlogRoute + } } } diff --git a/benchmarks/client-nav/scenarios/mount/vue/vite.config.ts b/benchmarks/client-nav/scenarios/mount/vue/vite.config.ts index 8d4005f339..107e1037b6 100644 --- a/benchmarks/client-nav/scenarios/mount/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/mount/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav mount (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/nested-params/react/speed.bench.ts b/benchmarks/client-nav/scenarios/nested-params/react/speed.bench.ts index fa5809c1fd..321b1ad230 100644 --- a/benchmarks/client-nav/scenarios/nested-params/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/nested-params/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-nested-params', async ({ bench }) => { - const scenario = setup() +describe('client-nested-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-nested-params navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/nested-params/react/src/main.tsx b/benchmarks/client-nav/scenarios/nested-params/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/nested-params/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/nested-params/react/vite.config.ts b/benchmarks/client-nav/scenarios/nested-params/react/vite.config.ts index a99060bf1c..672b1850ff 100644 --- a/benchmarks/client-nav/scenarios/nested-params/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/nested-params/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav nested-params (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/nested-params/solid/speed.bench.ts index 2c64d9a221..d35980f612 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/nested-params/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-nested-params', async ({ bench }) => { - const scenario = setup() +describe('client-nested-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-nested-params navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/main.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.$h.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.$h.tsx index 7dc55db0e4..fccc6ca7bb 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.$h.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.$h.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c/$d/$e/$f/$g/$h')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.h) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.h}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxH }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxH * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.tsx index d9c6c9429b..7274a19aac 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.$g.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c/$d/$e/$f/$g')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.g) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.g}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxG }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxG * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.tsx index 010f89bc4d..a7ec5597f7 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.$f.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c/$d/$e/$f')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.f) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.f}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxF }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxF * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.tsx index 08c107f0c6..79c6b118e0 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.$e.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c/$d/$e')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.e) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.e}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxE }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxE * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.tsx index 1b64edd58b..e0dc4c10d2 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.$d.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c/$d')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.d) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.d}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxD }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxD * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.tsx index e509ea82c6..3a0df7eb71 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.$c.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b/$c')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.c) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.c}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxC }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxC * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.tsx index ada853b845..6133e72b48 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.$b.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a/$b')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.b) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.b}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxB }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxB * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.tsx b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.tsx index 5ecf004fae..7bd378431b 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/solid/src/routes/l.$a.tsx @@ -13,9 +13,12 @@ export const Route = createFileRoute('/l/$a')({ function ParamsSubscriberOne() { const value = Route.useParams({ select: (params) => smallHash(params.a) }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -23,17 +26,23 @@ function ParamsSubscriberTwo() { const value = Route.useParams({ select: (params) => smallHash(`${params.a}:2`), }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } function ContextSubscriberOne() { const value = Route.useRouteContext({ select: (context) => context.ctxA }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } @@ -41,9 +50,12 @@ function ContextSubscriberTwo() { const value = Route.useRouteContext({ select: (context) => (context.ctxA * 31 + 7) >>> 0, }) - createRenderEffect(() => { - void value() - }) + createRenderEffect( + () => { + void value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/tsconfig.json b/benchmarks/client-nav/scenarios/nested-params/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/nested-params/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/nested-params/solid/vite.config.ts b/benchmarks/client-nav/scenarios/nested-params/solid/vite.config.ts index 9897e2c199..f5c9e13c0f 100644 --- a/benchmarks/client-nav/scenarios/nested-params/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/nested-params/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav nested-params (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/nested-params/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/nested-params/vue/speed.bench.ts index bd3e82e070..fac8703c34 100644 --- a/benchmarks/client-nav/scenarios/nested-params/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/nested-params/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-nested-params', async ({ bench }) => { - const scenario = setup() +describe('client-nested-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-nested-params navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/nested-params/vue/src/main.tsx b/benchmarks/client-nav/scenarios/nested-params/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/nested-params/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/nested-params/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/nested-params/vue/vite.config.ts b/benchmarks/client-nav/scenarios/nested-params/vue/vite.config.ts index 0d74eb7a7c..59a4af48ef 100644 --- a/benchmarks/client-nav/scenarios/nested-params/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/nested-params/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav nested-params (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/preload/react/speed.bench.ts b/benchmarks/client-nav/scenarios/preload/react/speed.bench.ts index 5c210b2fd7..c869ebdcfb 100644 --- a/benchmarks/client-nav/scenarios/preload/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/preload/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-preload', async ({ bench }) => { - const scenario = setup() +describe('client-preload', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-preload interaction loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/preload/react/src/main.tsx b/benchmarks/client-nav/scenarios/preload/react/src/main.tsx index 395867f674..6f8942c118 100644 --- a/benchmarks/client-nav/scenarios/preload/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/preload/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -25,8 +23,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/preload/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/preload/react/src/routeTree.gen.ts index 20619341c0..0c76e85974 100644 --- a/benchmarks/client-nav/scenarios/preload/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/preload/react/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as SectionsSectionRouteImport } from './routes/sections.$section' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DocsRoute = DocsRouteImport.update({ id: '/docs', path: '/docs', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const SectionsSectionRoute = SectionsSectionRouteImport.update({ id: '/sections/$section', path: '/sections/$section', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/docs': { id: '/docs' path: '/docs' @@ -75,6 +68,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/sections/$section': { id: '/sections/$section' path: '/sections/$section' diff --git a/benchmarks/client-nav/scenarios/preload/react/vite.config.ts b/benchmarks/client-nav/scenarios/preload/react/vite.config.ts index 8a41fc8707..ff51686959 100644 --- a/benchmarks/client-nav/scenarios/preload/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/preload/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav preload (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/preload/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/preload/solid/speed.bench.ts index f835b4a7b9..ff2771985b 100644 --- a/benchmarks/client-nav/scenarios/preload/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/preload/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-preload', async ({ bench }) => { - const scenario = setup() +describe('client-preload', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-preload interaction loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/preload/solid/src/main.tsx b/benchmarks/client-nav/scenarios/preload/solid/src/main.tsx index 3791156c64..6e944942f8 100644 --- a/benchmarks/client-nav/scenarios/preload/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/preload/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -25,8 +23,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/preload/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/preload/solid/src/routeTree.gen.ts index 97e215b6da..645d925238 100644 --- a/benchmarks/client-nav/scenarios/preload/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/preload/solid/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as SectionsSectionRouteImport } from './routes/sections.$section' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DocsRoute = DocsRouteImport.update({ id: '/docs', path: '/docs', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const SectionsSectionRoute = SectionsSectionRouteImport.update({ id: '/sections/$section', path: '/sections/$section', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/docs': { id: '/docs' path: '/docs' @@ -75,6 +68,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/sections/$section': { id: '/sections/$section' path: '/sections/$section' diff --git a/benchmarks/client-nav/scenarios/preload/solid/tsconfig.json b/benchmarks/client-nav/scenarios/preload/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/preload/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/preload/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/preload/solid/vite.config.ts b/benchmarks/client-nav/scenarios/preload/solid/vite.config.ts index 07014e6124..b542834469 100644 --- a/benchmarks/client-nav/scenarios/preload/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/preload/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav preload (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/preload/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/preload/vue/speed.bench.ts index e0ec83619b..2e790e9240 100644 --- a/benchmarks/client-nav/scenarios/preload/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/preload/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-preload', async ({ bench }) => { - const scenario = setup() +describe('client-preload', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-preload interaction loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/preload/vue/src/main.tsx b/benchmarks/client-nav/scenarios/preload/vue/src/main.tsx index 3da20b2cbf..1e325392a4 100644 --- a/benchmarks/client-nav/scenarios/preload/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/preload/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -25,8 +23,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/preload/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/preload/vue/src/routeTree.gen.ts index 5f95d09da0..05a751060b 100644 --- a/benchmarks/client-nav/scenarios/preload/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/preload/vue/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DocsRouteImport } from './routes/docs' +import { Route as IndexRouteImport } from './routes/index' import { Route as SectionsSectionRouteImport } from './routes/sections.$section' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DocsRoute = DocsRouteImport.update({ id: '/docs', path: '/docs', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const SectionsSectionRoute = SectionsSectionRouteImport.update({ id: '/sections/$section', path: '/sections/$section', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/docs': { id: '/docs' path: '/docs' @@ -75,6 +68,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof DocsRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/sections/$section': { id: '/sections/$section' path: '/sections/$section' diff --git a/benchmarks/client-nav/scenarios/preload/vue/vite.config.ts b/benchmarks/client-nav/scenarios/preload/vue/vite.config.ts index 8d00e66378..25e64b5bef 100644 --- a/benchmarks/client-nav/scenarios/preload/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/preload/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav preload (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/rewrites/react/speed.bench.ts b/benchmarks/client-nav/scenarios/rewrites/react/speed.bench.ts index dd1b6f3686..9b77a79838 100644 --- a/benchmarks/client-nav/scenarios/rewrites/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/rewrites/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-rewrites', async ({ bench }) => { - const scenario = setup() +describe('client-rewrites', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-rewrites navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/rewrites/react/src/main.tsx b/benchmarks/client-nav/scenarios/rewrites/react/src/main.tsx index 28020ce373..47746bb0fb 100644 --- a/benchmarks/client-nav/scenarios/rewrites/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/rewrites/react/src/main.tsx @@ -1,13 +1,11 @@ -import type { RouterHistory } from '@tanstack/history' import { RouterProvider, createRouter } from '@tanstack/react-router' import { createRoot } from 'react-dom/client' import { routeTree } from './routeTree.gen' import { basepath, localeRewrite } from '../../shared' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { return createRouter({ routeTree, - history, basepath, rewrite: localeRewrite, scrollRestoration: true, @@ -25,8 +23,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/rewrites/react/vite.config.ts b/benchmarks/client-nav/scenarios/rewrites/react/vite.config.ts index e79e8522e9..8c07cff4fb 100644 --- a/benchmarks/client-nav/scenarios/rewrites/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/rewrites/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav rewrites (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/rewrites/shared.ts b/benchmarks/client-nav/scenarios/rewrites/shared.ts index 0ca0a7ceb9..c45b15d503 100644 --- a/benchmarks/client-nav/scenarios/rewrites/shared.ts +++ b/benchmarks/client-nav/scenarios/rewrites/shared.ts @@ -8,7 +8,6 @@ * parsing the committed location. */ import type { ScenarioStep } from '../harness' -import type { RouterHistory } from '@tanstack/history' export const basepath = '/app' export const defaultLocale = 'en' @@ -52,7 +51,7 @@ interface StepDef { testId: string /** Internal router pathname expected after the step. */ routerPath: string - /** External history pathname expected after the step. */ + /** External window.location pathname expected after the step. */ windowPath: string } @@ -71,11 +70,7 @@ export const steps: ReadonlyArray = stepDefs.map( (step) => step.testId, ) -export function assertStepResult( - stepIndex: number, - container: HTMLElement, - history: RouterHistory, -) { +export function assertStepResult(stepIndex: number, container: HTMLElement) { const expected = stepDefs[stepIndex]! const marker = container.querySelector('[data-testid="loc"]') const routerPath = marker?.textContent @@ -86,9 +81,9 @@ export function assertStepResult( ) } - if (history.location.pathname !== expected.windowPath) { + if (window.location.pathname !== expected.windowPath) { throw new Error( - `Expected history pathname "${expected.windowPath}" after step ${stepIndex}, received "${history.location.pathname}"`, + `Expected window pathname "${expected.windowPath}" after step ${stepIndex}, received "${window.location.pathname}"`, ) } } diff --git a/benchmarks/client-nav/scenarios/rewrites/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/rewrites/solid/speed.bench.ts index 9c4313e2ff..30d3436071 100644 --- a/benchmarks/client-nav/scenarios/rewrites/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/rewrites/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-rewrites', async ({ bench }) => { - const scenario = setup() +describe('client-rewrites', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-rewrites navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/rewrites/solid/src/main.tsx b/benchmarks/client-nav/scenarios/rewrites/solid/src/main.tsx index 31f1d07650..9e7fbfe87f 100644 --- a/benchmarks/client-nav/scenarios/rewrites/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/rewrites/solid/src/main.tsx @@ -1,13 +1,11 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import { basepath, localeRewrite } from '../../shared' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { return createRouter({ routeTree, - history, basepath, rewrite: localeRewrite, scrollRestoration: true, @@ -25,8 +23,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/rewrites/solid/tsconfig.json b/benchmarks/client-nav/scenarios/rewrites/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/rewrites/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/rewrites/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/rewrites/solid/vite.config.ts b/benchmarks/client-nav/scenarios/rewrites/solid/vite.config.ts index c9e99b7d60..41613c2ad4 100644 --- a/benchmarks/client-nav/scenarios/rewrites/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/rewrites/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav rewrites (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/rewrites/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/rewrites/vue/speed.bench.ts index e96aff39eb..c10b8723bb 100644 --- a/benchmarks/client-nav/scenarios/rewrites/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/rewrites/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-rewrites', async ({ bench }) => { - const scenario = setup() +describe('client-rewrites', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-rewrites navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/rewrites/vue/src/main.tsx b/benchmarks/client-nav/scenarios/rewrites/vue/src/main.tsx index 6695e82dbb..83e430038d 100644 --- a/benchmarks/client-nav/scenarios/rewrites/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/rewrites/vue/src/main.tsx @@ -1,13 +1,11 @@ -import type { RouterHistory } from '@tanstack/history' import * as Vue from 'vue' import { RouterProvider, createRouter } from '@tanstack/vue-router' import { routeTree } from './routeTree.gen' import { basepath, localeRewrite } from '../../shared' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { return createRouter({ routeTree, - history, basepath, rewrite: localeRewrite, scrollRestoration: true, @@ -25,8 +23,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/rewrites/vue/vite.config.ts b/benchmarks/client-nav/scenarios/rewrites/vue/vite.config.ts index 1a795a4e1d..39e22b6c3e 100644 --- a/benchmarks/client-nav/scenarios/rewrites/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/rewrites/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav rewrites (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/react/speed.bench.ts b/benchmarks/client-nav/scenarios/route-tree-scale/react/speed.bench.ts index 6f4b448775..50cc26d5d6 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-route-tree-scale', async ({ bench }) => { - const scenario = setup() +describe('client-route-tree-scale', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-route-tree-scale navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/react/src/main.tsx b/benchmarks/client-nav/scenarios/route-tree-scale/react/src/main.tsx index 5febd6f795..ef0b99555c 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/route-tree-scale/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/route-tree-scale/react/src/routeTree.gen.ts index f8eeb73dda..b58b75180f 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/react/src/routeTree.gen.ts @@ -9,72 +9,48 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as SecARouteImport } from './routes/sec-a' -import { Route as SecBRouteImport } from './routes/sec-b' -import { Route as SecCRouteImport } from './routes/sec-c' -import { Route as SecDRouteImport } from './routes/sec-d' -import { Route as SecERouteImport } from './routes/sec-e' import { Route as SecFRouteImport } from './routes/sec-f' -import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' -import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' -import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' -import { Route as FilesSplatRouteImport } from './routes/files.$' -import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' -import { Route as SecAIndexRouteImport } from './routes/sec-a.index' -import { Route as SecAIdRouteImport } from './routes/sec-a.$id' -import { Route as SecAAboutRouteImport } from './routes/sec-a.about' -import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' -import { Route as SecBIndexRouteImport } from './routes/sec-b.index' -import { Route as SecBIdRouteImport } from './routes/sec-b.$id' -import { Route as SecBAboutRouteImport } from './routes/sec-b.about' -import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' -import { Route as SecCIndexRouteImport } from './routes/sec-c.index' -import { Route as SecCIdRouteImport } from './routes/sec-c.$id' -import { Route as SecCAboutRouteImport } from './routes/sec-c.about' -import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' -import { Route as SecDIndexRouteImport } from './routes/sec-d.index' -import { Route as SecDIdRouteImport } from './routes/sec-d.$id' -import { Route as SecDAboutRouteImport } from './routes/sec-d.about' -import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' -import { Route as SecEIndexRouteImport } from './routes/sec-e.index' -import { Route as SecEIdRouteImport } from './routes/sec-e.$id' -import { Route as SecEAboutRouteImport } from './routes/sec-e.about' -import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecERouteImport } from './routes/sec-e' +import { Route as SecDRouteImport } from './routes/sec-d' +import { Route as SecCRouteImport } from './routes/sec-c' +import { Route as SecBRouteImport } from './routes/sec-b' +import { Route as SecARouteImport } from './routes/sec-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as SecFIndexRouteImport } from './routes/sec-f.index' -import { Route as SecFIdRouteImport } from './routes/sec-f.$id' -import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecEIndexRouteImport } from './routes/sec-e.index' +import { Route as SecDIndexRouteImport } from './routes/sec-d.index' +import { Route as SecCIndexRouteImport } from './routes/sec-c.index' +import { Route as SecBIndexRouteImport } from './routes/sec-b.index' +import { Route as SecAIndexRouteImport } from './routes/sec-a.index' import { Route as SecFSettingsRouteImport } from './routes/sec-f.settings' +import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecFIdRouteImport } from './routes/sec-f.$id' +import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecEAboutRouteImport } from './routes/sec-e.about' +import { Route as SecEIdRouteImport } from './routes/sec-e.$id' +import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' +import { Route as SecDAboutRouteImport } from './routes/sec-d.about' +import { Route as SecDIdRouteImport } from './routes/sec-d.$id' +import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' +import { Route as SecCAboutRouteImport } from './routes/sec-c.about' +import { Route as SecCIdRouteImport } from './routes/sec-c.$id' +import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' +import { Route as SecBAboutRouteImport } from './routes/sec-b.about' +import { Route as SecBIdRouteImport } from './routes/sec-b.$id' +import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' +import { Route as SecAAboutRouteImport } from './routes/sec-a.about' +import { Route as SecAIdRouteImport } from './routes/sec-a.$id' +import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' +import { Route as FilesSplatRouteImport } from './routes/files.$' +import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' +import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' +import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' +import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const SecARoute = SecARouteImport.update({ - id: '/sec-a', - path: '/sec-a', - getParentRoute: () => rootRouteImport, -} as any) -const SecBRoute = SecBRouteImport.update({ - id: '/sec-b', - path: '/sec-b', - getParentRoute: () => rootRouteImport, -} as any) -const SecCRoute = SecCRouteImport.update({ - id: '/sec-c', - path: '/sec-c', - getParentRoute: () => rootRouteImport, -} as any) -const SecDRoute = SecDRouteImport.update({ - id: '/sec-d', - path: '/sec-d', +const SecFRoute = SecFRouteImport.update({ + id: '/sec-f', + path: '/sec-f', getParentRoute: () => rootRouteImport, } as any) const SecERoute = SecERouteImport.update({ @@ -82,150 +58,68 @@ const SecERoute = SecERouteImport.update({ path: '/sec-e', getParentRoute: () => rootRouteImport, } as any) -const SecFRoute = SecFRouteImport.update({ - id: '/sec-f', - path: '/sec-f', +const SecDRoute = SecDRouteImport.update({ + id: '/sec-d', + path: '/sec-d', getParentRoute: () => rootRouteImport, } as any) -const marketingPricingRoute = marketingPricingRouteImport.update({ - id: '/(marketing)/pricing', - path: '/pricing', +const SecCRoute = SecCRouteImport.update({ + id: '/sec-c', + path: '/sec-c', getParentRoute: () => rootRouteImport, } as any) -const marketingPromoRoute = marketingPromoRouteImport.update({ - id: '/(marketing)/promo', - path: '/promo', +const SecBRoute = SecBRouteImport.update({ + id: '/sec-b', + path: '/sec-b', getParentRoute: () => rootRouteImport, } as any) -const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ - id: '/alpha', - path: '/alpha', - getParentRoute: () => LayoutRoute, -} as any) -const LayoutBetaRoute = LayoutBetaRouteImport.update({ - id: '/beta', - path: '/beta', - getParentRoute: () => LayoutRoute, -} as any) -const FilesSplatRoute = FilesSplatRouteImport.update({ - id: '/files/$', - path: '/files/$', +const SecARoute = SecARouteImport.update({ + id: '/sec-a', + path: '/sec-a', getParentRoute: () => rootRouteImport, } as any) -const ReleaseVChar123versionChar125Route = - ReleaseVChar123versionChar125RouteImport.update({ - id: '/release/v{$version}', - path: '/release/v{$version}', - getParentRoute: () => rootRouteImport, - } as any) -const SecAIndexRoute = SecAIndexRouteImport.update({ +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => SecARoute, -} as any) -const SecAIdRoute = SecAIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecARoute, -} as any) -const SecAAboutRoute = SecAAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecARoute, -} as any) -const SecASettingsRoute = SecASettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecARoute, -} as any) -const SecBIndexRoute = SecBIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecBRoute, -} as any) -const SecBIdRoute = SecBIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecBRoute, -} as any) -const SecBAboutRoute = SecBAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecBRoute, -} as any) -const SecBSettingsRoute = SecBSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecBRoute, -} as any) -const SecCIndexRoute = SecCIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecCRoute, -} as any) -const SecCIdRoute = SecCIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecCRoute, -} as any) -const SecCAboutRoute = SecCAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecCRoute, -} as any) -const SecCSettingsRoute = SecCSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecCRoute, -} as any) -const SecDIndexRoute = SecDIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecDRoute, -} as any) -const SecDIdRoute = SecDIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecDRoute, -} as any) -const SecDAboutRoute = SecDAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecDRoute, -} as any) -const SecDSettingsRoute = SecDSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecDRoute, -} as any) -const SecEIndexRoute = SecEIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecERoute, -} as any) -const SecEIdRoute = SecEIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecERoute, -} as any) -const SecEAboutRoute = SecEAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecERoute, -} as any) -const SecESettingsRoute = SecESettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecERoute, + getParentRoute: () => rootRouteImport, } as any) const SecFIndexRoute = SecFIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => SecFRoute, } as any) -const SecFIdRoute = SecFIdRouteImport.update({ - id: '/$id', - path: '/$id', +const SecEIndexRoute = SecEIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecERoute, +} as any) +const SecDIndexRoute = SecDIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecDRoute, +} as any) +const SecCIndexRoute = SecCIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecCRoute, +} as any) +const SecBIndexRoute = SecBIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecBRoute, +} as any) +const SecAIndexRoute = SecAIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecARoute, +} as any) +const SecFSettingsRoute = SecFSettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => SecFRoute, } as any) const SecFAboutRoute = SecFAboutRouteImport.update({ @@ -233,10 +127,116 @@ const SecFAboutRoute = SecFAboutRouteImport.update({ path: '/about', getParentRoute: () => SecFRoute, } as any) -const SecFSettingsRoute = SecFSettingsRouteImport.update({ +const SecFIdRoute = SecFIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecFRoute, +} as any) +const SecESettingsRoute = SecESettingsRouteImport.update({ id: '/settings', path: '/settings', - getParentRoute: () => SecFRoute, + getParentRoute: () => SecERoute, +} as any) +const SecEAboutRoute = SecEAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecERoute, +} as any) +const SecEIdRoute = SecEIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecERoute, +} as any) +const SecDSettingsRoute = SecDSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecDRoute, +} as any) +const SecDAboutRoute = SecDAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecDRoute, +} as any) +const SecDIdRoute = SecDIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecDRoute, +} as any) +const SecCSettingsRoute = SecCSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecCRoute, +} as any) +const SecCAboutRoute = SecCAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecCRoute, +} as any) +const SecCIdRoute = SecCIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecCRoute, +} as any) +const SecBSettingsRoute = SecBSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecBRoute, +} as any) +const SecBAboutRoute = SecBAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecBRoute, +} as any) +const SecBIdRoute = SecBIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecBRoute, +} as any) +const SecASettingsRoute = SecASettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecARoute, +} as any) +const SecAAboutRoute = SecAAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecARoute, +} as any) +const SecAIdRoute = SecAIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecARoute, +} as any) +const ReleaseVChar123versionChar125Route = + ReleaseVChar123versionChar125RouteImport.update({ + id: '/release/v{$version}', + path: '/release/v{$version}', + getParentRoute: () => rootRouteImport, + } as any) +const FilesSplatRoute = FilesSplatRouteImport.update({ + id: '/files/$', + path: '/files/$', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutBetaRoute = LayoutBetaRouteImport.update({ + id: '/beta', + path: '/beta', + getParentRoute: () => LayoutRoute, +} as any) +const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ + id: '/alpha', + path: '/alpha', + getParentRoute: () => LayoutRoute, +} as any) +const marketingPromoRoute = marketingPromoRouteImport.update({ + id: '/(marketing)/promo', + path: '/promo', + getParentRoute: () => rootRouteImport, +} as any) +const marketingPricingRoute = marketingPricingRouteImport.update({ + id: '/(marketing)/pricing', + path: '/pricing', + getParentRoute: () => rootRouteImport, } as any) export interface FileRoutesByFullPath { @@ -484,46 +484,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-a': { - id: '/sec-a' - path: '/sec-a' - fullPath: '/sec-a' - preLoaderRoute: typeof SecARouteImport - parentRoute: typeof rootRouteImport - } - '/sec-b': { - id: '/sec-b' - path: '/sec-b' - fullPath: '/sec-b' - preLoaderRoute: typeof SecBRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-c': { - id: '/sec-c' - path: '/sec-c' - fullPath: '/sec-c' - preLoaderRoute: typeof SecCRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-d': { - id: '/sec-d' - path: '/sec-d' - fullPath: '/sec-d' - preLoaderRoute: typeof SecDRouteImport + '/sec-f': { + id: '/sec-f' + path: '/sec-f' + fullPath: '/sec-f' + preLoaderRoute: typeof SecFRouteImport parentRoute: typeof rootRouteImport } '/sec-e': { @@ -533,194 +498,47 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SecERouteImport parentRoute: typeof rootRouteImport } - '/sec-f': { - id: '/sec-f' - path: '/sec-f' - fullPath: '/sec-f' - preLoaderRoute: typeof SecFRouteImport + '/sec-d': { + id: '/sec-d' + path: '/sec-d' + fullPath: '/sec-d' + preLoaderRoute: typeof SecDRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/pricing': { - id: '/(marketing)/pricing' - path: '/pricing' - fullPath: '/pricing' - preLoaderRoute: typeof marketingPricingRouteImport + '/sec-c': { + id: '/sec-c' + path: '/sec-c' + fullPath: '/sec-c' + preLoaderRoute: typeof SecCRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/promo': { - id: '/(marketing)/promo' - path: '/promo' - fullPath: '/promo' - preLoaderRoute: typeof marketingPromoRouteImport + '/sec-b': { + id: '/sec-b' + path: '/sec-b' + fullPath: '/sec-b' + preLoaderRoute: typeof SecBRouteImport parentRoute: typeof rootRouteImport } - '/_layout/alpha': { - id: '/_layout/alpha' - path: '/alpha' - fullPath: '/alpha' - preLoaderRoute: typeof LayoutAlphaRouteImport - parentRoute: typeof LayoutRoute - } - '/_layout/beta': { - id: '/_layout/beta' - path: '/beta' - fullPath: '/beta' - preLoaderRoute: typeof LayoutBetaRouteImport - parentRoute: typeof LayoutRoute - } - '/files/$': { - id: '/files/$' - path: '/files/$' - fullPath: '/files/$' - preLoaderRoute: typeof FilesSplatRouteImport + '/sec-a': { + id: '/sec-a' + path: '/sec-a' + fullPath: '/sec-a' + preLoaderRoute: typeof SecARouteImport parentRoute: typeof rootRouteImport } - '/release/v{$version}': { - id: '/release/v{$version}' - path: '/release/v{$version}' - fullPath: '/release/v{$version}' - preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/sec-a/': { - id: '/sec-a/' + '/': { + id: '/' path: '/' - fullPath: '/sec-a/' - preLoaderRoute: typeof SecAIndexRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/$id': { - id: '/sec-a/$id' - path: '/$id' - fullPath: '/sec-a/$id' - preLoaderRoute: typeof SecAIdRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/about': { - id: '/sec-a/about' - path: '/about' - fullPath: '/sec-a/about' - preLoaderRoute: typeof SecAAboutRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/settings': { - id: '/sec-a/settings' - path: '/settings' - fullPath: '/sec-a/settings' - preLoaderRoute: typeof SecASettingsRouteImport - parentRoute: typeof SecARoute - } - '/sec-b/': { - id: '/sec-b/' - path: '/' - fullPath: '/sec-b/' - preLoaderRoute: typeof SecBIndexRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/$id': { - id: '/sec-b/$id' - path: '/$id' - fullPath: '/sec-b/$id' - preLoaderRoute: typeof SecBIdRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/about': { - id: '/sec-b/about' - path: '/about' - fullPath: '/sec-b/about' - preLoaderRoute: typeof SecBAboutRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/settings': { - id: '/sec-b/settings' - path: '/settings' - fullPath: '/sec-b/settings' - preLoaderRoute: typeof SecBSettingsRouteImport - parentRoute: typeof SecBRoute - } - '/sec-c/': { - id: '/sec-c/' - path: '/' - fullPath: '/sec-c/' - preLoaderRoute: typeof SecCIndexRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/$id': { - id: '/sec-c/$id' - path: '/$id' - fullPath: '/sec-c/$id' - preLoaderRoute: typeof SecCIdRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/about': { - id: '/sec-c/about' - path: '/about' - fullPath: '/sec-c/about' - preLoaderRoute: typeof SecCAboutRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/settings': { - id: '/sec-c/settings' - path: '/settings' - fullPath: '/sec-c/settings' - preLoaderRoute: typeof SecCSettingsRouteImport - parentRoute: typeof SecCRoute - } - '/sec-d/': { - id: '/sec-d/' - path: '/' - fullPath: '/sec-d/' - preLoaderRoute: typeof SecDIndexRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/$id': { - id: '/sec-d/$id' - path: '/$id' - fullPath: '/sec-d/$id' - preLoaderRoute: typeof SecDIdRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/about': { - id: '/sec-d/about' - path: '/about' - fullPath: '/sec-d/about' - preLoaderRoute: typeof SecDAboutRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/settings': { - id: '/sec-d/settings' - path: '/settings' - fullPath: '/sec-d/settings' - preLoaderRoute: typeof SecDSettingsRouteImport - parentRoute: typeof SecDRoute - } - '/sec-e/': { - id: '/sec-e/' - path: '/' - fullPath: '/sec-e/' - preLoaderRoute: typeof SecEIndexRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/$id': { - id: '/sec-e/$id' - path: '/$id' - fullPath: '/sec-e/$id' - preLoaderRoute: typeof SecEIdRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/about': { - id: '/sec-e/about' - path: '/about' - fullPath: '/sec-e/about' - preLoaderRoute: typeof SecEAboutRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/settings': { - id: '/sec-e/settings' - path: '/settings' - fullPath: '/sec-e/settings' - preLoaderRoute: typeof SecESettingsRouteImport - parentRoute: typeof SecERoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/sec-f/': { id: '/sec-f/' @@ -729,11 +547,46 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SecFIndexRouteImport parentRoute: typeof SecFRoute } - '/sec-f/$id': { - id: '/sec-f/$id' - path: '/$id' - fullPath: '/sec-f/$id' - preLoaderRoute: typeof SecFIdRouteImport + '/sec-e/': { + id: '/sec-e/' + path: '/' + fullPath: '/sec-e/' + preLoaderRoute: typeof SecEIndexRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/': { + id: '/sec-d/' + path: '/' + fullPath: '/sec-d/' + preLoaderRoute: typeof SecDIndexRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/': { + id: '/sec-c/' + path: '/' + fullPath: '/sec-c/' + preLoaderRoute: typeof SecCIndexRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/': { + id: '/sec-b/' + path: '/' + fullPath: '/sec-b/' + preLoaderRoute: typeof SecBIndexRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/': { + id: '/sec-a/' + path: '/' + fullPath: '/sec-a/' + preLoaderRoute: typeof SecAIndexRouteImport + parentRoute: typeof SecARoute + } + '/sec-f/settings': { + id: '/sec-f/settings' + path: '/settings' + fullPath: '/sec-f/settings' + preLoaderRoute: typeof SecFSettingsRouteImport parentRoute: typeof SecFRoute } '/sec-f/about': { @@ -743,13 +596,160 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SecFAboutRouteImport parentRoute: typeof SecFRoute } - '/sec-f/settings': { - id: '/sec-f/settings' - path: '/settings' - fullPath: '/sec-f/settings' - preLoaderRoute: typeof SecFSettingsRouteImport + '/sec-f/$id': { + id: '/sec-f/$id' + path: '/$id' + fullPath: '/sec-f/$id' + preLoaderRoute: typeof SecFIdRouteImport parentRoute: typeof SecFRoute } + '/sec-e/settings': { + id: '/sec-e/settings' + path: '/settings' + fullPath: '/sec-e/settings' + preLoaderRoute: typeof SecESettingsRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/about': { + id: '/sec-e/about' + path: '/about' + fullPath: '/sec-e/about' + preLoaderRoute: typeof SecEAboutRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/$id': { + id: '/sec-e/$id' + path: '/$id' + fullPath: '/sec-e/$id' + preLoaderRoute: typeof SecEIdRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/settings': { + id: '/sec-d/settings' + path: '/settings' + fullPath: '/sec-d/settings' + preLoaderRoute: typeof SecDSettingsRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/about': { + id: '/sec-d/about' + path: '/about' + fullPath: '/sec-d/about' + preLoaderRoute: typeof SecDAboutRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/$id': { + id: '/sec-d/$id' + path: '/$id' + fullPath: '/sec-d/$id' + preLoaderRoute: typeof SecDIdRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/settings': { + id: '/sec-c/settings' + path: '/settings' + fullPath: '/sec-c/settings' + preLoaderRoute: typeof SecCSettingsRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/about': { + id: '/sec-c/about' + path: '/about' + fullPath: '/sec-c/about' + preLoaderRoute: typeof SecCAboutRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/$id': { + id: '/sec-c/$id' + path: '/$id' + fullPath: '/sec-c/$id' + preLoaderRoute: typeof SecCIdRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/settings': { + id: '/sec-b/settings' + path: '/settings' + fullPath: '/sec-b/settings' + preLoaderRoute: typeof SecBSettingsRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/about': { + id: '/sec-b/about' + path: '/about' + fullPath: '/sec-b/about' + preLoaderRoute: typeof SecBAboutRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/$id': { + id: '/sec-b/$id' + path: '/$id' + fullPath: '/sec-b/$id' + preLoaderRoute: typeof SecBIdRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/settings': { + id: '/sec-a/settings' + path: '/settings' + fullPath: '/sec-a/settings' + preLoaderRoute: typeof SecASettingsRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/about': { + id: '/sec-a/about' + path: '/about' + fullPath: '/sec-a/about' + preLoaderRoute: typeof SecAAboutRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/$id': { + id: '/sec-a/$id' + path: '/$id' + fullPath: '/sec-a/$id' + preLoaderRoute: typeof SecAIdRouteImport + parentRoute: typeof SecARoute + } + '/release/v{$version}': { + id: '/release/v{$version}' + path: '/release/v{$version}' + fullPath: '/release/v{$version}' + preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + parentRoute: typeof rootRouteImport + } + '/files/$': { + id: '/files/$' + path: '/files/$' + fullPath: '/files/$' + preLoaderRoute: typeof FilesSplatRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout/beta': { + id: '/_layout/beta' + path: '/beta' + fullPath: '/beta' + preLoaderRoute: typeof LayoutBetaRouteImport + parentRoute: typeof LayoutRoute + } + '/_layout/alpha': { + id: '/_layout/alpha' + path: '/alpha' + fullPath: '/alpha' + preLoaderRoute: typeof LayoutAlphaRouteImport + parentRoute: typeof LayoutRoute + } + '/(marketing)/promo': { + id: '/(marketing)/promo' + path: '/promo' + fullPath: '/promo' + preLoaderRoute: typeof marketingPromoRouteImport + parentRoute: typeof rootRouteImport + } + '/(marketing)/pricing': { + id: '/(marketing)/pricing' + path: '/pricing' + fullPath: '/pricing' + preLoaderRoute: typeof marketingPricingRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/react/vite.config.ts b/benchmarks/client-nav/scenarios/route-tree-scale/react/vite.config.ts index 0f588fda53..686907a506 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav route-tree-scale (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/route-tree-scale/solid/speed.bench.ts index 9244ef1350..3d7a22a027 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-route-tree-scale', async ({ bench }) => { - const scenario = setup() +describe('client-route-tree-scale', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-route-tree-scale navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/main.tsx b/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/main.tsx index fa9d239418..b43608e191 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/routeTree.gen.ts index e6f3596562..20b4af6146 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/solid/src/routeTree.gen.ts @@ -9,72 +9,48 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as SecARouteImport } from './routes/sec-a' -import { Route as SecBRouteImport } from './routes/sec-b' -import { Route as SecCRouteImport } from './routes/sec-c' -import { Route as SecDRouteImport } from './routes/sec-d' -import { Route as SecERouteImport } from './routes/sec-e' import { Route as SecFRouteImport } from './routes/sec-f' -import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' -import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' -import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' -import { Route as FilesSplatRouteImport } from './routes/files.$' -import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' -import { Route as SecAIndexRouteImport } from './routes/sec-a.index' -import { Route as SecAIdRouteImport } from './routes/sec-a.$id' -import { Route as SecAAboutRouteImport } from './routes/sec-a.about' -import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' -import { Route as SecBIndexRouteImport } from './routes/sec-b.index' -import { Route as SecBIdRouteImport } from './routes/sec-b.$id' -import { Route as SecBAboutRouteImport } from './routes/sec-b.about' -import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' -import { Route as SecCIndexRouteImport } from './routes/sec-c.index' -import { Route as SecCIdRouteImport } from './routes/sec-c.$id' -import { Route as SecCAboutRouteImport } from './routes/sec-c.about' -import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' -import { Route as SecDIndexRouteImport } from './routes/sec-d.index' -import { Route as SecDIdRouteImport } from './routes/sec-d.$id' -import { Route as SecDAboutRouteImport } from './routes/sec-d.about' -import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' -import { Route as SecEIndexRouteImport } from './routes/sec-e.index' -import { Route as SecEIdRouteImport } from './routes/sec-e.$id' -import { Route as SecEAboutRouteImport } from './routes/sec-e.about' -import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecERouteImport } from './routes/sec-e' +import { Route as SecDRouteImport } from './routes/sec-d' +import { Route as SecCRouteImport } from './routes/sec-c' +import { Route as SecBRouteImport } from './routes/sec-b' +import { Route as SecARouteImport } from './routes/sec-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as SecFIndexRouteImport } from './routes/sec-f.index' -import { Route as SecFIdRouteImport } from './routes/sec-f.$id' -import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecEIndexRouteImport } from './routes/sec-e.index' +import { Route as SecDIndexRouteImport } from './routes/sec-d.index' +import { Route as SecCIndexRouteImport } from './routes/sec-c.index' +import { Route as SecBIndexRouteImport } from './routes/sec-b.index' +import { Route as SecAIndexRouteImport } from './routes/sec-a.index' import { Route as SecFSettingsRouteImport } from './routes/sec-f.settings' +import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecFIdRouteImport } from './routes/sec-f.$id' +import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecEAboutRouteImport } from './routes/sec-e.about' +import { Route as SecEIdRouteImport } from './routes/sec-e.$id' +import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' +import { Route as SecDAboutRouteImport } from './routes/sec-d.about' +import { Route as SecDIdRouteImport } from './routes/sec-d.$id' +import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' +import { Route as SecCAboutRouteImport } from './routes/sec-c.about' +import { Route as SecCIdRouteImport } from './routes/sec-c.$id' +import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' +import { Route as SecBAboutRouteImport } from './routes/sec-b.about' +import { Route as SecBIdRouteImport } from './routes/sec-b.$id' +import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' +import { Route as SecAAboutRouteImport } from './routes/sec-a.about' +import { Route as SecAIdRouteImport } from './routes/sec-a.$id' +import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' +import { Route as FilesSplatRouteImport } from './routes/files.$' +import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' +import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' +import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' +import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const SecARoute = SecARouteImport.update({ - id: '/sec-a', - path: '/sec-a', - getParentRoute: () => rootRouteImport, -} as any) -const SecBRoute = SecBRouteImport.update({ - id: '/sec-b', - path: '/sec-b', - getParentRoute: () => rootRouteImport, -} as any) -const SecCRoute = SecCRouteImport.update({ - id: '/sec-c', - path: '/sec-c', - getParentRoute: () => rootRouteImport, -} as any) -const SecDRoute = SecDRouteImport.update({ - id: '/sec-d', - path: '/sec-d', +const SecFRoute = SecFRouteImport.update({ + id: '/sec-f', + path: '/sec-f', getParentRoute: () => rootRouteImport, } as any) const SecERoute = SecERouteImport.update({ @@ -82,150 +58,68 @@ const SecERoute = SecERouteImport.update({ path: '/sec-e', getParentRoute: () => rootRouteImport, } as any) -const SecFRoute = SecFRouteImport.update({ - id: '/sec-f', - path: '/sec-f', +const SecDRoute = SecDRouteImport.update({ + id: '/sec-d', + path: '/sec-d', getParentRoute: () => rootRouteImport, } as any) -const marketingPricingRoute = marketingPricingRouteImport.update({ - id: '/(marketing)/pricing', - path: '/pricing', +const SecCRoute = SecCRouteImport.update({ + id: '/sec-c', + path: '/sec-c', getParentRoute: () => rootRouteImport, } as any) -const marketingPromoRoute = marketingPromoRouteImport.update({ - id: '/(marketing)/promo', - path: '/promo', +const SecBRoute = SecBRouteImport.update({ + id: '/sec-b', + path: '/sec-b', getParentRoute: () => rootRouteImport, } as any) -const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ - id: '/alpha', - path: '/alpha', - getParentRoute: () => LayoutRoute, -} as any) -const LayoutBetaRoute = LayoutBetaRouteImport.update({ - id: '/beta', - path: '/beta', - getParentRoute: () => LayoutRoute, -} as any) -const FilesSplatRoute = FilesSplatRouteImport.update({ - id: '/files/$', - path: '/files/$', +const SecARoute = SecARouteImport.update({ + id: '/sec-a', + path: '/sec-a', getParentRoute: () => rootRouteImport, } as any) -const ReleaseVChar123versionChar125Route = - ReleaseVChar123versionChar125RouteImport.update({ - id: '/release/v{$version}', - path: '/release/v{$version}', - getParentRoute: () => rootRouteImport, - } as any) -const SecAIndexRoute = SecAIndexRouteImport.update({ +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => SecARoute, -} as any) -const SecAIdRoute = SecAIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecARoute, -} as any) -const SecAAboutRoute = SecAAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecARoute, -} as any) -const SecASettingsRoute = SecASettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecARoute, -} as any) -const SecBIndexRoute = SecBIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecBRoute, -} as any) -const SecBIdRoute = SecBIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecBRoute, -} as any) -const SecBAboutRoute = SecBAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecBRoute, -} as any) -const SecBSettingsRoute = SecBSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecBRoute, -} as any) -const SecCIndexRoute = SecCIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecCRoute, -} as any) -const SecCIdRoute = SecCIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecCRoute, -} as any) -const SecCAboutRoute = SecCAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecCRoute, -} as any) -const SecCSettingsRoute = SecCSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecCRoute, -} as any) -const SecDIndexRoute = SecDIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecDRoute, -} as any) -const SecDIdRoute = SecDIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecDRoute, -} as any) -const SecDAboutRoute = SecDAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecDRoute, -} as any) -const SecDSettingsRoute = SecDSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecDRoute, -} as any) -const SecEIndexRoute = SecEIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecERoute, -} as any) -const SecEIdRoute = SecEIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecERoute, -} as any) -const SecEAboutRoute = SecEAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecERoute, -} as any) -const SecESettingsRoute = SecESettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecERoute, + getParentRoute: () => rootRouteImport, } as any) const SecFIndexRoute = SecFIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => SecFRoute, } as any) -const SecFIdRoute = SecFIdRouteImport.update({ - id: '/$id', - path: '/$id', +const SecEIndexRoute = SecEIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecERoute, +} as any) +const SecDIndexRoute = SecDIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecDRoute, +} as any) +const SecCIndexRoute = SecCIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecCRoute, +} as any) +const SecBIndexRoute = SecBIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecBRoute, +} as any) +const SecAIndexRoute = SecAIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecARoute, +} as any) +const SecFSettingsRoute = SecFSettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => SecFRoute, } as any) const SecFAboutRoute = SecFAboutRouteImport.update({ @@ -233,10 +127,116 @@ const SecFAboutRoute = SecFAboutRouteImport.update({ path: '/about', getParentRoute: () => SecFRoute, } as any) -const SecFSettingsRoute = SecFSettingsRouteImport.update({ +const SecFIdRoute = SecFIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecFRoute, +} as any) +const SecESettingsRoute = SecESettingsRouteImport.update({ id: '/settings', path: '/settings', - getParentRoute: () => SecFRoute, + getParentRoute: () => SecERoute, +} as any) +const SecEAboutRoute = SecEAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecERoute, +} as any) +const SecEIdRoute = SecEIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecERoute, +} as any) +const SecDSettingsRoute = SecDSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecDRoute, +} as any) +const SecDAboutRoute = SecDAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecDRoute, +} as any) +const SecDIdRoute = SecDIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecDRoute, +} as any) +const SecCSettingsRoute = SecCSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecCRoute, +} as any) +const SecCAboutRoute = SecCAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecCRoute, +} as any) +const SecCIdRoute = SecCIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecCRoute, +} as any) +const SecBSettingsRoute = SecBSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecBRoute, +} as any) +const SecBAboutRoute = SecBAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecBRoute, +} as any) +const SecBIdRoute = SecBIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecBRoute, +} as any) +const SecASettingsRoute = SecASettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecARoute, +} as any) +const SecAAboutRoute = SecAAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecARoute, +} as any) +const SecAIdRoute = SecAIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecARoute, +} as any) +const ReleaseVChar123versionChar125Route = + ReleaseVChar123versionChar125RouteImport.update({ + id: '/release/v{$version}', + path: '/release/v{$version}', + getParentRoute: () => rootRouteImport, + } as any) +const FilesSplatRoute = FilesSplatRouteImport.update({ + id: '/files/$', + path: '/files/$', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutBetaRoute = LayoutBetaRouteImport.update({ + id: '/beta', + path: '/beta', + getParentRoute: () => LayoutRoute, +} as any) +const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ + id: '/alpha', + path: '/alpha', + getParentRoute: () => LayoutRoute, +} as any) +const marketingPromoRoute = marketingPromoRouteImport.update({ + id: '/(marketing)/promo', + path: '/promo', + getParentRoute: () => rootRouteImport, +} as any) +const marketingPricingRoute = marketingPricingRouteImport.update({ + id: '/(marketing)/pricing', + path: '/pricing', + getParentRoute: () => rootRouteImport, } as any) export interface FileRoutesByFullPath { @@ -484,46 +484,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-a': { - id: '/sec-a' - path: '/sec-a' - fullPath: '/sec-a' - preLoaderRoute: typeof SecARouteImport - parentRoute: typeof rootRouteImport - } - '/sec-b': { - id: '/sec-b' - path: '/sec-b' - fullPath: '/sec-b' - preLoaderRoute: typeof SecBRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-c': { - id: '/sec-c' - path: '/sec-c' - fullPath: '/sec-c' - preLoaderRoute: typeof SecCRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-d': { - id: '/sec-d' - path: '/sec-d' - fullPath: '/sec-d' - preLoaderRoute: typeof SecDRouteImport + '/sec-f': { + id: '/sec-f' + path: '/sec-f' + fullPath: '/sec-f' + preLoaderRoute: typeof SecFRouteImport parentRoute: typeof rootRouteImport } '/sec-e': { @@ -533,194 +498,47 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SecERouteImport parentRoute: typeof rootRouteImport } - '/sec-f': { - id: '/sec-f' - path: '/sec-f' - fullPath: '/sec-f' - preLoaderRoute: typeof SecFRouteImport + '/sec-d': { + id: '/sec-d' + path: '/sec-d' + fullPath: '/sec-d' + preLoaderRoute: typeof SecDRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/pricing': { - id: '/(marketing)/pricing' - path: '/pricing' - fullPath: '/pricing' - preLoaderRoute: typeof marketingPricingRouteImport + '/sec-c': { + id: '/sec-c' + path: '/sec-c' + fullPath: '/sec-c' + preLoaderRoute: typeof SecCRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/promo': { - id: '/(marketing)/promo' - path: '/promo' - fullPath: '/promo' - preLoaderRoute: typeof marketingPromoRouteImport + '/sec-b': { + id: '/sec-b' + path: '/sec-b' + fullPath: '/sec-b' + preLoaderRoute: typeof SecBRouteImport parentRoute: typeof rootRouteImport } - '/_layout/alpha': { - id: '/_layout/alpha' - path: '/alpha' - fullPath: '/alpha' - preLoaderRoute: typeof LayoutAlphaRouteImport - parentRoute: typeof LayoutRoute - } - '/_layout/beta': { - id: '/_layout/beta' - path: '/beta' - fullPath: '/beta' - preLoaderRoute: typeof LayoutBetaRouteImport - parentRoute: typeof LayoutRoute - } - '/files/$': { - id: '/files/$' - path: '/files/$' - fullPath: '/files/$' - preLoaderRoute: typeof FilesSplatRouteImport + '/sec-a': { + id: '/sec-a' + path: '/sec-a' + fullPath: '/sec-a' + preLoaderRoute: typeof SecARouteImport parentRoute: typeof rootRouteImport } - '/release/v{$version}': { - id: '/release/v{$version}' - path: '/release/v{$version}' - fullPath: '/release/v{$version}' - preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/sec-a/': { - id: '/sec-a/' + '/': { + id: '/' path: '/' - fullPath: '/sec-a/' - preLoaderRoute: typeof SecAIndexRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/$id': { - id: '/sec-a/$id' - path: '/$id' - fullPath: '/sec-a/$id' - preLoaderRoute: typeof SecAIdRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/about': { - id: '/sec-a/about' - path: '/about' - fullPath: '/sec-a/about' - preLoaderRoute: typeof SecAAboutRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/settings': { - id: '/sec-a/settings' - path: '/settings' - fullPath: '/sec-a/settings' - preLoaderRoute: typeof SecASettingsRouteImport - parentRoute: typeof SecARoute - } - '/sec-b/': { - id: '/sec-b/' - path: '/' - fullPath: '/sec-b/' - preLoaderRoute: typeof SecBIndexRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/$id': { - id: '/sec-b/$id' - path: '/$id' - fullPath: '/sec-b/$id' - preLoaderRoute: typeof SecBIdRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/about': { - id: '/sec-b/about' - path: '/about' - fullPath: '/sec-b/about' - preLoaderRoute: typeof SecBAboutRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/settings': { - id: '/sec-b/settings' - path: '/settings' - fullPath: '/sec-b/settings' - preLoaderRoute: typeof SecBSettingsRouteImport - parentRoute: typeof SecBRoute - } - '/sec-c/': { - id: '/sec-c/' - path: '/' - fullPath: '/sec-c/' - preLoaderRoute: typeof SecCIndexRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/$id': { - id: '/sec-c/$id' - path: '/$id' - fullPath: '/sec-c/$id' - preLoaderRoute: typeof SecCIdRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/about': { - id: '/sec-c/about' - path: '/about' - fullPath: '/sec-c/about' - preLoaderRoute: typeof SecCAboutRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/settings': { - id: '/sec-c/settings' - path: '/settings' - fullPath: '/sec-c/settings' - preLoaderRoute: typeof SecCSettingsRouteImport - parentRoute: typeof SecCRoute - } - '/sec-d/': { - id: '/sec-d/' - path: '/' - fullPath: '/sec-d/' - preLoaderRoute: typeof SecDIndexRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/$id': { - id: '/sec-d/$id' - path: '/$id' - fullPath: '/sec-d/$id' - preLoaderRoute: typeof SecDIdRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/about': { - id: '/sec-d/about' - path: '/about' - fullPath: '/sec-d/about' - preLoaderRoute: typeof SecDAboutRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/settings': { - id: '/sec-d/settings' - path: '/settings' - fullPath: '/sec-d/settings' - preLoaderRoute: typeof SecDSettingsRouteImport - parentRoute: typeof SecDRoute - } - '/sec-e/': { - id: '/sec-e/' - path: '/' - fullPath: '/sec-e/' - preLoaderRoute: typeof SecEIndexRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/$id': { - id: '/sec-e/$id' - path: '/$id' - fullPath: '/sec-e/$id' - preLoaderRoute: typeof SecEIdRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/about': { - id: '/sec-e/about' - path: '/about' - fullPath: '/sec-e/about' - preLoaderRoute: typeof SecEAboutRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/settings': { - id: '/sec-e/settings' - path: '/settings' - fullPath: '/sec-e/settings' - preLoaderRoute: typeof SecESettingsRouteImport - parentRoute: typeof SecERoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/sec-f/': { id: '/sec-f/' @@ -729,11 +547,46 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SecFIndexRouteImport parentRoute: typeof SecFRoute } - '/sec-f/$id': { - id: '/sec-f/$id' - path: '/$id' - fullPath: '/sec-f/$id' - preLoaderRoute: typeof SecFIdRouteImport + '/sec-e/': { + id: '/sec-e/' + path: '/' + fullPath: '/sec-e/' + preLoaderRoute: typeof SecEIndexRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/': { + id: '/sec-d/' + path: '/' + fullPath: '/sec-d/' + preLoaderRoute: typeof SecDIndexRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/': { + id: '/sec-c/' + path: '/' + fullPath: '/sec-c/' + preLoaderRoute: typeof SecCIndexRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/': { + id: '/sec-b/' + path: '/' + fullPath: '/sec-b/' + preLoaderRoute: typeof SecBIndexRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/': { + id: '/sec-a/' + path: '/' + fullPath: '/sec-a/' + preLoaderRoute: typeof SecAIndexRouteImport + parentRoute: typeof SecARoute + } + '/sec-f/settings': { + id: '/sec-f/settings' + path: '/settings' + fullPath: '/sec-f/settings' + preLoaderRoute: typeof SecFSettingsRouteImport parentRoute: typeof SecFRoute } '/sec-f/about': { @@ -743,13 +596,160 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SecFAboutRouteImport parentRoute: typeof SecFRoute } - '/sec-f/settings': { - id: '/sec-f/settings' - path: '/settings' - fullPath: '/sec-f/settings' - preLoaderRoute: typeof SecFSettingsRouteImport + '/sec-f/$id': { + id: '/sec-f/$id' + path: '/$id' + fullPath: '/sec-f/$id' + preLoaderRoute: typeof SecFIdRouteImport parentRoute: typeof SecFRoute } + '/sec-e/settings': { + id: '/sec-e/settings' + path: '/settings' + fullPath: '/sec-e/settings' + preLoaderRoute: typeof SecESettingsRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/about': { + id: '/sec-e/about' + path: '/about' + fullPath: '/sec-e/about' + preLoaderRoute: typeof SecEAboutRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/$id': { + id: '/sec-e/$id' + path: '/$id' + fullPath: '/sec-e/$id' + preLoaderRoute: typeof SecEIdRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/settings': { + id: '/sec-d/settings' + path: '/settings' + fullPath: '/sec-d/settings' + preLoaderRoute: typeof SecDSettingsRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/about': { + id: '/sec-d/about' + path: '/about' + fullPath: '/sec-d/about' + preLoaderRoute: typeof SecDAboutRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/$id': { + id: '/sec-d/$id' + path: '/$id' + fullPath: '/sec-d/$id' + preLoaderRoute: typeof SecDIdRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/settings': { + id: '/sec-c/settings' + path: '/settings' + fullPath: '/sec-c/settings' + preLoaderRoute: typeof SecCSettingsRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/about': { + id: '/sec-c/about' + path: '/about' + fullPath: '/sec-c/about' + preLoaderRoute: typeof SecCAboutRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/$id': { + id: '/sec-c/$id' + path: '/$id' + fullPath: '/sec-c/$id' + preLoaderRoute: typeof SecCIdRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/settings': { + id: '/sec-b/settings' + path: '/settings' + fullPath: '/sec-b/settings' + preLoaderRoute: typeof SecBSettingsRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/about': { + id: '/sec-b/about' + path: '/about' + fullPath: '/sec-b/about' + preLoaderRoute: typeof SecBAboutRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/$id': { + id: '/sec-b/$id' + path: '/$id' + fullPath: '/sec-b/$id' + preLoaderRoute: typeof SecBIdRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/settings': { + id: '/sec-a/settings' + path: '/settings' + fullPath: '/sec-a/settings' + preLoaderRoute: typeof SecASettingsRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/about': { + id: '/sec-a/about' + path: '/about' + fullPath: '/sec-a/about' + preLoaderRoute: typeof SecAAboutRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/$id': { + id: '/sec-a/$id' + path: '/$id' + fullPath: '/sec-a/$id' + preLoaderRoute: typeof SecAIdRouteImport + parentRoute: typeof SecARoute + } + '/release/v{$version}': { + id: '/release/v{$version}' + path: '/release/v{$version}' + fullPath: '/release/v{$version}' + preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + parentRoute: typeof rootRouteImport + } + '/files/$': { + id: '/files/$' + path: '/files/$' + fullPath: '/files/$' + preLoaderRoute: typeof FilesSplatRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout/beta': { + id: '/_layout/beta' + path: '/beta' + fullPath: '/beta' + preLoaderRoute: typeof LayoutBetaRouteImport + parentRoute: typeof LayoutRoute + } + '/_layout/alpha': { + id: '/_layout/alpha' + path: '/alpha' + fullPath: '/alpha' + preLoaderRoute: typeof LayoutAlphaRouteImport + parentRoute: typeof LayoutRoute + } + '/(marketing)/promo': { + id: '/(marketing)/promo' + path: '/promo' + fullPath: '/promo' + preLoaderRoute: typeof marketingPromoRouteImport + parentRoute: typeof rootRouteImport + } + '/(marketing)/pricing': { + id: '/(marketing)/pricing' + path: '/pricing' + fullPath: '/pricing' + preLoaderRoute: typeof marketingPricingRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/solid/tsconfig.json b/benchmarks/client-nav/scenarios/route-tree-scale/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/route-tree-scale/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/solid/vite.config.ts b/benchmarks/client-nav/scenarios/route-tree-scale/solid/vite.config.ts index 542ede131b..dd0bd234e0 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -39,7 +38,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav route-tree-scale (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/route-tree-scale/vue/speed.bench.ts index 331e8e008f..a767b8d220 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-route-tree-scale', async ({ bench }) => { - const scenario = setup() +describe('client-route-tree-scale', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-route-tree-scale navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/main.tsx b/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/main.tsx index cae9b54f1d..c96d3f3a2e 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -22,8 +20,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/routeTree.gen.ts index a12f981bb4..a03c051a79 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/vue/src/routeTree.gen.ts @@ -9,72 +9,48 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as SecARouteImport } from './routes/sec-a' -import { Route as SecBRouteImport } from './routes/sec-b' -import { Route as SecCRouteImport } from './routes/sec-c' -import { Route as SecDRouteImport } from './routes/sec-d' -import { Route as SecERouteImport } from './routes/sec-e' import { Route as SecFRouteImport } from './routes/sec-f' -import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' -import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' -import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' -import { Route as FilesSplatRouteImport } from './routes/files.$' -import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' -import { Route as SecAIndexRouteImport } from './routes/sec-a.index' -import { Route as SecAIdRouteImport } from './routes/sec-a.$id' -import { Route as SecAAboutRouteImport } from './routes/sec-a.about' -import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' -import { Route as SecBIndexRouteImport } from './routes/sec-b.index' -import { Route as SecBIdRouteImport } from './routes/sec-b.$id' -import { Route as SecBAboutRouteImport } from './routes/sec-b.about' -import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' -import { Route as SecCIndexRouteImport } from './routes/sec-c.index' -import { Route as SecCIdRouteImport } from './routes/sec-c.$id' -import { Route as SecCAboutRouteImport } from './routes/sec-c.about' -import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' -import { Route as SecDIndexRouteImport } from './routes/sec-d.index' -import { Route as SecDIdRouteImport } from './routes/sec-d.$id' -import { Route as SecDAboutRouteImport } from './routes/sec-d.about' -import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' -import { Route as SecEIndexRouteImport } from './routes/sec-e.index' -import { Route as SecEIdRouteImport } from './routes/sec-e.$id' -import { Route as SecEAboutRouteImport } from './routes/sec-e.about' -import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecERouteImport } from './routes/sec-e' +import { Route as SecDRouteImport } from './routes/sec-d' +import { Route as SecCRouteImport } from './routes/sec-c' +import { Route as SecBRouteImport } from './routes/sec-b' +import { Route as SecARouteImport } from './routes/sec-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as SecFIndexRouteImport } from './routes/sec-f.index' -import { Route as SecFIdRouteImport } from './routes/sec-f.$id' -import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecEIndexRouteImport } from './routes/sec-e.index' +import { Route as SecDIndexRouteImport } from './routes/sec-d.index' +import { Route as SecCIndexRouteImport } from './routes/sec-c.index' +import { Route as SecBIndexRouteImport } from './routes/sec-b.index' +import { Route as SecAIndexRouteImport } from './routes/sec-a.index' import { Route as SecFSettingsRouteImport } from './routes/sec-f.settings' +import { Route as SecFAboutRouteImport } from './routes/sec-f.about' +import { Route as SecFIdRouteImport } from './routes/sec-f.$id' +import { Route as SecESettingsRouteImport } from './routes/sec-e.settings' +import { Route as SecEAboutRouteImport } from './routes/sec-e.about' +import { Route as SecEIdRouteImport } from './routes/sec-e.$id' +import { Route as SecDSettingsRouteImport } from './routes/sec-d.settings' +import { Route as SecDAboutRouteImport } from './routes/sec-d.about' +import { Route as SecDIdRouteImport } from './routes/sec-d.$id' +import { Route as SecCSettingsRouteImport } from './routes/sec-c.settings' +import { Route as SecCAboutRouteImport } from './routes/sec-c.about' +import { Route as SecCIdRouteImport } from './routes/sec-c.$id' +import { Route as SecBSettingsRouteImport } from './routes/sec-b.settings' +import { Route as SecBAboutRouteImport } from './routes/sec-b.about' +import { Route as SecBIdRouteImport } from './routes/sec-b.$id' +import { Route as SecASettingsRouteImport } from './routes/sec-a.settings' +import { Route as SecAAboutRouteImport } from './routes/sec-a.about' +import { Route as SecAIdRouteImport } from './routes/sec-a.$id' +import { Route as ReleaseVChar123versionChar125RouteImport } from './routes/release.v{$version}' +import { Route as FilesSplatRouteImport } from './routes/files.$' +import { Route as LayoutBetaRouteImport } from './routes/_layout.beta' +import { Route as LayoutAlphaRouteImport } from './routes/_layout.alpha' +import { Route as marketingPromoRouteImport } from './routes/(marketing)/promo' +import { Route as marketingPricingRouteImport } from './routes/(marketing)/pricing' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const SecARoute = SecARouteImport.update({ - id: '/sec-a', - path: '/sec-a', - getParentRoute: () => rootRouteImport, -} as any) -const SecBRoute = SecBRouteImport.update({ - id: '/sec-b', - path: '/sec-b', - getParentRoute: () => rootRouteImport, -} as any) -const SecCRoute = SecCRouteImport.update({ - id: '/sec-c', - path: '/sec-c', - getParentRoute: () => rootRouteImport, -} as any) -const SecDRoute = SecDRouteImport.update({ - id: '/sec-d', - path: '/sec-d', +const SecFRoute = SecFRouteImport.update({ + id: '/sec-f', + path: '/sec-f', getParentRoute: () => rootRouteImport, } as any) const SecERoute = SecERouteImport.update({ @@ -82,150 +58,68 @@ const SecERoute = SecERouteImport.update({ path: '/sec-e', getParentRoute: () => rootRouteImport, } as any) -const SecFRoute = SecFRouteImport.update({ - id: '/sec-f', - path: '/sec-f', +const SecDRoute = SecDRouteImport.update({ + id: '/sec-d', + path: '/sec-d', getParentRoute: () => rootRouteImport, } as any) -const marketingPricingRoute = marketingPricingRouteImport.update({ - id: '/(marketing)/pricing', - path: '/pricing', +const SecCRoute = SecCRouteImport.update({ + id: '/sec-c', + path: '/sec-c', getParentRoute: () => rootRouteImport, } as any) -const marketingPromoRoute = marketingPromoRouteImport.update({ - id: '/(marketing)/promo', - path: '/promo', +const SecBRoute = SecBRouteImport.update({ + id: '/sec-b', + path: '/sec-b', getParentRoute: () => rootRouteImport, } as any) -const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ - id: '/alpha', - path: '/alpha', - getParentRoute: () => LayoutRoute, -} as any) -const LayoutBetaRoute = LayoutBetaRouteImport.update({ - id: '/beta', - path: '/beta', - getParentRoute: () => LayoutRoute, -} as any) -const FilesSplatRoute = FilesSplatRouteImport.update({ - id: '/files/$', - path: '/files/$', +const SecARoute = SecARouteImport.update({ + id: '/sec-a', + path: '/sec-a', getParentRoute: () => rootRouteImport, } as any) -const ReleaseVChar123versionChar125Route = - ReleaseVChar123versionChar125RouteImport.update({ - id: '/release/v{$version}', - path: '/release/v{$version}', - getParentRoute: () => rootRouteImport, - } as any) -const SecAIndexRoute = SecAIndexRouteImport.update({ +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => SecARoute, -} as any) -const SecAIdRoute = SecAIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecARoute, -} as any) -const SecAAboutRoute = SecAAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecARoute, -} as any) -const SecASettingsRoute = SecASettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecARoute, -} as any) -const SecBIndexRoute = SecBIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecBRoute, -} as any) -const SecBIdRoute = SecBIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecBRoute, -} as any) -const SecBAboutRoute = SecBAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecBRoute, -} as any) -const SecBSettingsRoute = SecBSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecBRoute, -} as any) -const SecCIndexRoute = SecCIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecCRoute, -} as any) -const SecCIdRoute = SecCIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecCRoute, -} as any) -const SecCAboutRoute = SecCAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecCRoute, -} as any) -const SecCSettingsRoute = SecCSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecCRoute, -} as any) -const SecDIndexRoute = SecDIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecDRoute, -} as any) -const SecDIdRoute = SecDIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecDRoute, -} as any) -const SecDAboutRoute = SecDAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecDRoute, -} as any) -const SecDSettingsRoute = SecDSettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecDRoute, -} as any) -const SecEIndexRoute = SecEIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SecERoute, -} as any) -const SecEIdRoute = SecEIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => SecERoute, -} as any) -const SecEAboutRoute = SecEAboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => SecERoute, -} as any) -const SecESettingsRoute = SecESettingsRouteImport.update({ - id: '/settings', - path: '/settings', - getParentRoute: () => SecERoute, + getParentRoute: () => rootRouteImport, } as any) const SecFIndexRoute = SecFIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => SecFRoute, } as any) -const SecFIdRoute = SecFIdRouteImport.update({ - id: '/$id', - path: '/$id', +const SecEIndexRoute = SecEIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecERoute, +} as any) +const SecDIndexRoute = SecDIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecDRoute, +} as any) +const SecCIndexRoute = SecCIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecCRoute, +} as any) +const SecBIndexRoute = SecBIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecBRoute, +} as any) +const SecAIndexRoute = SecAIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SecARoute, +} as any) +const SecFSettingsRoute = SecFSettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => SecFRoute, } as any) const SecFAboutRoute = SecFAboutRouteImport.update({ @@ -233,10 +127,116 @@ const SecFAboutRoute = SecFAboutRouteImport.update({ path: '/about', getParentRoute: () => SecFRoute, } as any) -const SecFSettingsRoute = SecFSettingsRouteImport.update({ +const SecFIdRoute = SecFIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecFRoute, +} as any) +const SecESettingsRoute = SecESettingsRouteImport.update({ id: '/settings', path: '/settings', - getParentRoute: () => SecFRoute, + getParentRoute: () => SecERoute, +} as any) +const SecEAboutRoute = SecEAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecERoute, +} as any) +const SecEIdRoute = SecEIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecERoute, +} as any) +const SecDSettingsRoute = SecDSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecDRoute, +} as any) +const SecDAboutRoute = SecDAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecDRoute, +} as any) +const SecDIdRoute = SecDIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecDRoute, +} as any) +const SecCSettingsRoute = SecCSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecCRoute, +} as any) +const SecCAboutRoute = SecCAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecCRoute, +} as any) +const SecCIdRoute = SecCIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecCRoute, +} as any) +const SecBSettingsRoute = SecBSettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecBRoute, +} as any) +const SecBAboutRoute = SecBAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecBRoute, +} as any) +const SecBIdRoute = SecBIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecBRoute, +} as any) +const SecASettingsRoute = SecASettingsRouteImport.update({ + id: '/settings', + path: '/settings', + getParentRoute: () => SecARoute, +} as any) +const SecAAboutRoute = SecAAboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => SecARoute, +} as any) +const SecAIdRoute = SecAIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => SecARoute, +} as any) +const ReleaseVChar123versionChar125Route = + ReleaseVChar123versionChar125RouteImport.update({ + id: '/release/v{$version}', + path: '/release/v{$version}', + getParentRoute: () => rootRouteImport, + } as any) +const FilesSplatRoute = FilesSplatRouteImport.update({ + id: '/files/$', + path: '/files/$', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutBetaRoute = LayoutBetaRouteImport.update({ + id: '/beta', + path: '/beta', + getParentRoute: () => LayoutRoute, +} as any) +const LayoutAlphaRoute = LayoutAlphaRouteImport.update({ + id: '/alpha', + path: '/alpha', + getParentRoute: () => LayoutRoute, +} as any) +const marketingPromoRoute = marketingPromoRouteImport.update({ + id: '/(marketing)/promo', + path: '/promo', + getParentRoute: () => rootRouteImport, +} as any) +const marketingPricingRoute = marketingPricingRouteImport.update({ + id: '/(marketing)/pricing', + path: '/pricing', + getParentRoute: () => rootRouteImport, } as any) export interface FileRoutesByFullPath { @@ -484,46 +484,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-a': { - id: '/sec-a' - path: '/sec-a' - fullPath: '/sec-a' - preLoaderRoute: typeof SecARouteImport - parentRoute: typeof rootRouteImport - } - '/sec-b': { - id: '/sec-b' - path: '/sec-b' - fullPath: '/sec-b' - preLoaderRoute: typeof SecBRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-c': { - id: '/sec-c' - path: '/sec-c' - fullPath: '/sec-c' - preLoaderRoute: typeof SecCRouteImport - parentRoute: typeof rootRouteImport - } - '/sec-d': { - id: '/sec-d' - path: '/sec-d' - fullPath: '/sec-d' - preLoaderRoute: typeof SecDRouteImport + '/sec-f': { + id: '/sec-f' + path: '/sec-f' + fullPath: '/sec-f' + preLoaderRoute: typeof SecFRouteImport parentRoute: typeof rootRouteImport } '/sec-e': { @@ -533,194 +498,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SecERouteImport parentRoute: typeof rootRouteImport } - '/sec-f': { - id: '/sec-f' - path: '/sec-f' - fullPath: '/sec-f' - preLoaderRoute: typeof SecFRouteImport + '/sec-d': { + id: '/sec-d' + path: '/sec-d' + fullPath: '/sec-d' + preLoaderRoute: typeof SecDRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/pricing': { - id: '/(marketing)/pricing' - path: '/pricing' - fullPath: '/pricing' - preLoaderRoute: typeof marketingPricingRouteImport + '/sec-c': { + id: '/sec-c' + path: '/sec-c' + fullPath: '/sec-c' + preLoaderRoute: typeof SecCRouteImport parentRoute: typeof rootRouteImport } - '/(marketing)/promo': { - id: '/(marketing)/promo' - path: '/promo' - fullPath: '/promo' - preLoaderRoute: typeof marketingPromoRouteImport + '/sec-b': { + id: '/sec-b' + path: '/sec-b' + fullPath: '/sec-b' + preLoaderRoute: typeof SecBRouteImport parentRoute: typeof rootRouteImport } - '/_layout/alpha': { - id: '/_layout/alpha' - path: '/alpha' - fullPath: '/alpha' - preLoaderRoute: typeof LayoutAlphaRouteImport - parentRoute: typeof LayoutRoute - } - '/_layout/beta': { - id: '/_layout/beta' - path: '/beta' - fullPath: '/beta' - preLoaderRoute: typeof LayoutBetaRouteImport - parentRoute: typeof LayoutRoute - } - '/files/$': { - id: '/files/$' - path: '/files/$' - fullPath: '/files/$' - preLoaderRoute: typeof FilesSplatRouteImport + '/sec-a': { + id: '/sec-a' + path: '/sec-a' + fullPath: '/sec-a' + preLoaderRoute: typeof SecARouteImport parentRoute: typeof rootRouteImport } - '/release/v{$version}': { - id: '/release/v{$version}' - path: '/release/v{$version}' - fullPath: '/release/v{$version}' - preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/sec-a/': { - id: '/sec-a/' + '/': { + id: '/' path: '/' - fullPath: '/sec-a/' - preLoaderRoute: typeof SecAIndexRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/$id': { - id: '/sec-a/$id' - path: '/$id' - fullPath: '/sec-a/$id' - preLoaderRoute: typeof SecAIdRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/about': { - id: '/sec-a/about' - path: '/about' - fullPath: '/sec-a/about' - preLoaderRoute: typeof SecAAboutRouteImport - parentRoute: typeof SecARoute - } - '/sec-a/settings': { - id: '/sec-a/settings' - path: '/settings' - fullPath: '/sec-a/settings' - preLoaderRoute: typeof SecASettingsRouteImport - parentRoute: typeof SecARoute - } - '/sec-b/': { - id: '/sec-b/' - path: '/' - fullPath: '/sec-b/' - preLoaderRoute: typeof SecBIndexRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/$id': { - id: '/sec-b/$id' - path: '/$id' - fullPath: '/sec-b/$id' - preLoaderRoute: typeof SecBIdRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/about': { - id: '/sec-b/about' - path: '/about' - fullPath: '/sec-b/about' - preLoaderRoute: typeof SecBAboutRouteImport - parentRoute: typeof SecBRoute - } - '/sec-b/settings': { - id: '/sec-b/settings' - path: '/settings' - fullPath: '/sec-b/settings' - preLoaderRoute: typeof SecBSettingsRouteImport - parentRoute: typeof SecBRoute - } - '/sec-c/': { - id: '/sec-c/' - path: '/' - fullPath: '/sec-c/' - preLoaderRoute: typeof SecCIndexRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/$id': { - id: '/sec-c/$id' - path: '/$id' - fullPath: '/sec-c/$id' - preLoaderRoute: typeof SecCIdRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/about': { - id: '/sec-c/about' - path: '/about' - fullPath: '/sec-c/about' - preLoaderRoute: typeof SecCAboutRouteImport - parentRoute: typeof SecCRoute - } - '/sec-c/settings': { - id: '/sec-c/settings' - path: '/settings' - fullPath: '/sec-c/settings' - preLoaderRoute: typeof SecCSettingsRouteImport - parentRoute: typeof SecCRoute - } - '/sec-d/': { - id: '/sec-d/' - path: '/' - fullPath: '/sec-d/' - preLoaderRoute: typeof SecDIndexRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/$id': { - id: '/sec-d/$id' - path: '/$id' - fullPath: '/sec-d/$id' - preLoaderRoute: typeof SecDIdRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/about': { - id: '/sec-d/about' - path: '/about' - fullPath: '/sec-d/about' - preLoaderRoute: typeof SecDAboutRouteImport - parentRoute: typeof SecDRoute - } - '/sec-d/settings': { - id: '/sec-d/settings' - path: '/settings' - fullPath: '/sec-d/settings' - preLoaderRoute: typeof SecDSettingsRouteImport - parentRoute: typeof SecDRoute - } - '/sec-e/': { - id: '/sec-e/' - path: '/' - fullPath: '/sec-e/' - preLoaderRoute: typeof SecEIndexRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/$id': { - id: '/sec-e/$id' - path: '/$id' - fullPath: '/sec-e/$id' - preLoaderRoute: typeof SecEIdRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/about': { - id: '/sec-e/about' - path: '/about' - fullPath: '/sec-e/about' - preLoaderRoute: typeof SecEAboutRouteImport - parentRoute: typeof SecERoute - } - '/sec-e/settings': { - id: '/sec-e/settings' - path: '/settings' - fullPath: '/sec-e/settings' - preLoaderRoute: typeof SecESettingsRouteImport - parentRoute: typeof SecERoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/sec-f/': { id: '/sec-f/' @@ -729,11 +547,46 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SecFIndexRouteImport parentRoute: typeof SecFRoute } - '/sec-f/$id': { - id: '/sec-f/$id' - path: '/$id' - fullPath: '/sec-f/$id' - preLoaderRoute: typeof SecFIdRouteImport + '/sec-e/': { + id: '/sec-e/' + path: '/' + fullPath: '/sec-e/' + preLoaderRoute: typeof SecEIndexRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/': { + id: '/sec-d/' + path: '/' + fullPath: '/sec-d/' + preLoaderRoute: typeof SecDIndexRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/': { + id: '/sec-c/' + path: '/' + fullPath: '/sec-c/' + preLoaderRoute: typeof SecCIndexRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/': { + id: '/sec-b/' + path: '/' + fullPath: '/sec-b/' + preLoaderRoute: typeof SecBIndexRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/': { + id: '/sec-a/' + path: '/' + fullPath: '/sec-a/' + preLoaderRoute: typeof SecAIndexRouteImport + parentRoute: typeof SecARoute + } + '/sec-f/settings': { + id: '/sec-f/settings' + path: '/settings' + fullPath: '/sec-f/settings' + preLoaderRoute: typeof SecFSettingsRouteImport parentRoute: typeof SecFRoute } '/sec-f/about': { @@ -743,13 +596,160 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SecFAboutRouteImport parentRoute: typeof SecFRoute } - '/sec-f/settings': { - id: '/sec-f/settings' - path: '/settings' - fullPath: '/sec-f/settings' - preLoaderRoute: typeof SecFSettingsRouteImport + '/sec-f/$id': { + id: '/sec-f/$id' + path: '/$id' + fullPath: '/sec-f/$id' + preLoaderRoute: typeof SecFIdRouteImport parentRoute: typeof SecFRoute } + '/sec-e/settings': { + id: '/sec-e/settings' + path: '/settings' + fullPath: '/sec-e/settings' + preLoaderRoute: typeof SecESettingsRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/about': { + id: '/sec-e/about' + path: '/about' + fullPath: '/sec-e/about' + preLoaderRoute: typeof SecEAboutRouteImport + parentRoute: typeof SecERoute + } + '/sec-e/$id': { + id: '/sec-e/$id' + path: '/$id' + fullPath: '/sec-e/$id' + preLoaderRoute: typeof SecEIdRouteImport + parentRoute: typeof SecERoute + } + '/sec-d/settings': { + id: '/sec-d/settings' + path: '/settings' + fullPath: '/sec-d/settings' + preLoaderRoute: typeof SecDSettingsRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/about': { + id: '/sec-d/about' + path: '/about' + fullPath: '/sec-d/about' + preLoaderRoute: typeof SecDAboutRouteImport + parentRoute: typeof SecDRoute + } + '/sec-d/$id': { + id: '/sec-d/$id' + path: '/$id' + fullPath: '/sec-d/$id' + preLoaderRoute: typeof SecDIdRouteImport + parentRoute: typeof SecDRoute + } + '/sec-c/settings': { + id: '/sec-c/settings' + path: '/settings' + fullPath: '/sec-c/settings' + preLoaderRoute: typeof SecCSettingsRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/about': { + id: '/sec-c/about' + path: '/about' + fullPath: '/sec-c/about' + preLoaderRoute: typeof SecCAboutRouteImport + parentRoute: typeof SecCRoute + } + '/sec-c/$id': { + id: '/sec-c/$id' + path: '/$id' + fullPath: '/sec-c/$id' + preLoaderRoute: typeof SecCIdRouteImport + parentRoute: typeof SecCRoute + } + '/sec-b/settings': { + id: '/sec-b/settings' + path: '/settings' + fullPath: '/sec-b/settings' + preLoaderRoute: typeof SecBSettingsRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/about': { + id: '/sec-b/about' + path: '/about' + fullPath: '/sec-b/about' + preLoaderRoute: typeof SecBAboutRouteImport + parentRoute: typeof SecBRoute + } + '/sec-b/$id': { + id: '/sec-b/$id' + path: '/$id' + fullPath: '/sec-b/$id' + preLoaderRoute: typeof SecBIdRouteImport + parentRoute: typeof SecBRoute + } + '/sec-a/settings': { + id: '/sec-a/settings' + path: '/settings' + fullPath: '/sec-a/settings' + preLoaderRoute: typeof SecASettingsRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/about': { + id: '/sec-a/about' + path: '/about' + fullPath: '/sec-a/about' + preLoaderRoute: typeof SecAAboutRouteImport + parentRoute: typeof SecARoute + } + '/sec-a/$id': { + id: '/sec-a/$id' + path: '/$id' + fullPath: '/sec-a/$id' + preLoaderRoute: typeof SecAIdRouteImport + parentRoute: typeof SecARoute + } + '/release/v{$version}': { + id: '/release/v{$version}' + path: '/release/v{$version}' + fullPath: '/release/v{$version}' + preLoaderRoute: typeof ReleaseVChar123versionChar125RouteImport + parentRoute: typeof rootRouteImport + } + '/files/$': { + id: '/files/$' + path: '/files/$' + fullPath: '/files/$' + preLoaderRoute: typeof FilesSplatRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout/beta': { + id: '/_layout/beta' + path: '/beta' + fullPath: '/beta' + preLoaderRoute: typeof LayoutBetaRouteImport + parentRoute: typeof LayoutRoute + } + '/_layout/alpha': { + id: '/_layout/alpha' + path: '/alpha' + fullPath: '/alpha' + preLoaderRoute: typeof LayoutAlphaRouteImport + parentRoute: typeof LayoutRoute + } + '/(marketing)/promo': { + id: '/(marketing)/promo' + path: '/promo' + fullPath: '/promo' + preLoaderRoute: typeof marketingPromoRouteImport + parentRoute: typeof rootRouteImport + } + '/(marketing)/pricing': { + id: '/(marketing)/pricing' + path: '/pricing' + fullPath: '/pricing' + preLoaderRoute: typeof marketingPricingRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/client-nav/scenarios/route-tree-scale/vue/vite.config.ts b/benchmarks/client-nav/scenarios/route-tree-scale/vue/vite.config.ts index 189ba1de99..a547406198 100644 --- a/benchmarks/client-nav/scenarios/route-tree-scale/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/route-tree-scale/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -38,7 +37,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav route-tree-scale (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/search-params/react/speed.bench.ts b/benchmarks/client-nav/scenarios/search-params/react/speed.bench.ts index 0b38f7bddb..c534611bd0 100644 --- a/benchmarks/client-nav/scenarios/search-params/react/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/search-params/react/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-search-params', async ({ bench }) => { - const scenario = setup() +describe('client-search-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-search-params navigation loop (react)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/search-params/react/src/main.tsx b/benchmarks/client-nav/scenarios/search-params/react/src/main.tsx index b10d53554b..a68ef7bbb2 100644 --- a/benchmarks/client-nav/scenarios/search-params/react/src/main.tsx +++ b/benchmarks/client-nav/scenarios/search-params/react/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -23,8 +21,8 @@ declare module '@tanstack/react-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const reactRoot = createRoot(container) reactRoot.render() diff --git a/benchmarks/client-nav/scenarios/search-params/react/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/search-params/react/src/routeTree.gen.ts index cff9dca167..7380b704e1 100644 --- a/benchmarks/client-nav/scenarios/search-params/react/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/search-params/react/src/routeTree.gen.ts @@ -9,13 +9,13 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as CatalogRouteImport } from './routes/catalog' import { Route as ProductsRouteImport } from './routes/products' +import { Route as CatalogRouteImport } from './routes/catalog' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ProductsRoute = ProductsRouteImport.update({ + id: '/products', + path: '/products', getParentRoute: () => rootRouteImport, } as any) const CatalogRoute = CatalogRouteImport.update({ @@ -23,9 +23,9 @@ const CatalogRoute = CatalogRouteImport.update({ path: '/catalog', getParentRoute: () => rootRouteImport, } as any) -const ProductsRoute = ProductsRouteImport.update({ - id: '/products', - path: '/products', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -61,11 +61,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/products': { + id: '/products' + path: '/products' + fullPath: '/products' + preLoaderRoute: typeof ProductsRouteImport parentRoute: typeof rootRouteImport } '/catalog': { @@ -75,11 +75,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof CatalogRouteImport parentRoute: typeof rootRouteImport } - '/products': { - id: '/products' - path: '/products' - fullPath: '/products' - preLoaderRoute: typeof ProductsRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/search-params/react/vite.config.ts b/benchmarks/client-nav/scenarios/search-params/react/vite.config.ts index 0318a10815..b220ae7d0d 100644 --- a/benchmarks/client-nav/scenarios/search-params/react/vite.config.ts +++ b/benchmarks/client-nav/scenarios/search-params/react/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -33,7 +32,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav search-params (react)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/search-params/solid/speed.bench.ts b/benchmarks/client-nav/scenarios/search-params/solid/speed.bench.ts index caa626c596..df6a24dc15 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/search-params/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-search-params', async ({ bench }) => { - const scenario = setup() +describe('client-search-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-search-params navigation loop (solid)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/search-params/solid/src/main.tsx b/benchmarks/client-nav/scenarios/search-params/solid/src/main.tsx index 25071f7979..16814f03f7 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/src/main.tsx +++ b/benchmarks/client-nav/scenarios/search-params/solid/src/main.tsx @@ -1,12 +1,10 @@ -import type { RouterHistory } from '@tanstack/history' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' -export function createTestRouter(history: RouterHistory) { +export function createTestRouter() { 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 @@ -23,8 +21,8 @@ declare module '@tanstack/solid-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const unmount = render(() => , container) diff --git a/benchmarks/client-nav/scenarios/search-params/solid/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/search-params/solid/src/routeTree.gen.ts index b15beed09b..96d211d64c 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/search-params/solid/src/routeTree.gen.ts @@ -9,13 +9,13 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as CatalogRouteImport } from './routes/catalog' import { Route as ProductsRouteImport } from './routes/products' +import { Route as CatalogRouteImport } from './routes/catalog' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ProductsRoute = ProductsRouteImport.update({ + id: '/products', + path: '/products', getParentRoute: () => rootRouteImport, } as any) const CatalogRoute = CatalogRouteImport.update({ @@ -23,9 +23,9 @@ const CatalogRoute = CatalogRouteImport.update({ path: '/catalog', getParentRoute: () => rootRouteImport, } as any) -const ProductsRoute = ProductsRouteImport.update({ - id: '/products', - path: '/products', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -61,11 +61,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/products': { + id: '/products' + path: '/products' + fullPath: '/products' + preLoaderRoute: typeof ProductsRouteImport parentRoute: typeof rootRouteImport } '/catalog': { @@ -75,11 +75,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof CatalogRouteImport parentRoute: typeof rootRouteImport } - '/products': { - id: '/products' - path: '/products' - fullPath: '/products' - preLoaderRoute: typeof ProductsRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/__root.tsx b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/__root.tsx index 30c042f9c5..e6f9592e07 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/__root.tsx +++ b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/__root.tsx @@ -18,9 +18,12 @@ export const Route = createRootRoute({ const rootSubscribers = Array.from({ length: 4 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/catalog.tsx b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/catalog.tsx index 60cf8e7896..7f3fcf7078 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/catalog.tsx +++ b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/catalog.tsx @@ -19,9 +19,12 @@ export const Route = createFileRoute('/catalog')({ const subscriberIndexes = Array.from({ length: 2 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/products.tsx b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/products.tsx index 8b2a252155..1319aabae3 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/src/routes/products.tsx +++ b/benchmarks/client-nav/scenarios/search-params/solid/src/routes/products.tsx @@ -37,9 +37,12 @@ export const Route = createFileRoute('/products')({ const subscriberIndexes = Array.from({ length: 2 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => { + void props.value() + }, + () => {}, + ) return null } diff --git a/benchmarks/client-nav/scenarios/search-params/solid/tsconfig.json b/benchmarks/client-nav/scenarios/search-params/solid/tsconfig.json index 98d76ad6b8..8c57ff876a 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/tsconfig.json +++ b/benchmarks/client-nav/scenarios/search-params/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "allowImportingTsExtensions": true, "types": ["node", "vite/client", "vitest/globals"] }, diff --git a/benchmarks/client-nav/scenarios/search-params/solid/vite.config.ts b/benchmarks/client-nav/scenarios/search-params/solid/vite.config.ts index 511fd49466..c2f4b32806 100644 --- a/benchmarks/client-nav/scenarios/search-params/solid/vite.config.ts +++ b/benchmarks/client-nav/scenarios/search-params/solid/vite.config.ts @@ -3,7 +3,6 @@ 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)) @@ -36,7 +35,6 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav search-params (solid)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/scenarios/search-params/vue/speed.bench.ts b/benchmarks/client-nav/scenarios/search-params/vue/speed.bench.ts index 728d2779e8..0b394bbe27 100644 --- a/benchmarks/client-nav/scenarios/search-params/vue/speed.bench.ts +++ b/benchmarks/client-nav/scenarios/search-params/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' -import { benchLifecycle } from '../../../../cpu-simulation' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { benchOptions, ticksPerIteration } from '../shared' import { setup } from './setup' -test('client-search-params', async ({ bench }) => { - const scenario = setup() +describe('client-search-params', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-search-params navigation loop (vue)', - benchLifecycle(scenario), async () => { for (let i = 0; i < ticksPerIteration; i++) { - await scenario.tick() + await test.tick() } - await scenario.finishBatch() }, - ).run(benchOptions) + { + ...benchOptions, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/scenarios/search-params/vue/src/main.tsx b/benchmarks/client-nav/scenarios/search-params/vue/src/main.tsx index 65bade775c..1454b8d547 100644 --- a/benchmarks/client-nav/scenarios/search-params/vue/src/main.tsx +++ b/benchmarks/client-nav/scenarios/search-params/vue/src/main.tsx @@ -1,12 +1,10 @@ -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) { +export function createTestRouter() { 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 @@ -23,8 +21,8 @@ declare module '@tanstack/vue-router' { } } -export function mountTestApp(container: HTMLElement, history: RouterHistory) { - const router = createTestRouter(history) +export function mountTestApp(container: HTMLElement) { + const router = createTestRouter() const component = const app = Vue.createApp({ diff --git a/benchmarks/client-nav/scenarios/search-params/vue/src/routeTree.gen.ts b/benchmarks/client-nav/scenarios/search-params/vue/src/routeTree.gen.ts index f73b84ebe7..b95b667803 100644 --- a/benchmarks/client-nav/scenarios/search-params/vue/src/routeTree.gen.ts +++ b/benchmarks/client-nav/scenarios/search-params/vue/src/routeTree.gen.ts @@ -9,13 +9,13 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as CatalogRouteImport } from './routes/catalog' import { Route as ProductsRouteImport } from './routes/products' +import { Route as CatalogRouteImport } from './routes/catalog' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ProductsRoute = ProductsRouteImport.update({ + id: '/products', + path: '/products', getParentRoute: () => rootRouteImport, } as any) const CatalogRoute = CatalogRouteImport.update({ @@ -23,9 +23,9 @@ const CatalogRoute = CatalogRouteImport.update({ path: '/catalog', getParentRoute: () => rootRouteImport, } as any) -const ProductsRoute = ProductsRouteImport.update({ - id: '/products', - path: '/products', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -61,11 +61,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/products': { + id: '/products' + path: '/products' + fullPath: '/products' + preLoaderRoute: typeof ProductsRouteImport parentRoute: typeof rootRouteImport } '/catalog': { @@ -75,11 +75,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof CatalogRouteImport parentRoute: typeof rootRouteImport } - '/products': { - id: '/products' - path: '/products' - fullPath: '/products' - preLoaderRoute: typeof ProductsRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/client-nav/scenarios/search-params/vue/vite.config.ts b/benchmarks/client-nav/scenarios/search-params/vue/vite.config.ts index 27490b276a..9a3b82d066 100644 --- a/benchmarks/client-nav/scenarios/search-params/vue/vite.config.ts +++ b/benchmarks/client-nav/scenarios/search-params/vue/vite.config.ts @@ -4,7 +4,6 @@ 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)) @@ -35,7 +34,6 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav search-params (vue)', watch: false, environment: 'jsdom', diff --git a/benchmarks/client-nav/solid/app.tsx b/benchmarks/client-nav/solid/app.tsx index ef90130f5e..4779054bec 100644 --- a/benchmarks/client-nav/solid/app.tsx +++ b/benchmarks/client-nav/solid/app.tsx @@ -1,5 +1,5 @@ import { For, createRenderEffect } from 'solid-js' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Link, Outlet, @@ -37,9 +37,10 @@ const routeSelectors = Array.from({ length: 6 }, (_, index) => index) const linkGroups = Array.from({ length: 4 }, (_, index) => index) function PerfValue(props: { value: () => number }) { - createRenderEffect(() => { - void props.value() - }) + createRenderEffect( + () => props.value(), + () => {}, + ) return null } @@ -66,7 +67,8 @@ function LinkPanel() { return ( <> - {(groupIndex) => { + {(groupIndexAccessor) => { + const groupIndex = groupIndexAccessor const itemsId = groupIndex === 0 ? 1 : groupIndex + 2 const ctxId = groupIndex + 1 diff --git a/benchmarks/client-nav/solid/speed.bench.ts b/benchmarks/client-nav/solid/speed.bench.ts index d629da17a8..34791180ce 100644 --- a/benchmarks/client-nav/solid/speed.bench.ts +++ b/benchmarks/client-nav/solid/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { setup } from './setup' -test('client-nav', async ({ bench }) => { - const scenario = setup() +describe('client-nav', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-side navigation loop (solid)', - { beforeAll: scenario.before, afterAll: scenario.after }, async () => { for (let i = 0; i < 10; i++) { - await scenario.tick() + await test.tick() } }, - ).run({ - warmupIterations: 100, - time: 10_000, - }) + { + warmupIterations: 100, + time: 10_000, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/solid/tsconfig.json b/benchmarks/client-nav/solid/tsconfig.json index 4c500d0793..aa3cfb2444 100644 --- a/benchmarks/client-nav/solid/tsconfig.json +++ b/benchmarks/client-nav/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/client-nav/solid/vite.config.ts b/benchmarks/client-nav/solid/vite.config.ts index 0c26b32f5f..bd11fe8de9 100644 --- a/benchmarks/client-nav/solid/vite.config.ts +++ b/benchmarks/client-nav/solid/vite.config.ts @@ -2,7 +2,6 @@ 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' // Anchor the project root to the package directory so this config resolves // identically when run directly and as part of an aggregate `projects` config. @@ -32,12 +31,10 @@ export default defineConfig({ conditions: ['solid', 'browser'], }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav (solid)', watch: false, environment: 'jsdom', setupFiles: [`${rootDir}vitest.setup.ts`], - benchmark: { include: ['solid/speed.bench.ts'] }, server: { deps: { inline: [/@solidjs/, /@tanstack\/solid-store/], diff --git a/benchmarks/client-nav/vue/speed.bench.ts b/benchmarks/client-nav/vue/speed.bench.ts index 503e91e7b7..f9e532f5ba 100644 --- a/benchmarks/client-nav/vue/speed.bench.ts +++ b/benchmarks/client-nav/vue/speed.bench.ts @@ -1,19 +1,34 @@ -import { test } from 'vitest' +import { afterAll, beforeAll, bench, describe } from 'vitest' import { setup } from './setup' -test('client-nav', async ({ bench }) => { - const scenario = setup() +describe('client-nav', () => { + const test = setup() - await bench( + /** + * Running `vitest bench` ignores "suite hooks" like `beforeAll` and `afterAll`, + * so we use tinybench's `setup` and `teardown` options to run our setup and teardown logic. + * + * But CodSpeed calls the benchmarked function directly, bypassing `setup` and `teardown`, + * but it does support `beforeAll` and `afterAll`. + * + * So it looks like we're setting up in duplicate, but in reality, it's only running once per environment, as intended. + */ + + beforeAll(test.before) + afterAll(test.after) + + bench( 'client-side navigation loop (vue)', - { beforeAll: scenario.before, afterAll: scenario.after }, async () => { for (let i = 0; i < 10; i++) { - await scenario.tick() + await test.tick() } }, - ).run({ - warmupIterations: 100, - time: 10_000, - }) + { + warmupIterations: 100, + time: 10_000, + setup: test.before, + teardown: test.after, + }, + ) }) diff --git a/benchmarks/client-nav/vue/vite.config.ts b/benchmarks/client-nav/vue/vite.config.ts index 78d8ae5638..4c44c09fdd 100644 --- a/benchmarks/client-nav/vue/vite.config.ts +++ b/benchmarks/client-nav/vue/vite.config.ts @@ -3,7 +3,6 @@ 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 { cpuSimulationExecArgv } from '../../cpu-simulation' // Anchor the project root to the package directory so this config resolves // identically when run directly and as part of an aggregate `projects` config. @@ -31,11 +30,9 @@ export default defineConfig({ }, }, test: { - execArgv: cpuSimulationExecArgv(), name: '@benchmarks/client-nav (vue)', watch: false, environment: 'jsdom', setupFiles: [`${rootDir}vitest.setup.ts`], - benchmark: { include: ['vue/speed.bench.ts'] }, }, }) diff --git a/benchmarks/cpu-simulation.ts b/benchmarks/cpu-simulation.ts deleted file mode 100644 index 9b8859f74d..0000000000 --- a/benchmarks/cpu-simulation.ts +++ /dev/null @@ -1,53 +0,0 @@ -function codspeedRunnerMode() { - return process.env.CODSPEED_ENV === undefined - ? undefined - : process.env.CODSPEED_RUNNER_MODE -} - -/** - * Whether CodSpeed's simulation or memory instrument drives the run. Both - * measure one invocation after a few warmup calls instead of sampling. - */ -export function isCodSpeedAnalysis() { - const mode = codspeedRunnerMode() - return ( - mode === 'simulation' || mode === 'instrumentation' || mode === 'memory' - ) -} - -/** Extra worker flags for CodSpeed CPU simulation, not walltime benchmarks. */ -export function cpuSimulationExecArgv() { - const mode = codspeedRunnerMode() - if (mode === 'simulation' || mode === 'instrumentation') { - // CodSpeed supplies --no-opt, which only disables TurboFan on Node 24. - // Maglev can still compile and inline hot functions between measured runs. - // Compile baseline code on first use, so warmup does not leave functions - // near Sparkplug's later tier-up/batch-compilation thresholds. - // V8 renamed --scavenge-task in Node 20; CodSpeed's old flag is omitted. - // Keep minor GC tied to allocations instead of scheduled foreground tasks. - // Fix the initial/minimum old-generation allocation budget. This can skip - // automatic full collections below the budget; minor GC remains enabled. - return [ - '--no-maglev', - '--always-sparkplug', - '--no-minor-gc-task', - '--initial-old-space-size=512', - ] - } - return [] -} - -/** - * Per-bench lifecycle for apps that a bench prepares and disposes outside - * timing. CodSpeed measures one invocation, so each invocation gets fresh - * state. Tinybench samples thousands of iterations and keeps one instance per - * warmup/run phase instead of preparing it for every iteration. - */ -export function benchLifecycle(hooks: { - before: () => Promise | void - after: () => Promise | void -}) { - return isCodSpeedAnalysis() - ? { beforeEach: hooks.before, afterEach: hooks.after } - : { beforeAll: hooks.before, afterAll: hooks.after } -} diff --git a/benchmarks/memory/README.md b/benchmarks/memory/README.md index 18b68768f9..cf871f3439 100644 --- a/benchmarks/memory/README.md +++ b/benchmarks/memory/README.md @@ -2,7 +2,7 @@ Dedicated memory benchmarks for TanStack Router / Start, measured with the CodSpeed **memory instrument** (`mode: memory` in -`.github/workflows/benchmarks.yml`). The workflow runs on every +`.github/workflows/client-nav-benchmarks.yml`). The workflow runs on every push to `main` except docs/examples/e2e-only pushes: CodSpeed compares a PR against the run on its merge-base commit, and a main commit without a run makes CodSpeed silently fall back to an older base — a single outlier base run then @@ -34,8 +34,8 @@ benchmarks/memory// One app per scenario; apps and bench names are stable once landed (CodSpeed continuity). Never grow an existing scenario for a new case — add a scenario. `setup.ts` imports the built app and exports the concrete workload; -`memory.bench.ts` registers it with Vitest's `bench` test fixture, and -`memory.flame.ts` runs the same workload through the Flame profiler. +`memory.bench.ts` registers `bench(...)` directly, and `memory.flame.ts` runs the +same workload through the Flame profiler. ## How the memory instrument executes a bench @@ -43,98 +43,40 @@ continuity). Never grow an existing scenario for a new case — add a scenario. after a forced GC. Under plain `vitest bench` the suites only smoke-test: timing output is meaningless; real numbers come from CodSpeed. - Under CodSpeed the bench fn runs several warmup invocations plus the - measured one. The bench's `beforeEach`/`afterEach` hooks - (`memoryBenchHooks`) run around every invocation, outside the measurement - window: client workloads mount a fresh app before each invocation and tear - it down afterward. This prevents warmup navigation history and caches from - changing the starting state. Plain `vitest bench` runs the same hooks around - its warmup and measured iteration. Module-level counters/LCGs keep generated - URLs unique across invocations. -- Workload `run` functions must be `async` functions. CodSpeed's Vitest 5 - provider awaits only `AsyncFunction`s; a plain function that returns a - promise would be measured only up to its first suspension. -- Worker flags live in `runtime.ts` and apply only to the CodSpeed memory - instrument. They supplement the integration's predictable execution flags; - the retained overrides are described below. -- Before each CodSpeed invocation, the `beforeEach` hook yields to the event - loop, outside the measurement marker and before CodSpeed forces GC. Promise-only - warmup chains can keep WeakRef targets alive through a collection in the same - job. Client app setup also runs before the forced GC. -- Do not force GC inside a measured request loop or poll `heapUsed` to choose - how much work to do. Both introduce allocator activity from the harness into - the measurement. Footprint scenarios run exactly one large request per - invocation; churn scenarios retain their fixed sequential request counts. -- Error-path cases use separate isolated workers so one case's module and - allocator history cannot contaminate the next case. + measured one **on the same mount**, so bench fns must be idempotent and + module-level counters/LCGs are used where ids must never repeat across + invocations. +- Plain `vitest bench` never runs suite hooks (`beforeAll`/`afterAll`) and + only honors tinybench's `setup`/`teardown` options; the CodSpeed runner + does the exact opposite. Client benches therefore register **both** — in + any given mode exactly one pair runs. +- The process runs with V8 determinism flags (predictable GC schedule, + `--no-opt`). Never call `global.gc()` manually in **churn** scenarios — + their signal is accumulation across iterations, which a forced collection + masks. **Peak** scenarios do the opposite: they set + `pinGcBetweenIterations` on the request loop so a collection runs between + iterations. Their signal is the footprint of a single request, and without + pinned GC points the measured peak flips by a whole payload depending on + whether iteration i's garbage is collected before iteration i+1 allocates. + Because of `--no-opt`, allocation counts overstate production; numbers are + for regression tracking, not absolute claims. - Keep each bench under **~1.5M allocations** (instrument overhead grows past 2M); this is the main constraint when tuning iteration counts. -## Worker settings - -All scenarios use [`memoryConfig`](./runtime.ts). It adds these flags only in -memory mode: - -- `--no-maglev` -- `--no-flush-bytecode` -- `--no-minor-gc-task` -- `--no-incremental-marking` -- `--initial-old-space-size=512` - -`--jitless` was removed after repeated CI comparisons. Ten unchanged-commit -repetitions with the last four flags kept all 48 peak-memory results within 1% -(worst spread: 0.834%). With JIT enabled, all 16 subsets of the four flags were -tested. Removing bytecode, minor-GC-task, incremental-marking, or heap-budget -overrides from this profile produced worst client peak spreads of 6.616%, 2.714%, -2.109%, and 10.669%, respectively. Smaller combinations also exceeded 1% in at -least one tracked metric. This supports retaining the four-flag profile; it does -not establish that every override is required in every individual scenario. - -A server-only heap-budget profile initially passed five repetitions, but further -confirmation produced a 24.46% server peak outlier. That configuration was -rejected. Allocated bytes and allocation counts remain imperfectly repeatable: -a client confirmation with the retained four flags showed a 6.77% allocated-byte -spread and a 5.91% allocation-count spread. Client peaks remained within 0.834% -across all 15 observations with the retained profile. Experiment details and CI runs are recorded in -[PR #8260](https://github.com/TanStack/router/pull/8260). - -These settings trade production GC behavior for repeatable regression signals. -They suppress bytecode reclamation and change collection scheduling. The 512 MiB -initial/minimum old-generation allocation budget can postpone automatic full -collections. This does not preallocate 512 MiB, and the smallest sufficient budget -was not determined. Results describe this controlled worker profile, not a -production application's absolute memory footprint. - -CodSpeed's `--no-opt` only disables TurboFan on Node 24 (V8 13); Maglev still -compiles. Under CodSpeed's `--predictable` there is no background compilation, -so Maglev compiles run synchronously inside whichever request triggers them, and -the forced GC before the measured call can discard optimized code so recompiles -land inside the measured window. Maglev's malloc'd Zone scratch (32 KiB -segments) then dominates allocation metrics, and its size depends on -per-process feedback state. `--no-maglev` was added for this: the bimodal -+32,792 B / +1 allocation in `mem server error-paths unmatched (react)` was one -Maglev Zone segment allocated while compiling React Fizz's per-request stream -`write` closure, and compiler scratch made up ~97% of that bench's allocated -bytes. Retained-object measurements are unaffected because Zone memory is freed -after each compile. The repeatability figures above predate this flag. - ## Bench shapes and signals -- **Churn:** a fixed number of sequential operations, measuring native - allocation activity and peak outstanding native allocations. -- **Peak (footprint):** one large operation, measuring its native footprint. - -CodSpeed reports native allocator activity, not individual JavaScript object -allocations or retained JS heap size. V8 can reuse heap pages without a visible -native allocation. These benchmarks can detect native buffering and allocator -regressions, but a flat graph does not establish that route data or JS objects -are collectable. Absolute numbers include Node/framework/jsdom activity under -benchmark-specific V8 settings; compare identical harness versions. +- **Churn (leak detector):** N sequential iterations at steady state. If one + iteration leaks L bytes, peak grows by ~N·L; healthy builds show a flat + timeline floor independent of N. Tuning check: doubling N must leave peak + roughly unchanged. +- **Peak (footprint):** one (or very few) large operations; peak memory + scaling with the workload is the signal. ## Scenarios ### Server -| Scenario | Shape | Exercises | +| Scenario | Shape | Guards against | | ----------------------- | ----- | --------------------------------------------------------- | | `request-churn` | churn | cross-request retention in document SSR (unique URLs) | | `server-fn-churn` | churn | retention in the server-function RPC path | @@ -146,7 +88,7 @@ benchmark-specific V8 settings; compare identical harness versions. ### Client -| Scenario | Shape | Exercises | +| Scenario | Shape | Guards against | | ------------------------- | ----- | -------------------------------------------------------- | | `navigation-churn` | churn | per-navigation retention at steady state | | `unique-location-churn` | churn | unbounded href/search-keyed caches (never-repeated URLs) | @@ -161,10 +103,14 @@ benchmark-specific V8 settings; compare identical harness versions. server response is fully consumed before the next request. Pairing a single navigation with its render signal via `Promise.all([navigate, rendered])` is fine — never overlap distinct work items. -- Randomness only via the seeded LCG in `bench-utils.ts`. Deferred streaming - uses counted zero-delay timer hops to stage work. Timers still depend on the - event loop, so validate repeatability on CI instead of assuming deterministic - ordering from a zero delay alone. +- Randomness only via the seeded LCG in `bench-utils.ts`; no `Math.random`, + `Date.now`, or timers with a nonzero delay — anywhere async ordering must be + staged (`streaming-peak`'s deferred sections, `aborted-requests`' deferred + loader data and post-abort drain), chain **0ms `setTimeout` hops** and count + event-loop turns instead. A wall-clock delay races renderer work differently + depending on runner load and instrumentation overhead, which makes the + single measured run non-reproducible; 0ms hops fire in registration order in + the timers phase, so the interleaving is a pure function of the schedule. - Sanity assertions run once at module load and throw on wrong status/markers, so a bench can never silently measure the wrong thing. - Server requests follow `benchmarks/ssr` conventions: document GETs send @@ -238,7 +184,7 @@ pnpm --filter @benchmarks/memory-client clean:profiles ``` Client memory benches are useful for regression tracking of router/React/jsdom -integration behavior and native allocation activity. They are not pure +integration behavior, especially retained route/cache data. They are not pure browser-memory measurements, and local Flame attribution can include jsdom, React DOM, and profiler shutdown frames. @@ -254,20 +200,3 @@ WITH_INSTRUMENTATION=1 codspeed run --mode memory -- pnpm nx run @benchmarks/mem WITH_INSTRUMENTATION=1 codspeed run --mode memory -- pnpm nx run @benchmarks/memory-client:test:perf:solid WITH_INSTRUMENTATION=1 codspeed run --mode memory -- pnpm nx run @benchmarks/memory-client:test:perf:vue ``` - -Run the benchmark workflow on an experiment branch: - -```bash -gh workflow run benchmarks.yml --ref -``` - -Repeat at the same commit, using distinct branch names if runs should overlap -(the workflow serializes runs on the same ref). Compare all 48 fresh memory -results: 18 client and 30 server. Exclude CPU simulation results, inherited -CodSpeed results, and failed or incomplete repetitions. For each workload, calculate -`100 * (max / min - 1)` across runs for peak bytes, allocated bytes, and -allocation counts; aggregate averages hide unstable cases. - -Observed spreads below 1% establish repeatability in the tested sample, not a -bound on future runs. Changes to worker flags or workload lifecycles establish -new measurement baselines. diff --git a/benchmarks/memory/client/bench-utils.ts b/benchmarks/memory/client/bench-utils.ts index 785e8fac7f..0cbaedbd71 100644 --- a/benchmarks/memory/client/bench-utils.ts +++ b/benchmarks/memory/client/bench-utils.ts @@ -1,5 +1,3 @@ -export { memoryBenchHooks } from '../turn' - export const memoryBenchOptions = { iterations: 1, warmupIterations: 1, diff --git a/benchmarks/memory/client/benchmark.ts b/benchmarks/memory/client/benchmark.ts index 463047f4d9..8b877b0740 100644 --- a/benchmarks/memory/client/benchmark.ts +++ b/benchmarks/memory/client/benchmark.ts @@ -1,10 +1,6 @@ export interface ClientMemoryWorkload { name: string before?: () => Promise | void - /** - * Must be an `async` function: CodSpeed's Vitest 5 provider awaits only - * `AsyncFunction`s and otherwise measures just the synchronous part. - */ run: () => Promise | void sanity: () => Promise | void after?: () => Promise | void diff --git a/benchmarks/memory/client/package.json b/benchmarks/memory/client/package.json index 4dc6246183..f781a5eec4 100644 --- a/benchmarks/memory/client/package.json +++ b/benchmarks/memory/client/package.json @@ -12,17 +12,18 @@ "#memory-client/lifecycle": "./lifecycle.ts" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tanstack/react-router": "workspace:*", "@tanstack/router-core": "workspace:*", "@tanstack/solid-router": "workspace:*", "@tanstack/vue-router": "workspace:*", "react": "^19.0.0", "react-dom": "^19.0.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "vue": "^3.5.16" }, "devDependencies": { - "@codspeed/vitest-plugin": "^6.0.1", + "@codspeed/vitest-plugin": "^5.5.0", "@datadog/pprof": "^5.13.2", "@platformatic/flame": "^1.6.0", "@testing-library/react": "^16.2.0", @@ -30,14 +31,11 @@ "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "@types/jsdom": "28.0.0", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", "jsdom": "29.1.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11", - "vitest": "catalog:" + "vite-plugin-solid": "^3.0.0-next.16", + "vitest": "^4.1.4" }, "nx": { "targets": { @@ -202,7 +200,7 @@ "build:react" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.react.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.react.config.ts", "cwd": "benchmarks/memory/client" } }, @@ -214,7 +212,7 @@ "build:solid" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.solid.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.solid.config.ts", "cwd": "benchmarks/memory/client" } }, @@ -226,12 +224,12 @@ "build:vue" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.vue.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.vue.config.ts", "cwd": "benchmarks/memory/client" } }, "test:types": { - "executor": "nx:run-commands", + "executor": "nx:noop", "dependsOn": [ { "projects": [ @@ -256,17 +254,6 @@ ], "target": "test:types:client" } - ], - "options": { - "command": "tsc -p ./tsconfig.json --noEmit", - "cwd": "benchmarks/memory/client" - }, - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs", - "{workspaceRoot}/benchmarks/memory/*.ts" ] } } diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/react/memory.bench.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/react/vite.config.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/react/vite.config.ts index 0f05cedf40..048a9cc833 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client interrupted-navigations (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/shared.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/shared.ts index 80f234f0c8..f7f3a7cd8b 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/shared.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/shared.ts @@ -35,6 +35,7 @@ type RenderedEvent = { } type InterruptedNavigationRouter = { + latestLoadPromise: Promise | undefined load: () => Promise navigate: (options: { to: '/fast/$id' | '/slow/$id' @@ -103,6 +104,18 @@ function assertSlowNavigationSettlement(settlement: NavigationSettlement) { ) } +async function awaitExpectedLoadSettlement(loadPromise: Promise) { + try { + await loadPromise + } catch (reason) { + if (reasonHasAbortShape(reason) || reasonHasCancellationShape(reason)) { + return + } + + throw reason + } +} + function reasonHasAbortShape(reason: unknown) { return reason instanceof DOMException && reason.name === 'AbortError' } @@ -131,6 +144,7 @@ export function createWorkload( let navigateFast: (id: string) => Promise = uninitialized let startSlowNavigation: (id: string) => Promise = uninitializedSettlement + let getLatestLoadPromise: () => Promise | undefined = () => undefined function assertRenderedPage(page: 'shell' | 'fast', id?: string) { const element = container?.querySelector('[data-bench-page]') @@ -189,6 +203,7 @@ export function createWorkload( const mounted = mountTestApp(container) const router = mounted.router as InterruptedNavigationRouter unmount = mounted.unmount + getLatestLoadPromise = () => router.latestLoadPromise unsub = router.subscribe('onRendered', (event) => { if ( @@ -250,6 +265,7 @@ export function createWorkload( expectedRenderedPath = undefined navigateFast = uninitialized startSlowNavigation = uninitializedSettlement + getLatestLoadPromise = () => undefined } async function interrupt( @@ -260,6 +276,12 @@ export function createWorkload( const slowNavigation = startSlowNavigation(slowId) await waitForSlowLoader(slowId) + const slowLoadPromise = getLatestLoadPromise() + + if (!slowLoadPromise) { + throw new Error(`Slow navigation did not start a load for id: ${slowId}`) + } + await navigateFast(fastId) resolveSlowLoader(slowId) @@ -269,6 +291,7 @@ export function createWorkload( assertSlowNavigationSettlement(settlement) } + await awaitExpectedLoadSettlement(slowLoadPromise) await drainMicrotasks() } diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/src/app.tsx b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/src/app.tsx index 6288b5fab1..9264e1cc51 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export { diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/tsconfig.json b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/vite.config.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/vite.config.ts index 26ff0b5c8c..e710e0fd12 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client interrupted-navigations (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/fast.$id.tsx b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/fast.$id.tsx index f6dc9ac3bd..3bd820bd07 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/fast.$id.tsx +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/fast.$id.tsx @@ -1,19 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { fixedTimestamp } from '../../../slow-loaders' -const FastComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
- {`${data.value.kind}:${data.value.id}:${data.value.ts}`} -
- ) - }, -}) - export const Route = createFileRoute('/fast/$id')({ loader: ({ params }: { params: { id: string } }) => ({ id: params.id, @@ -22,3 +9,13 @@ export const Route = createFileRoute('/fast/$id')({ }), component: FastComponent, }) + +function FastComponent() { + const data = Route.useLoaderData() + + return ( +
+ {`${data.value.kind}:${data.value.id}:${data.value.ts}`} +
+ ) +} diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/slow.$id.tsx b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/slow.$id.tsx index 3b5bb75ede..68885fb918 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/slow.$id.tsx +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/src/routes/slow.$id.tsx @@ -1,19 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { getSlowLoaderDeferred } from '../../../slow-loaders' -const SlowComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
- {`${data.value.kind}:${data.value.id}:${data.value.ts}`} -
- ) - }, -}) - export const Route = createFileRoute('/slow/$id')({ loader: async ({ params }: { params: { id: string } }) => { const deferred = getSlowLoaderDeferred(params.id) @@ -22,3 +9,13 @@ export const Route = createFileRoute('/slow/$id')({ }, component: SlowComponent, }) + +function SlowComponent() { + const data = Route.useLoaderData() + + return ( +
+ {`${data.value.kind}:${data.value.id}:${data.value.ts}`} +
+ ) +} diff --git a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/vite.config.ts b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/vite.config.ts index 02574908d2..b2912ce9d1 100644 --- a/benchmarks/memory/client/scenarios/interrupted-navigations/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/interrupted-navigations/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client interrupted-navigations (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/react/memory.bench.ts b/benchmarks/memory/client/scenarios/loader-data-retention/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/react/vite.config.ts b/benchmarks/memory/client/scenarios/loader-data-retention/react/vite.config.ts index 8630417936..555e5f5612 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client loader-data-retention (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/loader-data-retention/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/solid/src/app.tsx b/benchmarks/memory/client/scenarios/loader-data-retention/solid/src/app.tsx index 4315a4b15c..1b47cda1f9 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/loader-data-retention/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export { loaderPayloadRecordCount } from '../../loader-data' diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/solid/tsconfig.json b/benchmarks/memory/client/scenarios/loader-data-retention/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/loader-data-retention/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/solid/vite.config.ts b/benchmarks/memory/client/scenarios/loader-data-retention/solid/vite.config.ts index 5dfd5b53fe..58d6b77acc 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client loader-data-retention (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/loader-data-retention/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/vue/src/routes/page.$id.tsx b/benchmarks/memory/client/scenarios/loader-data-retention/vue/src/routes/page.$id.tsx index 38f1d2614c..9f4b3c4470 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/vue/src/routes/page.$id.tsx +++ b/benchmarks/memory/client/scenarios/loader-data-retention/vue/src/routes/page.$id.tsx @@ -1,25 +1,22 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { createLoaderData } from '../../../loader-data' -const PageComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
- {`${data.value.id}:${data.value.records.length}`} -
- ) - }, -}) - export const Route = createFileRoute('/page/$id')({ loader: ({ params }: { params: { id: string } }) => createLoaderData(params.id), component: PageComponent, }) + +function PageComponent() { + const data = Route.useLoaderData() + + return ( +
+ {`${data.value.id}:${data.value.records.length}`} +
+ ) +} diff --git a/benchmarks/memory/client/scenarios/loader-data-retention/vue/vite.config.ts b/benchmarks/memory/client/scenarios/loader-data-retention/vue/vite.config.ts index 006636eaa0..bbf2fd02d8 100644 --- a/benchmarks/memory/client/scenarios/loader-data-retention/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/loader-data-retention/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client loader-data-retention (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/react/memory.bench.ts b/benchmarks/memory/client/scenarios/mount-unmount/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/react/vite.config.ts b/benchmarks/memory/client/scenarios/mount-unmount/react/vite.config.ts index a08352a837..bb0f3c2e0a 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client mount-unmount (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/mount-unmount/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/solid/src/app.tsx b/benchmarks/memory/client/scenarios/mount-unmount/solid/src/app.tsx index b23bc126d5..e82e21bd97 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/mount-unmount/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export function mountTestApp(container: Element) { diff --git a/benchmarks/memory/client/scenarios/mount-unmount/solid/tsconfig.json b/benchmarks/memory/client/scenarios/mount-unmount/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/mount-unmount/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/mount-unmount/solid/vite.config.ts b/benchmarks/memory/client/scenarios/mount-unmount/solid/vite.config.ts index 33699639de..5f0ab26252 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client mount-unmount (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/mount-unmount/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/mount-unmount/vue/src/routes/a.tsx b/benchmarks/memory/client/scenarios/mount-unmount/vue/src/routes/a.tsx index 0dd650e1dd..cbcd543ce5 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/vue/src/routes/a.tsx +++ b/benchmarks/memory/client/scenarios/mount-unmount/vue/src/routes/a.tsx @@ -1,15 +1,12 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const AComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () =>
{data.value.id}
- }, -}) - export const Route = createFileRoute('/a')({ loader: () => ({ id: 'a' }), component: AComponent, }) + +function AComponent() { + const data = Route.useLoaderData() + + return
{data.value.id}
+} diff --git a/benchmarks/memory/client/scenarios/mount-unmount/vue/vite.config.ts b/benchmarks/memory/client/scenarios/mount-unmount/vue/vite.config.ts index a3f0eeaa8c..0f7573a408 100644 --- a/benchmarks/memory/client/scenarios/mount-unmount/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/mount-unmount/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client mount-unmount (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/react/memory.bench.ts b/benchmarks/memory/client/scenarios/navigation-churn/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/react/vite.config.ts b/benchmarks/memory/client/scenarios/navigation-churn/react/vite.config.ts index eef60a658e..b05b999297 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client navigation-churn (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/navigation-churn/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/solid/src/app.tsx b/benchmarks/memory/client/scenarios/navigation-churn/solid/src/app.tsx index 16000c90a1..5917ef0191 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/navigation-churn/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export function mountTestApp(container: Element) { diff --git a/benchmarks/memory/client/scenarios/navigation-churn/solid/tsconfig.json b/benchmarks/memory/client/scenarios/navigation-churn/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/navigation-churn/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/navigation-churn/solid/vite.config.ts b/benchmarks/memory/client/scenarios/navigation-churn/solid/vite.config.ts index 7dfb186b2e..6b6735891a 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client navigation-churn (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/navigation-churn/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/a.tsx b/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/a.tsx index c1a9cfb244..183228e748 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/a.tsx +++ b/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/a.tsx @@ -1,19 +1,16 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' const fixedTimestamp = 1_700_000_000_000 -const AComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
{`${data.value.name}:${data.value.ts}`}
- ) - }, -}) - export const Route = createFileRoute('/a')({ loader: () => ({ name: 'a', ts: fixedTimestamp }), component: AComponent, }) + +function AComponent() { + const data = Route.useLoaderData() + + return ( +
{`${data.value.name}:${data.value.ts}`}
+ ) +} diff --git a/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/b.tsx b/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/b.tsx index 3a20799f3b..3a18ec97a9 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/b.tsx +++ b/benchmarks/memory/client/scenarios/navigation-churn/vue/src/routes/b.tsx @@ -1,19 +1,16 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' const fixedTimestamp = 1_700_000_000_000 -const BComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
{`${data.value.name}:${data.value.ts}`}
- ) - }, -}) - export const Route = createFileRoute('/b')({ loader: () => ({ name: 'b', ts: fixedTimestamp }), component: BComponent, }) + +function BComponent() { + const data = Route.useLoaderData() + + return ( +
{`${data.value.name}:${data.value.ts}`}
+ ) +} diff --git a/benchmarks/memory/client/scenarios/navigation-churn/vue/vite.config.ts b/benchmarks/memory/client/scenarios/navigation-churn/vue/vite.config.ts index b3bdd39dd2..d26ce23d07 100644 --- a/benchmarks/memory/client/scenarios/navigation-churn/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/navigation-churn/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client navigation-churn (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/react/memory.bench.ts b/benchmarks/memory/client/scenarios/preload-churn/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/react/vite.config.ts b/benchmarks/memory/client/scenarios/preload-churn/react/vite.config.ts index c12995f68e..f9c426656b 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client preload-churn (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/shared.ts b/benchmarks/memory/client/scenarios/preload-churn/shared.ts index 68fdfedd3f..8cea4aca81 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/shared.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/shared.ts @@ -35,14 +35,18 @@ type PreloadRouter = { subscribe: (event: 'onRendered', listener: () => void) => () => void } -// Reuse one navigation target while evicting the distinct preloaded routes. +// Fixed id for the eviction navigations interleaved into the bench loop; its +// payload is a constant-size steady-state resident, never part of the signal. const evictionItemId = 'nav-evict' const preloadChurnIterations = 200 // A navigation commit is what triggers the router's clearExpiredCache -- // preloaded matches (defaultPreloadGcTime: 0) are only evicted then, never -// during a preload-only loop. Interleave navigation to exercise eviction. +// during a preload-only loop. Interleaving a navigation every few preloads is +// what makes the flat floor assert "eviction releases preloaded payloads". const preloadsPerEvictionNavigation = 10 -// Keep generated URLs unique across warmup and measured invocations. +// Module-level so ids stay unique across runner invocations on one mount; a +// per-invocation LCG would replay identical ids, and every preload after the +// first invocation would dedupe against cachedMatches instead of doing work. const benchmarkRandom = createDeterministicRandom(0x706c6f61) let preloadCounter = 0 diff --git a/benchmarks/memory/client/scenarios/preload-churn/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/preload-churn/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/solid/src/app.tsx b/benchmarks/memory/client/scenarios/preload-churn/solid/src/app.tsx index 18ad5b97e4..b5b0a1d555 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/preload-churn/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export { getTrackedItemLoaderCount } from '../../item-payload' diff --git a/benchmarks/memory/client/scenarios/preload-churn/solid/tsconfig.json b/benchmarks/memory/client/scenarios/preload-churn/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/preload-churn/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/preload-churn/solid/vite.config.ts b/benchmarks/memory/client/scenarios/preload-churn/solid/vite.config.ts index efc75d2b93..c86a6fcbb3 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client preload-churn (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/preload-churn/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/preload-churn/vue/src/routes/items.$id.tsx b/benchmarks/memory/client/scenarios/preload-churn/vue/src/routes/items.$id.tsx index 08254e173e..2a29245926 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/vue/src/routes/items.$id.tsx +++ b/benchmarks/memory/client/scenarios/preload-churn/vue/src/routes/items.$id.tsx @@ -1,19 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { createItemPayload, trackItemLoaderCall } from '../../../item-payload' -const ItemComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
- {`${data.value.id}:${data.value.byteLength}`} -
- ) - }, -}) - export const Route = createFileRoute('/items/$id')({ loader: ({ params }: { params: { id: string } }) => { trackItemLoaderCall(params.id) @@ -21,3 +8,13 @@ export const Route = createFileRoute('/items/$id')({ }, component: ItemComponent, }) + +function ItemComponent() { + const data = Route.useLoaderData() + + return ( +
+ {`${data.value.id}:${data.value.byteLength}`} +
+ ) +} diff --git a/benchmarks/memory/client/scenarios/preload-churn/vue/vite.config.ts b/benchmarks/memory/client/scenarios/preload-churn/vue/vite.config.ts index 3d56089ba7..ea7ed7b695 100644 --- a/benchmarks/memory/client/scenarios/preload-churn/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/preload-churn/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client preload-churn (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/react/memory.bench.ts b/benchmarks/memory/client/scenarios/unique-location-churn/react/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/react/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/react/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/react/vite.config.ts b/benchmarks/memory/client/scenarios/unique-location-churn/react/vite.config.ts index 7ee67bfe30..f424c57cef 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/react/vite.config.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/react/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client unique-location-churn (react)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/solid/memory.bench.ts b/benchmarks/memory/client/scenarios/unique-location-churn/solid/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/solid/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/solid/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/solid/src/app.tsx b/benchmarks/memory/client/scenarios/unique-location-churn/solid/src/app.tsx index 16000c90a1..5917ef0191 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/solid/src/app.tsx +++ b/benchmarks/memory/client/scenarios/unique-location-churn/solid/src/app.tsx @@ -1,5 +1,5 @@ import { RouterProvider } from '@tanstack/solid-router' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { getRouter } from './router' export function mountTestApp(container: Element) { diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/solid/tsconfig.json b/benchmarks/memory/client/scenarios/unique-location-churn/solid/tsconfig.json index b12dcb7ade..9558353c88 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/solid/tsconfig.json +++ b/benchmarks/memory/client/scenarios/unique-location-churn/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "jsx": "preserve", "allowImportingTsExtensions": true, - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/solid/vite.config.ts b/benchmarks/memory/client/scenarios/unique-location-churn/solid/vite.config.ts index 4db90da2d2..d4acf0019a 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/solid/vite.config.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/solid/vite.config.ts @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -27,9 +26,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client unique-location-churn (solid)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/vue/memory.bench.ts b/benchmarks/memory/client/scenarios/unique-location-churn/vue/memory.bench.ts index 43ab822de3..e645ab38f1 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/vue/memory.bench.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/vue/memory.bench.ts @@ -1,14 +1,21 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-client/bench-utils' +import { afterAll, beforeAll, bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-client/bench-utils' import { workload } from './setup' await workload.sanity() -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(workload), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + if (workload.before && workload.after) { + beforeAll(workload.before) + afterAll(workload.after) + + bench(workload.name, workload.run, { + ...memoryBenchOptions, + setup: workload.before, + teardown: workload.after, + }) + return + } + + bench(workload.name, workload.run, memoryBenchOptions) }) diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/vue/src/routes/items.$id.tsx b/benchmarks/memory/client/scenarios/unique-location-churn/vue/src/routes/items.$id.tsx index e796ee14d1..1854367142 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/vue/src/routes/items.$id.tsx +++ b/benchmarks/memory/client/scenarios/unique-location-churn/vue/src/routes/items.$id.tsx @@ -1,22 +1,9 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' type ItemSearch = { q: string } -const ItemComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
{`${data.value.id}:${data.value.q}:${data.value.checksum}`}
- ) - }, -}) - export const Route = createFileRoute('/items/$id')({ validateSearch: (search: Record): ItemSearch => ({ q: typeof search.q === 'string' ? search.q : '', @@ -35,3 +22,13 @@ export const Route = createFileRoute('/items/$id')({ }), component: ItemComponent, }) + +function ItemComponent() { + const data = Route.useLoaderData() + + return ( +
{`${data.value.id}:${data.value.q}:${data.value.checksum}`}
+ ) +} diff --git a/benchmarks/memory/client/scenarios/unique-location-churn/vue/vite.config.ts b/benchmarks/memory/client/scenarios/unique-location-churn/vue/vite.config.ts index d074d571b9..423126019b 100644 --- a/benchmarks/memory/client/scenarios/unique-location-churn/vue/vite.config.ts +++ b/benchmarks/memory/client/scenarios/unique-location-churn/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -29,9 +28,9 @@ export default defineConfig({ }, }, test: { - ...memoryConfig('client'), name: '@benchmarks/memory-client unique-location-churn (vue)', watch: false, environment: 'jsdom', + setupFiles: ['../../../vitest.setup.ts'], }, }) diff --git a/benchmarks/memory/client/tsconfig.json b/benchmarks/memory/client/tsconfig.json index eefc5c581e..9280d5c42f 100644 --- a/benchmarks/memory/client/tsconfig.json +++ b/benchmarks/memory/client/tsconfig.json @@ -3,10 +3,5 @@ "compilerOptions": { "types": ["node", "vite/client", "vitest/globals"] }, - "include": [ - "bench-utils.ts", - "lifecycle.ts", - "vitest.setup.ts", - "scenarios/*/shared.ts" - ] + "include": ["bench-utils.ts", "lifecycle.ts", "vitest.setup.ts"] } diff --git a/benchmarks/memory/runtime.ts b/benchmarks/memory/runtime.ts deleted file mode 100644 index 010149b4df..0000000000 --- a/benchmarks/memory/runtime.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { fileURLToPath } from 'node:url' -import { isMemoryInstrumented } from './turn' - -/** Worker settings for the CodSpeed memory instrument. */ -export function memoryExecArgv() { - if (!isMemoryInstrumented()) { - return [] - } - - // CodSpeed supplies --no-opt, which only disables TurboFan on Node 24. - // Under --predictable, Maglev compilations run synchronously inside the - // request that triggers them, and the forced GC before the measured call can - // discard optimized code so recompiles land in the measured window. Their - // malloc'd Zone scratch (32 KiB segments) then dominates allocation metrics - // and depends on per-process feedback state. - // Limit variation from GC scheduling and bytecode reclamation; keep a - // fixed initial old-generation budget. - return [ - '--no-maglev', - '--no-flush-bytecode', - '--no-minor-gc-task', - '--no-incremental-marking', - '--initial-old-space-size=512', - ] -} - -export function memoryConfig(side: 'client' | 'server') { - const execArgv = memoryExecArgv() - return { - execArgv, - setupFiles: - side === 'client' - ? [fileURLToPath(new URL('./client/vitest.setup.ts', import.meta.url))] - : [], - } -} diff --git a/benchmarks/memory/server/bench-utils.ts b/benchmarks/memory/server/bench-utils.ts index 9caaf63384..b8a09fdd8e 100644 --- a/benchmarks/memory/server/bench-utils.ts +++ b/benchmarks/memory/server/bench-utils.ts @@ -1,5 +1,3 @@ -export { memoryBenchHooks } from '../turn' - export interface StartRequestHandler { fetch: (request: Request) => Promise | Response } @@ -19,6 +17,24 @@ export type RunSequentialRequestLoopOptions = iterations?: number buildRequest: (random: () => number, index: number) => Request validateResponse?: (response: Response, request: Request) => void + // Whether V8 collects iteration i's garbage before iteration i+1 + // allocates its payload is not reproducible run to run — the measured + // peak flips by a whole payload depending on GC timing, which shifts + // with runner hardware. Forcing a collection between iterations pins + // the GC points so peak deterministically measures the largest + // single-iteration footprint plus any reachable accumulation. + // Accumulation signals stay visible: leaked or cached objects are + // still referenced, so a forced collection cannot reclaim them — it + // only removes floating garbage, whose collection timing is the + // dominant cross-run noise source. + pinGcBetweenIterations?: boolean + // For peak-shape scenarios ONLY (flat inter-iteration heap floor): + // verify each pinned collection actually returned the heap to the + // floor, extending the barrier when a runner's late teardown holds the + // payload past the fixed window. Churn/abort scenarios must not set + // this: their floor legitimately drifts, so the verification caps out + // chronically and the extra collections it fires destabilize the peak. + verifyGcFloor?: boolean } export const memoryBenchOptions = { @@ -50,7 +66,7 @@ export async function drainResponse(response: Response) { } try { - for (;;) { + while (true) { const result = await reader.read() if (result.done) { @@ -66,7 +82,13 @@ export async function runSequentialRequestLoop( handler: StartRequestHandler, options: RunSequentialRequestLoopOptions, ) { - const { iterations = 10, buildRequest, validateResponse } = options + const { + iterations = 10, + buildRequest, + validateResponse, + pinGcBetweenIterations = false, + verifyGcFloor = false, + } = options const random = options.seed !== undefined ? createDeterministicRandom(options.seed) @@ -81,6 +103,8 @@ export async function runSequentialRequestLoop( } }) + const gcPinState = verifyGcFloor ? createGcPinState() : undefined + for (let index = 0; index < iterations; index++) { const request = buildRequest(random, index) const response = await handler.fetch(request) @@ -88,12 +112,89 @@ export async function runSequentialRequestLoop( validate(response, request) await drainResponse(response) + + if (pinGcBetweenIterations) { + await settleAndPinGc(gcPinState) + } } } -// Cancellation can leave deferred loaders and renderer teardown queued. -export async function settle() { - for (let turn = 0; turn < 16; turn++) { +// Renderer/stream teardown spans several event-loop turns (React and Vue +// need more than the two turns the original barrier allowed for), and a +// too-short settle window leaks a whole payload of garbage past the +// collection point, flipping the measured peak bimodally between runs. +// The settle length is a fixed count on purpose: an adaptive exit (collect +// until the post-GC heap size stops moving) makes the collection points +// land at data-dependent turns, which re-introduces exactly the run-to-run +// variance this barrier exists to remove — heap-size readings never fully +// stabilize under the instrumented CI environment, so the exit point (and +// with it every subsequent GC point) shifted between identical runs. +const settleTurnsBeforeGc = 16 +const maxSettleTurns = 64 +// Below every scenario's payload size, above normal inter-iteration jitter. +const settledHeapSlackBytes = 256 * 1024 + +// Tracks the smallest post-collection heap size seen in a workload run: +// the inter-iteration floor the heap must return to before the next +// iteration may start. +export interface GcPinState { + floorHeapUsed: number +} + +export function createGcPinState(): GcPinState { + return { floorHeapUsed: Infinity } +} + +// Settle trailing renderer/stream teardown with a fixed number of 0ms timer +// hops (one full event-loop turn each, microtasks flushing between hops), +// then pin a collection point. The second collection one turn later picks +// up whatever the first collection's finalizers released. gc() is present +// under CodSpeed (--expose-gc); in plain smoke runs there is nothing to +// pin, so only the settle hops run. +// +// The collection is then verified against the inter-iteration heap floor: +// on some runners the response teardown holds the payload past the fixed +// settle window (released only by a later internal timer), and that one +// still-reachable payload survives the collection and bleeds into the next +// iteration's measured peak. When the post-collection heap has not returned +// to the floor, keep hopping and collecting — bounded — until the payload +// is actually released, so the barrier self-heals in exactly the case where +// the fixed-count barrier fails. A workload that genuinely accumulates +// reachable memory raises the floor as it goes (the floor is the minimum +// seen), so accumulation still measures; it only pays the turn cap. +export async function settleAndPinGc(state?: GcPinState) { + for (let turn = 0; turn < settleTurnsBeforeGc; turn++) { await new Promise((resolve) => setTimeout(resolve, 0)) } + + const gc = (globalThis as { gc?: () => void }).gc + + if (!gc) { + return + } + + gc() + await new Promise((resolve) => setTimeout(resolve, 0)) + gc() + + if (!state) { + return + } + + let heapUsed = process.memoryUsage().heapUsed + + for ( + let turn = settleTurnsBeforeGc; + turn < maxSettleTurns && + heapUsed > state.floorHeapUsed + settledHeapSlackBytes; + turn++ + ) { + await new Promise((resolve) => setTimeout(resolve, 0)) + gc() + heapUsed = process.memoryUsage().heapUsed + } + + if (heapUsed < state.floorHeapUsed) { + state.floorHeapUsed = heapUsed + } } diff --git a/benchmarks/memory/server/benchmark.ts b/benchmarks/memory/server/benchmark.ts index 9b8dc2c76f..301a9f956d 100644 --- a/benchmarks/memory/server/benchmark.ts +++ b/benchmarks/memory/server/benchmark.ts @@ -1,9 +1,5 @@ export interface ServerMemoryWorkload { name: string - /** - * Must be an `async` function: CodSpeed's Vitest 5 provider awaits only - * `AsyncFunction`s and otherwise measures just the synchronous part. - */ run: () => Promise | void } diff --git a/benchmarks/memory/server/package.json b/benchmarks/memory/server/package.json index d09343c7b6..859ffb19a4 100644 --- a/benchmarks/memory/server/package.json +++ b/benchmarks/memory/server/package.json @@ -11,6 +11,7 @@ "#memory-server/flame-runner": "./flame-runner.ts" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tanstack/react-router": "workspace:*", "@tanstack/react-start": "workspace:*", "@tanstack/solid-router": "workspace:*", @@ -19,22 +20,19 @@ "@tanstack/vue-start": "workspace:*", "react": "^19.0.0", "react-dom": "^19.0.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "vue": "^3.5.16" }, "devDependencies": { - "@codspeed/vitest-plugin": "^6.0.1", + "@codspeed/vitest-plugin": "^5.5.0", "@datadog/pprof": "^5.13.2", "@platformatic/flame": "^1.6.0", "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-vue-jsx": "^5.1.5", - "@types/react": "catalog:", - "@typescript/native": "npm:typescript@^7.0.2", - "jsdom": "29.1.1", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11", - "vitest": "catalog:" + "vite-plugin-solid": "^3.0.0-next.16", + "vitest": "^4.1.4" }, "nx": { "targets": { @@ -208,7 +206,7 @@ "build:react" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.react.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.react.config.ts", "cwd": "benchmarks/memory/server" } }, @@ -220,7 +218,7 @@ "build:solid" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.solid.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.solid.config.ts", "cwd": "benchmarks/memory/server" } }, @@ -232,12 +230,12 @@ "build:vue" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.vue.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.vue.config.ts", "cwd": "benchmarks/memory/server" } }, "test:types": { - "executor": "nx:run-commands", + "executor": "nx:noop", "dependsOn": [ { "projects": [ @@ -265,17 +263,6 @@ ], "target": "test:types:ssr" } - ], - "options": { - "command": "tsc -p ./tsconfig.json --noEmit", - "cwd": "benchmarks/memory/server" - }, - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs", - "{workspaceRoot}/benchmarks/memory/*.ts" ] } } diff --git a/benchmarks/memory/server/scenarios/aborted-requests/deferred-records.ts b/benchmarks/memory/server/scenarios/aborted-requests/deferred-records.ts index 7a1cd6d254..4886e3ee80 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/deferred-records.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/deferred-records.ts @@ -16,42 +16,3 @@ export function makeAbortedRequestRecords( label: `deferred-${group}-${id}-${index}`, })) } - -// Abort probes keep their deferred payload pending until the request is -// cancelled. Timer chains can outlive cancellation and spill into the next -// measured request; route-loader signals stop observing the request after load. -export function makeDeferredRecords( - id: string, - group: RecordGroup, - signal: AbortSignal, -): Promise> { - return new Promise((resolve) => { - if (signal.aborted) { - resolve([]) - return - } - - let timeoutId: ReturnType | undefined - const onAbort = () => { - clearTimeout(timeoutId) - resolve([]) - } - signal.addEventListener('abort', onAbort, { once: true }) - - if (id === 'sanity-mid-stream' || id.startsWith('abort-')) { - return - } - - let remaining = group === 'alpha' ? 4 : 6 - const step = () => { - remaining -= 1 - if (remaining === 0) { - signal.removeEventListener('abort', onAbort) - resolve(makeAbortedRequestRecords(id, group)) - return - } - timeoutId = setTimeout(step, 0) - } - timeoutId = setTimeout(step, 0) - }) -} diff --git a/benchmarks/memory/server/scenarios/aborted-requests/react/memory.bench.ts b/benchmarks/memory/server/scenarios/aborted-requests/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/aborted-requests/react/vite.config.ts b/benchmarks/memory/server/scenarios/aborted-requests/react/vite.config.ts index eff0d0e043..2ce925e406 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server aborted-requests (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/aborted-requests/shared.ts b/benchmarks/memory/server/scenarios/aborted-requests/shared.ts index 29eca99e00..f7f63c17e6 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/shared.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/shared.ts @@ -1,4 +1,4 @@ -import { settle } from '#memory-server/bench-utils' +import { settleAndPinGc } from '#memory-server/bench-utils' import type { StartRequestHandler } from '#memory-server/bench-utils' export type { StartRequestHandler } @@ -6,6 +6,13 @@ export type { StartRequestHandler } type Framework = 'react' | 'solid' | 'vue' type AbortedRequestReadMode = 'first-chunk' | 'shell-before-deferred' +type AbortedRequestCancelMode = 'plain' | 'swallow-abort-error' + +type AbortedRequestMode = { + readMode: AbortedRequestReadMode + cancelMode: AbortedRequestCancelMode +} + const abortedRequestIterations = 40 let abortedRequestCounter = 0 const eagerMarker = 'data-bench="aborted-requests-eager"' @@ -17,10 +24,19 @@ const betaFirstRecord = (id: string) => `deferred-beta-${id}-0` const betaLastRecord = (id: string) => `deferred-beta-${id}-19` const textDecoder = new TextDecoder() -const abortedRequestModes: Record = { - react: 'first-chunk', - solid: 'first-chunk', - vue: 'shell-before-deferred', +const abortedRequestModes: Record = { + react: { + readMode: 'first-chunk', + cancelMode: 'plain', + }, + solid: { + readMode: 'first-chunk', + cancelMode: 'plain', + }, + vue: { + readMode: 'shell-before-deferred', + cancelMode: 'swallow-abort-error', + }, } const documentRequestInit = { @@ -80,7 +96,7 @@ async function readShellBeforeDeferred( const reader = response.body.getReader() let text = '' - for (;;) { + while (true) { const result = await reader.read() const value = result.value @@ -121,10 +137,10 @@ async function readShellBeforeDeferred( async function readSanityStream( response: Response, request: Request, - mode: AbortedRequestReadMode, + mode: AbortedRequestMode, id: string, ) { - if (mode === 'shell-before-deferred') { + if (mode.readMode === 'shell-before-deferred') { return readShellBeforeDeferred(response, request, id) } @@ -149,19 +165,36 @@ function readLoopStream( return readFirstChunk(response, request) } -async function cancelReader(reader: ReadableStreamDefaultReader) { - try { - await reader.cancel() - } catch (error) { - if (!(error instanceof DOMException && error.name === 'AbortError')) { - throw error +async function cancelReader( + reader: ReadableStreamDefaultReader, + mode: AbortedRequestCancelMode, +) { + if (mode === 'swallow-abort-error') { + try { + await reader.cancel() + } catch (error) { + if (!(error instanceof DOMException && error.name === 'AbortError')) { + throw error + } } + + return } + + await reader.cancel() +} + +// Post-abort settlement barrier. Settles renderer teardown across a fixed +// number of event-loop turns, then (under CodSpeed) pins a collection point +// after every aborted request, so the measured peak cannot drift with how +// much floating garbage the previous iterations happened to leave behind. +async function drainCancellation() { + await settleAndPinGc() } async function assertAbortedRequestsSanity( handler: StartRequestHandler, - mode: AbortedRequestReadMode, + mode: AbortedRequestMode, ) { const fullId = 'sanity-full' const fullRequest = buildStreamRequest(fullId) @@ -194,13 +227,13 @@ async function assertAbortedRequestsSanity( // reader.cancel() is the response-stream cancellation path if the handler // does not observe Request.signal for this in-process request. controller.abort() - await cancelReader(reader) - await settle() + await cancelReader(reader, mode.cancelMode) + await drainCancellation() } async function runAbortedRequestLoop( handler: StartRequestHandler, - mode: AbortedRequestReadMode, + mode: AbortedRequestMode, ) { for (let index = 0; index < abortedRequestIterations; index++) { const controller = new AbortController() @@ -209,10 +242,15 @@ async function runAbortedRequestLoop( const response = await handler.fetch(request) validateDocumentResponse(response, request) - const { reader } = await readLoopStream(mode, response, request, id) + const { reader } = await readLoopStream( + mode.readMode, + response, + request, + id, + ) controller.abort() - await cancelReader(reader) - await settle() + await cancelReader(reader, mode.cancelMode) + await drainCancellation() } } @@ -221,7 +259,7 @@ export function createWorkloadGroup( handler: StartRequestHandler, ) { const mode = abortedRequestModes[framework] - const run = async () => runAbortedRequestLoop(handler, mode) + const run = () => runAbortedRequestLoop(handler, mode) return { sanity: () => assertAbortedRequestsSanity(handler, mode), diff --git a/benchmarks/memory/server/scenarios/aborted-requests/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/aborted-requests/solid/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/stream.$id.tsx b/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/stream.$id.tsx index bf6af17f31..0ddc6d1447 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/stream.$id.tsx +++ b/benchmarks/memory/server/scenarios/aborted-requests/solid/src/routes/stream.$id.tsx @@ -1,17 +1,90 @@ -import { createServerOnlyFn } from '@tanstack/solid-start' -import { getRequest } from '@tanstack/solid-start/server' -import { createFileRoute } from '@tanstack/solid-router' -import { Show, Suspense, createResource } from 'solid-js' -import { makeDeferredRecords } from '../../../deferred-records' -import type { DeferredRecord } from '../../../deferred-records' +import { Await, createFileRoute } from '@tanstack/solid-router' +import { Loading } from 'solid-js' +import { + makeAbortedRequestRecords, + type DeferredRecord, + type RecordGroup, +} from '../../../deferred-records' -const getRequestSignal = createServerOnlyFn(() => getRequest().signal) +const alphaResolveTicks = 4 +const betaResolveTicks = 6 +const abortProbeAlphaResolveTicks = 40 +const abortProbeBetaResolveTicks = 60 + +function isAbortProbeId(id: string) { + return id === 'sanity-mid-stream' || id.startsWith('abort-') +} + +function getResolveTicks(id: string, group: RecordGroup) { + if (isAbortProbeId(id)) { + return group === 'alpha' + ? abortProbeAlphaResolveTicks + : abortProbeBetaResolveTicks + } + + return group === 'alpha' ? alphaResolveTicks : betaResolveTicks +} + +// One tick = one 0ms timers-phase hop. Counting event-loop turns instead of +// milliseconds keeps the resolve/abort interleaving a pure function of the +// event-loop schedule: a wall-clock delay races the abort differently +// depending on runner load and instrumentation overhead, which made this +// benchmark's single measured run swing between runs. +function resolveAfterTicks( + ticks: number, + signal: AbortSignal, + value: () => T, + abortedValue: () => T, +) { + return new Promise((resolve) => { + if (signal.aborted) { + resolve(abortedValue()) + return + } + + let remaining = ticks + let timeoutId: ReturnType + + const onAbort = () => { + clearTimeout(timeoutId) + resolve(abortedValue()) + } + + const step = () => { + remaining -= 1 + + if (remaining <= 0) { + signal.removeEventListener('abort', onAbort) + resolve(value()) + return + } + + timeoutId = setTimeout(step, 0) + } + + signal.addEventListener('abort', onAbort, { once: true }) + timeoutId = setTimeout(step, 0) + }) +} + +function makeDeferredRecords( + id: string, + group: RecordGroup, + signal: AbortSignal, +) { + return resolveAfterTicks( + getResolveTicks(id, group), + signal, + () => makeAbortedRequestRecords(id, group), + () => [], + ) +} export const Route = createFileRoute('/stream/$id')({ - loader: ({ params }) => ({ + loader: ({ params, abortController }) => ({ eager: `eager-${params.id}`, - alpha: makeDeferredRecords(params.id, 'alpha', getRequestSignal()), - beta: makeDeferredRecords(params.id, 'beta', getRequestSignal()), + alpha: makeDeferredRecords(params.id, 'alpha', abortController.signal), + beta: makeDeferredRecords(params.id, 'beta', abortController.signal), }), component: StreamComponent, }) @@ -22,48 +95,47 @@ function StreamComponent() { return (

{data().eager}

- loading-alpha

} > - -
- + {(records) => ( + + )} + + + loading-beta

} > - -
+ + {(records) => ( + + )} + +
) } function DeferredRecords(props: { - promise: Promise> + records: Array dataBench: string }) { - const [records] = createResource( - () => props.promise, - (promise) => promise, - ) - return ( - - {(resolvedRecords) => ( -
    - {resolvedRecords().map((record) => ( -
  • {record.label}
  • - ))} -
- )} -
+
    + {props.records.map((record) => ( +
  • {record.label}
  • + ))} +
) } diff --git a/benchmarks/memory/server/scenarios/aborted-requests/solid/tsconfig.json b/benchmarks/memory/server/scenarios/aborted-requests/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/aborted-requests/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/aborted-requests/solid/vite.config.ts b/benchmarks/memory/server/scenarios/aborted-requests/solid/vite.config.ts index d7fd3459ee..5ee4e152af 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server aborted-requests (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/aborted-requests/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/aborted-requests/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/aborted-requests/vue/src/routes/stream.$id.tsx b/benchmarks/memory/server/scenarios/aborted-requests/vue/src/routes/stream.$id.tsx index e41af03c16..b723c7f69e 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/vue/src/routes/stream.$id.tsx +++ b/benchmarks/memory/server/scenarios/aborted-requests/vue/src/routes/stream.$id.tsx @@ -1,65 +1,136 @@ -import { createServerOnlyFn } from '@tanstack/vue-start' -import { getRequest } from '@tanstack/vue-start/server' import { Await, createFileRoute } from '@tanstack/vue-router' -import { Suspense, defineComponent } from 'vue' -import { makeDeferredRecords } from '../../../deferred-records' -import type { DeferredRecord } from '../../../deferred-records' +import { Suspense } from 'vue' +import { + makeAbortedRequestRecords, + type DeferredRecord, + type RecordGroup, +} from '../../../deferred-records' -const getRequestSignal = createServerOnlyFn(() => getRequest().signal) +const alphaResolveTicks = 4 +const betaResolveTicks = 6 +const abortProbeAlphaResolveTicks = 40 +const abortProbeBetaResolveTicks = 60 -const StreamComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() +function isAbortProbeId(id: string) { + return id === 'sanity-mid-stream' || id.startsWith('abort-') +} - return () => ( -
-

{data.value.eager}

-

loading-alpha

-

loading-beta

- - {{ - default: () => ( - ) => ( -
    - {records.map((record) => ( -
  • {record.label}
  • - ))} -
- )} - /> - ), - fallback: () => null, - }} -
- - {{ - default: () => ( - ) => ( -
    - {records.map((record) => ( -
  • {record.label}
  • - ))} -
- )} - /> - ), - fallback: () => null, - }} -
-
- ) - }, -}) +function getResolveTicks(id: string, group: RecordGroup) { + if (isAbortProbeId(id)) { + return group === 'alpha' + ? abortProbeAlphaResolveTicks + : abortProbeBetaResolveTicks + } + + return group === 'alpha' ? alphaResolveTicks : betaResolveTicks +} + +// One tick = one 0ms timers-phase hop. Counting event-loop turns instead of +// milliseconds keeps the resolve/abort interleaving a pure function of the +// event-loop schedule: a wall-clock delay races the abort differently +// depending on runner load and instrumentation overhead, which made this +// benchmark's single measured run swing between runs. +function resolveAfterTicks( + ticks: number, + signal: AbortSignal, + value: () => T, + abortedValue: () => T, +) { + return new Promise((resolve) => { + if (signal.aborted) { + resolve(abortedValue()) + return + } + + let remaining = ticks + let timeoutId: ReturnType + + const onAbort = () => { + clearTimeout(timeoutId) + resolve(abortedValue()) + } + + const step = () => { + remaining -= 1 + + if (remaining <= 0) { + signal.removeEventListener('abort', onAbort) + resolve(value()) + return + } + + timeoutId = setTimeout(step, 0) + } + + signal.addEventListener('abort', onAbort, { once: true }) + timeoutId = setTimeout(step, 0) + }) +} + +function makeDeferredRecords( + id: string, + group: RecordGroup, + signal: AbortSignal, +) { + return resolveAfterTicks( + getResolveTicks(id, group), + signal, + () => makeAbortedRequestRecords(id, group), + () => [], + ) +} export const Route = createFileRoute('/stream/$id')({ - loader: ({ params }) => ({ + loader: ({ params, abortController }) => ({ eager: `eager-${params.id}`, - alpha: makeDeferredRecords(params.id, 'alpha', getRequestSignal()), - beta: makeDeferredRecords(params.id, 'beta', getRequestSignal()), + alpha: makeDeferredRecords(params.id, 'alpha', abortController.signal), + beta: makeDeferredRecords(params.id, 'beta', abortController.signal), }), component: StreamComponent, }) + +function StreamComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.eager}

+

loading-alpha

+

loading-beta

+ + {{ + default: () => ( + ) => ( +
    + {records.map((record) => ( +
  • {record.label}
  • + ))} +
+ )} + /> + ), + fallback: () => null, + }} +
+ + {{ + default: () => ( + ) => ( +
    + {records.map((record) => ( +
  • {record.label}
  • + ))} +
+ )} + /> + ), + fallback: () => null, + }} +
+
+ ) +} diff --git a/benchmarks/memory/server/scenarios/aborted-requests/vue/vite.config.ts b/benchmarks/memory/server/scenarios/aborted-requests/vue/vite.config.ts index e4e1eb66d4..5ccc9f5d1d 100644 --- a/benchmarks/memory/server/scenarios/aborted-requests/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/aborted-requests/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server aborted-requests (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/error-paths/react/memory.bench.ts b/benchmarks/memory/server/scenarios/error-paths/react/memory.bench.ts index a6f07b97be..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/error-paths/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/error-paths/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -const workload = workloadGroup.workloads[0]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + for (const workload of workloadGroup.workloads) { + bench(workload.name, workload.run, memoryBenchOptions) + } }) diff --git a/benchmarks/memory/server/scenarios/error-paths/react/memory.error.bench.ts b/benchmarks/memory/server/scenarios/error-paths/react/memory.error.bench.ts deleted file mode 100644 index 89071137c3..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/react/memory.error.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[2]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/react/memory.not-found.bench.ts b/benchmarks/memory/server/scenarios/error-paths/react/memory.not-found.bench.ts deleted file mode 100644 index fa6a6693ed..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/react/memory.not-found.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[1]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/react/memory.unmatched.bench.ts b/benchmarks/memory/server/scenarios/error-paths/react/memory.unmatched.bench.ts deleted file mode 100644 index b2c3d24200..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/react/memory.unmatched.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[3]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/react/src/routeTree.gen.ts b/benchmarks/memory/server/scenarios/error-paths/react/src/routeTree.gen.ts index 4e8e4ce0e4..fd373be6b4 100644 --- a/benchmarks/memory/server/scenarios/error-paths/react/src/routeTree.gen.ts +++ b/benchmarks/memory/server/scenarios/error-paths/react/src/routeTree.gen.ts @@ -10,24 +10,19 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as BoomIdRouteImport } from './routes/boom.$id' -import { Route as FromIdRouteImport } from './routes/from.$id' -import { Route as MissingIdRouteImport } from './routes/missing.$id' import { Route as TargetIdRouteImport } from './routes/target.$id' +import { Route as MissingIdRouteImport } from './routes/missing.$id' +import { Route as FromIdRouteImport } from './routes/from.$id' +import { Route as BoomIdRouteImport } from './routes/boom.$id' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const BoomIdRoute = BoomIdRouteImport.update({ - id: '/boom/$id', - path: '/boom/$id', - getParentRoute: () => rootRouteImport, -} as any) -const FromIdRoute = FromIdRouteImport.update({ - id: '/from/$id', - path: '/from/$id', +const TargetIdRoute = TargetIdRouteImport.update({ + id: '/target/$id', + path: '/target/$id', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -35,9 +30,14 @@ const MissingIdRoute = MissingIdRouteImport.update({ path: '/missing/$id', getParentRoute: () => rootRouteImport, } as any) -const TargetIdRoute = TargetIdRouteImport.update({ - id: '/target/$id', - path: '/target/$id', +const FromIdRoute = FromIdRouteImport.update({ + id: '/from/$id', + path: '/from/$id', + getParentRoute: () => rootRouteImport, +} as any) +const BoomIdRoute = BoomIdRouteImport.update({ + id: '/boom/$id', + path: '/boom/$id', getParentRoute: () => rootRouteImport, } as any) @@ -94,18 +94,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/boom/$id': { - id: '/boom/$id' - path: '/boom/$id' - fullPath: '/boom/$id' - preLoaderRoute: typeof BoomIdRouteImport - parentRoute: typeof rootRouteImport - } - '/from/$id': { - id: '/from/$id' - path: '/from/$id' - fullPath: '/from/$id' - preLoaderRoute: typeof FromIdRouteImport + '/target/$id': { + id: '/target/$id' + path: '/target/$id' + fullPath: '/target/$id' + preLoaderRoute: typeof TargetIdRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { @@ -115,11 +108,18 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof MissingIdRouteImport parentRoute: typeof rootRouteImport } - '/target/$id': { - id: '/target/$id' - path: '/target/$id' - fullPath: '/target/$id' - preLoaderRoute: typeof TargetIdRouteImport + '/from/$id': { + id: '/from/$id' + path: '/from/$id' + fullPath: '/from/$id' + preLoaderRoute: typeof FromIdRouteImport + parentRoute: typeof rootRouteImport + } + '/boom/$id': { + id: '/boom/$id' + path: '/boom/$id' + fullPath: '/boom/$id' + preLoaderRoute: typeof BoomIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/memory/server/scenarios/error-paths/react/tsconfig.json b/benchmarks/memory/server/scenarios/error-paths/react/tsconfig.json index 2dba47fc99..11ddcce4ea 100644 --- a/benchmarks/memory/server/scenarios/error-paths/react/tsconfig.json +++ b/benchmarks/memory/server/scenarios/error-paths/react/tsconfig.json @@ -7,7 +7,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "memory*.bench.ts", + "memory.bench.ts", "memory.flame.ts", "setup.ts", "vite.config.ts", diff --git a/benchmarks/memory/server/scenarios/error-paths/react/vite.config.ts b/benchmarks/memory/server/scenarios/error-paths/react/vite.config.ts index c00de7727a..bc67b1cfc7 100644 --- a/benchmarks/memory/server/scenarios/error-paths/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/error-paths/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,19 @@ export default defineConfig({ minify: false, }, test: { - isolate: true, - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server error-paths (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/error-paths/shared.ts b/benchmarks/memory/server/scenarios/error-paths/shared.ts index 11ed293d22..57e229b7e3 100644 --- a/benchmarks/memory/server/scenarios/error-paths/shared.ts +++ b/benchmarks/memory/server/scenarios/error-paths/shared.ts @@ -9,6 +9,8 @@ export type { StartRequestHandler } type Framework = 'react' | 'solid' | 'vue' +// Sized to sit just above the 2s measured-run floor on CI (per-iteration +// cost with the pinned collection is ~0.13-0.19s across frameworks). const errorPathsIterations = 18 const redirectSeed = 0xdecafbad const notFoundSeed = 0xdecafb0d @@ -136,36 +138,40 @@ export function createWorkloadGroup( framework: Framework, handler: StartRequestHandler, ) { - const runRedirect = async () => + const runRedirect = () => runSequentialRequestLoop(handler, { random: redirectRandom, iterations: errorPathsIterations, buildRequest: buildRedirectRequest, validateResponse: validateRedirectResponse, + pinGcBetweenIterations: true, }) - const runNotFound = async () => + const runNotFound = () => runSequentialRequestLoop(handler, { random: notFoundRandom, iterations: errorPathsIterations, buildRequest: buildNotFoundRequest, validateResponse: validateNotFoundResponse, + pinGcBetweenIterations: true, }) - const runError = async () => + const runError = () => runSequentialRequestLoop(handler, { random: errorRandom, iterations: errorPathsIterations, buildRequest: buildErrorRequest, validateResponse: validateErrorResponse, + pinGcBetweenIterations: true, }) - const runUnmatched = async () => + const runUnmatched = () => runSequentialRequestLoop(handler, { random: unmatchedRandom, iterations: errorPathsIterations, buildRequest: buildUnmatchedRequest, validateResponse: validateNotFoundResponse, + pinGcBetweenIterations: true, }) return { diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/error-paths/solid/memory.bench.ts index a6f07b97be..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/error-paths/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/error-paths/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -const workload = workloadGroup.workloads[0]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + for (const workload of workloadGroup.workloads) { + bench(workload.name, workload.run, memoryBenchOptions) + } }) diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/memory.error.bench.ts b/benchmarks/memory/server/scenarios/error-paths/solid/memory.error.bench.ts deleted file mode 100644 index 89071137c3..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/solid/memory.error.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[2]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/memory.not-found.bench.ts b/benchmarks/memory/server/scenarios/error-paths/solid/memory.not-found.bench.ts deleted file mode 100644 index fa6a6693ed..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/solid/memory.not-found.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[1]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/memory.unmatched.bench.ts b/benchmarks/memory/server/scenarios/error-paths/solid/memory.unmatched.bench.ts deleted file mode 100644 index b2c3d24200..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/solid/memory.unmatched.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[3]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/error-paths/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/error-paths/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/error-paths/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/tsconfig.json b/benchmarks/memory/server/scenarios/error-paths/solid/tsconfig.json index 1e8103127a..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/error-paths/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/error-paths/solid/tsconfig.json @@ -3,11 +3,11 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "memory*.bench.ts", + "memory.bench.ts", "memory.flame.ts", "setup.ts", "vite.config.ts", diff --git a/benchmarks/memory/server/scenarios/error-paths/solid/vite.config.ts b/benchmarks/memory/server/scenarios/error-paths/solid/vite.config.ts index d7a0bb51b0..401d1e5f25 100644 --- a/benchmarks/memory/server/scenarios/error-paths/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/error-paths/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,19 @@ export default defineConfig({ minify: false, }, test: { - isolate: true, - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server error-paths (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/error-paths/vue/memory.bench.ts index a6f07b97be..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/error-paths/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/error-paths/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -const workload = workloadGroup.workloads[0]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) +describe('memory', () => { + for (const workload of workloadGroup.workloads) { + bench(workload.name, workload.run, memoryBenchOptions) + } }) diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/memory.error.bench.ts b/benchmarks/memory/server/scenarios/error-paths/vue/memory.error.bench.ts deleted file mode 100644 index 89071137c3..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/vue/memory.error.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[2]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/memory.not-found.bench.ts b/benchmarks/memory/server/scenarios/error-paths/vue/memory.not-found.bench.ts deleted file mode 100644 index fa6a6693ed..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/vue/memory.not-found.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[1]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/memory.unmatched.bench.ts b/benchmarks/memory/server/scenarios/error-paths/vue/memory.unmatched.bench.ts deleted file mode 100644 index b2c3d24200..0000000000 --- a/benchmarks/memory/server/scenarios/error-paths/vue/memory.unmatched.bench.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' - -await workloadGroup.sanity() - -const workload = workloadGroup.workloads[3]! - -test('memory', async ({ bench }) => { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) -}) diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/src/routes/target.$id.tsx b/benchmarks/memory/server/scenarios/error-paths/vue/src/routes/target.$id.tsx index 0bbf4a3dc6..17ade6bf5b 100644 --- a/benchmarks/memory/server/scenarios/error-paths/vue/src/routes/target.$id.tsx +++ b/benchmarks/memory/server/scenarios/error-paths/vue/src/routes/target.$id.tsx @@ -1,14 +1,11 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const TargetComponent = defineComponent({ - setup() { - const params = Route.useParams() - - return () =>
{`target-${params.value.id}`}
- }, -}) - export const Route = createFileRoute('/target/$id')({ component: TargetComponent, }) + +function TargetComponent() { + const params = Route.useParams() + + return
{`target-${params.value.id}`}
+} diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/tsconfig.json b/benchmarks/memory/server/scenarios/error-paths/vue/tsconfig.json index af8b83005c..9ad6481342 100644 --- a/benchmarks/memory/server/scenarios/error-paths/vue/tsconfig.json +++ b/benchmarks/memory/server/scenarios/error-paths/vue/tsconfig.json @@ -7,7 +7,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "memory*.bench.ts", + "memory.bench.ts", "memory.flame.ts", "setup.ts", "vite.config.ts", diff --git a/benchmarks/memory/server/scenarios/error-paths/vue/vite.config.ts b/benchmarks/memory/server/scenarios/error-paths/vue/vite.config.ts index 3dc0762aa0..9a0ca28a25 100644 --- a/benchmarks/memory/server/scenarios/error-paths/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/error-paths/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,19 @@ export default defineConfig({ minify: false, }, test: { - isolate: true, - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server error-paths (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/peak-large-page/react/memory.bench.ts b/benchmarks/memory/server/scenarios/peak-large-page/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/peak-large-page/react/src/routeTree.gen.ts b/benchmarks/memory/server/scenarios/peak-large-page/react/src/routeTree.gen.ts index 6004590f9b..60a1bd1fbc 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/react/src/routeTree.gen.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/react/src/routeTree.gen.ts @@ -9,8 +9,8 @@ // 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 IndexRouteImport } from './routes/index' import { Route as L1RouteImport } from './routes/l1' +import { Route as IndexRouteImport } from './routes/index' import { Route as L1L2RouteImport } from './routes/l1.l2' import { Route as L1L2L3RouteImport } from './routes/l1.l2.l3' import { Route as L1L2L3L4RouteImport } from './routes/l1.l2.l3.l4' @@ -19,16 +19,16 @@ import { Route as L1L2L3L4L5L6RouteImport } from './routes/l1.l2.l3.l4.l5.l6' import { Route as L1L2L3L4L5L6L7RouteImport } from './routes/l1.l2.l3.l4.l5.l6.l7' import { Route as L1L2L3L4L5L6L7L8RouteImport } from './routes/l1.l2.l3.l4.l5.l6.l7.l8' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const L1Route = L1RouteImport.update({ id: '/l1', path: '/l1', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const L1L2Route = L1L2RouteImport.update({ id: '/l2', path: '/l2', @@ -142,13 +142,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/l1': { id: '/l1' path: '/l1' @@ -156,6 +149,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof L1RouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/l1/l2': { id: '/l1/l2' path: '/l2' diff --git a/benchmarks/memory/server/scenarios/peak-large-page/react/vite.config.ts b/benchmarks/memory/server/scenarios/peak-large-page/react/vite.config.ts index dcfcf1f92b..adaacda86e 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server peak-large-page (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/peak-large-page/shared.ts b/benchmarks/memory/server/scenarios/peak-large-page/shared.ts index 085e576244..578fc9c5a2 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/shared.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/shared.ts @@ -6,7 +6,7 @@ export type { StartRequestHandler } type Framework = 'react' | 'solid' | 'vue' const benchmarkSeed = 0x5eed_0005 -const peakLargePageIterations = 1 +const peakLargePageIterations = 20 const peakLargePageUrl = 'http://localhost/l1/l2/l3/l4/l5/l6/l7/l8' const levelEightMarker = 'data-bench="peak-large-page-level-8"' @@ -48,12 +48,14 @@ export function createWorkloadGroup( framework: Framework, handler: StartRequestHandler, ) { - const run = async () => + const run = () => runSequentialRequestLoop(handler, { seed: benchmarkSeed, iterations: peakLargePageIterations, buildRequest: buildPeakLargePageRequest, validateResponse: validatePeakLargePageResponse, + pinGcBetweenIterations: true, + verifyGcFloor: true, }) return { diff --git a/benchmarks/memory/server/scenarios/peak-large-page/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/peak-large-page/solid/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/peak-large-page/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/peak-large-page/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/peak-large-page/solid/tsconfig.json b/benchmarks/memory/server/scenarios/peak-large-page/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/peak-large-page/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/peak-large-page/solid/vite.config.ts b/benchmarks/memory/server/scenarios/peak-large-page/solid/vite.config.ts index 15b8c3a571..27d4dd65f7 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server peak-large-page (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/peak-large-page/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.l8.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.l8.tsx index 7f7a42d645..bd079aa1a0 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.l8.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.l8.tsx @@ -1,34 +1,28 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelEightComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
-
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3/l4/l5/l6/l7/l8')({ loader: () => makeLargePageLevelData(8, 0x5eed_1008), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelEightComponent, }) + +function LevelEightComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.tsx index a99c56e529..7f69f6f438 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.l7.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelSevenComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3/l4/l5/l6/l7')({ loader: () => makeLargePageLevelData(7, 0x5eed_1007), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelSevenComponent, }) + +function LevelSevenComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.tsx index 3de3f03427..75a7c717e3 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.l6.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelSixComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3/l4/l5/l6')({ loader: () => makeLargePageLevelData(6, 0x5eed_1006), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelSixComponent, }) + +function LevelSixComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.tsx index 5d936f83b5..f390ae3db3 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.l5.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelFiveComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3/l4/l5')({ loader: () => makeLargePageLevelData(5, 0x5eed_1005), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelFiveComponent, }) + +function LevelFiveComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.tsx index 8e10331f2d..6b30bd50dc 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.l4.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelFourComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3/l4')({ loader: () => makeLargePageLevelData(4, 0x5eed_1004), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelFourComponent, }) + +function LevelFourComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.tsx index d69529c50c..6ec6f32fea 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.l3.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelThreeComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2/l3')({ loader: () => makeLargePageLevelData(3, 0x5eed_1003), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelThreeComponent, }) + +function LevelThreeComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.tsx index d04bc7f827..e5b4cf0de1 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.l2.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelTwoComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1/l2')({ loader: () => makeLargePageLevelData(2, 0x5eed_1002), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelTwoComponent, }) + +function LevelTwoComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.tsx b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.tsx index a95ae7f9b0..a29e465cd4 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.tsx +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/src/routes/l1.tsx @@ -1,35 +1,29 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLargePageHead, makeLargePageLevelData, } from '../../../large-page-data' -const LevelOneComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const first = data.value.records[0]! - - return ( -
-

{data.value.marker}

-

records: {data.value.records.length}

-
-

{first.name}

-

{first.id}

-

{first.description}

-
- -
- ) - } - }, -}) - export const Route = createFileRoute('/l1')({ loader: () => makeLargePageLevelData(1, 0x5eed_1001), head: ({ loaderData }) => makeLargePageHead(loaderData), component: LevelOneComponent, }) + +function LevelOneComponent() { + const data = Route.useLoaderData() + const first = data.value.records[0]! + + return ( +
+

{data.value.marker}

+

records: {data.value.records.length}

+
+

{first.name}

+

{first.id}

+

{first.description}

+
+ +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/peak-large-page/vue/vite.config.ts b/benchmarks/memory/server/scenarios/peak-large-page/vue/vite.config.ts index 3fab2aff9e..0f238bd7f7 100644 --- a/benchmarks/memory/server/scenarios/peak-large-page/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/peak-large-page/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server peak-large-page (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/request-churn/react/memory.bench.ts b/benchmarks/memory/server/scenarios/request-churn/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/request-churn/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/request-churn/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/request-churn/react/vite.config.ts b/benchmarks/memory/server/scenarios/request-churn/react/vite.config.ts index 35adf6a249..1e956958ec 100644 --- a/benchmarks/memory/server/scenarios/request-churn/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/request-churn/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server request-churn (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/request-churn/shared.ts b/benchmarks/memory/server/scenarios/request-churn/shared.ts index b200c96ed6..a196eec8b5 100644 --- a/benchmarks/memory/server/scenarios/request-churn/shared.ts +++ b/benchmarks/memory/server/scenarios/request-churn/shared.ts @@ -62,12 +62,13 @@ export function createWorkloadGroup( return new Request(`http://localhost/items/${id}?q=${q}`, requestInit) } - const run = async () => + const run = () => runSequentialRequestLoop(handler, { random: benchmarkRandom, iterations: requestChurnIterations, buildRequest: buildItemRequest, validateResponse: validateItemResponse, + pinGcBetweenIterations: true, }) return { diff --git a/benchmarks/memory/server/scenarios/request-churn/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/request-churn/solid/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/request-churn/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/request-churn/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/request-churn/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/request-churn/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/request-churn/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/request-churn/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/request-churn/solid/tsconfig.json b/benchmarks/memory/server/scenarios/request-churn/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/request-churn/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/request-churn/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/request-churn/solid/vite.config.ts b/benchmarks/memory/server/scenarios/request-churn/solid/vite.config.ts index 6601309a74..fbf8df9491 100644 --- a/benchmarks/memory/server/scenarios/request-churn/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/request-churn/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server request-churn (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/request-churn/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/request-churn/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/request-churn/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/request-churn/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/request-churn/vue/src/routes/items.$id.tsx b/benchmarks/memory/server/scenarios/request-churn/vue/src/routes/items.$id.tsx index 570561f2a8..a98d036565 100644 --- a/benchmarks/memory/server/scenarios/request-churn/vue/src/routes/items.$id.tsx +++ b/benchmarks/memory/server/scenarios/request-churn/vue/src/routes/items.$id.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' const itemIndexes = Array.from({ length: 5 }, (_, index) => index) @@ -7,24 +6,6 @@ type ItemSearch = { q: string } -const ItemComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.title}

-

{data.value.q}

-
    - {data.value.items.map((item) => ( -
  • {item.label}
  • - ))} -
-
- ) - }, -}) - export const Route = createFileRoute('/items/$id')({ validateSearch: (search: Record): ItemSearch => ({ q: typeof search.q === 'string' ? search.q : '', @@ -41,3 +22,19 @@ export const Route = createFileRoute('/items/$id')({ }), component: ItemComponent, }) + +function ItemComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.title}

+

{data.value.q}

+
    + {data.value.items.map((item) => ( +
  • {item.label}
  • + ))} +
+
+ ) +} diff --git a/benchmarks/memory/server/scenarios/request-churn/vue/vite.config.ts b/benchmarks/memory/server/scenarios/request-churn/vue/vite.config.ts index 7f15c5c7af..a551a96e2f 100644 --- a/benchmarks/memory/server/scenarios/request-churn/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/request-churn/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server request-churn (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/serialization-payload/react/memory.bench.ts b/benchmarks/memory/server/scenarios/serialization-payload/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/serialization-payload/react/vite.config.ts b/benchmarks/memory/server/scenarios/serialization-payload/react/vite.config.ts index 1ed3bcc335..de5549de3b 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server serialization-payload (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/serialization-payload/shared.ts b/benchmarks/memory/server/scenarios/serialization-payload/shared.ts index 14ec8f7e0a..ce095b5e10 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/shared.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/shared.ts @@ -9,7 +9,7 @@ export type { StartRequestHandler } type Framework = 'react' | 'solid' | 'vue' const benchmarkSeed = 0x51eaa11 -const serializationPayloadIterations = 1 +const serializationPayloadIterations = 12 const payloadPageMarker = 'data-bench="serialization-payload"' const requestInit = { @@ -55,12 +55,14 @@ export function createWorkloadGroup( framework: Framework, handler: StartRequestHandler, ) { - const run = async () => + const run = () => runSequentialRequestLoop(handler, { seed: benchmarkSeed, iterations: serializationPayloadIterations, buildRequest: buildPayloadRequest, validateResponse: validatePayloadResponse, + pinGcBetweenIterations: true, + verifyGcFloor: true, }) return { diff --git a/benchmarks/memory/server/scenarios/serialization-payload/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/serialization-payload/solid/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/serialization-payload/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/serialization-payload/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/serialization-payload/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/serialization-payload/solid/tsconfig.json b/benchmarks/memory/server/scenarios/serialization-payload/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/serialization-payload/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/serialization-payload/solid/vite.config.ts b/benchmarks/memory/server/scenarios/serialization-payload/solid/vite.config.ts index a2d04b986c..926646ee12 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server serialization-payload (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/serialization-payload/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/serialization-payload/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/serialization-payload/vue/src/routes/data.$id.tsx b/benchmarks/memory/server/scenarios/serialization-payload/vue/src/routes/data.$id.tsx index 37b1a590e4..e6b4cfadfb 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/vue/src/routes/data.$id.tsx +++ b/benchmarks/memory/server/scenarios/serialization-payload/vue/src/routes/data.$id.tsx @@ -1,20 +1,17 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeSerializationPayload } from '../../../serialization-payload' -const DataComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
- Map size: {data.value.lookup.size} -
- ) - }, -}) - export const Route = createFileRoute('/data/$id')({ loader: ({ params }) => makeSerializationPayload(params.id), component: DataComponent, }) + +function DataComponent() { + const data = Route.useLoaderData() + + return ( +
+ Map size: {data.value.lookup.size} +
+ ) +} diff --git a/benchmarks/memory/server/scenarios/serialization-payload/vue/vite.config.ts b/benchmarks/memory/server/scenarios/serialization-payload/vue/vite.config.ts index b63a561228..41a5596adf 100644 --- a/benchmarks/memory/server/scenarios/serialization-payload/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/serialization-payload/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server serialization-payload (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/react/memory.bench.ts b/benchmarks/memory/server/scenarios/server-fn-churn/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/react/vite.config.ts b/benchmarks/memory/server/scenarios/server-fn-churn/react/vite.config.ts index f72cc53d6f..68d9ed839b 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server server-fn-churn (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/shared.ts b/benchmarks/memory/server/scenarios/server-fn-churn/shared.ts index 167b24d3b6..6e2959e757 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/shared.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/shared.ts @@ -38,6 +38,8 @@ type SerovalNode = const benchmarkSeed = 0xdecafbad const payloadSeed = 0x51f0cafe const fixtureCount = 16 +// Sized to sit just above the 2s measured-run floor on CI (per-iteration +// cost with the pinned collection is ~0.08-0.11s across frameworks). const serverFnChurnIterations = 30 const origin = 'http://localhost' const tssContentTypeFramed = 'application/x-tss-framed' @@ -202,10 +204,11 @@ export async function createWorkloadGroup( handler: StartRequestHandler, ) { const urls = await discoverUrls(handler) - const run = async () => + const run = () => runSequentialRequestLoop(handler, { seed: benchmarkSeed, iterations: serverFnChurnIterations, + pinGcBetweenIterations: true, buildRequest: (_random, index) => { const fixtureIndex = Math.floor(index / 2) % fixtureCount diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/server-fn-churn/solid/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/solid/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/server-fn-churn/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/server-fn-churn/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/solid/tsconfig.json b/benchmarks/memory/server/scenarios/server-fn-churn/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/server-fn-churn/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/solid/vite.config.ts b/benchmarks/memory/server/scenarios/server-fn-churn/solid/vite.config.ts index 4fba196bd2..8d6d226e97 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server server-fn-churn (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/server-fn-churn/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/server-fn-churn/vue/vite.config.ts b/benchmarks/memory/server/scenarios/server-fn-churn/vue/vite.config.ts index 5ab5ec37e3..0e249b9f3b 100644 --- a/benchmarks/memory/server/scenarios/server-fn-churn/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/server-fn-churn/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server server-fn-churn (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/streaming-peak/react/memory.bench.ts b/benchmarks/memory/server/scenarios/streaming-peak/react/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/react/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/react/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/streaming-peak/react/vite.config.ts b/benchmarks/memory/server/scenarios/streaming-peak/react/vite.config.ts index 5d555441b6..5af0f0d138 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/react/vite.config.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server streaming-peak (react)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/streaming-peak/shared.ts b/benchmarks/memory/server/scenarios/streaming-peak/shared.ts index c027047408..6b45470329 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/shared.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/shared.ts @@ -9,7 +9,7 @@ export type { StartRequestHandler } type Framework = 'react' | 'solid' | 'vue' const benchmarkSeed = 0xdecafbad -const streamingPeakIterations = 1 +const streamingPeakIterations = 20 const fallbackMarker = 'streaming-peak-fallback-0' const requestInit = { @@ -50,7 +50,7 @@ async function readStreamingBody(response: Response) { let body = '' let chunkCount = 0 - for (;;) { + while (true) { const result = await reader.read() if (result.done) { @@ -92,21 +92,18 @@ export function createWorkloadGroup( framework: Framework, handler: StartRequestHandler, ) { - const run = async () => + const run = () => runSequentialRequestLoop(handler, { seed: benchmarkSeed, iterations: streamingPeakIterations, buildRequest: buildStreamingRequest, validateResponse: validateStreamingResponse, + pinGcBetweenIterations: true, + verifyGcFloor: true, }) return { - sanity: async () => { - // Import the route chunks before checking streaming. Cold disk I/O can - // otherwise outlast the deferred payload and collapse the first response. - await run() - await assertStreamingPeakSanity(handler) - }, + sanity: () => assertStreamingPeakSanity(handler), workloads: [ { name: `mem server streaming-peak chunked (${framework})`, diff --git a/benchmarks/memory/server/scenarios/streaming-peak/solid/memory.bench.ts b/benchmarks/memory/server/scenarios/streaming-peak/solid/memory.bench.ts index 8b5f16ad63..138ad2bbde 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/solid/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/solid/memory.bench.ts @@ -1,16 +1,14 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' -import { workloadGroup } from './setup' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' -await workloadGroup.sanity() - -test('memory', async ({ bench }) => { - for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) - } +// TODO(solid-router-v2): re-enable once router-core's SSR stream transformer +// supports Solid 2's streaming shape. Solid 2's renderToStream emits +// `` at the end of the initial shell and streams deferred +// Loading-boundary HTML after it, so transformStreamWithRouter tail-buffers +// every deferred section and throws "SSR stream tail exceeded maximum buffer" +// (MAX_TAIL_CHARS = 64 kB) for this scenario's ~200 kB of deferred payload. +// React and Vue keep deferred chunks before ``, which is what the +// transformer assumes. +describe('memory', () => { + bench.skip('mem server streaming-peak (solid)', () => {}, memoryBenchOptions) }) diff --git a/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/__root.tsx b/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/__root.tsx index aaf7dfdd89..6e83136ea0 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/__root.tsx +++ b/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/__root.tsx @@ -4,7 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' +import { HydrationScript } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ diff --git a/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/stream.$id.tsx b/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/stream.$id.tsx index 977f43061e..a1de56098a 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/stream.$id.tsx +++ b/benchmarks/memory/server/scenarios/streaming-peak/solid/src/routes/stream.$id.tsx @@ -1,5 +1,5 @@ import { Await, createFileRoute } from '@tanstack/solid-router' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' import { makeDeferredSectionPayload, type DeferredSectionPayload, @@ -66,11 +66,11 @@ function StreamComponent() {

streaming-peak-fallback-{index}

- + {(section) => } - + ))} diff --git a/benchmarks/memory/server/scenarios/streaming-peak/solid/tsconfig.json b/benchmarks/memory/server/scenarios/streaming-peak/solid/tsconfig.json index 4b61264e11..cdb88448d7 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/solid/tsconfig.json +++ b/benchmarks/memory/server/scenarios/streaming-peak/solid/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "allowImportingTsExtensions": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/memory/server/scenarios/streaming-peak/solid/vite.config.ts b/benchmarks/memory/server/scenarios/streaming-peak/solid/vite.config.ts index 5fbdb48c23..18bf5b2d04 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/solid/vite.config.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server streaming-peak (solid)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/scenarios/streaming-peak/vue/memory.bench.ts b/benchmarks/memory/server/scenarios/streaming-peak/vue/memory.bench.ts index 8b5f16ad63..9a5c211fee 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/vue/memory.bench.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/vue/memory.bench.ts @@ -1,16 +1,11 @@ -import { test } from 'vitest' -import { - memoryBenchHooks, - memoryBenchOptions, -} from '#memory-server/bench-utils' +import { bench, describe } from 'vitest' +import { memoryBenchOptions } from '#memory-server/bench-utils' import { workloadGroup } from './setup' await workloadGroup.sanity() -test('memory', async ({ bench }) => { +describe('memory', () => { for (const workload of workloadGroup.workloads) { - await bench(workload.name, memoryBenchHooks(), workload.run).run( - memoryBenchOptions, - ) + bench(workload.name, workload.run, memoryBenchOptions) } }) diff --git a/benchmarks/memory/server/scenarios/streaming-peak/vue/src/routes/stream.$id.tsx b/benchmarks/memory/server/scenarios/streaming-peak/vue/src/routes/stream.$id.tsx index 750d1cb47d..0c71a8d3a0 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/vue/src/routes/stream.$id.tsx +++ b/benchmarks/memory/server/scenarios/streaming-peak/vue/src/routes/stream.$id.tsx @@ -1,5 +1,5 @@ import { Await, createFileRoute } from '@tanstack/vue-router' -import { Suspense, defineComponent } from 'vue' +import { Suspense } from 'vue' import { makeDeferredSectionPayload, type DeferredSectionPayload, @@ -7,47 +7,6 @@ import { const fallbackFlushTicks = 20 -const StreamComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => { - const deferredSections = [ - { index: 0, promise: data.value.deferred0 }, - { index: 1, promise: data.value.deferred1 }, - { index: 2, promise: data.value.deferred2 }, - { index: 3, promise: data.value.deferred3 }, - ] as const - - return ( -
-

{data.value.eager}

- {deferredSections.map(({ index, promise }) => ( - <> -

- streaming-peak-fallback-{index} -

- - {{ - default: () => ( - ( - - )} - /> - ), - fallback: () => null, - }} - - - ))} -
- ) - } - }, -}) - export const Route = createFileRoute('/stream/$id')({ loader: ({ params }) => ({ eager: `streaming-peak-eager-${params.id}`, @@ -89,6 +48,42 @@ function makeDeferredSection(id: string, sectionIndex: number) { ) } +function StreamComponent() { + const data = Route.useLoaderData() + const deferredSections = [ + { index: 0, promise: data.value.deferred0 }, + { index: 1, promise: data.value.deferred1 }, + { index: 2, promise: data.value.deferred2 }, + { index: 3, promise: data.value.deferred3 }, + ] as const + + return ( +
+

{data.value.eager}

+ {deferredSections.map(({ index, promise }) => ( + <> +

+ streaming-peak-fallback-{index} +

+ + {{ + default: () => ( + ( + + )} + /> + ), + fallback: () => null, + }} + + + ))} +
+ ) +} + function DeferredSection({ section }: { section: DeferredSectionPayload }) { const marker = `streaming-peak-deferred-${section.index}` diff --git a/benchmarks/memory/server/scenarios/streaming-peak/vue/vite.config.ts b/benchmarks/memory/server/scenarios/streaming-peak/vue/vite.config.ts index cd848584a5..7cd481da0b 100644 --- a/benchmarks/memory/server/scenarios/streaming-peak/vue/vite.config.ts +++ b/benchmarks/memory/server/scenarios/streaming-peak/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { memoryConfig } from '../../../../runtime' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,7 +22,19 @@ export default defineConfig({ minify: false, }, test: { - ...memoryConfig('server'), + // Keep lazily-compiled code alive for the whole run: the pinned + // collections age code fast enough for V8 to flush unused bytecode, + // and the mid-measurement recompile injects a multi-MB allocation + // burst at a run-dependent time. + execArgv: [ + '--no-flush-bytecode', + // Pre-size the V8 heap so no space has to grow mid-measurement: + // heap-growth events allocate several MB at a run-dependent moment, + // which flips the measured peak bimodally between identical runs. + '--initial-old-space-size=64', + '--min-semi-space-size=16', + '--max-semi-space-size=16', + ], name: '@benchmarks/memory-server streaming-peak (vue)', watch: false, environment: 'node', diff --git a/benchmarks/memory/server/tsconfig.json b/benchmarks/memory/server/tsconfig.json index 86d36f047a..5d5dcbf825 100644 --- a/benchmarks/memory/server/tsconfig.json +++ b/benchmarks/memory/server/tsconfig.json @@ -3,10 +3,5 @@ "compilerOptions": { "types": ["node", "vite/client", "vitest/globals"] }, - "include": [ - "bench-utils.ts", - "scenarios/*/shared.ts", - "../runtime.ts", - "vitest.setup.ts" - ] + "include": ["bench-utils.ts"] } diff --git a/benchmarks/memory/tsconfig.json b/benchmarks/memory/tsconfig.json deleted file mode 100644 index 5a325f3b6c..0000000000 --- a/benchmarks/memory/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "types": ["node"] - }, - "include": ["runtime.ts"] -} diff --git a/benchmarks/memory/turn.ts b/benchmarks/memory/turn.ts deleted file mode 100644 index 08729685fe..0000000000 --- a/benchmarks/memory/turn.ts +++ /dev/null @@ -1,34 +0,0 @@ -export function isMemoryInstrumented() { - return ( - process.env.CODSPEED_ENV !== undefined && - process.env.CODSPEED_RUNNER_MODE === 'memory' - ) -} - -// CodSpeed calls beforeEach before its forced GC and measurement marker. End -// the previous warmup's job so WeakRef targets can be released by that GC. -export function endMemoryTurn() { - return new Promise((resolve) => setImmediate(resolve)) -} - -/** - * Per-invocation bench hooks. CodSpeed runs them around every warmup - * invocation and the measured one, outside the measurement marker: the turn - * ends first, then the workload prepares fresh state before the forced GC. - */ -export function memoryBenchHooks( - workload: { - before?: () => Promise | void - after?: () => Promise | void - } = {}, -) { - return { - async beforeEach() { - if (isMemoryInstrumented()) { - await endMemoryTurn() - } - await workload.before?.() - }, - afterEach: workload.after, - } -} diff --git a/benchmarks/ssr/README.md b/benchmarks/ssr/README.md index 3d90af1598..625e1006c5 100644 --- a/benchmarks/ssr/README.md +++ b/benchmarks/ssr/README.md @@ -98,18 +98,3 @@ Use `react`, `solid`, or `vue` for ``. The baseline projects use `@be - Server-function loops must include `sec-fetch-site: same-origin` so the default CSRF middleware accepts the request. - Loops that expect non-200 responses pass a custom `validateResponse` to `runRequestLoop`. - Bench loops must build deterministic requests from the seeded random helper and consume response bodies through `runRequestLoop` or `runSsrRequestLoop`. - -## Optional React Link workloads - -The [opt-in Link suite](../client-nav/README.md#opt-in-react-link-performance-suite) -adds focused standalone React Router SSR coverage for params/updaters, -inheritance, search middlewares, optional/splat segments, encoding, masks, -rewrites, and active props. Each timed batch creates four fresh routers and -renders their Links to HTML; it does not measure Start HTTP/streaming overhead. - -```bash -CI=1 NX_DAEMON=false pnpm nx run @benchmarks/react-link-performance:test:perf:ssr --outputStyle=stream --skipRemoteCache -- --run -``` - -These cases are excluded from this directory's aggregate projects and normal -CodSpeed dependency graph; they only run through the dedicated target above. diff --git a/benchmarks/ssr/bench-utils.test.ts b/benchmarks/ssr/bench-utils.test.ts deleted file mode 100644 index c6a520447b..0000000000 --- a/benchmarks/ssr/bench-utils.test.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { buildRequestSequences, runRequestLoop } from './bench-utils' -import type { StartRequestHandler } from './bench-utils' - -function deferred() { - let resolve = () => {} - const promise = new Promise((resolvePromise) => { - resolve = resolvePromise - }) - return { promise, resolve } -} - -describe('runRequestLoop', () => { - it('caps fixed concurrency and waits for every streaming body', async () => { - const concurrency = 4 - const totalRequests = 20 - const firstWaveStarted = deferred() - let builtRequests = 0 - let executedRequests = 0 - let validatedResponses = 0 - let finishedBodies = 0 - let inFlightRequests = 0 - let maximumInFlightRequests = 0 - - const handler: StartRequestHandler = { - fetch() { - expect(builtRequests).toBe(totalRequests) - executedRequests += 1 - inFlightRequests += 1 - maximumInFlightRequests = Math.max( - maximumInFlightRequests, - inFlightRequests, - ) - - if (inFlightRequests === concurrency) { - firstWaveStarted.resolve() - } - - const body = new ReadableStream({ - async start(controller) { - await firstWaveStarted.promise - controller.enqueue(new Uint8Array([1])) - controller.close() - finishedBodies += 1 - inFlightRequests -= 1 - }, - }) - - return new Response(body) - }, - } - - await runRequestLoop(handler, { - seed: 123, - concurrency, - totalRequests, - buildRequest: (_random, index) => { - builtRequests += 1 - return new Request(`http://localhost/request/${index}`) - }, - validateResponse: () => { - validatedResponses += 1 - }, - }) - - expect(builtRequests).toBe(totalRequests) - expect(executedRequests).toBe(totalRequests) - expect(validatedResponses).toBe(totalRequests) - expect(maximumInFlightRequests).toBe(concurrency) - expect(inFlightRequests).toBe(0) - expect(finishedBodies).toBe(totalRequests) - }) - - it('builds identical predetermined worker sequences from identical seeds', () => { - const buildSequences = (seed: number) => - buildRequestSequences({ - seed, - concurrency: 4, - totalRequests: 12, - buildRequest: (random, index) => - new Request( - `http://localhost/request/${index}?value=${random().toString(36)}`, - ), - }).map((requests) => requests.map((request) => request.url)) - - const first = buildSequences(456) - const second = buildSequences(456) - - expect(second).toEqual(first) - expect(first.map((requests) => requests.map(requestIndex))).toEqual([ - [0, 4, 8], - [1, 5, 9], - [2, 6, 10], - [3, 7, 11], - ]) - }) - - it('drains every started body before reporting a worker failure', async () => { - const concurrency = 4 - const firstWaveStarted = deferred() - let executedRequests = 0 - let finishedBodies = 0 - let inFlightRequests = 0 - - const handler: StartRequestHandler = { - fetch(request) { - executedRequests += 1 - inFlightRequests += 1 - if (inFlightRequests === concurrency) { - firstWaveStarted.resolve() - } - - const body = new ReadableStream({ - async start(controller) { - await firstWaveStarted.promise - controller.close() - finishedBodies += 1 - inFlightRequests -= 1 - }, - }) - - return new Response(body, { - status: request.url.endsWith('/0') ? 500 : 200, - }) - }, - } - - await expect( - runRequestLoop(handler, { - seed: 789, - concurrency, - totalRequests: 12, - buildRequest: (_random, index) => - new Request(`http://localhost/request/${index}`), - }), - ).rejects.toThrow('non-200 status 500') - - expect(finishedBodies).toBe(executedRequests) - expect(inFlightRequests).toBe(0) - }) -}) - -function requestIndex(url: string) { - return Number(new URL(url).pathname.split('/').at(-1)) -} diff --git a/benchmarks/ssr/bench-utils.ts b/benchmarks/ssr/bench-utils.ts index 7a54fce897..353c56cb4b 100644 --- a/benchmarks/ssr/bench-utils.ts +++ b/benchmarks/ssr/bench-utils.ts @@ -9,8 +9,7 @@ export interface RunSsrRequestLoopOptions { export interface RunRequestLoopOptions { seed: number - concurrency: number - totalRequests: number + iterations?: number buildRequest: (random: () => number, index: number) => Request validateResponse?: (response: Response, request: Request) => void } @@ -100,18 +99,13 @@ export async function runRequestLoop( handler: StartRequestHandler, { seed, - concurrency, - totalRequests, + iterations = 10, buildRequest, validateResponse, }: RunRequestLoopOptions, ) { - const requestSequences = buildRequestSequences({ - seed, - concurrency, - totalRequests, - buildRequest, - }) + const random = createDeterministicRandom(seed) + const pendingBodyReads: Array> = [] const validate = validateResponse ?? ((response: Response, request: Request) => { @@ -122,84 +116,20 @@ export async function runRequestLoop( } }) - let startWorkers = () => {} - const startBarrier = new Promise((resolve) => { - startWorkers = resolve - }) + for (let index = 0; index < iterations; index++) { + const request = buildRequest(random, index) + const response = await handler.fetch(request) - const workers = requestSequences.map(async (requests) => { - await startBarrier + try { + validate(response, request) + } catch (error) { + await Promise.allSettled(pendingBodyReads) - for (const request of requests) { - const response = await handler.fetch(request) - let validationFailure: { error: unknown } | undefined - - try { - validate(response, request) - } catch (error) { - validationFailure = { error } - } - - await drainResponse(response) - - if (validationFailure) { - throw validationFailure.error - } + throw error } - }) - startWorkers() - const results = await Promise.allSettled(workers) - const failedWorker = results.find( - (result): result is PromiseRejectedResult => result.status === 'rejected', - ) - - if (failedWorker) { - throw failedWorker.reason - } -} - -export type BuildRequestSequencesOptions = Pick< - RunRequestLoopOptions, - 'seed' | 'concurrency' | 'totalRequests' | 'buildRequest' -> - -/** - * Build the entire seeded workload before any request starts, then partition - * it round-robin so completion timing can never change a worker's next input. - */ -export function buildRequestSequences({ - seed, - concurrency, - totalRequests, - buildRequest, -}: BuildRequestSequencesOptions): Array> { - assertPositiveInteger('concurrency', concurrency) - assertPositiveInteger('totalRequests', totalRequests) - - if (concurrency > totalRequests) { - throw new RangeError( - `concurrency (${concurrency}) cannot exceed totalRequests (${totalRequests})`, - ) - } - - const random = createDeterministicRandom(seed) - const requestSequences = Array.from( - { length: concurrency }, - () => new Array(), - ) - - for (let index = 0; index < totalRequests; index++) { - requestSequences[index % concurrency]!.push(buildRequest(random, index)) - } - - return requestSequences -} - -function assertPositiveInteger(name: string, value: number) { - if (!Number.isSafeInteger(value) || value < 1) { - throw new RangeError( - `${name} must be a positive integer; received ${value}`, - ) + pendingBodyReads.push(drainResponse(response)) } + + await Promise.all(pendingBodyReads) } diff --git a/benchmarks/ssr/package.json b/benchmarks/ssr/package.json index 20c1837468..bcd831c5b4 100644 --- a/benchmarks/ssr/package.json +++ b/benchmarks/ssr/package.json @@ -3,6 +3,7 @@ "private": true, "type": "module", "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tanstack/react-router": "workspace:^", "@tanstack/react-start": "workspace:^", "@tanstack/solid-router": "workspace:^", @@ -11,21 +12,18 @@ "@tanstack/vue-start": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "vue": "^3.5.16" }, "devDependencies": { - "@codspeed/vitest-plugin": "^6.0.1", + "@codspeed/vitest-plugin": "^5.5.0", "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-vue-jsx": "^5.1.5", - "@types/react": "catalog:", - "seroval": "^1.6.7", - "@typescript/native": "npm:typescript@^7.0.2", - "jsdom": "29.1.1", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "seroval": "^1.5.4", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11", - "vitest": "catalog:" + "vite-plugin-solid": "^3.0.0-next.16", + "vitest": "^4.1.4" }, "nx": { "targets": { @@ -116,14 +114,7 @@ "build:vue" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark", - "cwd": "benchmarks/ssr" - } - }, - "test:unit": { - "executor": "nx:run-commands", - "options": { - "command": "vitest run --config ./vitest.unit.config.ts", + "command": "NODE_ENV=production vitest bench", "cwd": "benchmarks/ssr" } }, @@ -134,7 +125,7 @@ "build:react" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.react.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.react.config.ts", "cwd": "benchmarks/ssr" } }, @@ -145,7 +136,7 @@ "build:solid" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.solid.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.solid.config.ts", "cwd": "benchmarks/ssr" } }, @@ -156,16 +147,12 @@ "build:vue" ], "options": { - "command": "NODE_ENV=production vitest bench --mode benchmark --config ./vitest.vue.config.ts", + "command": "NODE_ENV=production vitest bench --config ./vitest.vue.config.ts", "cwd": "benchmarks/ssr" } }, "test:types": { - "executor": "nx:run-commands", - "options": { - "command": "tsc -p ./tsconfig.json --noEmit", - "cwd": "benchmarks/ssr" - }, + "executor": "nx:noop", "dependsOn": [ { "projects": [ @@ -217,13 +204,6 @@ ], "target": "test:types:ssr" } - ], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "{workspaceRoot}/benchmarks/cpu-simulation.ts", - "dependentTaskOutputs" ] } } diff --git a/benchmarks/ssr/react/speed.bench.ts b/benchmarks/ssr/react/speed.bench.ts index 6825a7ddfb..419b1ccb36 100644 --- a/benchmarks/ssr/react/speed.bench.ts +++ b/benchmarks/ssr/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { runSsrRequestLoop } from '../bench-utils' import type { StartRequestHandler } from '../bench-utils' @@ -11,12 +11,14 @@ const { default: handler } = (await import( default: StartRequestHandler } -test('ssr', async ({ bench }) => { - await bench('ssr request loop (react)', async () => - runSsrRequestLoop(handler, { seed: benchmarkSeed }), - ).run({ - warmupIterations: 100, - time: 10_000, - throws: true, - }) +describe('ssr', () => { + bench( + 'ssr request loop (react)', + () => runSsrRequestLoop(handler, { seed: benchmarkSeed }), + { + warmupIterations: 100, + time: 10_000, + throws: true, + }, + ) }) diff --git a/benchmarks/ssr/react/vite.config.ts b/benchmarks/ssr/react/vite.config.ts index e607db366b..04f15c3959 100644 --- a/benchmarks/ssr/react/vite.config.ts +++ b/benchmarks/ssr/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/assets/react/speed.assets-linked-css-control.bench.ts b/benchmarks/ssr/scenarios/assets/react/speed.assets-linked-css-control.bench.ts deleted file mode 100644 index 0496613afb..0000000000 --- a/benchmarks/ssr/scenarios/assets/react/speed.assets-linked-css-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertAssetsScenario, - assetsBenchOptions, - runAssetsLinkedControlLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertAssetsScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr assets linked-css control (react)', async () => - runAssetsLinkedControlLoop(handler), - ).run(assetsBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/assets/react/speed.bench.ts b/benchmarks/ssr/scenarios/assets/react/speed.bench.ts index 7dc57d89f1..a54042cd86 100644 --- a/benchmarks/ssr/scenarios/assets/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/assets/react/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertAssetsScenario, assetsBenchOptions, runAssetsInlineLoop, + runAssetsLinkedControlLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertAssetsScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr assets inline-css cdn (react)', async () => - runAssetsInlineLoop(handler), - ).run(assetsBenchOptions) +describe('ssr', () => { + bench( + 'ssr assets inline-css cdn (react)', + () => runAssetsInlineLoop(handler), + assetsBenchOptions, + ) + bench( + 'ssr assets linked-css control (react)', + () => runAssetsLinkedControlLoop(handler), + assetsBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/assets/react/tsconfig.json b/benchmarks/ssr/scenarios/assets/react/tsconfig.json index cf14e1d440..91027bfc88 100644 --- a/benchmarks/ssr/scenarios/assets/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/assets/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/assets/react/vite.config.ts b/benchmarks/ssr/scenarios/assets/react/vite.config.ts index 5990bba6d3..91534d3de8 100644 --- a/benchmarks/ssr/scenarios/assets/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/assets/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -28,8 +27,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr assets (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/assets/shared.ts b/benchmarks/ssr/scenarios/assets/shared.ts index ec811794e3..3974988698 100644 --- a/benchmarks/ssr/scenarios/assets/shared.ts +++ b/benchmarks/ssr/scenarios/assets/shared.ts @@ -7,8 +7,8 @@ export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad const origin = 'http://localhost' const cdnOrigin = 'https://cdn.example.com' -const inlineCssLoopTotalRequests = 32 -const linkedCssLoopTotalRequests = 32 +const inlineCssLoopIterations = 25 +const linkedCssLoopIterations = 30 const inlineRequestInit = { method: 'GET', @@ -41,8 +41,7 @@ function buildAssetsRequest(random: () => number, requestInit: RequestInit) { export function runAssetsInlineLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: inlineCssLoopTotalRequests, + iterations: inlineCssLoopIterations, buildRequest: (random) => buildAssetsRequest(random, inlineRequestInit), }) } @@ -50,8 +49,7 @@ export function runAssetsInlineLoop(handler: StartRequestHandler) { export function runAssetsLinkedControlLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: linkedCssLoopTotalRequests, + iterations: linkedCssLoopIterations, buildRequest: (random) => buildAssetsRequest(random, linkedRequestInit), }) } diff --git a/benchmarks/ssr/scenarios/assets/solid/speed.assets-linked-css-control.bench.ts b/benchmarks/ssr/scenarios/assets/solid/speed.assets-linked-css-control.bench.ts deleted file mode 100644 index d159124a04..0000000000 --- a/benchmarks/ssr/scenarios/assets/solid/speed.assets-linked-css-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertAssetsScenario, - assetsBenchOptions, - runAssetsLinkedControlLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertAssetsScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr assets linked-css control (solid)', async () => - runAssetsLinkedControlLoop(handler), - ).run(assetsBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/assets/solid/speed.bench.ts b/benchmarks/ssr/scenarios/assets/solid/speed.bench.ts index 47f483df11..49d7722163 100644 --- a/benchmarks/ssr/scenarios/assets/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/assets/solid/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertAssetsScenario, assetsBenchOptions, runAssetsInlineLoop, + runAssetsLinkedControlLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertAssetsScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr assets inline-css cdn (solid)', async () => - runAssetsInlineLoop(handler), - ).run(assetsBenchOptions) +describe('ssr', () => { + bench( + 'ssr assets inline-css cdn (solid)', + () => runAssetsInlineLoop(handler), + assetsBenchOptions, + ) + bench( + 'ssr assets linked-css control (solid)', + () => runAssetsLinkedControlLoop(handler), + assetsBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/assets/solid/tsconfig.json b/benchmarks/ssr/scenarios/assets/solid/tsconfig.json index 42c3a2160f..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/assets/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/assets/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/assets/solid/vite.config.ts b/benchmarks/ssr/scenarios/assets/solid/vite.config.ts index 3ee54e5ae2..788ac1f5b8 100644 --- a/benchmarks/ssr/scenarios/assets/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/assets/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -28,8 +27,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr assets (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/assets/vue/speed.assets-linked-css-control.bench.ts b/benchmarks/ssr/scenarios/assets/vue/speed.assets-linked-css-control.bench.ts deleted file mode 100644 index e56d41df6b..0000000000 --- a/benchmarks/ssr/scenarios/assets/vue/speed.assets-linked-css-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertAssetsScenario, - assetsBenchOptions, - runAssetsLinkedControlLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertAssetsScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr assets linked-css control (vue)', async () => - runAssetsLinkedControlLoop(handler), - ).run(assetsBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/assets/vue/speed.bench.ts b/benchmarks/ssr/scenarios/assets/vue/speed.bench.ts index 3f77a0dcc1..01eb3b9d5a 100644 --- a/benchmarks/ssr/scenarios/assets/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/assets/vue/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertAssetsScenario, assetsBenchOptions, runAssetsInlineLoop, + runAssetsLinkedControlLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertAssetsScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr assets inline-css cdn (vue)', async () => - runAssetsInlineLoop(handler), - ).run(assetsBenchOptions) +describe('ssr', () => { + bench( + 'ssr assets inline-css cdn (vue)', + () => runAssetsInlineLoop(handler), + assetsBenchOptions, + ) + bench( + 'ssr assets linked-css control (vue)', + () => runAssetsLinkedControlLoop(handler), + assetsBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.$y.tsx b/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.$y.tsx index a29fe59f22..a20e292938 100644 --- a/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.$y.tsx +++ b/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.$y.tsx @@ -1,21 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import '../styles/assets-leaf.css' -const LeafComponent = defineComponent({ - setup() { - const params = Route.useParams() - - return () => ( -
-

- assets-leaf-{params.value.x}-{params.value.y} -

-
- ) - }, -}) - export const Route = createFileRoute('/a/$x/$y')({ head: ({ params }) => ({ meta: [{ title: `SSR Assets ${params.x} ${params.y}` }], @@ -27,3 +12,15 @@ export const Route = createFileRoute('/a/$x/$y')({ }), component: LeafComponent, }) + +function LeafComponent() { + const params = Route.useParams() + + return ( +
+

+ assets-leaf-{params.value.x}-{params.value.y} +

+
+ ) +} diff --git a/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.tsx b/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.tsx index e1fe0418e4..f8038f6f28 100644 --- a/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.tsx +++ b/benchmarks/ssr/scenarios/assets/vue/src/routes/a.$x.tsx @@ -1,20 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import '../styles/assets-a.css' -const LevelAComponent = defineComponent({ - setup() { - const params = Route.useParams() - - return () => ( -
-

assets-level-a-{params.value.x}

- -
- ) - }, -}) - export const Route = createFileRoute('/a/$x')({ head: ({ params }) => ({ meta: [{ title: `SSR Assets ${params.x}` }], @@ -26,3 +12,14 @@ export const Route = createFileRoute('/a/$x')({ }), component: LevelAComponent, }) + +function LevelAComponent() { + const params = Route.useParams() + + return ( +
+

assets-level-a-{params.value.x}

+ +
+ ) +} diff --git a/benchmarks/ssr/scenarios/assets/vue/tsconfig.json b/benchmarks/ssr/scenarios/assets/vue/tsconfig.json index 08c94853f4..4fe3ccecb1 100644 --- a/benchmarks/ssr/scenarios/assets/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/assets/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/assets/vue/vite.config.ts b/benchmarks/ssr/scenarios/assets/vue/vite.config.ts index e664b9b02b..8beb38c972 100644 --- a/benchmarks/ssr/scenarios/assets/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/assets/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -28,8 +27,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr assets (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/before-load/react/speed.bench.ts b/benchmarks/ssr/scenarios/before-load/react/speed.bench.ts index 8a4355a168..09073687c0 100644 --- a/benchmarks/ssr/scenarios/before-load/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/before-load/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertBeforeLoadScenario, beforeLoadBenchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertBeforeLoadScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr before-load chain (react)', async () => - runBeforeLoadLoop(handler), - ).run(beforeLoadBenchOptions) +describe('ssr', () => { + bench( + 'ssr before-load chain (react)', + () => runBeforeLoadLoop(handler), + beforeLoadBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/before-load/react/vite.config.ts b/benchmarks/ssr/scenarios/before-load/react/vite.config.ts index 3fd72c5f1d..2767b85787 100644 --- a/benchmarks/ssr/scenarios/before-load/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/before-load/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr before-load (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/before-load/shared-bench.ts b/benchmarks/ssr/scenarios/before-load/shared-bench.ts index cf3a02f114..39579fc818 100644 --- a/benchmarks/ssr/scenarios/before-load/shared-bench.ts +++ b/benchmarks/ssr/scenarios/before-load/shared-bench.ts @@ -5,7 +5,7 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const beforeLoadLoopTotalRequests = 32 +const beforeLoadLoopIterations = 30 const requestInit = { method: 'GET', @@ -57,8 +57,7 @@ export const beforeLoadBenchOptions = { export function runBeforeLoadLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: beforeLoadLoopTotalRequests, + iterations: beforeLoadLoopIterations, buildRequest: buildBeforeLoadRequest, }) } diff --git a/benchmarks/ssr/scenarios/before-load/solid/speed.bench.ts b/benchmarks/ssr/scenarios/before-load/solid/speed.bench.ts index 27e0d3a64c..5f6e8baf8a 100644 --- a/benchmarks/ssr/scenarios/before-load/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/before-load/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertBeforeLoadScenario, beforeLoadBenchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertBeforeLoadScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr before-load chain (solid)', async () => - runBeforeLoadLoop(handler), - ).run(beforeLoadBenchOptions) +describe('ssr', () => { + bench( + 'ssr before-load chain (solid)', + () => runBeforeLoadLoop(handler), + beforeLoadBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/before-load/solid/tsconfig.json b/benchmarks/ssr/scenarios/before-load/solid/tsconfig.json index 0995292743..fb59d23345 100644 --- a/benchmarks/ssr/scenarios/before-load/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/before-load/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/before-load/solid/vite.config.ts b/benchmarks/ssr/scenarios/before-load/solid/vite.config.ts index a20e32742e..ea0177e059 100644 --- a/benchmarks/ssr/scenarios/before-load/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/before-load/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr before-load (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/before-load/vue/speed.bench.ts b/benchmarks/ssr/scenarios/before-load/vue/speed.bench.ts index 8684c159eb..d2cfd6814b 100644 --- a/benchmarks/ssr/scenarios/before-load/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/before-load/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertBeforeLoadScenario, beforeLoadBenchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertBeforeLoadScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr before-load chain (vue)', async () => - runBeforeLoadLoop(handler), - ).run(beforeLoadBenchOptions) +describe('ssr', () => { + bench( + 'ssr before-load chain (vue)', + () => runBeforeLoadLoop(handler), + beforeLoadBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/before-load/vue/src/routes/$a.$b.$c.tsx b/benchmarks/ssr/scenarios/before-load/vue/src/routes/$a.$b.$c.tsx index 178d4071eb..118e16553b 100644 --- a/benchmarks/ssr/scenarios/before-load/vue/src/routes/$a.$b.$c.tsx +++ b/benchmarks/ssr/scenarios/before-load/vue/src/routes/$a.$b.$c.tsx @@ -1,15 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeBeforeLoadMarker, type BeforeLoadContext } from '../../../shared' -const LevelCComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () =>
{data.value.marker}
- }, -}) - export const Route = createFileRoute('/$a/$b/$c')({ beforeLoad: ({ params, context }) => { const parent = context as BeforeLoadContext @@ -24,3 +15,9 @@ export const Route = createFileRoute('/$a/$b/$c')({ }), component: LevelCComponent, }) + +function LevelCComponent() { + const data = Route.useLoaderData() + + return
{data.value.marker}
+} diff --git a/benchmarks/ssr/scenarios/before-load/vue/vite.config.ts b/benchmarks/ssr/scenarios/before-load/vue/vite.config.ts index 093776869f..181200a004 100644 --- a/benchmarks/ssr/scenarios/before-load/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/before-load/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr before-load (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/control-flow/react/speed.bench.ts b/benchmarks/ssr/scenarios/control-flow/react/speed.bench.ts index 899f400799..4fca8eb477 100644 --- a/benchmarks/ssr/scenarios/control-flow/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/control-flow/react/speed.bench.ts @@ -1,8 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertControlFlowSanity, controlFlowBenchOptions, + runErrorLoop, + runNotFoundLoop, runRedirectLoop, + runRouteHeadersLoop, + runUnmatchedLoop, } from '../shared' import type { StartRequestHandler } from '../shared' @@ -16,8 +20,34 @@ const { default: handler } = (await import( await assertControlFlowSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr redirect (react)', async () => runRedirectLoop(handler)).run( +describe('ssr', () => { + bench( + 'ssr redirect (react)', + () => runRedirectLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr not-found (react)', + () => runNotFoundLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow error 500 (react)', + () => runErrorLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow unmatched 404 (react)', + () => runUnmatchedLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow route headers (react)', + () => runRouteHeadersLoop(handler), controlFlowBenchOptions, ) }) diff --git a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-error-500.bench.ts b/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-error-500.bench.ts deleted file mode 100644 index 0a93c5eac3..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-error-500.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runErrorLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow error 500 (react)', async () => - runErrorLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-route-headers.bench.ts b/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-route-headers.bench.ts deleted file mode 100644 index 53e09fd34e..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-route-headers.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runRouteHeadersLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow route headers (react)', async () => - runRouteHeadersLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-unmatched-404.bench.ts b/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-unmatched-404.bench.ts deleted file mode 100644 index 1cd7c1044c..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/react/speed.control-flow-unmatched-404.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runUnmatchedLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow unmatched 404 (react)', async () => - runUnmatchedLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/react/speed.not-found.bench.ts b/benchmarks/ssr/scenarios/control-flow/react/speed.not-found.bench.ts deleted file mode 100644 index 1e8abfd318..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/react/speed.not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runNotFoundLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr not-found (react)', async () => - runNotFoundLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/react/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/control-flow/react/src/routeTree.gen.ts index 4d4424c222..ed682bf62f 100644 --- a/benchmarks/ssr/scenarios/control-flow/react/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/control-flow/react/src/routeTree.gen.ts @@ -10,30 +10,20 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as BoomIdRouteImport } from './routes/boom.$id' -import { Route as FromIdRouteImport } from './routes/from.$id' -import { Route as HeadersIdRouteImport } from './routes/headers.$id' -import { Route as MissingIdRouteImport } from './routes/missing.$id' import { Route as TargetIdRouteImport } from './routes/target.$id' +import { Route as MissingIdRouteImport } from './routes/missing.$id' +import { Route as HeadersIdRouteImport } from './routes/headers.$id' +import { Route as FromIdRouteImport } from './routes/from.$id' +import { Route as BoomIdRouteImport } from './routes/boom.$id' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const BoomIdRoute = BoomIdRouteImport.update({ - id: '/boom/$id', - path: '/boom/$id', - getParentRoute: () => rootRouteImport, -} as any) -const FromIdRoute = FromIdRouteImport.update({ - id: '/from/$id', - path: '/from/$id', - getParentRoute: () => rootRouteImport, -} as any) -const HeadersIdRoute = HeadersIdRouteImport.update({ - id: '/headers/$id', - path: '/headers/$id', +const TargetIdRoute = TargetIdRouteImport.update({ + id: '/target/$id', + path: '/target/$id', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -41,9 +31,19 @@ const MissingIdRoute = MissingIdRouteImport.update({ path: '/missing/$id', getParentRoute: () => rootRouteImport, } as any) -const TargetIdRoute = TargetIdRouteImport.update({ - id: '/target/$id', - path: '/target/$id', +const HeadersIdRoute = HeadersIdRouteImport.update({ + id: '/headers/$id', + path: '/headers/$id', + getParentRoute: () => rootRouteImport, +} as any) +const FromIdRoute = FromIdRouteImport.update({ + id: '/from/$id', + path: '/from/$id', + getParentRoute: () => rootRouteImport, +} as any) +const BoomIdRoute = BoomIdRouteImport.update({ + id: '/boom/$id', + path: '/boom/$id', getParentRoute: () => rootRouteImport, } as any) @@ -117,25 +117,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/boom/$id': { - id: '/boom/$id' - path: '/boom/$id' - fullPath: '/boom/$id' - preLoaderRoute: typeof BoomIdRouteImport - parentRoute: typeof rootRouteImport - } - '/from/$id': { - id: '/from/$id' - path: '/from/$id' - fullPath: '/from/$id' - preLoaderRoute: typeof FromIdRouteImport - parentRoute: typeof rootRouteImport - } - '/headers/$id': { - id: '/headers/$id' - path: '/headers/$id' - fullPath: '/headers/$id' - preLoaderRoute: typeof HeadersIdRouteImport + '/target/$id': { + id: '/target/$id' + path: '/target/$id' + fullPath: '/target/$id' + preLoaderRoute: typeof TargetIdRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { @@ -145,11 +131,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof MissingIdRouteImport parentRoute: typeof rootRouteImport } - '/target/$id': { - id: '/target/$id' - path: '/target/$id' - fullPath: '/target/$id' - preLoaderRoute: typeof TargetIdRouteImport + '/headers/$id': { + id: '/headers/$id' + path: '/headers/$id' + fullPath: '/headers/$id' + preLoaderRoute: typeof HeadersIdRouteImport + parentRoute: typeof rootRouteImport + } + '/from/$id': { + id: '/from/$id' + path: '/from/$id' + fullPath: '/from/$id' + preLoaderRoute: typeof FromIdRouteImport + parentRoute: typeof rootRouteImport + } + '/boom/$id': { + id: '/boom/$id' + path: '/boom/$id' + fullPath: '/boom/$id' + preLoaderRoute: typeof BoomIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/ssr/scenarios/control-flow/react/tsconfig.json b/benchmarks/ssr/scenarios/control-flow/react/tsconfig.json index cf14e1d440..91027bfc88 100644 --- a/benchmarks/ssr/scenarios/control-flow/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/control-flow/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/control-flow/react/vite.config.ts b/benchmarks/ssr/scenarios/control-flow/react/vite.config.ts index 273d7d9d80..b15f7bc530 100644 --- a/benchmarks/ssr/scenarios/control-flow/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/control-flow/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr control-flow (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/control-flow/shared.ts b/benchmarks/ssr/scenarios/control-flow/shared.ts index 307665d59d..7b79683785 100644 --- a/benchmarks/ssr/scenarios/control-flow/shared.ts +++ b/benchmarks/ssr/scenarios/control-flow/shared.ts @@ -5,11 +5,11 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const redirectLoopTotalRequests = 112 -const notFoundLoopTotalRequests = 48 -const errorLoopTotalRequests = 48 -const unmatchedLoopTotalRequests = 64 -const routeHeadersLoopTotalRequests = 64 +const redirectLoopIterations = 100 +const notFoundLoopIterations = 45 +const errorLoopIterations = 45 +const unmatchedLoopIterations = 60 +const routeHeadersLoopIterations = 50 // Pinned to the current built handler responses for these control-flow routes. const OK_STATUS = 200 @@ -124,8 +124,7 @@ function validateRouteHeadersResponse(response: Response, request: Request) { export function runRedirectLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: redirectLoopTotalRequests, + iterations: redirectLoopIterations, buildRequest: buildRedirectRequest, validateResponse: validateRedirectResponse, }) @@ -134,8 +133,7 @@ export function runRedirectLoop(handler: StartRequestHandler) { export function runNotFoundLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: notFoundLoopTotalRequests, + iterations: notFoundLoopIterations, buildRequest: buildNotFoundRequest, validateResponse: validateNotFoundResponse, }) @@ -144,8 +142,7 @@ export function runNotFoundLoop(handler: StartRequestHandler) { export function runErrorLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: errorLoopTotalRequests, + iterations: errorLoopIterations, buildRequest: buildErrorRequest, validateResponse: validateErrorResponse, }) @@ -154,8 +151,7 @@ export function runErrorLoop(handler: StartRequestHandler) { export function runUnmatchedLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: unmatchedLoopTotalRequests, + iterations: unmatchedLoopIterations, buildRequest: buildUnmatchedRequest, validateResponse: validateUnmatchedResponse, }) @@ -164,8 +160,7 @@ export function runUnmatchedLoop(handler: StartRequestHandler) { export function runRouteHeadersLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: routeHeadersLoopTotalRequests, + iterations: routeHeadersLoopIterations, buildRequest: buildRouteHeadersRequest, validateResponse: validateRouteHeadersResponse, }) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/speed.bench.ts b/benchmarks/ssr/scenarios/control-flow/solid/speed.bench.ts index 904b693e25..ed23ed45d7 100644 --- a/benchmarks/ssr/scenarios/control-flow/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/control-flow/solid/speed.bench.ts @@ -1,8 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertControlFlowSanity, controlFlowBenchOptions, + runErrorLoop, + runNotFoundLoop, runRedirectLoop, + runRouteHeadersLoop, + runUnmatchedLoop, } from '../shared' import type { StartRequestHandler } from '../shared' @@ -16,8 +20,34 @@ const { default: handler } = (await import( await assertControlFlowSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr redirect (solid)', async () => runRedirectLoop(handler)).run( +describe('ssr', () => { + bench( + 'ssr redirect (solid)', + () => runRedirectLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr not-found (solid)', + () => runNotFoundLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow error 500 (solid)', + () => runErrorLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow unmatched 404 (solid)', + () => runUnmatchedLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow route headers (solid)', + () => runRouteHeadersLoop(handler), controlFlowBenchOptions, ) }) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-error-500.bench.ts b/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-error-500.bench.ts deleted file mode 100644 index 57a2f0fbe9..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-error-500.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runErrorLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow error 500 (solid)', async () => - runErrorLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-route-headers.bench.ts b/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-route-headers.bench.ts deleted file mode 100644 index 6581e92b39..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-route-headers.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runRouteHeadersLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow route headers (solid)', async () => - runRouteHeadersLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-unmatched-404.bench.ts b/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-unmatched-404.bench.ts deleted file mode 100644 index 40f1679320..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/solid/speed.control-flow-unmatched-404.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runUnmatchedLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow unmatched 404 (solid)', async () => - runUnmatchedLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/speed.not-found.bench.ts b/benchmarks/ssr/scenarios/control-flow/solid/speed.not-found.bench.ts deleted file mode 100644 index efcb7cc229..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/solid/speed.not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runNotFoundLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr not-found (solid)', async () => - runNotFoundLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/solid/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/control-flow/solid/src/routeTree.gen.ts index 3cec17d9c8..5e7342c172 100644 --- a/benchmarks/ssr/scenarios/control-flow/solid/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/control-flow/solid/src/routeTree.gen.ts @@ -10,30 +10,20 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as BoomIdRouteImport } from './routes/boom.$id' -import { Route as FromIdRouteImport } from './routes/from.$id' -import { Route as HeadersIdRouteImport } from './routes/headers.$id' -import { Route as MissingIdRouteImport } from './routes/missing.$id' import { Route as TargetIdRouteImport } from './routes/target.$id' +import { Route as MissingIdRouteImport } from './routes/missing.$id' +import { Route as HeadersIdRouteImport } from './routes/headers.$id' +import { Route as FromIdRouteImport } from './routes/from.$id' +import { Route as BoomIdRouteImport } from './routes/boom.$id' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const BoomIdRoute = BoomIdRouteImport.update({ - id: '/boom/$id', - path: '/boom/$id', - getParentRoute: () => rootRouteImport, -} as any) -const FromIdRoute = FromIdRouteImport.update({ - id: '/from/$id', - path: '/from/$id', - getParentRoute: () => rootRouteImport, -} as any) -const HeadersIdRoute = HeadersIdRouteImport.update({ - id: '/headers/$id', - path: '/headers/$id', +const TargetIdRoute = TargetIdRouteImport.update({ + id: '/target/$id', + path: '/target/$id', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -41,9 +31,19 @@ const MissingIdRoute = MissingIdRouteImport.update({ path: '/missing/$id', getParentRoute: () => rootRouteImport, } as any) -const TargetIdRoute = TargetIdRouteImport.update({ - id: '/target/$id', - path: '/target/$id', +const HeadersIdRoute = HeadersIdRouteImport.update({ + id: '/headers/$id', + path: '/headers/$id', + getParentRoute: () => rootRouteImport, +} as any) +const FromIdRoute = FromIdRouteImport.update({ + id: '/from/$id', + path: '/from/$id', + getParentRoute: () => rootRouteImport, +} as any) +const BoomIdRoute = BoomIdRouteImport.update({ + id: '/boom/$id', + path: '/boom/$id', getParentRoute: () => rootRouteImport, } as any) @@ -117,25 +117,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/boom/$id': { - id: '/boom/$id' - path: '/boom/$id' - fullPath: '/boom/$id' - preLoaderRoute: typeof BoomIdRouteImport - parentRoute: typeof rootRouteImport - } - '/from/$id': { - id: '/from/$id' - path: '/from/$id' - fullPath: '/from/$id' - preLoaderRoute: typeof FromIdRouteImport - parentRoute: typeof rootRouteImport - } - '/headers/$id': { - id: '/headers/$id' - path: '/headers/$id' - fullPath: '/headers/$id' - preLoaderRoute: typeof HeadersIdRouteImport + '/target/$id': { + id: '/target/$id' + path: '/target/$id' + fullPath: '/target/$id' + preLoaderRoute: typeof TargetIdRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { @@ -145,11 +131,25 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof MissingIdRouteImport parentRoute: typeof rootRouteImport } - '/target/$id': { - id: '/target/$id' - path: '/target/$id' - fullPath: '/target/$id' - preLoaderRoute: typeof TargetIdRouteImport + '/headers/$id': { + id: '/headers/$id' + path: '/headers/$id' + fullPath: '/headers/$id' + preLoaderRoute: typeof HeadersIdRouteImport + parentRoute: typeof rootRouteImport + } + '/from/$id': { + id: '/from/$id' + path: '/from/$id' + fullPath: '/from/$id' + preLoaderRoute: typeof FromIdRouteImport + parentRoute: typeof rootRouteImport + } + '/boom/$id': { + id: '/boom/$id' + path: '/boom/$id' + fullPath: '/boom/$id' + preLoaderRoute: typeof BoomIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/ssr/scenarios/control-flow/solid/tsconfig.json b/benchmarks/ssr/scenarios/control-flow/solid/tsconfig.json index 42c3a2160f..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/control-flow/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/control-flow/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/control-flow/solid/vite.config.ts b/benchmarks/ssr/scenarios/control-flow/solid/vite.config.ts index c75c957466..0bcd175f60 100644 --- a/benchmarks/ssr/scenarios/control-flow/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/control-flow/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr control-flow (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/control-flow/vue/speed.bench.ts b/benchmarks/ssr/scenarios/control-flow/vue/speed.bench.ts index 0b95f426f2..99bb46dfb3 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/control-flow/vue/speed.bench.ts @@ -1,8 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertControlFlowSanity, controlFlowBenchOptions, + runErrorLoop, + runNotFoundLoop, runRedirectLoop, + runRouteHeadersLoop, + runUnmatchedLoop, } from '../shared' import type { StartRequestHandler } from '../shared' @@ -16,8 +20,34 @@ const { default: handler } = (await import( await assertControlFlowSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr redirect (vue)', async () => runRedirectLoop(handler)).run( +describe('ssr', () => { + bench( + 'ssr redirect (vue)', + () => runRedirectLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr not-found (vue)', + () => runNotFoundLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow error 500 (vue)', + () => runErrorLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow unmatched 404 (vue)', + () => runUnmatchedLoop(handler), + controlFlowBenchOptions, + ) + + bench( + 'ssr control-flow route headers (vue)', + () => runRouteHeadersLoop(handler), controlFlowBenchOptions, ) }) diff --git a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-error-500.bench.ts b/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-error-500.bench.ts deleted file mode 100644 index 262ca951af..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-error-500.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runErrorLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow error 500 (vue)', async () => - runErrorLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-route-headers.bench.ts b/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-route-headers.bench.ts deleted file mode 100644 index bf8c90a8a1..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-route-headers.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runRouteHeadersLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow route headers (vue)', async () => - runRouteHeadersLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-unmatched-404.bench.ts b/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-unmatched-404.bench.ts deleted file mode 100644 index d7f8ebeb9e..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/vue/speed.control-flow-unmatched-404.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runUnmatchedLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr control-flow unmatched 404 (vue)', async () => - runUnmatchedLoop(handler), - ).run(controlFlowBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/vue/speed.not-found.bench.ts b/benchmarks/ssr/scenarios/control-flow/vue/speed.not-found.bench.ts deleted file mode 100644 index 4b84fb594c..0000000000 --- a/benchmarks/ssr/scenarios/control-flow/vue/speed.not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertControlFlowSanity, - controlFlowBenchOptions, - runNotFoundLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertControlFlowSanity(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr not-found (vue)', async () => runNotFoundLoop(handler)).run( - controlFlowBenchOptions, - ) -}) diff --git a/benchmarks/ssr/scenarios/control-flow/vue/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/control-flow/vue/src/routeTree.gen.ts index 6dcf0d095e..f5063d1c09 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/control-flow/vue/src/routeTree.gen.ts @@ -10,30 +10,20 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as BoomIdRouteImport } from './routes/boom.$id' -import { Route as FromIdRouteImport } from './routes/from.$id' -import { Route as HeadersIdRouteImport } from './routes/headers.$id' -import { Route as MissingIdRouteImport } from './routes/missing.$id' import { Route as TargetIdRouteImport } from './routes/target.$id' +import { Route as MissingIdRouteImport } from './routes/missing.$id' +import { Route as HeadersIdRouteImport } from './routes/headers.$id' +import { Route as FromIdRouteImport } from './routes/from.$id' +import { Route as BoomIdRouteImport } from './routes/boom.$id' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const BoomIdRoute = BoomIdRouteImport.update({ - id: '/boom/$id', - path: '/boom/$id', - getParentRoute: () => rootRouteImport, -} as any) -const FromIdRoute = FromIdRouteImport.update({ - id: '/from/$id', - path: '/from/$id', - getParentRoute: () => rootRouteImport, -} as any) -const HeadersIdRoute = HeadersIdRouteImport.update({ - id: '/headers/$id', - path: '/headers/$id', +const TargetIdRoute = TargetIdRouteImport.update({ + id: '/target/$id', + path: '/target/$id', getParentRoute: () => rootRouteImport, } as any) const MissingIdRoute = MissingIdRouteImport.update({ @@ -41,9 +31,19 @@ const MissingIdRoute = MissingIdRouteImport.update({ path: '/missing/$id', getParentRoute: () => rootRouteImport, } as any) -const TargetIdRoute = TargetIdRouteImport.update({ - id: '/target/$id', - path: '/target/$id', +const HeadersIdRoute = HeadersIdRouteImport.update({ + id: '/headers/$id', + path: '/headers/$id', + getParentRoute: () => rootRouteImport, +} as any) +const FromIdRoute = FromIdRouteImport.update({ + id: '/from/$id', + path: '/from/$id', + getParentRoute: () => rootRouteImport, +} as any) +const BoomIdRoute = BoomIdRouteImport.update({ + id: '/boom/$id', + path: '/boom/$id', getParentRoute: () => rootRouteImport, } as any) @@ -117,25 +117,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/boom/$id': { - id: '/boom/$id' - path: '/boom/$id' - fullPath: '/boom/$id' - preLoaderRoute: typeof BoomIdRouteImport - parentRoute: typeof rootRouteImport - } - '/from/$id': { - id: '/from/$id' - path: '/from/$id' - fullPath: '/from/$id' - preLoaderRoute: typeof FromIdRouteImport - parentRoute: typeof rootRouteImport - } - '/headers/$id': { - id: '/headers/$id' - path: '/headers/$id' - fullPath: '/headers/$id' - preLoaderRoute: typeof HeadersIdRouteImport + '/target/$id': { + id: '/target/$id' + path: '/target/$id' + fullPath: '/target/$id' + preLoaderRoute: typeof TargetIdRouteImport parentRoute: typeof rootRouteImport } '/missing/$id': { @@ -145,11 +131,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof MissingIdRouteImport parentRoute: typeof rootRouteImport } - '/target/$id': { - id: '/target/$id' - path: '/target/$id' - fullPath: '/target/$id' - preLoaderRoute: typeof TargetIdRouteImport + '/headers/$id': { + id: '/headers/$id' + path: '/headers/$id' + fullPath: '/headers/$id' + preLoaderRoute: typeof HeadersIdRouteImport + parentRoute: typeof rootRouteImport + } + '/from/$id': { + id: '/from/$id' + path: '/from/$id' + fullPath: '/from/$id' + preLoaderRoute: typeof FromIdRouteImport + parentRoute: typeof rootRouteImport + } + '/boom/$id': { + id: '/boom/$id' + path: '/boom/$id' + fullPath: '/boom/$id' + preLoaderRoute: typeof BoomIdRouteImport parentRoute: typeof rootRouteImport } } diff --git a/benchmarks/ssr/scenarios/control-flow/vue/src/routes/headers.$id.tsx b/benchmarks/ssr/scenarios/control-flow/vue/src/routes/headers.$id.tsx index 20c1bbe5ac..ac2ec01b52 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/src/routes/headers.$id.tsx +++ b/benchmarks/ssr/scenarios/control-flow/vue/src/routes/headers.$id.tsx @@ -1,14 +1,5 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const HeadersComponent = defineComponent({ - setup() { - const params = Route.useParams() - - return () =>
{`headers-${params.value.id}`}
- }, -}) - export const Route = createFileRoute('/headers/$id')({ headers: ({ params }) => ({ 'x-bench-route-header': `route-header-${params.id}`, @@ -16,3 +7,9 @@ export const Route = createFileRoute('/headers/$id')({ }), component: HeadersComponent, }) + +function HeadersComponent() { + const params = Route.useParams() + + return
{`headers-${params.value.id}`}
+} diff --git a/benchmarks/ssr/scenarios/control-flow/vue/src/routes/target.$id.tsx b/benchmarks/ssr/scenarios/control-flow/vue/src/routes/target.$id.tsx index 0bbf4a3dc6..17ade6bf5b 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/src/routes/target.$id.tsx +++ b/benchmarks/ssr/scenarios/control-flow/vue/src/routes/target.$id.tsx @@ -1,14 +1,11 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const TargetComponent = defineComponent({ - setup() { - const params = Route.useParams() - - return () =>
{`target-${params.value.id}`}
- }, -}) - export const Route = createFileRoute('/target/$id')({ component: TargetComponent, }) + +function TargetComponent() { + const params = Route.useParams() + + return
{`target-${params.value.id}`}
+} diff --git a/benchmarks/ssr/scenarios/control-flow/vue/tsconfig.json b/benchmarks/ssr/scenarios/control-flow/vue/tsconfig.json index 08c94853f4..4fe3ccecb1 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/control-flow/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/control-flow/vue/vite.config.ts b/benchmarks/ssr/scenarios/control-flow/vue/vite.config.ts index 1b77968d96..2c978a7a71 100644 --- a/benchmarks/ssr/scenarios/control-flow/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/control-flow/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr control-flow (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/global-middleware/bench.ts b/benchmarks/ssr/scenarios/global-middleware/bench.ts index d2784aed38..cd4dc662e3 100644 --- a/benchmarks/ssr/scenarios/global-middleware/bench.ts +++ b/benchmarks/ssr/scenarios/global-middleware/bench.ts @@ -7,13 +7,10 @@ import { import { expectedFunctionTotal, expectedRequestTotal, - getExpectedRequestContext, makeDocumentMarker, makeServerFnMarker, makeServerRouteMarker, - setRequestMiddlewareCount, } from './shared' -import type { RequestMiddlewareCount } from './shared' import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } @@ -57,9 +54,9 @@ const postHeaders = { accept: acceptHeader, 'content-type': 'application/json', } satisfies HeadersInit -const documentLoopTotalRequests = 64 -const serverFnLoopTotalRequests = 128 -const serverRouteLoopTotalRequests = 256 +const documentLoopIterations = 50 +const serverFnLoopIterations = 125 +const serverRouteLoopIterations = 250 export const globalMiddlewareBenchOptions = { warmupIterations: 100, @@ -143,7 +140,6 @@ function buildPostRequest(urls: FnUrls, bodies: Array, index: number) { export async function setupGlobalMiddlewareBench( handler: StartRequestHandler, ): Promise { - setRequestMiddlewareCount(3) const urls = await discoverUrls(handler) const payloads = createPayloads() const bodies = await createBodies(payloads) @@ -158,7 +154,6 @@ export async function setupGlobalMiddlewareBench( } async function assertDocumentResponse(handler: StartRequestHandler) { - setRequestMiddlewareCount(3) const id = 'page-sanity' const response = await handler.fetch( new Request(`${origin}/page/${id}`, documentRequestInit), @@ -180,11 +175,7 @@ async function assertDocumentResponse(handler: StartRequestHandler) { } } -async function assertServerRouteResponseForCount( - handler: StartRequestHandler, - count: RequestMiddlewareCount, -) { - setRequestMiddlewareCount(count) +async function assertServerRouteResponse(handler: StartRequestHandler) { const id = 'route-sanity' const response = await handler.fetch( new Request(`${origin}/api/ping/${id}`, apiRequestInit), @@ -208,8 +199,10 @@ async function assertServerRouteResponseForCount( marker?: string requestTotal?: number } - const expectedContext = getExpectedRequestContext(count) - const expectedMarker = makeServerRouteMarker(id, expectedContext) + const expectedMarker = makeServerRouteMarker(id, { + requestTrace: 'req.r1.r2.r3', + requestTotal: expectedRequestTotal, + }) if (body.marker !== expectedMarker) { throw new Error( @@ -217,9 +210,9 @@ async function assertServerRouteResponseForCount( ) } - if (body.requestTotal !== expectedContext.requestTotal) { + if (body.requestTotal !== expectedRequestTotal) { throw new Error( - `Expected server route requestTotal ${expectedContext.requestTotal}, received ${body.requestTotal}`, + `Expected server route requestTotal ${expectedRequestTotal}, received ${body.requestTotal}`, ) } } @@ -228,7 +221,6 @@ async function assertServerFnResponse( handler: StartRequestHandler, context: GlobalMiddlewareBenchContext, ) { - setRequestMiddlewareCount(3) const response = await handler.fetch( buildPostRequest(context.urls, context.bodies, 0), ) @@ -265,18 +257,13 @@ export async function assertGlobalMiddlewareScenario( ) { await assertDocumentResponse(handler) await assertServerFnResponse(handler, context) - for (const count of [0, 1, 2, 3] as const) { - await assertServerRouteResponseForCount(handler, count) - } - setRequestMiddlewareCount(3) + await assertServerRouteResponse(handler) } export function runGlobalMiddlewareDocumentLoop(handler: StartRequestHandler) { - setRequestMiddlewareCount(3) return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: documentLoopTotalRequests, + iterations: documentLoopIterations, buildRequest: buildDocumentRequest, }) } @@ -285,11 +272,9 @@ export function runGlobalMiddlewareServerFnLoop( handler: StartRequestHandler, context: GlobalMiddlewareBenchContext, ) { - setRequestMiddlewareCount(3) return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnLoopTotalRequests, + iterations: serverFnLoopIterations, buildRequest: (_random, index) => buildPostRequest(context.urls, context.bodies, index), }) @@ -297,13 +282,10 @@ export function runGlobalMiddlewareServerFnLoop( export function runGlobalMiddlewareServerRouteLoop( handler: StartRequestHandler, - count: RequestMiddlewareCount = 3, ) { - setRequestMiddlewareCount(count) return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverRouteLoopTotalRequests, + iterations: serverRouteLoopIterations, buildRequest: buildServerRouteRequest, }) } diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.bench.ts index cb3f9f427c..8288322e70 100644 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/global-middleware/react/speed.bench.ts @@ -1,8 +1,10 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertGlobalMiddlewareScenario, globalMiddlewareBenchOptions, runGlobalMiddlewareDocumentLoop, + runGlobalMiddlewareServerFnLoop, + runGlobalMiddlewareServerRouteLoop, setupGlobalMiddlewareBench, } from '../bench' import type { StartRequestHandler } from '../bench' @@ -14,12 +16,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupGlobalMiddlewareBench(handler) await assertGlobalMiddlewareScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr global-mw document (react)', async () => - runGlobalMiddlewareDocumentLoop(handler), - ).run(globalMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr global-mw document (react)', + () => runGlobalMiddlewareDocumentLoop(handler), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-fn (react)', + () => runGlobalMiddlewareServerFnLoop(handler, context), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-route (react)', + () => runGlobalMiddlewareServerRouteLoop(handler), + globalMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-fn.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-fn.bench.ts deleted file mode 100644 index 48c444de77..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-fn.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerFnLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-fn (react)', async () => - runGlobalMiddlewareServerFnLoop(handler, context), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-0-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-0-middleware.bench.ts deleted file mode 100644 index 22f53883ee..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-0-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 0 middleware (react)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 0), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-1-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-1-middleware.bench.ts deleted file mode 100644 index f01b48d66e..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-1-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 1 middleware (react)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 1), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-2-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-2-middleware.bench.ts deleted file mode 100644 index b01957f806..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route-2-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 2 middlewares (react)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 2), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route.bench.ts b/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route.bench.ts deleted file mode 100644 index 08d97fcaf6..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/react/speed.global-mw-server-route.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 3 middlewares (react)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 3), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/global-middleware/react/src/routeTree.gen.ts index 8dfaa80562..aa916f0800 100644 --- a/benchmarks/ssr/scenarios/global-middleware/react/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/global-middleware/react/src/routeTree.gen.ts @@ -10,8 +10,8 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as PageIdRouteImport } from './routes/page.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as ApiPingIdRouteImport } from './routes/api.ping.$id' const IndexRoute = IndexRouteImport.update({ @@ -19,16 +19,16 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const PageIdRoute = PageIdRouteImport.update({ id: '/page/$id', path: '/page/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) const ApiPingIdRoute = ApiPingIdRouteImport.update({ id: '/api/ping/$id', path: '/api/ping/$id', @@ -78,13 +78,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/page/$id': { id: '/page/$id' path: '/page/$id' @@ -92,6 +85,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PageIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } '/api/ping/$id': { id: '/api/ping/$id' path: '/api/ping/$id' diff --git a/benchmarks/ssr/scenarios/global-middleware/react/src/start.ts b/benchmarks/ssr/scenarios/global-middleware/react/src/start.ts index 8dfb2dd3c4..6b59e8035b 100644 --- a/benchmarks/ssr/scenarios/global-middleware/react/src/start.ts +++ b/benchmarks/ssr/scenarios/global-middleware/react/src/start.ts @@ -1,5 +1,4 @@ import { createMiddleware, createStart } from '@tanstack/react-start' -import { getRequestMiddlewareCount } from '../../shared' import type { GlobalMiddlewareContext } from '../../shared' function appendTrace( @@ -49,13 +48,6 @@ const requestMiddlewareC = createMiddleware({ type: 'request' }).server( }, ) -const requestMiddlewareSets: Array> = [ - [], - [requestMiddlewareA], - [requestMiddlewareA, requestMiddlewareB], - [requestMiddlewareA, requestMiddlewareB, requestMiddlewareC], -] - const functionMiddlewareA = createMiddleware({ type: 'function' }).server( ({ next, context }) => { const ctx = (context ?? {}) as GlobalMiddlewareContext @@ -83,6 +75,10 @@ const functionMiddlewareB = createMiddleware({ type: 'function' }).server( ) export const startInstance = createStart(() => ({ - requestMiddleware: requestMiddlewareSets[getRequestMiddlewareCount()], + requestMiddleware: [ + requestMiddlewareA, + requestMiddlewareB, + requestMiddlewareC, + ], functionMiddleware: [functionMiddlewareA, functionMiddlewareB], })) diff --git a/benchmarks/ssr/scenarios/global-middleware/react/tsconfig.json b/benchmarks/ssr/scenarios/global-middleware/react/tsconfig.json index de4a3204b9..0c0192daaa 100644 --- a/benchmarks/ssr/scenarios/global-middleware/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/global-middleware/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared.ts", diff --git a/benchmarks/ssr/scenarios/global-middleware/react/vite.config.ts b/benchmarks/ssr/scenarios/global-middleware/react/vite.config.ts index 968a8a24e9..71c8ff3719 100644 --- a/benchmarks/ssr/scenarios/global-middleware/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/global-middleware/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr global-middleware (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/global-middleware/shared.ts b/benchmarks/ssr/scenarios/global-middleware/shared.ts index 8fbe788911..f90fa9b233 100644 --- a/benchmarks/ssr/scenarios/global-middleware/shared.ts +++ b/benchmarks/ssr/scenarios/global-middleware/shared.ts @@ -10,41 +10,11 @@ export interface GlobalMiddlewareRouteContext extends GlobalMiddlewareContext { globalMiddlewareContext?: GlobalMiddlewareContext } -export type RequestMiddlewareCount = 0 | 1 | 2 | 3 - -const requestMiddlewareCountKey = '__TSR_SSR_BENCH_REQUEST_MIDDLEWARE_COUNT__' - -type BenchmarkGlobal = typeof globalThis & { - [requestMiddlewareCountKey]?: RequestMiddlewareCount -} - -const expectedRequestContexts: ReadonlyArray = [ - {}, - { requestTrace: 'req.r1', requestTotal: 1 }, - { requestTrace: 'req.r1.r2', requestTotal: 3 }, - { requestTrace: 'req.r1.r2.r3', requestTotal: 6 }, -] - export const expectedRequestTrace = 'req.r1.r2.r3' export const expectedRequestTotal = 6 export const expectedFunctionTrace = 'fn.f1.f2' export const expectedFunctionTotal = 30 -export function setRequestMiddlewareCount(count: RequestMiddlewareCount) { - const benchmarkGlobal = globalThis as BenchmarkGlobal - benchmarkGlobal[requestMiddlewareCountKey] = count -} - -export function getRequestMiddlewareCount(): RequestMiddlewareCount { - return (globalThis as BenchmarkGlobal)[requestMiddlewareCountKey] ?? 3 -} - -export function getExpectedRequestContext( - count: RequestMiddlewareCount, -): GlobalMiddlewareContext { - return expectedRequestContexts[count]! -} - export function makeDocumentMarker( id: string, context: GlobalMiddlewareContext, diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.bench.ts index 0e5f504090..019735eb40 100644 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/global-middleware/solid/speed.bench.ts @@ -1,8 +1,10 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertGlobalMiddlewareScenario, globalMiddlewareBenchOptions, runGlobalMiddlewareDocumentLoop, + runGlobalMiddlewareServerFnLoop, + runGlobalMiddlewareServerRouteLoop, setupGlobalMiddlewareBench, } from '../bench' import type { StartRequestHandler } from '../bench' @@ -14,12 +16,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupGlobalMiddlewareBench(handler) await assertGlobalMiddlewareScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr global-mw document (solid)', async () => - runGlobalMiddlewareDocumentLoop(handler), - ).run(globalMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr global-mw document (solid)', + () => runGlobalMiddlewareDocumentLoop(handler), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-fn (solid)', + () => runGlobalMiddlewareServerFnLoop(handler, context), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-route (solid)', + () => runGlobalMiddlewareServerRouteLoop(handler), + globalMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-fn.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-fn.bench.ts deleted file mode 100644 index 915507ef9f..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-fn.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerFnLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-fn (solid)', async () => - runGlobalMiddlewareServerFnLoop(handler, context), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-0-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-0-middleware.bench.ts deleted file mode 100644 index a791145935..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-0-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 0 middleware (solid)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 0), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-1-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-1-middleware.bench.ts deleted file mode 100644 index 1baab0f344..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-1-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 1 middleware (solid)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 1), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-2-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-2-middleware.bench.ts deleted file mode 100644 index d6fde20764..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route-2-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 2 middlewares (solid)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 2), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route.bench.ts b/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route.bench.ts deleted file mode 100644 index 558ebeb9a4..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/solid/speed.global-mw-server-route.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 3 middlewares (solid)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 3), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/global-middleware/solid/src/routeTree.gen.ts index 65f7fa5848..28d816525e 100644 --- a/benchmarks/ssr/scenarios/global-middleware/solid/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/global-middleware/solid/src/routeTree.gen.ts @@ -10,8 +10,8 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as PageIdRouteImport } from './routes/page.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as ApiPingIdRouteImport } from './routes/api.ping.$id' const IndexRoute = IndexRouteImport.update({ @@ -19,16 +19,16 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const PageIdRoute = PageIdRouteImport.update({ id: '/page/$id', path: '/page/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) const ApiPingIdRoute = ApiPingIdRouteImport.update({ id: '/api/ping/$id', path: '/api/ping/$id', @@ -78,13 +78,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/page/$id': { id: '/page/$id' path: '/page/$id' @@ -92,6 +85,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PageIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } '/api/ping/$id': { id: '/api/ping/$id' path: '/api/ping/$id' diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/src/start.ts b/benchmarks/ssr/scenarios/global-middleware/solid/src/start.ts index a6f6214b82..8c4168d574 100644 --- a/benchmarks/ssr/scenarios/global-middleware/solid/src/start.ts +++ b/benchmarks/ssr/scenarios/global-middleware/solid/src/start.ts @@ -1,5 +1,4 @@ import { createMiddleware, createStart } from '@tanstack/solid-start' -import { getRequestMiddlewareCount } from '../../shared' import type { GlobalMiddlewareContext } from '../../shared' function appendTrace( @@ -49,13 +48,6 @@ const requestMiddlewareC = createMiddleware({ type: 'request' }).server( }, ) -const requestMiddlewareSets: Array> = [ - [], - [requestMiddlewareA], - [requestMiddlewareA, requestMiddlewareB], - [requestMiddlewareA, requestMiddlewareB, requestMiddlewareC], -] - const functionMiddlewareA = createMiddleware({ type: 'function' }).server( ({ next, context }) => { const ctx = (context ?? {}) as GlobalMiddlewareContext @@ -83,6 +75,10 @@ const functionMiddlewareB = createMiddleware({ type: 'function' }).server( ) export const startInstance = createStart(() => ({ - requestMiddleware: requestMiddlewareSets[getRequestMiddlewareCount()], + requestMiddleware: [ + requestMiddlewareA, + requestMiddlewareB, + requestMiddlewareC, + ], functionMiddleware: [functionMiddlewareA, functionMiddlewareB], })) diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/tsconfig.json b/benchmarks/ssr/scenarios/global-middleware/solid/tsconfig.json index dce3ceae30..374f8048ef 100644 --- a/benchmarks/ssr/scenarios/global-middleware/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/global-middleware/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared.ts", diff --git a/benchmarks/ssr/scenarios/global-middleware/solid/vite.config.ts b/benchmarks/ssr/scenarios/global-middleware/solid/vite.config.ts index f3597b25d5..e8af6933ed 100644 --- a/benchmarks/ssr/scenarios/global-middleware/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/global-middleware/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr global-middleware (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.bench.ts index 9660f29d07..0b3ed9dd7a 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/global-middleware/vue/speed.bench.ts @@ -1,8 +1,10 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertGlobalMiddlewareScenario, globalMiddlewareBenchOptions, runGlobalMiddlewareDocumentLoop, + runGlobalMiddlewareServerFnLoop, + runGlobalMiddlewareServerRouteLoop, setupGlobalMiddlewareBench, } from '../bench' import type { StartRequestHandler } from '../bench' @@ -14,12 +16,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupGlobalMiddlewareBench(handler) await assertGlobalMiddlewareScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr global-mw document (vue)', async () => - runGlobalMiddlewareDocumentLoop(handler), - ).run(globalMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr global-mw document (vue)', + () => runGlobalMiddlewareDocumentLoop(handler), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-fn (vue)', + () => runGlobalMiddlewareServerFnLoop(handler, context), + globalMiddlewareBenchOptions, + ) + + bench( + 'ssr global-mw server-route (vue)', + () => runGlobalMiddlewareServerRouteLoop(handler), + globalMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-fn.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-fn.bench.ts deleted file mode 100644 index 297e8cee7b..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-fn.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerFnLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-fn (vue)', async () => - runGlobalMiddlewareServerFnLoop(handler, context), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-0-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-0-middleware.bench.ts deleted file mode 100644 index d023dd458a..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-0-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 0 middleware (vue)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 0), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-1-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-1-middleware.bench.ts deleted file mode 100644 index 5018163631..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-1-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 1 middleware (vue)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 1), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-2-middleware.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-2-middleware.bench.ts deleted file mode 100644 index f9abd8eb60..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route-2-middleware.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 2 middlewares (vue)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 2), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route.bench.ts b/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route.bench.ts deleted file mode 100644 index adcec3019f..0000000000 --- a/benchmarks/ssr/scenarios/global-middleware/vue/speed.global-mw-server-route.bench.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { test } from 'vitest' -import { - assertGlobalMiddlewareScenario, - globalMiddlewareBenchOptions, - runGlobalMiddlewareServerRouteLoop, - setupGlobalMiddlewareBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} -const context = await setupGlobalMiddlewareBench(handler) - -await assertGlobalMiddlewareScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr global-mw server-route 3 middlewares (vue)', async () => - runGlobalMiddlewareServerRouteLoop(handler, 3), - ).run(globalMiddlewareBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/global-middleware/vue/src/routeTree.gen.ts index 3118848e4d..aae3329420 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/global-middleware/vue/src/routeTree.gen.ts @@ -10,8 +10,8 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as PageIdRouteImport } from './routes/page.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as ApiPingIdRouteImport } from './routes/api.ping.$id' const IndexRoute = IndexRouteImport.update({ @@ -19,16 +19,16 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const PageIdRoute = PageIdRouteImport.update({ id: '/page/$id', path: '/page/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) const ApiPingIdRoute = ApiPingIdRouteImport.update({ id: '/api/ping/$id', path: '/api/ping/$id', @@ -78,13 +78,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/page/$id': { id: '/page/$id' path: '/page/$id' @@ -92,6 +85,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PageIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } '/api/ping/$id': { id: '/api/ping/$id' path: '/api/ping/$id' diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/src/routes/page.$id.tsx b/benchmarks/ssr/scenarios/global-middleware/vue/src/routes/page.$id.tsx index 6e837ef0a0..2010d0cd2a 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/src/routes/page.$id.tsx +++ b/benchmarks/ssr/scenarios/global-middleware/vue/src/routes/page.$id.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { getGlobalMiddlewareContext, @@ -6,14 +5,6 @@ import { type GlobalMiddlewareContext, } from '../../../shared' -const PageComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () =>
{data.value.marker}
- }, -}) - export const Route = createFileRoute('/page/$id')({ beforeLoad: ({ serverContext }) => ({ globalMiddlewareContext: (serverContext ?? {}) as GlobalMiddlewareContext, @@ -23,3 +14,9 @@ export const Route = createFileRoute('/page/$id')({ }), component: PageComponent, }) + +function PageComponent() { + const data = Route.useLoaderData() + + return
{data.value.marker}
+} diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/src/start.ts b/benchmarks/ssr/scenarios/global-middleware/vue/src/start.ts index 6e4eb2c5ef..dc3f142e27 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/src/start.ts +++ b/benchmarks/ssr/scenarios/global-middleware/vue/src/start.ts @@ -1,5 +1,4 @@ import { createMiddleware, createStart } from '@tanstack/vue-start' -import { getRequestMiddlewareCount } from '../../shared' import type { GlobalMiddlewareContext } from '../../shared' function appendTrace( @@ -49,13 +48,6 @@ const requestMiddlewareC = createMiddleware({ type: 'request' }).server( }, ) -const requestMiddlewareSets: Array> = [ - [], - [requestMiddlewareA], - [requestMiddlewareA, requestMiddlewareB], - [requestMiddlewareA, requestMiddlewareB, requestMiddlewareC], -] - const functionMiddlewareA = createMiddleware({ type: 'function' }).server( ({ next, context }) => { const ctx = (context ?? {}) as GlobalMiddlewareContext @@ -83,6 +75,10 @@ const functionMiddlewareB = createMiddleware({ type: 'function' }).server( ) export const startInstance = createStart(() => ({ - requestMiddleware: requestMiddlewareSets[getRequestMiddlewareCount()], + requestMiddleware: [ + requestMiddlewareA, + requestMiddlewareB, + requestMiddlewareC, + ], functionMiddleware: [functionMiddlewareA, functionMiddlewareB], })) diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/tsconfig.json b/benchmarks/ssr/scenarios/global-middleware/vue/tsconfig.json index 56800fd29e..70d62162e6 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/global-middleware/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared.ts", diff --git a/benchmarks/ssr/scenarios/global-middleware/vue/vite.config.ts b/benchmarks/ssr/scenarios/global-middleware/vue/vite.config.ts index 8e29c5ee98..6dd55adab3 100644 --- a/benchmarks/ssr/scenarios/global-middleware/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/global-middleware/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr global-middleware (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/head/react/speed.bench.ts b/benchmarks/ssr/scenarios/head/react/speed.bench.ts index f75008506e..19158b32a9 100644 --- a/benchmarks/ssr/scenarios/head/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/head/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertHeadSanity, headBenchOptions, runHeadLoop } from '../shared' import type { StartRequestHandler } from '../shared' @@ -12,8 +12,6 @@ const { default: handler } = (await import( await assertHeadSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr head (react)', async () => runHeadLoop(handler)).run( - headBenchOptions, - ) +describe('ssr', () => { + bench('ssr head (react)', () => runHeadLoop(handler), headBenchOptions) }) diff --git a/benchmarks/ssr/scenarios/head/react/vite.config.ts b/benchmarks/ssr/scenarios/head/react/vite.config.ts index d24fc850a1..56d69443ac 100644 --- a/benchmarks/ssr/scenarios/head/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/head/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr head (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/head/shared.ts b/benchmarks/ssr/scenarios/head/shared.ts index 033ca47c22..26e084b156 100644 --- a/benchmarks/ssr/scenarios/head/shared.ts +++ b/benchmarks/ssr/scenarios/head/shared.ts @@ -7,7 +7,7 @@ export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad const origin = 'http://localhost' const dedupedMetaName = 'head-benchmark-shared' -const headLoopTotalRequests = 32 +const headLoopIterations = 25 const requestInit = { method: 'GET', @@ -32,8 +32,7 @@ function buildHeadRequest(random: () => number) { export function runHeadLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: headLoopTotalRequests, + iterations: headLoopIterations, buildRequest: buildHeadRequest, }) } diff --git a/benchmarks/ssr/scenarios/head/solid/speed.bench.ts b/benchmarks/ssr/scenarios/head/solid/speed.bench.ts index 333e2f091b..ad5bf52809 100644 --- a/benchmarks/ssr/scenarios/head/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/head/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertHeadSanity, headBenchOptions, runHeadLoop } from '../shared' import type { StartRequestHandler } from '../shared' @@ -12,8 +12,6 @@ const { default: handler } = (await import( await assertHeadSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr head (solid)', async () => runHeadLoop(handler)).run( - headBenchOptions, - ) +describe('ssr', () => { + bench('ssr head (solid)', () => runHeadLoop(handler), headBenchOptions) }) diff --git a/benchmarks/ssr/scenarios/head/solid/tsconfig.json b/benchmarks/ssr/scenarios/head/solid/tsconfig.json index b1806caa67..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/head/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/head/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/head/solid/vite.config.ts b/benchmarks/ssr/scenarios/head/solid/vite.config.ts index 7a870bbd77..f7b97a44d1 100644 --- a/benchmarks/ssr/scenarios/head/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/head/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr head (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/head/vue/speed.bench.ts b/benchmarks/ssr/scenarios/head/vue/speed.bench.ts index 936735a909..5d8243b588 100644 --- a/benchmarks/ssr/scenarios/head/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/head/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertHeadSanity, headBenchOptions, runHeadLoop } from '../shared' import type { StartRequestHandler } from '../shared' @@ -12,8 +12,6 @@ const { default: handler } = (await import( await assertHeadSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr head (vue)', async () => runHeadLoop(handler)).run( - headBenchOptions, - ) +describe('ssr', () => { + bench('ssr head (vue)', () => runHeadLoop(handler), headBenchOptions) }) diff --git a/benchmarks/ssr/scenarios/head/vue/vite.config.ts b/benchmarks/ssr/scenarios/head/vue/vite.config.ts index 1434d26069..e020012560 100644 --- a/benchmarks/ssr/scenarios/head/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/head/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr head (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/loaders/react/speed.bench.ts b/benchmarks/ssr/scenarios/loaders/react/speed.bench.ts index 7acd43c635..a5eecfc648 100644 --- a/benchmarks/ssr/scenarios/loaders/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/loaders/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertLoadersSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertLoadersSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr loaders (react)', async () => runLoadersLoop(handler)).run( - benchOptions, - ) +describe('ssr', () => { + bench('ssr loaders (react)', () => runLoadersLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/loaders/react/vite.config.ts b/benchmarks/ssr/scenarios/loaders/react/vite.config.ts index e761426c84..5c4dcaa40d 100644 --- a/benchmarks/ssr/scenarios/loaders/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/loaders/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr loaders (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/loaders/shared-bench.ts b/benchmarks/ssr/scenarios/loaders/shared-bench.ts index f52c51dccd..2b1e9b4749 100644 --- a/benchmarks/ssr/scenarios/loaders/shared-bench.ts +++ b/benchmarks/ssr/scenarios/loaders/shared-bench.ts @@ -5,7 +5,7 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const loadersLoopTotalRequests = 16 +const loadersLoopIterations = 15 const requestInit = { method: 'GET', @@ -68,8 +68,7 @@ export const benchOptions = { export function runLoadersLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: loadersLoopTotalRequests, + iterations: loadersLoopIterations, buildRequest: buildLoaderRequest, }) } diff --git a/benchmarks/ssr/scenarios/loaders/solid/speed.bench.ts b/benchmarks/ssr/scenarios/loaders/solid/speed.bench.ts index 7fc8d88389..7b3f6247ea 100644 --- a/benchmarks/ssr/scenarios/loaders/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/loaders/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertLoadersSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertLoadersSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr loaders (solid)', async () => runLoadersLoop(handler)).run( - benchOptions, - ) +describe('ssr', () => { + bench('ssr loaders (solid)', () => runLoadersLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/loaders/solid/tsconfig.json b/benchmarks/ssr/scenarios/loaders/solid/tsconfig.json index 47f264ba4f..261257c6e0 100644 --- a/benchmarks/ssr/scenarios/loaders/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/loaders/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/loaders/solid/vite.config.ts b/benchmarks/ssr/scenarios/loaders/solid/vite.config.ts index 64f52159c3..527ca977c5 100644 --- a/benchmarks/ssr/scenarios/loaders/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/loaders/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr loaders (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/loaders/vue/speed.bench.ts b/benchmarks/ssr/scenarios/loaders/vue/speed.bench.ts index 321350d98c..fb39e0652c 100644 --- a/benchmarks/ssr/scenarios/loaders/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/loaders/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertLoadersSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertLoadersSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr loaders (vue)', async () => runLoadersLoop(handler)).run( - benchOptions, - ) +describe('ssr', () => { + bench('ssr loaders (vue)', () => runLoadersLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.$c.tsx b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.$c.tsx index 0a52b9c542..de927a8092 100644 --- a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.$c.tsx +++ b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.$c.tsx @@ -1,24 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../shared-data' -const LevelCComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.meta.label}

-
    - {data.value.items.slice(0, 10).map((item) => ( -
  • {item.name}
  • - ))} -
-
- ) - }, -}) - export const Route = createFileRoute('/$a/$b/$c')({ beforeLoad: ({ params, context }) => { void context @@ -33,3 +15,18 @@ export const Route = createFileRoute('/$a/$b/$c')({ }, component: LevelCComponent, }) + +function LevelCComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.meta.label}

+
    + {data.value.items.slice(0, 10).map((item) => ( +
  • {item.name}
  • + ))} +
+
+ ) +} diff --git a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.tsx b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.tsx index f3943d58e7..e1a5f52ae2 100644 --- a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.tsx +++ b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.$b.tsx @@ -1,25 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../shared-data' -const LevelBComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.meta.label}

-
    - {data.value.items.slice(0, 10).map((item) => ( -
  • {item.name}
  • - ))} -
- -
- ) - }, -}) - export const Route = createFileRoute('/$a/$b')({ beforeLoad: ({ params, context }) => { void context @@ -34,3 +15,19 @@ export const Route = createFileRoute('/$a/$b')({ }, component: LevelBComponent, }) + +function LevelBComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.meta.label}

+
    + {data.value.items.slice(0, 10).map((item) => ( +
  • {item.name}
  • + ))} +
+ +
+ ) +} diff --git a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.tsx b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.tsx index 63bb36949f..b197a8edf1 100644 --- a/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.tsx +++ b/benchmarks/ssr/scenarios/loaders/vue/src/routes/$a.tsx @@ -1,25 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../shared-data' -const LevelAComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.meta.label}

-
    - {data.value.items.slice(0, 10).map((item) => ( -
  • {item.name}
  • - ))} -
- -
- ) - }, -}) - export const Route = createFileRoute('/$a')({ beforeLoad: ({ params, context }) => { void context @@ -34,3 +15,19 @@ export const Route = createFileRoute('/$a')({ }, component: LevelAComponent, }) + +function LevelAComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.meta.label}

+
    + {data.value.items.slice(0, 10).map((item) => ( +
  • {item.name}
  • + ))} +
+ +
+ ) +} diff --git a/benchmarks/ssr/scenarios/loaders/vue/vite.config.ts b/benchmarks/ssr/scenarios/loaders/vue/vite.config.ts index 92bf3e60f0..b7a4d1b48b 100644 --- a/benchmarks/ssr/scenarios/loaders/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/loaders/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr loaders (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/rewrites/react/speed.bench.ts b/benchmarks/ssr/scenarios/rewrites/react/speed.bench.ts index 920186c5db..d7025ce0f9 100644 --- a/benchmarks/ssr/scenarios/rewrites/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/rewrites/react/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertRewriteScenario, rewriteBenchOptions, runRewriteLocalizedLoop, + runRewritePassthroughLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertRewriteScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr rewrite localized (react)', async () => - runRewriteLocalizedLoop(handler), - ).run(rewriteBenchOptions) +describe('ssr', () => { + bench( + 'ssr rewrite localized (react)', + () => runRewriteLocalizedLoop(handler), + rewriteBenchOptions, + ) + bench( + 'ssr rewrite passthrough (react)', + () => runRewritePassthroughLoop(handler), + rewriteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/rewrites/react/speed.rewrite-passthrough.bench.ts b/benchmarks/ssr/scenarios/rewrites/react/speed.rewrite-passthrough.bench.ts deleted file mode 100644 index f5d09089a6..0000000000 --- a/benchmarks/ssr/scenarios/rewrites/react/speed.rewrite-passthrough.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertRewriteScenario, - rewriteBenchOptions, - runRewritePassthroughLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertRewriteScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr rewrite passthrough (react)', async () => - runRewritePassthroughLoop(handler), - ).run(rewriteBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/rewrites/react/tsconfig.json b/benchmarks/ssr/scenarios/rewrites/react/tsconfig.json index cf14e1d440..91027bfc88 100644 --- a/benchmarks/ssr/scenarios/rewrites/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/rewrites/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/rewrites/react/vite.config.ts b/benchmarks/ssr/scenarios/rewrites/react/vite.config.ts index 7b20340ec6..5bf098275b 100644 --- a/benchmarks/ssr/scenarios/rewrites/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/rewrites/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -26,8 +25,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr rewrites (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/rewrites/shared.ts b/benchmarks/ssr/scenarios/rewrites/shared.ts index 9b29bc0249..a8f2e3279b 100644 --- a/benchmarks/ssr/scenarios/rewrites/shared.ts +++ b/benchmarks/ssr/scenarios/rewrites/shared.ts @@ -6,8 +6,8 @@ export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad const origin = 'http://localhost' -const localizedLoopTotalRequests = 32 -const passthroughLoopTotalRequests = 32 +const localizedLoopIterations = 25 +const passthroughLoopIterations = 25 const requestInit = { method: 'GET', @@ -39,8 +39,7 @@ function buildPassthroughRequest(random: () => number) { export function runRewriteLocalizedLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: localizedLoopTotalRequests, + iterations: localizedLoopIterations, buildRequest: buildLocalizedRequest, }) } @@ -48,8 +47,7 @@ export function runRewriteLocalizedLoop(handler: StartRequestHandler) { export function runRewritePassthroughLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: passthroughLoopTotalRequests, + iterations: passthroughLoopIterations, buildRequest: buildPassthroughRequest, }) } diff --git a/benchmarks/ssr/scenarios/rewrites/solid/speed.bench.ts b/benchmarks/ssr/scenarios/rewrites/solid/speed.bench.ts index 488fb2ca52..7aa4bd0b18 100644 --- a/benchmarks/ssr/scenarios/rewrites/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/rewrites/solid/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertRewriteScenario, rewriteBenchOptions, runRewriteLocalizedLoop, + runRewritePassthroughLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertRewriteScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr rewrite localized (solid)', async () => - runRewriteLocalizedLoop(handler), - ).run(rewriteBenchOptions) +describe('ssr', () => { + bench( + 'ssr rewrite localized (solid)', + () => runRewriteLocalizedLoop(handler), + rewriteBenchOptions, + ) + bench( + 'ssr rewrite passthrough (solid)', + () => runRewritePassthroughLoop(handler), + rewriteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/rewrites/solid/speed.rewrite-passthrough.bench.ts b/benchmarks/ssr/scenarios/rewrites/solid/speed.rewrite-passthrough.bench.ts deleted file mode 100644 index 7b86e2ba11..0000000000 --- a/benchmarks/ssr/scenarios/rewrites/solid/speed.rewrite-passthrough.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertRewriteScenario, - rewriteBenchOptions, - runRewritePassthroughLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertRewriteScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr rewrite passthrough (solid)', async () => - runRewritePassthroughLoop(handler), - ).run(rewriteBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/rewrites/solid/tsconfig.json b/benchmarks/ssr/scenarios/rewrites/solid/tsconfig.json index 42c3a2160f..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/rewrites/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/rewrites/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/rewrites/solid/vite.config.ts b/benchmarks/ssr/scenarios/rewrites/solid/vite.config.ts index 963fe7132b..ae9f925cb7 100644 --- a/benchmarks/ssr/scenarios/rewrites/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/rewrites/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -26,8 +25,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr rewrites (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/rewrites/vue/speed.bench.ts b/benchmarks/ssr/scenarios/rewrites/vue/speed.bench.ts index 5fd4da9d3e..0bbd896d71 100644 --- a/benchmarks/ssr/scenarios/rewrites/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/rewrites/vue/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertRewriteScenario, rewriteBenchOptions, runRewriteLocalizedLoop, + runRewritePassthroughLoop, + type StartRequestHandler, } from '../shared' -import type { StartRequestHandler } from '../shared' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,15 @@ const { default: handler } = (await import( await assertRewriteScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr rewrite localized (vue)', async () => - runRewriteLocalizedLoop(handler), - ).run(rewriteBenchOptions) +describe('ssr', () => { + bench( + 'ssr rewrite localized (vue)', + () => runRewriteLocalizedLoop(handler), + rewriteBenchOptions, + ) + bench( + 'ssr rewrite passthrough (vue)', + () => runRewritePassthroughLoop(handler), + rewriteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/rewrites/vue/speed.rewrite-passthrough.bench.ts b/benchmarks/ssr/scenarios/rewrites/vue/speed.rewrite-passthrough.bench.ts deleted file mode 100644 index f3664b5f21..0000000000 --- a/benchmarks/ssr/scenarios/rewrites/vue/speed.rewrite-passthrough.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertRewriteScenario, - rewriteBenchOptions, - runRewritePassthroughLoop, -} from '../shared' -import type { StartRequestHandler } from '../shared' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertRewriteScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr rewrite passthrough (vue)', async () => - runRewritePassthroughLoop(handler), - ).run(rewriteBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.$b.tsx b/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.$b.tsx index 3c9de1806e..3fdb7014f4 100644 --- a/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.$b.tsx +++ b/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.$b.tsx @@ -1,41 +1,5 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' -const LeafComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

- rewrite-leaf {data.value.a} {data.value.b} -

- - leaf-self-link - - - leaf-next-link - - - leaf-parent-link - -
- ) - }, -}) - export const Route = createFileRoute('/p/$a/$b')({ loader: ({ params }) => ({ a: params.a, @@ -44,3 +8,32 @@ export const Route = createFileRoute('/p/$a/$b')({ }), component: LeafComponent, }) + +function LeafComponent() { + const data = Route.useLoaderData() + + return ( +
+

+ rewrite-leaf {data.value.a} {data.value.b} +

+ + leaf-self-link + + + leaf-next-link + + + leaf-parent-link + +
+ ) +} diff --git a/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.tsx b/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.tsx index 9702ebedd7..acb74aabbd 100644 --- a/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.tsx +++ b/benchmarks/ssr/scenarios/rewrites/vue/src/routes/p.$a.tsx @@ -1,26 +1,5 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' -const ParentComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

rewrite-parent {data.value.a}

- - parent-branch-link - - -
- ) - }, -}) - export const Route = createFileRoute('/p/$a')({ loader: ({ params }) => ({ a: params.a, @@ -28,3 +7,21 @@ export const Route = createFileRoute('/p/$a')({ }), component: ParentComponent, }) + +function ParentComponent() { + const data = Route.useLoaderData() + + return ( +
+

rewrite-parent {data.value.a}

+ + parent-branch-link + + +
+ ) +} diff --git a/benchmarks/ssr/scenarios/rewrites/vue/tsconfig.json b/benchmarks/ssr/scenarios/rewrites/vue/tsconfig.json index 08c94853f4..4fe3ccecb1 100644 --- a/benchmarks/ssr/scenarios/rewrites/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/rewrites/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/rewrites/vue/vite.config.ts b/benchmarks/ssr/scenarios/rewrites/vue/vite.config.ts index 22399ec6b2..f3b69dfe20 100644 --- a/benchmarks/ssr/scenarios/rewrites/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/rewrites/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -26,8 +25,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr rewrites (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/selective-ssr/react/speed.bench.ts b/benchmarks/ssr/scenarios/selective-ssr/react/speed.bench.ts index ba6bd4a61d..e0e8a0e3c4 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSelectiveSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertSelectiveSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr selective (react)', async () => - runSelectiveLoop(handler), - ).run(benchOptions) +describe('ssr', () => { + bench('ssr selective (react)', () => runSelectiveLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/selective-ssr/react/vite.config.ts b/benchmarks/ssr/scenarios/selective-ssr/react/vite.config.ts index 70c67cff81..03ff77aa7b 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr selective-ssr (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/selective-ssr/shared-bench.ts b/benchmarks/ssr/scenarios/selective-ssr/shared-bench.ts index 5b2530ccab..bf97d5d63e 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/shared-bench.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/shared-bench.ts @@ -5,7 +5,7 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const selectiveLoopTotalRequests = 32 +const selectiveLoopIterations = 20 const requestInit = { method: 'GET', @@ -88,8 +88,7 @@ export const benchOptions = { export function runSelectiveLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: selectiveLoopTotalRequests, + iterations: selectiveLoopIterations, buildRequest: buildSelectiveRequest, }) } diff --git a/benchmarks/ssr/scenarios/selective-ssr/solid/speed.bench.ts b/benchmarks/ssr/scenarios/selective-ssr/solid/speed.bench.ts index 76265397ab..6a2803d45f 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSelectiveSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertSelectiveSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr selective (solid)', async () => - runSelectiveLoop(handler), - ).run(benchOptions) +describe('ssr', () => { + bench('ssr selective (solid)', () => runSelectiveLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/selective-ssr/solid/tsconfig.json b/benchmarks/ssr/scenarios/selective-ssr/solid/tsconfig.json index f386c3f996..0ec86d47f9 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/selective-ssr/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/selective-ssr/solid/vite.config.ts b/benchmarks/ssr/scenarios/selective-ssr/solid/vite.config.ts index 2c0042c1ed..09b42f00e6 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr selective-ssr (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/selective-ssr/vue/speed.bench.ts b/benchmarks/ssr/scenarios/selective-ssr/vue/speed.bench.ts index ff60341b27..f3082a102d 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSelectiveSanity, benchOptions, @@ -16,8 +16,6 @@ const { default: handler } = (await import( await assertSelectiveSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr selective (vue)', async () => runSelectiveLoop(handler)).run( - benchOptions, - ) +describe('ssr', () => { + bench('ssr selective (vue)', () => runSelectiveLoop(handler), benchOptions) }) diff --git a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.$c.tsx b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.$c.tsx index 8ae7d468f1..46d7541c2b 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.$c.tsx +++ b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.$c.tsx @@ -1,21 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../../loaders/shared-data' -const LevelCComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - const params = Route.useParams() - - return () => ( -
-

{`csr-rendered-${params.value.c}`}

-

{data.value.marker}

-
- ) - }, -}) - export const Route = createFileRoute('/mix/$a/$b/$c')({ ssr: false, loader: async ({ params }) => { @@ -26,3 +11,15 @@ export const Route = createFileRoute('/mix/$a/$b/$c')({ }, component: LevelCComponent, }) + +function LevelCComponent() { + const data = Route.useLoaderData() + const params = Route.useParams() + + return ( +
+

{`csr-rendered-${params.value.c}`}

+

{data.value.marker}

+
+ ) +} diff --git a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.tsx b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.tsx index c10751489e..bc685478cc 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.tsx +++ b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.$b.tsx @@ -1,22 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../../loaders/shared-data' -const LevelBComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - const params = Route.useParams() - - return () => ( -
-

{`data-only-rendered-${params.value.b}`}

-

{data.value.marker}

- -
- ) - }, -}) - export const Route = createFileRoute('/mix/$a/$b')({ ssr: 'data-only', loader: async ({ params }) => { @@ -27,3 +11,16 @@ export const Route = createFileRoute('/mix/$a/$b')({ }, component: LevelBComponent, }) + +function LevelBComponent() { + const data = Route.useLoaderData() + const params = Route.useParams() + + return ( +
+

{`data-only-rendered-${params.value.b}`}

+

{data.value.marker}

+ +
+ ) +} diff --git a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.tsx b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.tsx index c96165c6d6..8ab4c7d54d 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.tsx +++ b/benchmarks/ssr/scenarios/selective-ssr/vue/src/routes/mix.$a.tsx @@ -1,22 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { makeLevelData } from '../../../../loaders/shared-data' -const LevelAComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - const params = Route.useParams() - - return () => ( -
-

{`level-a-rendered-${params.value.a}`}

-

{data.value.items[0]?.name}

- -
- ) - }, -}) - export const Route = createFileRoute('/mix/$a')({ ssr: true, loader: async ({ params }) => { @@ -24,3 +8,16 @@ export const Route = createFileRoute('/mix/$a')({ }, component: LevelAComponent, }) + +function LevelAComponent() { + const data = Route.useLoaderData() + const params = Route.useParams() + + return ( +
+

{`level-a-rendered-${params.value.a}`}

+

{data.value.items[0]?.name}

+ +
+ ) +} diff --git a/benchmarks/ssr/scenarios/selective-ssr/vue/vite.config.ts b/benchmarks/ssr/scenarios/selective-ssr/vue/vite.config.ts index 09bb36cb0b..76299a67fd 100644 --- a/benchmarks/ssr/scenarios/selective-ssr/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/selective-ssr/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr selective-ssr (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/serialization/react/speed.bench.ts b/benchmarks/ssr/scenarios/serialization/react/speed.bench.ts index 8be07d2643..95c91f4529 100644 --- a/benchmarks/ssr/scenarios/serialization/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/serialization/react/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSerializationScenario, + runPlainSerializationLoop, runRichSerializationLoop, serializationBenchOptions, + type StartRequestHandler, } from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,16 @@ const { default: handler } = (await import( await assertSerializationScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate rich types (react)', async () => - runRichSerializationLoop(handler), - ).run(serializationBenchOptions) +describe('ssr', () => { + bench( + 'ssr dehydrate rich types (react)', + () => runRichSerializationLoop(handler), + serializationBenchOptions, + ) + + bench( + 'ssr dehydrate plain control (react)', + () => runPlainSerializationLoop(handler), + serializationBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/serialization/react/speed.dehydrate-plain-control.bench.ts b/benchmarks/ssr/scenarios/serialization/react/speed.dehydrate-plain-control.bench.ts deleted file mode 100644 index c70fddc6c4..0000000000 --- a/benchmarks/ssr/scenarios/serialization/react/speed.dehydrate-plain-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertSerializationScenario, - runPlainSerializationLoop, - serializationBenchOptions, -} from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertSerializationScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate plain control (react)', async () => - runPlainSerializationLoop(handler), - ).run(serializationBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/serialization/react/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/serialization/react/src/routeTree.gen.ts index 49bdbd036b..92bf0bb732 100644 --- a/benchmarks/ssr/scenarios/serialization/react/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/serialization/react/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 PlainIdRouteImport } from './routes/plain.$id' import { Route as RichIdRouteImport } from './routes/rich.$id' +import { Route as PlainIdRouteImport } from './routes/plain.$id' -const PlainIdRoute = PlainIdRouteImport.update({ - id: '/plain/$id', - path: '/plain/$id', - getParentRoute: () => rootRouteImport, -} as any) const RichIdRoute = RichIdRouteImport.update({ id: '/rich/$id', path: '/rich/$id', getParentRoute: () => rootRouteImport, } as any) +const PlainIdRoute = PlainIdRouteImport.update({ + id: '/plain/$id', + path: '/plain/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/plain/$id': typeof PlainIdRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/plain/$id': { - id: '/plain/$id' - path: '/plain/$id' - fullPath: '/plain/$id' - preLoaderRoute: typeof PlainIdRouteImport - parentRoute: typeof rootRouteImport - } '/rich/$id': { id: '/rich/$id' path: '/rich/$id' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RichIdRouteImport parentRoute: typeof rootRouteImport } + '/plain/$id': { + id: '/plain/$id' + path: '/plain/$id' + fullPath: '/plain/$id' + preLoaderRoute: typeof PlainIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/serialization/react/tsconfig.json b/benchmarks/ssr/scenarios/serialization/react/tsconfig.json index 59499356d6..9bfd9bcf62 100644 --- a/benchmarks/ssr/scenarios/serialization/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/serialization/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared-bench.ts", diff --git a/benchmarks/ssr/scenarios/serialization/react/vite.config.ts b/benchmarks/ssr/scenarios/serialization/react/vite.config.ts index 64568ccb7e..6280d87579 100644 --- a/benchmarks/ssr/scenarios/serialization/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/serialization/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr serialization (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/serialization/shared-bench.ts b/benchmarks/ssr/scenarios/serialization/shared-bench.ts index 25ed478f03..a39f35dc75 100644 --- a/benchmarks/ssr/scenarios/serialization/shared-bench.ts +++ b/benchmarks/ssr/scenarios/serialization/shared-bench.ts @@ -5,8 +5,8 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const richSerializationLoopTotalRequests = 32 -const plainSerializationLoopTotalRequests = 32 +const richSerializationLoopIterations = 30 +const plainSerializationLoopIterations = 30 const requestInit = { method: 'GET', @@ -89,8 +89,7 @@ export const serializationBenchOptions = { export function runRichSerializationLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: richSerializationLoopTotalRequests, + iterations: richSerializationLoopIterations, buildRequest: (random, index) => buildSerializationRequest('rich', random, index), }) @@ -99,8 +98,7 @@ export function runRichSerializationLoop(handler: StartRequestHandler) { export function runPlainSerializationLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: plainSerializationLoopTotalRequests, + iterations: plainSerializationLoopIterations, buildRequest: (random, index) => buildSerializationRequest('plain', random, index), }) diff --git a/benchmarks/ssr/scenarios/serialization/solid/speed.bench.ts b/benchmarks/ssr/scenarios/serialization/solid/speed.bench.ts index 70bda8c7af..a939cae51f 100644 --- a/benchmarks/ssr/scenarios/serialization/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/serialization/solid/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSerializationScenario, + runPlainSerializationLoop, runRichSerializationLoop, serializationBenchOptions, + type StartRequestHandler, } from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,16 @@ const { default: handler } = (await import( await assertSerializationScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate rich types (solid)', async () => - runRichSerializationLoop(handler), - ).run(serializationBenchOptions) +describe('ssr', () => { + bench( + 'ssr dehydrate rich types (solid)', + () => runRichSerializationLoop(handler), + serializationBenchOptions, + ) + + bench( + 'ssr dehydrate plain control (solid)', + () => runPlainSerializationLoop(handler), + serializationBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/serialization/solid/speed.dehydrate-plain-control.bench.ts b/benchmarks/ssr/scenarios/serialization/solid/speed.dehydrate-plain-control.bench.ts deleted file mode 100644 index d7ccb16f6f..0000000000 --- a/benchmarks/ssr/scenarios/serialization/solid/speed.dehydrate-plain-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertSerializationScenario, - runPlainSerializationLoop, - serializationBenchOptions, -} from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertSerializationScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate plain control (solid)', async () => - runPlainSerializationLoop(handler), - ).run(serializationBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/serialization/solid/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/serialization/solid/src/routeTree.gen.ts index b9e25f918e..69b63cffe9 100644 --- a/benchmarks/ssr/scenarios/serialization/solid/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/serialization/solid/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 PlainIdRouteImport } from './routes/plain.$id' import { Route as RichIdRouteImport } from './routes/rich.$id' +import { Route as PlainIdRouteImport } from './routes/plain.$id' -const PlainIdRoute = PlainIdRouteImport.update({ - id: '/plain/$id', - path: '/plain/$id', - getParentRoute: () => rootRouteImport, -} as any) const RichIdRoute = RichIdRouteImport.update({ id: '/rich/$id', path: '/rich/$id', getParentRoute: () => rootRouteImport, } as any) +const PlainIdRoute = PlainIdRouteImport.update({ + id: '/plain/$id', + path: '/plain/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/plain/$id': typeof PlainIdRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/plain/$id': { - id: '/plain/$id' - path: '/plain/$id' - fullPath: '/plain/$id' - preLoaderRoute: typeof PlainIdRouteImport - parentRoute: typeof rootRouteImport - } '/rich/$id': { id: '/rich/$id' path: '/rich/$id' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RichIdRouteImport parentRoute: typeof rootRouteImport } + '/plain/$id': { + id: '/plain/$id' + path: '/plain/$id' + fullPath: '/plain/$id' + preLoaderRoute: typeof PlainIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/serialization/solid/tsconfig.json b/benchmarks/ssr/scenarios/serialization/solid/tsconfig.json index 3ea91b977f..32185b9e46 100644 --- a/benchmarks/ssr/scenarios/serialization/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/serialization/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared-bench.ts", diff --git a/benchmarks/ssr/scenarios/serialization/solid/vite.config.ts b/benchmarks/ssr/scenarios/serialization/solid/vite.config.ts index db81e2ab74..67df3299e1 100644 --- a/benchmarks/ssr/scenarios/serialization/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/serialization/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr serialization (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/serialization/vue/speed.bench.ts b/benchmarks/ssr/scenarios/serialization/vue/speed.bench.ts index 7f733dd601..ee1e072286 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/serialization/vue/speed.bench.ts @@ -1,10 +1,11 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertSerializationScenario, + runPlainSerializationLoop, runRichSerializationLoop, serializationBenchOptions, + type StartRequestHandler, } from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href @@ -16,8 +17,16 @@ const { default: handler } = (await import( await assertSerializationScenario(handler) -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate rich types (vue)', async () => - runRichSerializationLoop(handler), - ).run(serializationBenchOptions) +describe('ssr', () => { + bench( + 'ssr dehydrate rich types (vue)', + () => runRichSerializationLoop(handler), + serializationBenchOptions, + ) + + bench( + 'ssr dehydrate plain control (vue)', + () => runPlainSerializationLoop(handler), + serializationBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/serialization/vue/speed.dehydrate-plain-control.bench.ts b/benchmarks/ssr/scenarios/serialization/vue/speed.dehydrate-plain-control.bench.ts deleted file mode 100644 index 8efdeb6c79..0000000000 --- a/benchmarks/ssr/scenarios/serialization/vue/speed.dehydrate-plain-control.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertSerializationScenario, - runPlainSerializationLoop, - serializationBenchOptions, -} from '../shared-bench' -import type { StartRequestHandler } from '../shared-bench' - -const appModuleUrl = new URL('./dist/server/server.js', import.meta.url).href - -const { default: handler } = (await import( - /* @vite-ignore */ appModuleUrl -)) as { - default: StartRequestHandler -} - -await assertSerializationScenario(handler) - -test('ssr', async ({ bench }) => { - await bench('ssr dehydrate plain control (vue)', async () => - runPlainSerializationLoop(handler), - ).run(serializationBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/serialization/vue/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/serialization/vue/src/routeTree.gen.ts index cd7b0b449b..02268c2c3c 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/serialization/vue/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 PlainIdRouteImport } from './routes/plain.$id' import { Route as RichIdRouteImport } from './routes/rich.$id' +import { Route as PlainIdRouteImport } from './routes/plain.$id' -const PlainIdRoute = PlainIdRouteImport.update({ - id: '/plain/$id', - path: '/plain/$id', - getParentRoute: () => rootRouteImport, -} as any) const RichIdRoute = RichIdRouteImport.update({ id: '/rich/$id', path: '/rich/$id', getParentRoute: () => rootRouteImport, } as any) +const PlainIdRoute = PlainIdRouteImport.update({ + id: '/plain/$id', + path: '/plain/$id', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/plain/$id': typeof PlainIdRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/plain/$id': { - id: '/plain/$id' - path: '/plain/$id' - fullPath: '/plain/$id' - preLoaderRoute: typeof PlainIdRouteImport - parentRoute: typeof rootRouteImport - } '/rich/$id': { id: '/rich/$id' path: '/rich/$id' @@ -65,6 +58,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RichIdRouteImport parentRoute: typeof rootRouteImport } + '/plain/$id': { + id: '/plain/$id' + path: '/plain/$id' + fullPath: '/plain/$id' + preLoaderRoute: typeof PlainIdRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/serialization/vue/src/routes/plain.$id.tsx b/benchmarks/ssr/scenarios/serialization/vue/src/routes/plain.$id.tsx index 47fdeb971f..d41d123f1f 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/src/routes/plain.$id.tsx +++ b/benchmarks/ssr/scenarios/serialization/vue/src/routes/plain.$id.tsx @@ -1,27 +1,24 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makePlainSerializationData } from '../../../shared-data' -const PlainComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.label}

-

{data.value.createdAt}

-

{data.value.lookup[0]?.[1].label}

-

{data.value.tags[0]}

-

{data.value.count}

-

{data.value.nested[0]?.id}

-

{data.value.points[0]?.label}

-

{data.value.problem.message}

-
- ) - }, -}) - export const Route = createFileRoute('/plain/$id')({ loader: ({ params }) => makePlainSerializationData(params.id), component: PlainComponent, }) + +function PlainComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.label}

+

{data.value.createdAt}

+

{data.value.lookup[0]?.[1].label}

+

{data.value.tags[0]}

+

{data.value.count}

+

{data.value.nested[0]?.id}

+

{data.value.points[0]?.label}

+

{data.value.problem.message}

+
+ ) +} diff --git a/benchmarks/ssr/scenarios/serialization/vue/src/routes/rich.$id.tsx b/benchmarks/ssr/scenarios/serialization/vue/src/routes/rich.$id.tsx index 1ee86cefd3..d50a3f292d 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/src/routes/rich.$id.tsx +++ b/benchmarks/ssr/scenarios/serialization/vue/src/routes/rich.$id.tsx @@ -1,27 +1,24 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { makeRichSerializationData } from '../../../shared-data' -const RichComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
-

{data.value.label}

-

{data.value.createdAt.toISOString()}

-

{data.value.lookup.get('k0')?.label}

-

{Array.from(data.value.tags)[0]}

-

{data.value.count.toString()}

-

{data.value.nested[0]?.id}

-

{data.value.points[0]?.label}

-

{data.value.problem.message}

-
- ) - }, -}) - export const Route = createFileRoute('/rich/$id')({ loader: ({ params }) => makeRichSerializationData(params.id), component: RichComponent, }) + +function RichComponent() { + const data = Route.useLoaderData() + + return ( +
+

{data.value.label}

+

{data.value.createdAt.toISOString()}

+

{data.value.lookup.get('k0')?.label}

+

{Array.from(data.value.tags)[0]}

+

{data.value.count.toString()}

+

{data.value.nested[0]?.id}

+

{data.value.points[0]?.label}

+

{data.value.problem.message}

+
+ ) +} diff --git a/benchmarks/ssr/scenarios/serialization/vue/tsconfig.json b/benchmarks/ssr/scenarios/serialization/vue/tsconfig.json index 5d8c7b5b62..4a7f0ef092 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/serialization/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../shared-bench.ts", diff --git a/benchmarks/ssr/scenarios/serialization/vue/vite.config.ts b/benchmarks/ssr/scenarios/serialization/vue/vite.config.ts index b89537fa18..76f99750c3 100644 --- a/benchmarks/ssr/scenarios/serialization/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/serialization/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr serialization (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fn-transport/bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/bench.ts index 4274c724ca..73a79aa79a 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/bench.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/bench.ts @@ -67,9 +67,9 @@ const commonHeaders = { 'sec-fetch-site': 'same-origin', accept: acceptHeader, } satisfies HeadersInit -const serverFnMultipartLoopTotalRequests = 128 -const serverFnRawResponseLoopTotalRequests = 176 -const serverFnRawStreamLoopTotalRequests = 112 +const serverFnMultipartLoopIterations = 125 +const serverFnRawResponseLoopIterations = 175 +const serverFnRawStreamLoopIterations = 100 export const serverFnTransportBenchOptions = { warmupIterations: 100, @@ -519,8 +519,7 @@ export function runServerFnMultipartRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnMultipartLoopTotalRequests, + iterations: serverFnMultipartLoopIterations, buildRequest: (_random, index) => buildMultipartRequest(context.urls, context.multipartPayloads, index), validateResponse: validateSerializedResponse, @@ -533,8 +532,7 @@ export function runServerFnRawResponseRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnRawResponseLoopTotalRequests, + iterations: serverFnRawResponseLoopIterations, buildRequest: (_random, index) => buildRawResponseRequest(context.urls, context.rawPayloads, index), validateResponse: validateRawResponse, @@ -547,8 +545,7 @@ export function runServerFnRawStreamRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnRawStreamLoopTotalRequests, + iterations: serverFnRawStreamLoopIterations, buildRequest: (_random, index) => buildRawStreamRequest(context.urls, context.streamPayloads, index), validateResponse: validateRawStreamResponse, diff --git a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/react/speed.bench.ts index fa80cdb690..c168f6e61c 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/react/speed.bench.ts @@ -1,7 +1,9 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnTransportScenario, runServerFnMultipartRequestLoop, + runServerFnRawResponseRequestLoop, + runServerFnRawStreamRequestLoop, serverFnTransportBenchOptions, setupServerFnTransportBench, } from '../bench' @@ -12,12 +14,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnTransportBench(handler) await assertServerFnTransportScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn multipart (react)', async () => - runServerFnMultipartRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn multipart (react)', + () => runServerFnMultipartRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-response (react)', + () => runServerFnRawResponseRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-stream (react)', + () => runServerFnRawStreamRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-response.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-response.bench.ts deleted file mode 100644 index fd535ee313..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-response.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawResponseRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-response (react)', async () => - runServerFnRawResponseRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-stream.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-stream.bench.ts deleted file mode 100644 index 8fbce405dd..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/react/speed.server-fn-raw-stream.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawStreamRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-stream (react)', async () => - runServerFnRawStreamRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/react/tsconfig.json b/benchmarks/ssr/scenarios/server-fn-transport/react/tsconfig.json index 4f3cc314af..08c349fd49 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fn-transport/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../bench.ts", diff --git a/benchmarks/ssr/scenarios/server-fn-transport/react/vite.config.ts b/benchmarks/ssr/scenarios/server-fn-transport/react/vite.config.ts index c37fde0c4b..4c6293d5d7 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fn-transport (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.bench.ts index adac07cb22..b93d7d79a9 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.bench.ts @@ -1,7 +1,9 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnTransportScenario, runServerFnMultipartRequestLoop, + runServerFnRawResponseRequestLoop, + runServerFnRawStreamRequestLoop, serverFnTransportBenchOptions, setupServerFnTransportBench, } from '../bench' @@ -12,12 +14,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnTransportBench(handler) await assertServerFnTransportScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn multipart (solid)', async () => - runServerFnMultipartRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn multipart (solid)', + () => runServerFnMultipartRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-response (solid)', + () => runServerFnRawResponseRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-stream (solid)', + () => runServerFnRawStreamRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-response.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-response.bench.ts deleted file mode 100644 index 843a4c97ce..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-response.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawResponseRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-response (solid)', async () => - runServerFnRawResponseRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-stream.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-stream.bench.ts deleted file mode 100644 index aa24d55e79..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/solid/speed.server-fn-raw-stream.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawStreamRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-stream (solid)', async () => - runServerFnRawStreamRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/solid/tsconfig.json b/benchmarks/ssr/scenarios/server-fn-transport/solid/tsconfig.json index 0af78df33d..b2818dd4ed 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fn-transport/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../bench.ts", diff --git a/benchmarks/ssr/scenarios/server-fn-transport/solid/vite.config.ts b/benchmarks/ssr/scenarios/server-fn-transport/solid/vite.config.ts index a8af4a6b50..b71d03009b 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fn-transport (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.bench.ts index 24305cf1bc..6f803d1665 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.bench.ts @@ -1,7 +1,9 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnTransportScenario, runServerFnMultipartRequestLoop, + runServerFnRawResponseRequestLoop, + runServerFnRawStreamRequestLoop, serverFnTransportBenchOptions, setupServerFnTransportBench, } from '../bench' @@ -12,12 +14,27 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnTransportBench(handler) await assertServerFnTransportScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn multipart (vue)', async () => - runServerFnMultipartRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn multipart (vue)', + () => runServerFnMultipartRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-response (vue)', + () => runServerFnRawResponseRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) + + bench( + 'ssr server-fn raw-stream (vue)', + () => runServerFnRawStreamRequestLoop(handler, context), + serverFnTransportBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-response.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-response.bench.ts deleted file mode 100644 index 2eeb9a4f6b..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-response.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawResponseRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-response (vue)', async () => - runServerFnRawResponseRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-stream.bench.ts b/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-stream.bench.ts deleted file mode 100644 index a73905004d..0000000000 --- a/benchmarks/ssr/scenarios/server-fn-transport/vue/speed.server-fn-raw-stream.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnTransportScenario, - runServerFnRawStreamRequestLoop, - serverFnTransportBenchOptions, - setupServerFnTransportBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnTransportBench(handler) - -await assertServerFnTransportScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn raw-stream (vue)', async () => - runServerFnRawStreamRequestLoop(handler, context), - ).run(serverFnTransportBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fn-transport/vue/tsconfig.json b/benchmarks/ssr/scenarios/server-fn-transport/vue/tsconfig.json index 5b7742b414..29efa76d67 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fn-transport/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "../bench.ts", diff --git a/benchmarks/ssr/scenarios/server-fn-transport/vue/vite.config.ts b/benchmarks/ssr/scenarios/server-fn-transport/vue/vite.config.ts index 0f3e2ce84d..5d74904e14 100644 --- a/benchmarks/ssr/scenarios/server-fn-transport/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fn-transport/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fn-transport (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fns/bench.ts b/benchmarks/ssr/scenarios/server-fns/bench.ts index 1461ce2bfd..65a8749cef 100644 --- a/benchmarks/ssr/scenarios/server-fns/bench.ts +++ b/benchmarks/ssr/scenarios/server-fns/bench.ts @@ -53,12 +53,12 @@ const documentRequestInit = { accept: 'text/html', }, } satisfies RequestInit -const serverFnGetLoopTotalRequests = 112 -const serverFnPostLoopTotalRequests = 160 -const serverFnRedirectLoopTotalRequests = 128 -const serverFnNotFoundLoopTotalRequests = 208 -const serverFnSendContextLoopTotalRequests = 176 -const serverFnDocumentSsrLoopTotalRequests = 48 +const serverFnGetLoopIterations = 100 +const serverFnPostLoopIterations = 150 +const serverFnRedirectLoopIterations = 125 +const serverFnNotFoundLoopIterations = 200 +const serverFnSendContextLoopIterations = 175 +const serverFnDocumentSsrLoopIterations = 45 export const serverFnBenchOptions = { warmupIterations: 100, @@ -456,8 +456,7 @@ export function runServerFnGetRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnGetLoopTotalRequests, + iterations: serverFnGetLoopIterations, buildRequest: (_random, index) => buildGetRequest(context.urls, context.getQueries, index), }) @@ -469,8 +468,7 @@ export function runServerFnPostRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnPostLoopTotalRequests, + iterations: serverFnPostLoopIterations, buildRequest: (_random, index) => buildPostRequest(context.urls, context.bodies, index), }) @@ -482,8 +480,7 @@ export function runServerFnRedirectRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnRedirectLoopTotalRequests, + iterations: serverFnRedirectLoopIterations, buildRequest: (_random, index) => buildRedirectRequest(context.urls, context.bodies, index), validateResponse: validateRedirectResponse, @@ -496,8 +493,7 @@ export function runServerFnNotFoundRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnNotFoundLoopTotalRequests, + iterations: serverFnNotFoundLoopIterations, buildRequest: (_random, index) => buildNotFoundRequest(context.urls, context.bodies, index), validateResponse: (response) => @@ -511,8 +507,7 @@ export function runServerFnSendContextRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnSendContextLoopTotalRequests, + iterations: serverFnSendContextLoopIterations, buildRequest: (_random, index) => buildContextRequest(context.urls, context.contextBodies, index), validateResponse: (response) => @@ -525,8 +520,7 @@ export function runServerFnDocumentSsrRequestLoop( ) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: serverFnDocumentSsrLoopTotalRequests, + iterations: serverFnDocumentSsrLoopIterations, buildRequest: buildSsrCallRequest, validateResponse: validateDocumentResponse, }) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.bench.ts index c876772ad1..46dca5adc7 100644 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fns/react/speed.bench.ts @@ -1,7 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnScenario, + runServerFnDocumentSsrRequestLoop, runServerFnGetRequestLoop, + runServerFnNotFoundRequestLoop, + runServerFnPostRequestLoop, + runServerFnRedirectRequestLoop, + runServerFnSendContextRequestLoop, serverFnBenchOptions, setupServerFnBench, } from '../bench' @@ -12,12 +17,45 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnBench(handler) await assertServerFnScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn GET (react)', async () => - runServerFnGetRequestLoop(handler, context), - ).run(serverFnBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn GET (react)', + () => runServerFnGetRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn POST (react)', + () => runServerFnPostRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn redirect (react)', + () => runServerFnRedirectRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn not-found (react)', + () => runServerFnNotFoundRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn send-context (react)', + () => runServerFnSendContextRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn during document ssr (react)', + () => runServerFnDocumentSsrRequestLoop(handler), + serverFnBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-during-document-ssr.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-during-document-ssr.bench.ts deleted file mode 100644 index 6a0cb55f78..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-during-document-ssr.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnDocumentSsrRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn during document ssr (react)', async () => - runServerFnDocumentSsrRequestLoop(handler), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-not-found.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-not-found.bench.ts deleted file mode 100644 index 96f1160078..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnNotFoundRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn not-found (react)', async () => - runServerFnNotFoundRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-post.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-post.bench.ts deleted file mode 100644 index e85d5debd3..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-post.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnPostRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn POST (react)', async () => - runServerFnPostRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-redirect.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-redirect.bench.ts deleted file mode 100644 index 5dae598549..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-redirect.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnRedirectRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn redirect (react)', async () => - runServerFnRedirectRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-send-context.bench.ts b/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-send-context.bench.ts deleted file mode 100644 index 40d6961206..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/react/speed.server-fn-send-context.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnSendContextRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn send-context (react)', async () => - runServerFnSendContextRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/react/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/server-fns/react/src/routeTree.gen.ts index 4daa5f03b0..1abf49d56b 100644 --- a/benchmarks/ssr/scenarios/server-fns/react/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/server-fns/react/src/routeTree.gen.ts @@ -10,24 +10,24 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as SsrCallIdRouteImport } from './routes/ssr-call.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const SsrCallIdRoute = SsrCallIdRouteImport.update({ id: '/ssr-call/$id', path: '/ssr-call/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -68,13 +68,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/ssr-call/$id': { id: '/ssr-call/$id' path: '/ssr-call/$id' @@ -82,6 +75,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SsrCallIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/server-fns/react/tsconfig.json b/benchmarks/ssr/scenarios/server-fns/react/tsconfig.json index cf14e1d440..91027bfc88 100644 --- a/benchmarks/ssr/scenarios/server-fns/react/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fns/react/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/server-fns/react/vite.config.ts b/benchmarks/ssr/scenarios/server-fns/react/vite.config.ts index cd56edda95..4f608f0444 100644 --- a/benchmarks/ssr/scenarios/server-fns/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fns/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fns (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.bench.ts index f6bbdc9e73..a116ea9102 100644 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fns/solid/speed.bench.ts @@ -1,7 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnScenario, + runServerFnDocumentSsrRequestLoop, runServerFnGetRequestLoop, + runServerFnNotFoundRequestLoop, + runServerFnPostRequestLoop, + runServerFnRedirectRequestLoop, + runServerFnSendContextRequestLoop, serverFnBenchOptions, setupServerFnBench, } from '../bench' @@ -12,12 +17,45 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnBench(handler) await assertServerFnScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn GET (solid)', async () => - runServerFnGetRequestLoop(handler, context), - ).run(serverFnBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn GET (solid)', + () => runServerFnGetRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn POST (solid)', + () => runServerFnPostRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn redirect (solid)', + () => runServerFnRedirectRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn not-found (solid)', + () => runServerFnNotFoundRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn send-context (solid)', + () => runServerFnSendContextRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn during document ssr (solid)', + () => runServerFnDocumentSsrRequestLoop(handler), + serverFnBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-during-document-ssr.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-during-document-ssr.bench.ts deleted file mode 100644 index 933f61b59c..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-during-document-ssr.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnDocumentSsrRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn during document ssr (solid)', async () => - runServerFnDocumentSsrRequestLoop(handler), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-not-found.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-not-found.bench.ts deleted file mode 100644 index 513b69f4ba..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnNotFoundRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn not-found (solid)', async () => - runServerFnNotFoundRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-post.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-post.bench.ts deleted file mode 100644 index e2ce8ad9ee..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-post.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnPostRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn POST (solid)', async () => - runServerFnPostRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-redirect.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-redirect.bench.ts deleted file mode 100644 index 14353f1290..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-redirect.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnRedirectRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn redirect (solid)', async () => - runServerFnRedirectRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-send-context.bench.ts b/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-send-context.bench.ts deleted file mode 100644 index 76d3a554bd..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/solid/speed.server-fn-send-context.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnSendContextRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn send-context (solid)', async () => - runServerFnSendContextRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/solid/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/server-fns/solid/src/routeTree.gen.ts index 3d0bd34eaa..3db5e487b3 100644 --- a/benchmarks/ssr/scenarios/server-fns/solid/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/server-fns/solid/src/routeTree.gen.ts @@ -10,24 +10,24 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as SsrCallIdRouteImport } from './routes/ssr-call.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const SsrCallIdRoute = SsrCallIdRouteImport.update({ id: '/ssr-call/$id', path: '/ssr-call/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -68,13 +68,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/ssr-call/$id': { id: '/ssr-call/$id' path: '/ssr-call/$id' @@ -82,6 +75,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SsrCallIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/server-fns/solid/tsconfig.json b/benchmarks/ssr/scenarios/server-fns/solid/tsconfig.json index 42c3a2160f..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/server-fns/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fns/solid/tsconfig.json @@ -2,11 +2,11 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/server-fns/solid/vite.config.ts b/benchmarks/ssr/scenarios/server-fns/solid/vite.config.ts index 2f2f78b75c..ef8292a042 100644 --- a/benchmarks/ssr/scenarios/server-fns/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fns/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fns (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.bench.ts index 3f67c1a500..02cb03efd1 100644 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-fns/vue/speed.bench.ts @@ -1,7 +1,12 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerFnScenario, + runServerFnDocumentSsrRequestLoop, runServerFnGetRequestLoop, + runServerFnNotFoundRequestLoop, + runServerFnPostRequestLoop, + runServerFnRedirectRequestLoop, + runServerFnSendContextRequestLoop, serverFnBenchOptions, setupServerFnBench, } from '../bench' @@ -12,12 +17,45 @@ const { default: handler } = (await import( )) as { default: StartRequestHandler } + const context = await setupServerFnBench(handler) await assertServerFnScenario(handler, context) -test('ssr', async ({ bench }) => { - await bench('ssr server-fn GET (vue)', async () => - runServerFnGetRequestLoop(handler, context), - ).run(serverFnBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-fn GET (vue)', + () => runServerFnGetRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn POST (vue)', + () => runServerFnPostRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn redirect (vue)', + () => runServerFnRedirectRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn not-found (vue)', + () => runServerFnNotFoundRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn send-context (vue)', + () => runServerFnSendContextRequestLoop(handler, context), + serverFnBenchOptions, + ) + + bench( + 'ssr server-fn during document ssr (vue)', + () => runServerFnDocumentSsrRequestLoop(handler), + serverFnBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-during-document-ssr.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-during-document-ssr.bench.ts deleted file mode 100644 index 56c9addca5..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-during-document-ssr.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnDocumentSsrRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn during document ssr (vue)', async () => - runServerFnDocumentSsrRequestLoop(handler), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-not-found.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-not-found.bench.ts deleted file mode 100644 index e9a6e31617..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-not-found.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnNotFoundRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn not-found (vue)', async () => - runServerFnNotFoundRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-post.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-post.bench.ts deleted file mode 100644 index df9312ccd1..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-post.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnPostRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn POST (vue)', async () => - runServerFnPostRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-redirect.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-redirect.bench.ts deleted file mode 100644 index 67c4611644..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-redirect.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnRedirectRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn redirect (vue)', async () => - runServerFnRedirectRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-send-context.bench.ts b/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-send-context.bench.ts deleted file mode 100644 index 6f51ef4bab..0000000000 --- a/benchmarks/ssr/scenarios/server-fns/vue/speed.server-fn-send-context.bench.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { test } from 'vitest' -import { - assertServerFnScenario, - runServerFnSendContextRequestLoop, - serverFnBenchOptions, - setupServerFnBench, -} from '../bench' -import type { StartRequestHandler } from '../bench' - -const { default: handler } = (await import( - /* @vite-ignore */ new URL('./dist/server/server.js', import.meta.url).href -)) as { - default: StartRequestHandler -} -const context = await setupServerFnBench(handler) - -await assertServerFnScenario(handler, context) - -test('ssr', async ({ bench }) => { - await bench('ssr server-fn send-context (vue)', async () => - runServerFnSendContextRequestLoop(handler, context), - ).run(serverFnBenchOptions) -}) diff --git a/benchmarks/ssr/scenarios/server-fns/vue/src/routeTree.gen.ts b/benchmarks/ssr/scenarios/server-fns/vue/src/routeTree.gen.ts index 0e24cd9c15..fa27fb1a5d 100644 --- a/benchmarks/ssr/scenarios/server-fns/vue/src/routeTree.gen.ts +++ b/benchmarks/ssr/scenarios/server-fns/vue/src/routeTree.gen.ts @@ -10,24 +10,24 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' import { Route as SsrCallIdRouteImport } from './routes/ssr-call.$id' +import { Route as ApiFnUrlsRouteImport } from './routes/api.fn-urls' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ - id: '/api/fn-urls', - path: '/api/fn-urls', - getParentRoute: () => rootRouteImport, -} as any) const SsrCallIdRoute = SsrCallIdRouteImport.update({ id: '/ssr-call/$id', path: '/ssr-call/$id', getParentRoute: () => rootRouteImport, } as any) +const ApiFnUrlsRoute = ApiFnUrlsRouteImport.update({ + id: '/api/fn-urls', + path: '/api/fn-urls', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -68,13 +68,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/api/fn-urls': { - id: '/api/fn-urls' - path: '/api/fn-urls' - fullPath: '/api/fn-urls' - preLoaderRoute: typeof ApiFnUrlsRouteImport - parentRoute: typeof rootRouteImport - } '/ssr-call/$id': { id: '/ssr-call/$id' path: '/ssr-call/$id' @@ -82,6 +75,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SsrCallIdRouteImport parentRoute: typeof rootRouteImport } + '/api/fn-urls': { + id: '/api/fn-urls' + path: '/api/fn-urls' + fullPath: '/api/fn-urls' + preLoaderRoute: typeof ApiFnUrlsRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/benchmarks/ssr/scenarios/server-fns/vue/src/routes/ssr-call.$id.tsx b/benchmarks/ssr/scenarios/server-fns/vue/src/routes/ssr-call.$id.tsx index 45fad23dc0..8abe77c2af 100644 --- a/benchmarks/ssr/scenarios/server-fns/vue/src/routes/ssr-call.$id.tsx +++ b/benchmarks/ssr/scenarios/server-fns/vue/src/routes/ssr-call.$id.tsx @@ -1,17 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { echoGet } from '../fns' -const SsrCallComponent = defineComponent({ - setup() { - const data = Route.useLoaderData() - - return () => ( -
{data.value.marker}
- ) - }, -}) - export const Route = createFileRoute('/ssr-call/$id')({ loader: async ({ params }) => { const result = await echoGet({ @@ -26,3 +15,9 @@ export const Route = createFileRoute('/ssr-call/$id')({ }, component: SsrCallComponent, }) + +function SsrCallComponent() { + const data = Route.useLoaderData() + + return
{data.value.marker}
+} diff --git a/benchmarks/ssr/scenarios/server-fns/vue/tsconfig.json b/benchmarks/ssr/scenarios/server-fns/vue/tsconfig.json index 08c94853f4..4fe3ccecb1 100644 --- a/benchmarks/ssr/scenarios/server-fns/vue/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-fns/vue/tsconfig.json @@ -6,7 +6,7 @@ "types": ["node", "vite/client", "vitest/globals"] }, "include": [ - "speed*.bench.ts", + "speed.bench.ts", "vite.config.ts", "../../../bench-utils.ts", "./src/**/*" diff --git a/benchmarks/ssr/scenarios/server-fns/vue/vite.config.ts b/benchmarks/ssr/scenarios/server-fns/vue/vite.config.ts index 5f3e3ca4b5..2a7783ed7a 100644 --- a/benchmarks/ssr/scenarios/server-fns/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-fns/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-fns (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/react/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes-middleware/react/speed.bench.ts index 6331216522..8e96bc8e04 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteMiddlewareResponse, runServerRouteMiddlewareLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteMiddlewareResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route middleware (react)', async () => - runServerRouteMiddlewareLoop(handler), - ).run(serverRouteMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route middleware (react)', + () => runServerRouteMiddlewareLoop(handler), + serverRouteMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/react/vite.config.ts b/benchmarks/ssr/scenarios/server-routes-middleware/react/vite.config.ts index f6998c2ac8..9c41f6d542 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes-middleware (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/shared.ts b/benchmarks/ssr/scenarios/server-routes-middleware/shared.ts index 663ca09294..3177e0f763 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/shared.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/shared.ts @@ -4,7 +4,7 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const loopTotalRequests = 160 +const loopIterations = 150 const apiRequestInit = { method: 'GET', @@ -22,8 +22,7 @@ export const serverRouteMiddlewareBenchOptions = { export function runServerRouteMiddlewareLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: loopTotalRequests, + iterations: loopIterations, buildRequest: (random) => new Request( `http://localhost/api/chain/${randomSegment(random)}`, diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/solid/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes-middleware/solid/speed.bench.ts index 77d58e7b19..7e6fac4bbe 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteMiddlewareResponse, runServerRouteMiddlewareLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteMiddlewareResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route middleware (solid)', async () => - runServerRouteMiddlewareLoop(handler), - ).run(serverRouteMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route middleware (solid)', + () => runServerRouteMiddlewareLoop(handler), + serverRouteMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/solid/tsconfig.json b/benchmarks/ssr/scenarios/server-routes-middleware/solid/tsconfig.json index b1806caa67..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-routes-middleware/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/solid/vite.config.ts b/benchmarks/ssr/scenarios/server-routes-middleware/solid/vite.config.ts index 800cf9db9f..89116c111e 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes-middleware (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/vue/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes-middleware/vue/speed.bench.ts index 3d03b9c1fa..e67ca0a420 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteMiddlewareResponse, runServerRouteMiddlewareLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteMiddlewareResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route middleware (vue)', async () => - runServerRouteMiddlewareLoop(handler), - ).run(serverRouteMiddlewareBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route middleware (vue)', + () => runServerRouteMiddlewareLoop(handler), + serverRouteMiddlewareBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes-middleware/vue/vite.config.ts b/benchmarks/ssr/scenarios/server-routes-middleware/vue/vite.config.ts index 909b7cca50..a1b26182f7 100644 --- a/benchmarks/ssr/scenarios/server-routes-middleware/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes-middleware/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes-middleware (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes/react/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes/react/speed.bench.ts index 631314148a..1bdb7946b2 100644 --- a/benchmarks/ssr/scenarios/server-routes/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteResponse, runServerRouteLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route (react)', async () => - runServerRouteLoop(handler), - ).run(serverRouteBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route (react)', + () => runServerRouteLoop(handler), + serverRouteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes/react/vite.config.ts b/benchmarks/ssr/scenarios/server-routes/react/vite.config.ts index 2c723c749c..fdc16bf50c 100644 --- a/benchmarks/ssr/scenarios/server-routes/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes/shared.ts b/benchmarks/ssr/scenarios/server-routes/shared.ts index ce33faaefe..20f67ea296 100644 --- a/benchmarks/ssr/scenarios/server-routes/shared.ts +++ b/benchmarks/ssr/scenarios/server-routes/shared.ts @@ -4,7 +4,7 @@ import type { StartRequestHandler } from '../../bench-utils' export type { StartRequestHandler } const benchmarkSeed = 0xdecafbad -const loopTotalRequests = 208 +const loopIterations = 200 const apiRequestInit = { method: 'GET', @@ -22,8 +22,7 @@ export const serverRouteBenchOptions = { export function runServerRouteLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: loopTotalRequests, + iterations: loopIterations, buildRequest: (random) => new Request( `http://localhost/api/users/${randomSegment(random)}`, diff --git a/benchmarks/ssr/scenarios/server-routes/solid/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes/solid/speed.bench.ts index 4788d31854..ce3e1f8a21 100644 --- a/benchmarks/ssr/scenarios/server-routes/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteResponse, runServerRouteLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route (solid)', async () => - runServerRouteLoop(handler), - ).run(serverRouteBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route (solid)', + () => runServerRouteLoop(handler), + serverRouteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes/solid/tsconfig.json b/benchmarks/ssr/scenarios/server-routes/solid/tsconfig.json index b1806caa67..18aa910e92 100644 --- a/benchmarks/ssr/scenarios/server-routes/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/server-routes/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/server-routes/solid/vite.config.ts b/benchmarks/ssr/scenarios/server-routes/solid/vite.config.ts index 994e04f1d6..24e502a63a 100644 --- a/benchmarks/ssr/scenarios/server-routes/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/server-routes/vue/speed.bench.ts b/benchmarks/ssr/scenarios/server-routes/vue/speed.bench.ts index 09c0bbe90b..f2b9e27acb 100644 --- a/benchmarks/ssr/scenarios/server-routes/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/server-routes/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertServerRouteResponse, runServerRouteLoop, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertServerRouteResponse(handler) -test('ssr', async ({ bench }) => { - await bench('ssr server-route (vue)', async () => - runServerRouteLoop(handler), - ).run(serverRouteBenchOptions) +describe('ssr', () => { + bench( + 'ssr server-route (vue)', + () => runServerRouteLoop(handler), + serverRouteBenchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/server-routes/vue/vite.config.ts b/benchmarks/ssr/scenarios/server-routes/vue/vite.config.ts index 0457453532..c56f3c872a 100644 --- a/benchmarks/ssr/scenarios/server-routes/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/server-routes/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr server-routes (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/streaming/react/speed.bench.ts b/benchmarks/ssr/scenarios/streaming/react/speed.bench.ts index eb4c9dc1d6..c1dbf38ae5 100644 --- a/benchmarks/ssr/scenarios/streaming/react/speed.bench.ts +++ b/benchmarks/ssr/scenarios/streaming/react/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertStreamingSanity, benchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertStreamingSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr streaming deferred (react)', async () => - runStreamingLoop(handler), - ).run(benchOptions) +describe('ssr', () => { + bench( + 'ssr streaming deferred (react)', + () => runStreamingLoop(handler), + benchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/streaming/react/vite.config.ts b/benchmarks/ssr/scenarios/streaming/react/vite.config.ts index e1cc5f534b..bdbfebdfce 100644 --- a/benchmarks/ssr/scenarios/streaming/react/vite.config.ts +++ b/benchmarks/ssr/scenarios/streaming/react/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import react from '@vitejs/plugin-react' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr streaming (react)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/streaming/shared-bench.ts b/benchmarks/ssr/scenarios/streaming/shared-bench.ts index cc45062e1b..25685b3c78 100644 --- a/benchmarks/ssr/scenarios/streaming/shared-bench.ts +++ b/benchmarks/ssr/scenarios/streaming/shared-bench.ts @@ -71,8 +71,6 @@ export const benchOptions = { export function runStreamingLoop(handler: StartRequestHandler) { return runRequestLoop(handler, { seed: benchmarkSeed, - concurrency: 16, - totalRequests: 16, buildRequest: buildStreamingRequest, }) } diff --git a/benchmarks/ssr/scenarios/streaming/shared-data.ts b/benchmarks/ssr/scenarios/streaming/shared-data.ts index 695ed107c6..550a351794 100644 --- a/benchmarks/ssr/scenarios/streaming/shared-data.ts +++ b/benchmarks/ssr/scenarios/streaming/shared-data.ts @@ -15,11 +15,7 @@ export const streamChunkCount = 96 export const streamChunkLength = 192 export function sleep0() { - // Give SSR a render turn before resolving deferred values. Counted turns - // avoid grouping concurrent requests by wall-clock timer expiration. - return new Promise((resolve) => { - setImmediate(() => setImmediate(resolve)) - }) + return new Promise((resolve) => setTimeout(resolve, 1)) } function hashId(id: string) { diff --git a/benchmarks/ssr/scenarios/streaming/solid/speed.bench.ts b/benchmarks/ssr/scenarios/streaming/solid/speed.bench.ts index 19d5817d32..0828715220 100644 --- a/benchmarks/ssr/scenarios/streaming/solid/speed.bench.ts +++ b/benchmarks/ssr/scenarios/streaming/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertStreamingSanity, benchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertStreamingSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr streaming deferred (solid)', async () => - runStreamingLoop(handler), - ).run(benchOptions) +describe('ssr', () => { + bench( + 'ssr streaming deferred (solid)', + () => runStreamingLoop(handler), + benchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/streaming/solid/src/routes/stream.$id.tsx b/benchmarks/ssr/scenarios/streaming/solid/src/routes/stream.$id.tsx index 1a65fff950..a806d2d663 100644 --- a/benchmarks/ssr/scenarios/streaming/solid/src/routes/stream.$id.tsx +++ b/benchmarks/ssr/scenarios/streaming/solid/src/routes/stream.$id.tsx @@ -1,5 +1,5 @@ import { Await, createFileRoute } from '@tanstack/solid-router' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' import { makeBigPayload, sleep0 } from '../../../shared-data' export const Route = createFileRoute('/stream/$id')({ @@ -18,11 +18,11 @@ function StreamComponent() { <>

{data().fast.label}

loading-small

- + {(d) =>

{d.label}

}
-
+

loading-big

- + {(d) => (
@@ -33,7 +33,7 @@ function StreamComponent() {
)}
-
+ ) } diff --git a/benchmarks/ssr/scenarios/streaming/solid/tsconfig.json b/benchmarks/ssr/scenarios/streaming/solid/tsconfig.json index 47f264ba4f..261257c6e0 100644 --- a/benchmarks/ssr/scenarios/streaming/solid/tsconfig.json +++ b/benchmarks/ssr/scenarios/streaming/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/scenarios/streaming/solid/vite.config.ts b/benchmarks/ssr/scenarios/streaming/solid/vite.config.ts index 353c21f552..5b736899c0 100644 --- a/benchmarks/ssr/scenarios/streaming/solid/vite.config.ts +++ b/benchmarks/ssr/scenarios/streaming/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr streaming (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/scenarios/streaming/vue/speed.bench.ts b/benchmarks/ssr/scenarios/streaming/vue/speed.bench.ts index 42473fc694..a484f95d6a 100644 --- a/benchmarks/ssr/scenarios/streaming/vue/speed.bench.ts +++ b/benchmarks/ssr/scenarios/streaming/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { assertStreamingSanity, benchOptions, @@ -16,8 +16,10 @@ const { default: handler } = (await import( await assertStreamingSanity(handler) -test('ssr', async ({ bench }) => { - await bench('ssr streaming deferred (vue)', async () => - runStreamingLoop(handler), - ).run(benchOptions) +describe('ssr', () => { + bench( + 'ssr streaming deferred (vue)', + () => runStreamingLoop(handler), + benchOptions, + ) }) diff --git a/benchmarks/ssr/scenarios/streaming/vue/vite.config.ts b/benchmarks/ssr/scenarios/streaming/vue/vite.config.ts index a09a30076f..8c65f71268 100644 --- a/benchmarks/ssr/scenarios/streaming/vue/vite.config.ts +++ b/benchmarks/ssr/scenarios/streaming/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr streaming (vue)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/solid/speed.bench.ts b/benchmarks/ssr/solid/speed.bench.ts index 2f72977612..0c4317415d 100644 --- a/benchmarks/ssr/solid/speed.bench.ts +++ b/benchmarks/ssr/solid/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { runSsrRequestLoop } from '../bench-utils' import type { StartRequestHandler } from '../bench-utils' @@ -11,12 +11,14 @@ const { default: handler } = (await import( default: StartRequestHandler } -test('ssr', async ({ bench }) => { - await bench('ssr request loop (solid)', async () => - runSsrRequestLoop(handler, { seed: benchmarkSeed }), - ).run({ - warmupIterations: 100, - time: 10_000, - throws: true, - }) +describe('ssr', () => { + bench( + 'ssr request loop (solid)', + () => runSsrRequestLoop(handler, { seed: benchmarkSeed }), + { + warmupIterations: 100, + time: 10_000, + throws: true, + }, + ) }) diff --git a/benchmarks/ssr/solid/src/workload.tsx b/benchmarks/ssr/solid/src/workload.tsx index 76fcae555a..f6439b9ddf 100644 --- a/benchmarks/ssr/solid/src/workload.tsx +++ b/benchmarks/ssr/solid/src/workload.tsx @@ -29,9 +29,10 @@ function ParamsProbe(props: { salt: number }) { ), }) - createEffect(() => { - void params() - }) + createEffect( + () => params(), + () => {}, + ) return null } @@ -43,9 +44,10 @@ function SearchProbe(props: { salt: number }) { runSelectorWork(String(nextSearch.q ?? ''), props.salt), }) - createEffect(() => { - void search() - }) + createEffect( + () => search(), + () => {}, + ) return null } diff --git a/benchmarks/ssr/solid/tsconfig.json b/benchmarks/ssr/solid/tsconfig.json index 6c87e995c7..af1b74dba7 100644 --- a/benchmarks/ssr/solid/tsconfig.json +++ b/benchmarks/ssr/solid/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "types": ["node", "vite/client", "vitest/globals"] }, "include": [ diff --git a/benchmarks/ssr/solid/vite.config.ts b/benchmarks/ssr/solid/vite.config.ts index dfd82d9192..dc9cbf90e3 100644 --- a/benchmarks/ssr/solid/vite.config.ts +++ b/benchmarks/ssr/solid/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/solid-start/plugin/vite' import solid from 'vite-plugin-solid' -import { cpuSimulationExecArgv } from '../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr (solid)', watch: false, environment: 'node', diff --git a/benchmarks/ssr/tsconfig.json b/benchmarks/ssr/tsconfig.json index 7279177023..e3ed3ad08a 100644 --- a/benchmarks/ssr/tsconfig.json +++ b/benchmarks/ssr/tsconfig.json @@ -3,10 +3,5 @@ "compilerOptions": { "types": ["node", "vite/client", "vitest/globals"] }, - "include": [ - "bench-utils.ts", - "bench-utils.test.ts", - "scenarios/streaming/shared-data.ts", - "vitest.unit.config.ts" - ] + "include": ["bench-utils.ts"] } diff --git a/benchmarks/ssr/vitest.unit.config.ts b/benchmarks/ssr/vitest.unit.config.ts deleted file mode 100644 index cbba6db9ef..0000000000 --- a/benchmarks/ssr/vitest.unit.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - name: '@benchmarks/ssr unit', - environment: 'node', - include: ['bench-utils.test.ts'], - }, -}) diff --git a/benchmarks/ssr/vue/speed.bench.ts b/benchmarks/ssr/vue/speed.bench.ts index 57b59e0504..849f042e3c 100644 --- a/benchmarks/ssr/vue/speed.bench.ts +++ b/benchmarks/ssr/vue/speed.bench.ts @@ -1,4 +1,4 @@ -import { test } from 'vitest' +import { bench, describe } from 'vitest' import { runSsrRequestLoop } from '../bench-utils' import type { StartRequestHandler } from '../bench-utils' @@ -11,12 +11,14 @@ const { default: handler } = (await import( default: StartRequestHandler } -test('ssr', async ({ bench }) => { - await bench('ssr request loop (vue)', async () => - runSsrRequestLoop(handler, { seed: benchmarkSeed }), - ).run({ - warmupIterations: 100, - time: 10_000, - throws: true, - }) +describe('ssr', () => { + bench( + 'ssr request loop (vue)', + () => runSsrRequestLoop(handler, { seed: benchmarkSeed }), + { + warmupIterations: 100, + time: 10_000, + throws: true, + }, + ) }) diff --git a/benchmarks/ssr/vue/vite.config.ts b/benchmarks/ssr/vue/vite.config.ts index b2b9fc8a09..312f43a7ae 100644 --- a/benchmarks/ssr/vue/vite.config.ts +++ b/benchmarks/ssr/vue/vite.config.ts @@ -3,7 +3,6 @@ import { defineConfig } from 'vitest/config' import codspeedPlugin from '@codspeed/vitest-plugin' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' -import { cpuSimulationExecArgv } from '../../cpu-simulation' const rootDir = fileURLToPath(new URL('.', import.meta.url)) @@ -23,8 +22,6 @@ export default defineConfig({ minify: false, }, test: { - execArgv: cpuSimulationExecArgv(), - isolate: true, name: '@benchmarks/ssr (vue)', watch: false, environment: 'node', diff --git a/benchmarks/tsconfig.json b/benchmarks/tsconfig.json deleted file mode 100644 index 5e9ff9a8e1..0000000000 --- a/benchmarks/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "types": ["node"] - }, - "include": ["cpu-simulation.ts"] -} diff --git a/docs/AGENTS.md b/docs/AGENTS.md deleted file mode 100644 index ab2d4117e2..0000000000 --- a/docs/AGENTS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Documentation - -- Register new published pages in `router/config.json` or `start/config.json`; drafts need not be registered. -- Run `pnpm test:docs` from the repository root for Markdown link validation. It checks `docs/**/*.md`, not Markdown elsewhere. Relative links resolve from the containing file. diff --git a/docs/router/api/file-based-routing.md b/docs/router/api/file-based-routing.md index 7c94d484d1..ad3e07fad7 100644 --- a/docs/router/api/file-based-routing.md +++ b/docs/router/api/file-based-routing.md @@ -188,7 +188,7 @@ By default, this value is set to `false`. ### `autoCodeSplitting` -This feature is only available if you are using the TanStack Router Bundler Plugin with Vite, Rspack/Rsbuild or Webpack. With Esbuild, setting it to `true` is an error. +This feature is only available if you are using the TanStack Router Bundler Plugin. This option is used to enable automatic code-splitting for non-critical route configuration items. See the "Automatic Code-Splitting" guide for more information. diff --git a/docs/router/api/router/LinkOptionsType.md b/docs/router/api/router/LinkOptionsType.md index 9d3d3fe8d8..481a5b4a3d 100644 --- a/docs/router/api/router/LinkOptionsType.md +++ b/docs/router/api/router/LinkOptionsType.md @@ -9,7 +9,7 @@ The `LinkOptions` type extends the [`NavigateOptions`](./NavigateOptionsType.md) type LinkOptions = NavigateOptions & { target?: HTMLAnchorElement['target'] activeOptions?: ActiveOptions - preload?: false | 'intent' | 'viewport' | 'render' + preload?: false | 'intent' preloadDelay?: number disabled?: boolean } @@ -42,7 +42,7 @@ The `LinkOptions` object accepts/contains the following properties: - Type: `number` - Optional -- Delay focus, hover, and viewport preloading by this many milliseconds. Touch intent preloads immediately. If focus or hover ends, or the link leaves the viewport before the delay, the preload will be cancelled. +- Delay intent preloading by this many milliseconds. If the intent exits before this delay, the preload will be cancelled. ### `disabled` diff --git a/docs/router/api/router/RouteMatchType.md b/docs/router/api/router/RouteMatchType.md index b5009ebe68..251c2c031e 100644 --- a/docs/router/api/router/RouteMatchType.md +++ b/docs/router/api/router/RouteMatchType.md @@ -11,8 +11,9 @@ interface RouteMatch { routeId: string pathname: string params: Route['allParams'] - status: 'pending' | 'success' | 'error' | 'notFound' + status: 'pending' | 'success' | 'error' | 'redirected' | 'notFound' isFetching: false | 'beforeLoad' | 'loader' + showPending: boolean error: unknown paramsError: unknown searchError: unknown @@ -20,17 +21,9 @@ interface RouteMatch { loaderData?: Route['loaderData'] context: Route['allContext'] search: Route['fullSearchSchema'] + fetchedAt: number abortController: AbortController - cause: 'preload' | 'enter' | 'stay' + cause: 'enter' | 'stay' ssr?: boolean | 'data-only' } ``` - -`status` describes the match's render state. `isFetching` independently exposes -active `beforeLoad` or loader work. In particular, a successful match can report -`isFetching: 'loader'` while stale data remains visible during a background -reload. - -The router state can contain matches below the pending, error, or not-found -boundary. Those matches remain observable as part of the structurally matched -lane even though the route renderer stops at the boundary. diff --git a/docs/router/api/router/RouteOptionsType.md b/docs/router/api/router/RouteOptionsType.md index 2adfc6e5c6..1fb4c4eb30 100644 --- a/docs/router/api/router/RouteOptionsType.md +++ b/docs/router/api/router/RouteOptionsType.md @@ -56,7 +56,6 @@ The `RouteOptions` type accepts an object with the following properties: - Type: `(rawSearchParams: unknown) => TSearchSchema` - Optional - A function that will be called when this route is matched and passed the raw search params from the current location and return valid parsed search params. If this function throws, the route will be put into an error state and the error will be thrown during render. If this function does not throw, its return value will be used as the route's search params and the return type will be inferred into the rest of the router. -- This is a planning callback. It must be deterministic and side-effect-free for the same input; do not navigate or mutate application/router state from it. - Optionally, the parameter type can be tagged with the `SearchSchemaInput` type like this: `(searchParams: TSearchSchemaInput & SearchSchemaInput) => TSearchSchema`. If this tag is present, `TSearchSchemaInput` will be used to type the `search` property of `` and `navigate()` **instead of** `TSearchSchema`. The difference between `TSearchSchemaInput` and `TSearchSchema` can be useful, for example, to express optional search parameters. ### `search.middlewares` property @@ -71,7 +70,6 @@ The `RouteOptions` type accepts an object with the following properties: - Type: `(rawParams: Record) => TParams` - Optional - A function that will be called when this route is matched and passed the raw params from the current location and return valid parsed params. If this function throws, the route will be put into an error state and the error will be thrown during render. If this function does not throw, its return value will be used as the route's params and the return type will be inferred into the rest of the router. -- This is a planning callback. It must be deterministic and side-effect-free for the same input. ### `stringifyParams` method (⚠️ deprecated, use `params.stringify` instead) @@ -84,7 +82,6 @@ The `RouteOptions` type accepts an object with the following properties: - Type: `(rawParams: Record) => TParams | false` - Optional - A function that will be called when this route is matched and passed the raw params from the current location and return valid parsed params. If this function throws, the route will be put into an error state and the error will be thrown during render. If this function returns parsed params, its return value will be used as the route's params and the return type will be inferred into the rest of the router. -- This is a planning callback. It must be deterministic and side-effect-free for the same input. - Experimental: returning `false` during incoming route matching skips this route and allows matching to continue to another candidate route. ### `params.priority` property @@ -115,14 +112,14 @@ type beforeLoad = ( location: ParsedLocation navigate: NavigateFn // @deprecated buildLocation: BuildLocationFn - cause: 'preload' | 'enter' | 'stay' + cause: 'enter' | 'stay' }, ) => Promise | TRouteContext | void ``` - Optional - [`ParsedLocation`](./ParsedLocationType.md) -- This async function is called before a route is loaded. If it fails, the route's loader and its descendants will not run. During navigation, ordinary errors become the match's error state and are passed to the `onError` function. During a preload, ordinary errors and not-found results are represented in the returned speculative match lane instead of rejecting the `preloadRoute` promise. +- This async function is called before a route is loaded. If an error is thrown here, the route's loader will not be called and the route will not render. If thrown during a navigation, the navigation will be canceled and the error will be passed to the `onError` function. If thrown during a preload event, the error will be logged to the console and the preload will fail. - If this function returns a promise, the route will be put into a pending state and cause rendering to suspend until the promise resolves. If this route's pendingMs threshold is reached, the `pendingComponent` will be shown until it resolves. If the promise rejects, the route will be put into an error state and the error will be thrown during render. - If this function returns a `TRouteContext` object, that object will be merged into the route's context and be made available in the `loader` and other related route components/methods. - It's common to use this function to check if a user is authenticated and redirect them to a login page if they are not. To do this, you can either return or throw a `redirect` object from this function. @@ -159,9 +156,9 @@ type loader = - Optional - [`ParsedLocation`](./ParsedLocationType.md) -- This async function is called when a route is matched and passed the route's match object. During navigation, ordinary errors become the match's error state and are passed to the `onError` function. During a preload, ordinary errors and not-found results are represented in the returned speculative match lane instead of rejecting the `preloadRoute` promise. +- This async function is called when a route is matched and passed the route's match object. If an error is thrown here, the route will be put into an error state and the error will be thrown during render. If thrown during a navigation, the navigation will be canceled and the error will be passed to the `onError` function. If thrown during a preload event, the error will be logged to the console and the preload will fail. - If this function returns a promise, the route will be put into a pending state and cause rendering to suspend until the promise resolves. If this route's pendingMs threshold is reached, the `pendingComponent` will be shown until it resolves. If the promise rejects, the route will be put into an error state and the error will be thrown during render. -- If this function returns a `TLoaderData` object, that object will be stored on the route match and can remain available in the in-memory cache after the match becomes inactive. Navigation-owned data uses `gcTime` for retention, while preload-owned data uses `preloadGcTime`. It can be accessed using the `useLoaderData` hook in any component that is a child of the route match before another `` is rendered. +- If this function returns a `TLoaderData` object, that object will be stored on the route match until the route match is no longer active. It can be accessed using the `useLoaderData` hook in any component that is a child of the route match before another `` is rendered. - Deps must be returned by your `loaderDeps` function in order to appear. - Use the object form to configure loader-specific behavior like `staleReloadMode`. - `staleReloadMode: 'background'` preserves stale-while-revalidate behavior for stale successful matches. @@ -179,7 +176,6 @@ type loaderDeps = (opts: { search: TFullSearchSchema }) => Record - Optional - A function that will be called before this route is matched to provide additional unique identification to the route match and serve as a dependency tracker for when the match should be reloaded. It should return any serializable value that can uniquely identify the route match from navigation to navigation. -- This is a planning callback and cache-key function. It must be deterministic and side-effect-free for the same validated search input. The returned value and any serialization methods on it, such as `toJSON`, must also be side-effect-free. - By default, path params are already used to uniquely identify a route match, so it's unnecessary to return these here. - If your route match relies on search params for unique identification, it's required that you return them here so they can be made available in the `loader`'s `deps` argument. @@ -190,26 +186,19 @@ type loaderDeps = (opts: { search: TFullSearchSchema }) => Record - Defaults to `routerOptions.defaultStaleTime`, which defaults to `0` - The amount of time in milliseconds that a route match's loader data will be considered fresh. If a route match is matched again within this time frame, its loader data will not be reloaded. -### `preload` property - -- Type: `boolean` -- Optional -- Defaults to `true` -- If `false`, speculative preloads still run this route's `beforeLoad` function but skip its `loader`. A navigation runs both `beforeLoad` and the skipped `loader` normally. - ### `preloadStaleTime` property - Type: `number` - Optional - Defaults to `routerOptions.defaultPreloadStaleTime`, which defaults to `30_000` ms (30 seconds) -- The amount of time in milliseconds that loader data produced by a preload is considered fresh. Another preload or the first navigation can reuse it within this interval. After navigation accepts the generation, subsequent freshness uses `staleTime`. +- The amount of time in milliseconds that a route match's loader data will be considered fresh when preloading. If a route match is preloaded again within this time frame, its loader data will not be reloaded. If a route match is loaded (for navigation) within this time frame, the normal `staleTime` is used instead. ### `gcTime` property - Type: `number` - Optional -- Defaults to `routerOptions.defaultGcTime`, which defaults to 5 minutes. -- The retention window in milliseconds for unused loader data from an ordinary load. Once the data is older than this value, it is eligible for pruning during a later cache reconciliation. +- Defaults to `routerOptions.defaultGcTime`, which defaults to 30 minutes. +- The amount of time in milliseconds that a route match's loader data will be kept in memory after a preload or it is no longer in use. ### `shouldReload` property @@ -245,12 +234,12 @@ type loaderDeps = (opts: { search: TFullSearchSchema }) => Record - Defaults to `routerOptions.defaultPendingMinMs` which defaults to `500` - The minimum amount of time in milliseconds that the pending component will be shown for if it is shown. This is useful to prevent the pending component from flashing on the screen for a split second. -### `preloadGcTime` property +### `preloadMaxAge` property - Type: `number` - Optional -- Defaults to `routerOptions.defaultPreloadGcTime`, which defaults to 5 minutes. -- The retention window in milliseconds for unused loader data produced by a preload. Once the data is older than this value, it is eligible for pruning during a later cache reconciliation. Use `preloadStaleTime` to control whether retained data is fresh enough to reuse without reloading. +- Defaults to `30_000` ms (30 seconds) +- The maximum amount of time in milliseconds that a route's preloaded route data will be cached for. If a route is not matched within this time frame, its loader data will be discarded. ### `preSearchFilters` property (⚠️ deprecated, use `search.middlewares` instead) @@ -273,33 +262,29 @@ type loaderDeps = (opts: { search: TFullSearchSchema }) => Record - Type: `(error: any) => void` - Optional - A function that will be called when an error is thrown during a navigation or preload event. -- If this function throws a [`redirect`](./redirectFunction.md), the redirect replaces the original error and becomes control flow for the current navigation or preload operation. If it throws a not-found result, that result replaces the original error in the current match lane. +- If this function throws a [`redirect`](./redirectFunction.md), then the router will process and apply the redirect immediately. ### `onEnter` property - Type: `(match: RouteMatch) => void` - Optional - A function that will be called when a route is matched and loaded after not being matched in the previous location. -- Routes below an error or not-found boundary do not enter the active route lifecycle. The boundary itself remains active. A previously hidden route receives `onEnter` when a navigation makes it active again. ### `onStay` property - Type: `(match: RouteMatch) => void` - Optional - A function that will be called when a route is matched and loaded after being matched in the previous location. -- Both navigations must include the route in the active branch, through the first error or not-found boundary. ### `onLeave` property - Type: `(match: RouteMatch) => void` - Optional - A function that will be called when a route is no longer matched after being matched in the previous location. -- This also runs when a navigation hides a previously active route below an error or not-found boundary, even if the route remains structurally matched. -- Background reloads update route data without dispatching these lifecycle callbacks. ### `onCatch` property -- Type: `(error: unknown) => void` in React and Vue; `(error: Error) => void` in Solid +- Type: `(error: Error, errorInfo: ErrorInfo) => void` - Optional - Defaults to `routerOptions.defaultOnCatch` - A function that will be called when errors are caught when the route encounters an error. diff --git a/docs/router/api/router/RouterEventsType.md b/docs/router/api/router/RouterEventsType.md index c27887fba1..c79bb47f81 100644 --- a/docs/router/api/router/RouterEventsType.md +++ b/docs/router/api/router/RouterEventsType.md @@ -47,6 +47,9 @@ type RouterEvents = { hrefChanged: boolean hashChanged: boolean } + onInjectedHtml: { + type: 'onInjectedHtml' + } onRendered: { type: 'onRendered' fromLocation?: ParsedLocation @@ -64,7 +67,7 @@ Once an event is emitted, the following properties will be present on the event ### `type` property -- Type: `onBeforeNavigate | onBeforeLoad | onLoad | onBeforeRouteMount | onResolved | onRendered` +- Type: `onBeforeNavigate | onBeforeLoad | onLoad | onBeforeRouteMount | onResolved | onRendered | onInjectedHtml` - The type of the event - This is useful for discriminating between events in a listener function. diff --git a/docs/router/api/router/RouterOptionsType.md b/docs/router/api/router/RouterOptionsType.md index 31f410b208..7127e1191e 100644 --- a/docs/router/api/router/RouterOptionsType.md +++ b/docs/router/api/router/RouterOptionsType.md @@ -59,7 +59,7 @@ The `RouterOptions` type accepts an object with the following properties and met - Type: `number` - Optional - Defaults to `50` -- The delay in milliseconds before intent focus/hover and viewport preloading. Touch intent preloads immediately. +- The delay in milliseconds that a route must be hovered over or touched before it is preloaded. ### `defaultComponent` property @@ -129,19 +129,19 @@ The `RouterOptions` type accepts an object with the following properties and met - Type: `number` - Optional -- Defaults to 5 minutes. +- Defaults to `routerOptions.defaultGcTime`, which defaults to 30 minutes. - The default `preloadGcTime` a route should use if no preloadGcTime is provided. ### `defaultGcTime` property - Type: `number` - Optional -- Defaults to 5 minutes. +- Defaults to 30 minutes. - The default `gcTime` a route should use if no gcTime is provided. ### `defaultOnCatch` property -- Type: `(error: unknown, errorInfo: ErrorInfo) => void` +- Type: `(error: Error, errorInfo: ErrorInfo) => void` - Optional - The default `onCatch` handler for errors caught by the Router ErrorBoundary @@ -223,13 +223,6 @@ const router = createRouter({ - Defaults to `/` - The basepath for the entire router. This is useful for mounting a router instance at a subpath. -### `origin` property - -- Type: `string` -- Optional -- The origin used to resolve URLs. Defaults to the browser origin, or `http://localhost` on the server and in browsers with an opaque origin. -- Pass a normalized origin, such as `https://example.com` or `http://localhost:3000`, without a path or trailing slash. The router uses this value as provided; if you have a full URL, normalize it with `new URL(url).origin` before passing it to the router. - ### `rewrite` property - Type: `LocationRewrite` @@ -375,10 +368,9 @@ const router = createRouter({ ### `pathParamsAllowedCharacters` property -- Type: `ReadonlyArray<';' | ':' | '@' | '&' | '=' | '+' | '$' | ','>` +- Type: `Array<';' | ':' | '@' | '&' | '=' | '+' | '$' | ','>` - Optional - Configures which URI characters are allowed in path params that would ordinarily be escaped by encodeURIComponent. -- Read only when the router is created. To change these characters, create a new router instance. Router option updates and provider props do not change this setting. ### `defaultStructuralSharing` property diff --git a/docs/router/api/router/RouterStateType.md b/docs/router/api/router/RouterStateType.md index 4da9cd9bb6..a77f4e775f 100644 --- a/docs/router/api/router/RouterStateType.md +++ b/docs/router/api/router/RouterStateType.md @@ -3,17 +3,16 @@ id: RouterStateType title: RouterState type --- -The `RouterState` type represents the observable state of the router, including -the requested and resolved locations, match presentation, and foreground loading -status. +The `RouterState` type represents shape of the internal state of the router. The Router's internal state is useful, if you need to access certain internals of the router, such as any pending matches, is the router in its loading state, etc. ```tsx type RouterState = { status: 'pending' | 'idle' isLoading: boolean + isTransitioning: boolean matches: Array location: ParsedLocation - resolvedLocation?: ParsedLocation + resolvedLocation: ParsedLocation } ``` @@ -24,24 +23,22 @@ The `RouterState` type contains all of the properties that are available on the ### `status` property - Type: `'pending' | 'idle'` -- The current foreground status of the router. `pending` means the requested route is still loading or waiting for its framework transition to settle. +- The current status of the router. If the router is pending, it means that it is currently loading a route or the router is still transitioning to the new route. ### `isLoading` property - Type: `boolean` -- `true` when `status` is `pending`. -- Background loader refreshes do not change this value. Inspect each match's `isFetching` field to observe foreground `beforeLoad`/loader work and background loader work. +- `true` if the router is currently loading a route or waiting for a route to finish loading. + +### `isTransitioning` property + +- Type: `boolean` +- `true` if the router is currently transitioning to a new route. ### `matches` property - Type: [`Array`](./RouteMatchType.md) -- The match presentation currently exposed to the application. -- A navigation can keep the previous presentation visible until pending UI is - published. Once the destination is presented, this contains its complete - structurally matched lane, including descendants that are still loading. -- Error and not-found results also preserve the complete structurally matched - lane. Rendering stops at the selected pending or terminal boundary; it does - not truncate this array. +- An array of all of the route matches that have been resolved and are currently active. ### `location` property @@ -50,5 +47,5 @@ The `RouterState` type contains all of the properties that are available on the ### `resolvedLocation` property -- Type: [`ParsedLocation`](./ParsedLocationType.md) | `undefined` -- The location whose load and framework transition have settled. It is `undefined` before the initial location resolves. +- Type: [`ParsedLocation`](./ParsedLocationType.md) +- The location that the router has resolved and loaded. diff --git a/docs/router/api/router/RouterType.md b/docs/router/api/router/RouterType.md index 3fde90e32e..757a6098ca 100644 --- a/docs/router/api/router/RouterType.md +++ b/docs/router/api/router/RouterType.md @@ -11,9 +11,8 @@ An instance of the `Router` has the following properties and methods: ### `.update` method -- Type: `(newOptions: Omit) => void` +- Type: `(newOptions: RouterOptions) => void` - Updates the router instance with new options. -- Initialization-only options such as `pathParamsAllowedCharacters` cannot be updated. Create a new router instance to change them. ### `state` property @@ -36,6 +35,16 @@ An instance of the `Router` has the following properties and methods: - Matches a pathname and search params against the router's route tree and returns an array of route matches. - If `opts.throwOnError` is `true`, any errors that occur during the matching process will be thrown (in addition to being returned in the route match's `error` property). +### `.cancelMatch` method + +- Type: `(matchId: string) => void` +- Cancels a route match that is currently pending by calling `match.abortController.abort()`. + +### `.cancelMatches` method + +- Type: `() => void` +- Cancels all route matches that are currently pending by calling `match.abortController.abort()` on each one. + ### `.buildLocation` method Builds a new parsed location object that can be used later to navigate to a new location. @@ -129,27 +138,23 @@ Navigates to a new location. ### `.invalidate` method -Invalidates selected route-match generations, reruns their loading lifecycle, -reruns `beforeLoad`, and reloads their loaders through the normal loading -protocol. +Invalidates route matches by forcing their `beforeLoad` and `load` functions to be called again. - Type: `(opts?: {filter?: (d: MakeRouteMatchUnion) => boolean, sync?: boolean, forcePending?: boolean }) => Promise` - This is useful any time your loader data might be out of date or stale. For example, if you have a route that displays a list of posts, and you have a loader function that fetches the list of posts from an API, you might want to invalidate the route matches for that route any time a new post is created so that the list of posts is always up-to-date. -- If `filter` is not supplied, all committed, cached, and in-flight match generations are invalidated. -- If `filter` is supplied, it is evaluated against committed, cached, and in-flight matches. Selecting one generation invalidates every committed, cached, or in-flight generation with the same match ID. -- Invalidation reruns `beforeLoad`; reusable loader data is marked stale and reloads through the normal loading protocol. Route-level `context` remains reusable while the match ID is unchanged. -- If `sync` is `true`, stale loader work is blocking and the returned promise resolves after it finishes instead of leaving a background refresh detached. -- If `forcePending` is `true`, selected routes that need loading enter the normal pending protocol even when successful data was already available. +- if `filter` is not supplied, all matches will be invalidated +- if `filter` is supplied, only matches for which `filter` returns `true` will be invalidated. +- if `sync` is true, the promise returned by this function will only resolve once all loaders have finished. +- if `forcePending` is true, the invalidated matches will be put into `'pending'` state regardless whether they are in `'error'` state or not. - You might also want to invalidate the Router if you imperatively `reset` the router's `CatchBoundary` to trigger loaders again. ### `.clearCache` method -Remove cached route matches and matching active preloads. +Remove cached route matches. - Type: `(opts?: {filter?: (d: MakeRouteMatchUnion) => boolean}) => void` -- If `filter` is not supplied, all cached matches and active preload lanes are removed. -- If `filter` is supplied, matching cached matches are removed. An active preload lane is canceled when any match in that lane passes the filter. -- Current committed and presented matches are not removed. +- if `filter` is not supplied, all cached matches will be removed +- if `filter` is supplied, only matches for which `filter` returns `true` will be removed. ### `.load` method @@ -165,28 +170,16 @@ Loads all of the currently matched route matches and resolves when they are all Preloads all of the matches that match the provided `NavigateOptions`. -An active preload is speculative and is not published as the current match -presentation. Successful loader data can enter the normal in-memory route -cache. Its freshness follows `preloadStaleTime`; once unused and older than -`preloadGcTime`, it is eligible for pruning during a later cache -reconciliation. +> ⚠️⚠️⚠️ **Preloaded route matches are not stored long-term in the router state. They are only stored until the next attempted navigation action.** -Every preload and navigation runs its own `beforeLoad` chain. A later lane can -reuse successful settled loader data or join loader work that is still in -flight, but it never reuses `beforeLoad` context or an already-settled -redirect, error, or not-found result. If joined loader work later produces a -terminal outcome, all current consumers of that flight observe it. - -- Type: `(opts: NavigateOptions) => Promise` +- Type: `(opts?: NavigateOptions) => Promise` - Properties - `opts` - Type: `NavigateOptions` - - Required. + - Optional, defaults to the current location. - The options that will be used to determine which route matches to preload. - Returns - - A promise that resolves with the speculative route-match lane. An ordinary error or not-found is represented by a terminal match array rather than a rejected promise. - - It resolves with `undefined` when cancellation or control flow does not produce a reusable lane. - - The method is also available on server router instances. It remains speculative and does not change the request's current location or presented matches. + - A promise that resolves with an array of all of the route matches that were preloaded. ### `.loadRouteChunk` method diff --git a/docs/router/api/router/catchBoundaryComponent.md b/docs/router/api/router/catchBoundaryComponent.md index aa2f6eb7ce..deef0ffa22 100644 --- a/docs/router/api/router/catchBoundaryComponent.md +++ b/docs/router/api/router/catchBoundaryComponent.md @@ -29,7 +29,7 @@ The `CatchBoundary` component accepts the following props: ### `props.onCatch` prop -- Type: `(error: unknown, errorInfo: ErrorInfo) => void` in React; `(error: unknown) => void` in Vue; `(error: Error) => void` in Solid +- Type: `(error: any) => void` - Optional - A callback that will be called with the error that was thrown by the component's children. diff --git a/docs/router/api/router/errorComponentComponent.md b/docs/router/api/router/errorComponentComponent.md index 07d7187580..04399f124d 100644 --- a/docs/router/api/router/errorComponentComponent.md +++ b/docs/router/api/router/errorComponentComponent.md @@ -3,7 +3,7 @@ id: errorComponentComponent title: ErrorComponent component --- -The `ErrorComponent` component renders an error notice and optional details about the thrown value. +The `ErrorComponent` component is a component that renders an error message and optionally the error's message. ## ErrorComponent props @@ -11,8 +11,8 @@ The `ErrorComponent` component accepts the following props: ### `props.error` prop -- Type: `unknown` in React and Vue; `Error` in Solid -- The caught error. Solid normalizes non-`Error` values, including SSR loader errors, into an `Error` with the original value in `cause`. +- Type: `TError` (defaults to `Error`) +- The error that was thrown by the component's children ### `props.info` prop @@ -27,6 +27,6 @@ The `ErrorComponent` component accepts the following props: ## ErrorComponent returns -- Displays an error notice, with details when the thrown value has a nonempty `message`. Values without a message still display the error notice. +- Returns a formatted error message with the error's message if it exists. - The error message can be toggled by clicking the "Show Error" button. - By default, the error message will be shown in development. diff --git a/docs/router/api/router/linkComponent.md b/docs/router/api/router/linkComponent.md index 478271a208..a8227913b5 100644 --- a/docs/router/api/router/linkComponent.md +++ b/docs/router/api/router/linkComponent.md @@ -43,7 +43,7 @@ By default, param values with characters such as `@` will be encoded in the URL: ``` -To opt out, set [pathParamsAllowedCharacters](../router/RouterOptionsType#pathparamsallowedcharacters-property) when creating the router. This setting cannot be changed on an existing router instance. +To opt-out, update the [pathParamsAllowedCharacters](../router/RouterOptionsType#pathparamsallowedcharacters-property) config on the router ```tsx import { createRouter } from '@tanstack/react-router' diff --git a/docs/router/api/router/useChildMatchesHook.md b/docs/router/api/router/useChildMatchesHook.md index 13212e61e0..d6de892192 100644 --- a/docs/router/api/router/useChildMatchesHook.md +++ b/docs/router/api/router/useChildMatchesHook.md @@ -5,9 +5,8 @@ title: useChildMatches hook The `useChildMatches` hook returns all of the child [`RouteMatch`](./RouteMatchType.md) objects from the closest match down to the leaf-most match. **It does not include the current match, which can be obtained using the `useMatch` hook.** -The result is derived from the router's current match presentation. It can -include still-loading descendants and descendants below the current render -boundary. +> [!IMPORTANT] +> If the router has pending matches and they are showing their pending component fallbacks, pending matches are used instead of active matches. ## useChildMatches options diff --git a/docs/router/api/router/useMatchRouteHook.md b/docs/router/api/router/useMatchRouteHook.md index e67ccb6cbd..01c26d07c6 100644 --- a/docs/router/api/router/useMatchRouteHook.md +++ b/docs/router/api/router/useMatchRouteHook.md @@ -3,9 +3,7 @@ id: useMatchRouteHook title: useMatchRoute hook --- -The `useMatchRoute` hook returns a `matchRoute` function that can be used to match a route against either the current or pending location. The hook subscribes the component to changes in the router state used for matching, making it useful when the match result affects what the component renders. - -The `matchRoute` function's identity changes when that router state changes. For an imperative check, such as one performed in an event handler, use [`useRouter`](./useRouterHook.md) and call `router.matchRoute` instead. The router instance is stable, and this avoids subscribing the component to router state that it does not use while rendering. +The `useMatchRoute` hook is a hook that returns a `matchRoute` function that can be used to match a route against either the current or pending location. ## useMatchRoute returns @@ -27,8 +25,6 @@ The `matchRoute` function accepts a single argument, an `options` object. ## Examples -Use `useMatchRoute` when the result determines the rendered output: - ```tsx import { useMatchRoute } from '@tanstack/react-router' @@ -37,36 +33,7 @@ function Component() { const matchRoute = useMatchRoute() const params = matchRoute({ to: '/posts/$postId' }) // ^ { postId: '123' } - - return params ? : } -``` - -For a check made at the time of an event, call `router.matchRoute` directly: - -```tsx -import { useRouter } from '@tanstack/react-router' - -function Component() { - const router = useRouter() - - return ( - - ) -} -``` - -Additional matching examples: - -```tsx -import { useMatchRoute } from '@tanstack/react-router' // Current location: /posts/123 function Component() { diff --git a/docs/router/api/router/useMatchesHook.md b/docs/router/api/router/useMatchesHook.md index e57c6c2c7e..d7a1be8dc3 100644 --- a/docs/router/api/router/useMatchesHook.md +++ b/docs/router/api/router/useMatchesHook.md @@ -3,7 +3,7 @@ id: useMatchesHook title: useMatches hook --- -The `useMatches` hook returns the router's complete presented array of [`RouteMatch`](./RouteMatchType.md) objects **regardless of its caller's position in the component tree**. The array can include still-loading descendants or matches below a pending/error/not-found render boundary. +The `useMatches` hook returns all of the [`RouteMatch`](./RouteMatchType.md) objects from the router **regardless of its callers position in the React component tree**. > [!TIP] > If you only want the parent or child matches, then you can use the [`useParentMatches`](./useParentMatchesHook.md) or the [`useChildMatches`](./useChildMatchesHook.md) based on the selection you need. diff --git a/docs/router/api/router/useParentMatchesHook.md b/docs/router/api/router/useParentMatchesHook.md index a0ce985411..7afc5585a6 100644 --- a/docs/router/api/router/useParentMatchesHook.md +++ b/docs/router/api/router/useParentMatchesHook.md @@ -5,9 +5,8 @@ title: useParentMatches hook The `useParentMatches` hook returns all of the parent [`RouteMatch`](./RouteMatchType.md) objects from the root down to the immediate parent of the current match in context. **It does not include the current match, which can be obtained using the `useMatch` hook.** -The result is derived from the router's current match presentation. During a -navigation that may still be the previous presentation; after pending UI is -published it is the destination's complete structurally matched lane. +> [!IMPORTANT] +> If the router has pending matches and they are showing their pending component fallbacks, pending matches are used instead of active matches. ## useParentMatches options diff --git a/docs/router/config.json b/docs/router/config.json index 1258ddd817..bb30fabc4a 100644 --- a/docs/router/config.json +++ b/docs/router/config.json @@ -94,7 +94,7 @@ ] }, { - "label": "Core Routing", + "label": "Routing", "children": [ { "label": "Routing Concepts", @@ -123,10 +123,6 @@ { "label": "File Naming Conventions", "to": "routing/file-naming-conventions" - }, - { - "label": "URL Rewrites", - "to": "guide/url-rewrites" } ], "frameworks": [ @@ -141,20 +137,31 @@ ] }, { - "label": "Navigation & URL State", - "collapsible": true, + "label": "Guides", "children": [ + { + "label": "Code Splitting", + "to": "guide/code-splitting" + }, + { + "label": "Automatic Code Splitting", + "to": "guide/automatic-code-splitting" + }, + { + "label": "Creating a Router", + "to": "guide/creating-a-router" + }, + { + "label": "Outlets", + "to": "guide/outlets" + }, { "label": "Navigation", "to": "guide/navigation" }, { - "label": "Link Options", - "to": "guide/link-options" - }, - { - "label": "Custom Links", - "to": "guide/custom-link" + "label": "Router Events", + "to": "guide/router-events" }, { "label": "Path Params", @@ -165,52 +172,12 @@ "to": "guide/search-params" }, { - "label": "Custom Search Param Serialization", - "to": "guide/custom-search-param-serialization" + "label": "Link Options", + "to": "guide/link-options" }, { - "label": "Route Masking", - "to": "guide/route-masking" - }, - { - "label": "Navigation Blocking", - "to": "guide/navigation-blocking" - }, - { - "label": "History Types", - "to": "guide/history-types" - }, - { - "label": "Scroll Restoration", - "to": "guide/scroll-restoration" - }, - { - "label": "Internationalization", - "to": "guide/internationalization-i18n" - } - ], - "frameworks": [ - { - "label": "react", - "children": [] - }, - { - "label": "solid", - "children": [] - } - ] - }, - { - "label": "Data & Rendering", - "collapsible": true, - "children": [ - { - "label": "Code Splitting", - "to": "guide/code-splitting" - }, - { - "label": "Automatic Code Splitting", - "to": "guide/automatic-code-splitting" + "label": "Custom Links", + "to": "guide/custom-link" }, { "label": "Data Loading", @@ -228,6 +195,14 @@ "label": "Data Mutations", "to": "guide/data-mutations" }, + { + "label": "Type Safety", + "to": "guide/type-safety" + }, + { + "label": "Type Utilities", + "to": "guide/type-utilities" + }, { "label": "Preloading", "to": "guide/preloading" @@ -237,48 +212,20 @@ "to": "guide/document-head-management" }, { - "label": "SSR", - "to": "guide/ssr" + "label": "Route Masking", + "to": "guide/route-masking" }, { - "label": "Render Optimizations", - "to": "guide/render-optimizations" - } - ], - "frameworks": [ - { - "label": "react", - "children": [] + "label": "Navigation Blocking", + "to": "guide/navigation-blocking" }, { - "label": "solid", - "children": [] - } - ] - }, - { - "label": "Router Configuration", - "collapsible": true, - "children": [ - { - "label": "Creating a Router", - "to": "guide/creating-a-router" + "label": "Custom Search Param Serialization", + "to": "guide/custom-search-param-serialization" }, { - "label": "Outlets", - "to": "guide/outlets" - }, - { - "label": "Router Events", - "to": "guide/router-events" - }, - { - "label": "Type Safety", - "to": "guide/type-safety" - }, - { - "label": "Type Utilities", - "to": "guide/type-utilities" + "label": "History Types", + "to": "guide/history-types" }, { "label": "Router Context", @@ -292,9 +239,21 @@ "label": "Authenticated Routes", "to": "guide/authenticated-routes" }, + { + "label": "Scroll Restoration", + "to": "guide/scroll-restoration" + }, { "label": "Static Route Data", "to": "guide/static-route-data" + }, + { + "label": "SSR", + "to": "guide/ssr" + }, + { + "label": "Render Optimizations", + "to": "guide/render-optimizations" } ], "frameworks": [ diff --git a/docs/router/decisions-on-dx.md b/docs/router/decisions-on-dx.md index a06ec4b331..26c366a9da 100644 --- a/docs/router/decisions-on-dx.md +++ b/docs/router/decisions-on-dx.md @@ -39,7 +39,7 @@ But to achieve this, we had to make some decisions that deviate from the norms i ## Why is the Router's configuration done this way? -When you want to leverage TypeScript's inference features to its fullest, you'll quickly realize that _Generics_ are your best friend. And so, TanStack Router uses Generics everywhere to ensure that the types of your routes are inferred as much as possible. +When you want to leverage the TypeScript's inference features to its fullest, you'll quickly realize that _Generics_ are your best friend. And so, TanStack Router uses Generics everywhere to ensure that the types of your routes are inferred as much as possible. This means that you have to define your routes in a way that allows TypeScript to infer the types of your routes as much as possible. @@ -219,7 +219,7 @@ TanStack Router's file-based routing is designed to solve all of these issues. I The file-based routing approach is powered by the TanStack Router Bundler Plugin. It performs 3 essential tasks that solve the pain points in route configuration when using code-based routing: 1. **Route configuration boilerplate**: It generates the boilerplate for your route configurations. -2. **Route tree stitching**: It stitches together your route configurations into a single cohesive route-tree. Also in the background, it correctly updates the route configurations to define the `getParentRoute` function and so matches the routes with their parent routes. +2. **Route tree stitching**: It stitches together your route configurations into a single cohesive route-tree. Also in the background, it correctly updates the route configurations to define the `getParentRoute` function match the routes with their parent routes. 3. **Code-splitting**: It automatically code-splits your route content components and updates the route configurations with the correct component. Additionally, at runtime, it ensures that the correct component is loaded when the route is visited. Let's take a look at how the route configuration for the previous example would look like with file-based routing. diff --git a/docs/router/eslint/create-route-property-order.md b/docs/router/eslint/create-route-property-order.md index 453fd64acc..c22aa7c52d 100644 --- a/docs/router/eslint/create-route-property-order.md +++ b/docs/router/eslint/create-route-property-order.md @@ -37,10 +37,7 @@ import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/path')({ loader: async ({ context }) => { - await context.queryClient.query({ - ...getQueryOptions(context.hello), - staleTime: 'static', - }) + await context.queryClient.ensureQueryData(getQueryOptions(context.hello)) }, beforeLoad: () => ({ hello: 'world' }), }) @@ -58,10 +55,7 @@ import { createFileRoute } from '@tanstack/solid-router' export const Route = createFileRoute('/path')({ loader: async ({ context }) => { - await context.queryClient.query({ - ...getQueryOptions(context.hello), - staleTime: 'static', - }) + await context.queryClient.ensureQueryData(getQueryOptions(context.hello)) }, beforeLoad: () => ({ hello: 'world' }), }) @@ -86,10 +80,7 @@ import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/path')({ beforeLoad: () => ({ hello: 'world' }), loader: async ({ context }) => { - await context.queryClient.query({ - ...getQueryOptions(context.hello), - staleTime: 'static', - }) + await context.queryClient.ensureQueryData(getQueryOptions(context.hello)) }, }) ``` @@ -107,10 +98,7 @@ import { createFileRoute } from '@tanstack/solid-router' export const Route = createFileRoute('/path')({ beforeLoad: () => ({ hello: 'world' }), loader: async ({ context }) => { - await context.queryClient.query({ - ...getQueryOptions(context.hello), - staleTime: 'static', - }) + await context.queryClient.ensureQueryData(getQueryOptions(context.hello)) }, }) ``` diff --git a/docs/router/guide/automatic-code-splitting.md b/docs/router/guide/automatic-code-splitting.md index 859a19ff09..4612c298c6 100644 --- a/docs/router/guide/automatic-code-splitting.md +++ b/docs/router/guide/automatic-code-splitting.md @@ -4,7 +4,7 @@ title: Automatic Code Splitting The automatic code splitting feature in TanStack Router allows you to optimize your application's bundle size by lazily loading route components and their associated data. This is particularly useful for large applications where you want to minimize the initial load time by only loading the necessary code for the current route. -To turn this feature on, simply set the `autoCodeSplitting` option to `true` in your bundler plugin configuration. This enables the router to automatically handle code splitting for your routes without requiring any additional setup. It is available with Vite, Rspack/Rsbuild and Webpack, not with Esbuild. +To turn this feature on, simply set the `autoCodeSplitting` option to `true` in your bundler plugin configuration. This enables the router to automatically handle code splitting for your routes without requiring any additional setup. ```ts // vite.config.ts @@ -35,7 +35,7 @@ This happens seamlessly, without requiring you to manually split your code or ma ### The transformation process -When you enable automatic code splitting, the bundler plugin does this by using static code analysis to look at the code in your route files and to transform them into optimized outputs. +When you enable automatic code splitting, the bundler plugin does this by using static code analysis look at your the code in your route files to transform them into optimized outputs. This transformation process produces two key outputs when each of your route files are processed: @@ -48,7 +48,7 @@ This process ensures that your original code remains clean and readable, while t The decision of what to split into separate chunks is crucial for optimizing your application's performance. TanStack Router uses a concept called "**Split Groupings**" to determine how different parts of your route should be bundled together. -Split groupings are arrays of properties that tell TanStack Router how to bundle different parts of your route together. Each grouping is a list of property names that you want to bundle together into a single lazy-loaded chunk. +Split groupings are arrays of properties that tell TanStack Router how to bundle different parts of your route together. Each grouping is an list of property names that you want to bundle together into a single lazy-loaded chunk. The available properties to split are: @@ -76,7 +76,7 @@ This means that it creates three separate lazy-loaded chunks for each route. Res ### Rules of Splitting -For automatic code splitting to work, there are some rules in place to make sure that this process can happen reliably and predictably. +For automatic code splitting to work, there are some rules in-place to make sure that this process can reliably and predictably happen. #### Do not export route properties diff --git a/docs/router/guide/code-splitting.md b/docs/router/guide/code-splitting.md index b1423253be..698bf262b5 100644 --- a/docs/router/guide/code-splitting.md +++ b/docs/router/guide/code-splitting.md @@ -115,7 +115,7 @@ These are the only options that `createLazyFileRoute` supports: ### Example code splitting with `.lazy.tsx` -When you are using `.lazy.tsx`, you can split your route into two files to enable code splitting: +When you are using `.lazy.tsx` you can split your route into two files to enable code splitting: **Before (Single File)** diff --git a/docs/router/guide/data-loading.md b/docs/router/guide/data-loading.md index 6b9fd42777..2ecdf443ad 100644 --- a/docs/router/guide/data-loading.md +++ b/docs/router/guide/data-loading.md @@ -81,7 +81,7 @@ Use the object form when you want to configure loader-specific behavior such as The `loader` function receives a single object with the following properties: -- `abortController` - The controller for this shareable loader invocation. A preload and navigation can share the same in-flight loader work. Its signal is cancelled after the invocation becomes outdated and no consumer still needs it. +- `abortController` - The route's abortController. Its signal is cancelled when the route is unloaded or when the Route is no longer relevant and the current invocation of the `loader` function becomes outdated. - `cause` - The cause of the current route match. Can be either one of the following: - `enter` - When the route is matched and loaded after not being matched in the previous location. - `preload` - When the route is being preloaded. @@ -150,7 +150,7 @@ Using these dependencies as keys, TanStack Router will cache the data returned f To control router dependencies and "freshness", TanStack Router provides a plethora of options to control the keying and caching behavior of your route loaders. Let's take a look at them in the order that you are most likely to use them: - `routeOptions.loaderDeps` - - A deterministic, side-effect-free function that supplies you the validated search params for a router and returns a serializable object of dependencies for use in your `loader` function. When these deps change from navigation to navigation, it will cause the route to reload regardless of `staleTime`s. The deps are compared using a deep equality check. + - A function that supplies you the search params for a router and returns an object of dependencies for use in your `loader` function. When these deps changed from navigation to navigation, it will cause the route to reload regardless of `staleTime`s. The deps are compared using a deep equality check. - `routeOptions.staleTime` - `routerOptions.defaultStaleTime` - The number of milliseconds that a route's data should be considered fresh when attempting to load. @@ -168,11 +168,11 @@ To control router dependencies and "freshness", TanStack Router provides a pleth ### ⚠️ Some Important Defaults -- By default, `staleTime` is set to `0`, so reusable successful data is immediately considered stale. When the same loader key is entered again or `router.load()` is called explicitly, stale data revalidates in the background by default. A different loader key identifies a separate cache entry and must load if it has no reusable data. -- By default, loader data produced by a preload is considered fresh for **30 seconds**. Every preload and navigation still runs its own `beforeLoad` chain, but a later preload and the first navigation can reuse the preload's loader data or in-flight loader work during that interval. After navigation accepts that loader generation, subsequent freshness checks use the standard `staleTime`. -- By default, `gcTime` and `preloadGcTime` define **5-minute** retention windows. Once unused data is older than its applicable window, it is eligible for pruning during a later cache reconciliation. The two windows can be configured independently. +- By default, the `staleTime` is set to `0`, meaning that the route's data is immediately considered stale. Stale matches are reloaded in the background when the route is entered again, when its loader key changes (path params used by the route or `loaderDeps`), or when `router.load()` is called explicitly. +- By default, a previously preloaded route is considered fresh for **30 seconds**. This means if a route is preloaded, then preloaded again within 30 seconds, the second preload will be ignored. This prevents unnecessary preloads from happening too frequently. **When a route is loaded normally, the standard `staleTime` is used.** +- By default, the `gcTime` is set to **30 minutes**, meaning that any route data that has not been accessed in 30 minutes will be garbage collected and removed from the cache. - By default, `staleReloadMode` is `'background'`, so stale successful matches keep rendering with their existing `loaderData` while the loader revalidates in the background. -- `router.invalidate()` selects matching committed, cached, and in-flight loader generations for invalidation and retires matching active preload lanes. Current active routes reload through the normal loading protocol; cached inactive data remains marked stale and reloads when it is reused. By default, stale successful loader data revalidates in the background unless `sync: true` is requested. +- `router.invalidate()` will force all active routes to reload their loaders immediately and mark every cached route's data as stale. ### Using `loaderDeps` to access search params @@ -180,11 +180,6 @@ Imagine a `/posts` route supports some pagination via search params `offset` and Once we have these deps in place, the route will always reload when the deps change. -`loaderDeps` defines a cache key during route planning. For the same validated -search input it must return the same value without navigating or mutating state. -The returned value and custom serialization methods such as `toJSON` must also -be side-effect-free. - ```tsx // /routes/posts.tsx export const Route = createFileRoute('/posts')({ @@ -221,13 +216,7 @@ export const Route = createFileRoute('/posts')({ ### Using `staleTime` to control how long data is considered fresh -By default, `staleTime` for accepted navigation data is `0`ms, while -`preloadStaleTime` is 30 seconds. A successful preload can therefore provide -loader data to the first navigation during that interval. Once navigation -accepts that loader generation, normal navigation freshness applies. With the -default `staleTime`, the data is immediately stale for a later use of the same -loader key and revalidates in the background while cached data remains visible. -A different loader key identifies a separate cache entry. +By default, `staleTime` for navigations is set to `0`ms (and 30 seconds for preloads) which means that the route's data will always be considered stale. When a stale route is entered again, its loader key changes, or `router.load()` is called explicitly, the route will reload in the background. **This is a good default for most use cases, but you may find that some route data is more static or potentially expensive to load.** In these cases, you can use the `staleTime` option to control how long the route's data is considered fresh for navigations. Let's take a look at an example: @@ -313,16 +302,9 @@ export const Route = createFileRoute('/posts')({ ### Opting out of caching while still preloading -Even though you may opt out of retaining ordinary route data, you can still get -the benefits of preloading. Preloaded results use `preloadGcTime` for retention -and `preloadStaleTime` for freshness, so the default settings keep a recent -preload in memory and let the first navigation reuse it without another loader -call. +Even though you may opt-out of short-term caching for your route data, you can still get the benefits of preloading! With the above configuration, preloading will still "just work" with the default `preloadGcTime`. This means that if a route is preloaded, then navigated to, the route's data will be considered fresh and will not be reloaded. -Use `routerOptions.defaultPreload` to control automatic link preloading. Setting -`routeOptions.preload` to `false` has a narrower effect: a speculative lane -still runs that route's `beforeLoad`, but skips its `loader`. Navigation runs -both normally. +To opt out of preloading, don't turn it on via the `routerOptions.defaultPreload` or `routeOptions.preload` options. ## Passing all loader events to an external cache @@ -335,11 +317,7 @@ const router = createRouter({ }) ``` -This makes settled preload data immediately stale in the Router, allowing your -external cache to decide whether to fetch. Retention still follows -`preloadGcTime`, and overlapping preload or navigation consumers can still -share in-flight loader work. A route's `shouldReload` option can also suppress -a loader call. +This will ensure that every preload, load, and reload event will trigger your `loader` functions, which can then be handled and deduped by your external cache. ## Using Router Context @@ -494,7 +472,7 @@ export const Route = createFileRoute('/posts')({ ## Using the Abort Signal -The `abortController` property of the `loader` function is an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for that loader invocation. A preload and navigation can share an in-flight invocation, so its signal remains active while any consumer still needs the work. The signal is cancelled after the invocation becomes outdated and has no remaining consumers. Here is an example using it with a fetch call: +The `abortController` property of the `loader` function is an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). Its signal is cancelled when the route is unloaded or when the `loader` call becomes outdated. This is useful for cancelling network requests when the route is unloaded or when the route's params change. Here is an example using it with a fetch call: ```tsx // src/routes/posts.tsx @@ -570,7 +548,7 @@ The `routeOptions.onCatch` option is a function that is called whenever an error ```tsx // src/routes/posts.tsx export const Route = createFileRoute('/posts')({ - onCatch: (error) => { + onCatch: ({ error, errorInfo }) => { // Log the error console.error(error) }, @@ -581,20 +559,16 @@ export const Route = createFileRoute('/posts')({ The `routeOptions.errorComponent` option is a component that is rendered when an error occurs during the route loading or rendering lifecycle. It is rendered with the following props: -- `error` - The caught value (`unknown` in React and Vue; `Error` in Solid) +- `error` - The error that occurred - `reset` - A function to reset the internal `CatchBoundary` -`ErrorComponentProps` defaults its `error` property to `unknown` in React and Vue, where you must narrow the value before accessing properties such as `message`. In Solid, it defaults to `Error`. `ErrorComponentProps` can describe an error after you have narrowed it; it does not restrict what a route can throw. This applies to boundary components and `onCatch` callbacks, including `defaultOnCatch`; it does not change the `onError` callback. - -React and Vue boundaries pass through the caught value, including falsy values. Solid wraps non-`Error` throws in an `Error` whose `cause` contains the original value. This also applies to Solid error components rendered during SSR: existing `Error` instances are preserved, strings become the error message, and other values use the message `Unknown error`. Router state and loader `onError` callbacks retain the original value. - ```tsx // src/routes/posts.tsx export const Route = createFileRoute('/posts')({ loader: () => fetchPosts(), errorComponent: ({ error }) => { // Render an error message - return
{error instanceof Error ? error.message : String(error)}
+ return
{error.message}
}, }) ``` @@ -608,7 +582,7 @@ export const Route = createFileRoute('/posts')({ errorComponent: ({ error, reset }) => { return (
- {error instanceof Error ? error.message : String(error)} + {error.message} - ) -} -``` - --- Phew! That's a lot of navigating! That said, hopefully you're feeling pretty good about getting around your application now. Let's move on! diff --git a/docs/router/guide/path-params.md b/docs/router/guide/path-params.md index d326eabb4b..b1ae4f5d2f 100644 --- a/docs/router/guide/path-params.md +++ b/docs/router/guide/path-params.md @@ -137,9 +137,6 @@ When multiple dynamic, optional, or wildcard routes can match the same URL, rout Higher `params.priority` values are tried first. The default priority is `0`, and if a higher-priority route's `params.parse` returns `false`, matching continues to the next candidate route. -`params.parse` runs during route planning and may be evaluated more than once. -It must be deterministic and side-effect-free for the same raw params. - ```tsx title="src/routes/posts.$postId.tsx" export const Route = createFileRoute('/posts/$postId')({ params: { @@ -229,7 +226,7 @@ function PostComponent() { -You can even combine prefixes with wildcard routes to create more complex patterns: +You can even combines prefixes with wildcard routes to create more complex patterns: @@ -585,10 +582,10 @@ Optional parameters can be combined with wildcards for complex routing patterns: # React -```tsx title="src/routes/docs/v{-$version}/$.tsx" -// Route: /docs/v{-$version}/$ +```tsx title="src/routes/docs/{-$version}/$.tsx" +// Route: /docs/{-$version}/$ // Matches: /docs/extra/path, /docs/v2/extra/path -export const Route = createFileRoute('/docs/v{-$version}/$')({ +export const Route = createFileRoute('/docs/{-$version}/$')({ component: DocsComponent, }) @@ -598,7 +595,7 @@ function DocsComponent() { return (
- Version: {version ? `v${version}` : 'latest'} + Version: {version || 'latest'} Path: {_splat}
) @@ -607,10 +604,10 @@ function DocsComponent() { # Solid -```tsx title="src/routes/docs/v{-$version}/$.tsx" -// Route: /docs/v{-$version}/$ +```tsx title="src/routes/docs/{-$version}/$.tsx" +// Route: /docs/{-$version}/$ // Matches: /docs/extra/path, /docs/v2/extra/path -export const Route = createFileRoute('/docs/v{-$version}/$')({ +export const Route = createFileRoute('/docs/{-$version}/$')({ component: DocsComponent, }) @@ -619,7 +616,7 @@ function DocsComponent() { return (
- Version: {params().version ? `v${params().version}` : 'latest'} + Version: {params().version || 'latest'} Path: {params()._splat}
) @@ -1395,8 +1392,6 @@ const router = createRouter({ }) ``` -This setting is fixed when the router is created. To use different allowed characters, create a new router instance. - The following is the list of accepted allowed characters: - `;` diff --git a/docs/router/guide/preloading.md b/docs/router/guide/preloading.md index 7f48412ce6..453294ab6e 100644 --- a/docs/router/guide/preloading.md +++ b/docs/router/guide/preloading.md @@ -18,17 +18,10 @@ Preloading in TanStack Router is a way to load a route before the user actually ## How long does preloaded data stay in memory? -Successful preloaded loader results can enter the router's in-memory cache with -two independent policies: +Preloaded route matches are temporarily cached in memory with a few important caveats: -- **Freshness defaults to 30 seconds.** Configure it with - `defaultPreloadStaleTime` or a route's `preloadStaleTime`. -- **The unused retention window defaults to 5 minutes.** Configure it with - `defaultPreloadGcTime` or a route's `preloadGcTime`. Older unused entries - are eligible for pruning during a later cache reconciliation. -- **The speculative lane is never promoted into router state.** Navigation - creates its own presentation and runs its own `beforeLoad` chain. It can reuse - cached loader data or join a loader that is still in flight. +- **Unused preloaded data is removed after 30 seconds by default.** This can be configured by setting the `defaultPreloadMaxAge` option on your router. +- **Obviously, when a route is loaded, its preloaded version is promoted to the router's normal pending matches state.** If you need more control over preloading, caching and/or garbage collection of preloaded data, you should use an external caching library like [TanStack Query](https://tanstack.com/query). @@ -64,7 +57,7 @@ This will turn on `intent` preloading by default for all `` components in ## Preload Delay -By default, intent focus/hover and viewport preloading start after **50ms**. Pending preloads are cancelled if focus or hover ends, or the link leaves the viewport. Touch intent preloads immediately. You can change this delay by setting the `defaultPreloadDelay` option on your router: +By default, preloading will start after **50ms** of the user hovering or touching a `` component. You can change this delay by setting the `defaultPreloadDelay` option on your router: @@ -94,16 +87,9 @@ const router = createRouter({ You can also set the `preloadDelay` prop on individual `` components to override the default behavior on a per-link basis. -## Built-in Preloading, Freshness, and Retention +## Built-in Preloading & `preloadStaleTime` -If you're using the built-in loaders, you can control how long preloaded data is considered fresh by setting either `routerOptions.defaultPreloadStaleTime` or `routeOptions.preloadStaleTime` to a number of milliseconds. **By default, preloaded data is considered fresh for 30 seconds.** - -Freshness and retention are separate. `preloadStaleTime` controls whether the -retained loader result can be reused without another loader call. -`preloadGcTime` (or `defaultPreloadGcTime`) controls when an unused preload -result becomes eligible for pruning during a later cache reconciliation; it -does not schedule a timer to evict the result at that exact moment. Both preload -GC options default to 5 minutes. +If you're using the built-in loaders, you can control how long preloaded data is considered fresh until another preload is triggered by setting either `routerOptions.defaultPreloadStaleTime` or `routeOptions.preloadStaleTime` to a number of milliseconds. **By default, preloaded data is considered fresh for 30 seconds.**. To change this, you can set the `defaultPreloadStaleTime` option on your router: @@ -139,34 +125,16 @@ Or, you can use the `routeOptions.preloadStaleTime` option on individual routes: // src/routes/posts.$postId.tsx export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params }) => fetchPost(params.postId), - // Reload preloaded data when it is more than 10 seconds old + // Preload the route again if the preload cache is older than 10 seconds preloadStaleTime: 10_000, }) ``` -Client-side preloading runs each route's `beforeLoad` with `preload: true`. -Every later preload or navigation runs its own `beforeLoad` chain, so a -navigation observes `preload: false` even when an identical preload is still -active. A later lane can reuse successful settled loader data or join loader -work that is still in flight, but it never reuses `beforeLoad` context or an -already-settled redirect, error, or not-found result. If joined loader work -later produces a terminal outcome, all current consumers of that flight observe -it. The `shouldReload` option remains loader-only. - -If a route has `preload: false`, its speculative lane still runs `beforeLoad`, -but skips that route's loader. Navigation runs `beforeLoad` again and performs -the skipped loader work. - ## Preloading with External Libraries When integrating external caching libraries like React Query, which have their own mechanisms for determining stale data, you may want to override the default preloading and stale-while-revalidate logic of TanStack Router. These libraries often use options like staleTime to control the freshness of data. -To let an external cache make the freshness decision, set -`routerOptions.defaultPreloadStaleTime` or `routeOptions.preloadStaleTime` to -`0`. Settled preload data then becomes immediately stale in the Router, while -retention still follows `preloadGcTime`. Overlapping preload or navigation -consumers can still share in-flight loader work, and `shouldReload` can still -suppress a loader call. +To customize the preloading behavior in TanStack Router and fully leverage your external library's caching strategy, you can bypass the built-in caching by setting routerOptions.defaultPreloadStaleTime or routeOptions.preloadStaleTime to 0. This ensures that all preloads are marked as stale internally, and loaders are always invoked, allowing your external library, such as React Query, to manage data loading and caching. For example: @@ -200,38 +168,25 @@ This would then allow you, for instance, to use an option like React Query's `st ## Preloading Manually -If you need to manually preload a route, use the router's `preloadRoute` method. -It accepts a standard TanStack `NavigateOptions` object and returns the -speculative match lane. An ordinary error or not-found thrown while loading is -represented in that returned lane; cancellation or control flow that produces -no reusable lane can return `undefined`. +If you need to manually preload a route, you can use the router's `preloadRoute` method. It accepts a standard TanStack `NavigateOptions` object and returns a promise that resolves when the route is preloaded. # React ```tsx -import { isNotFound } from '@tanstack/react-router' - function Component() { const router = useRouter() useEffect(() => { async function preload() { - const matches = await router.preloadRoute({ - to: postRoute, - params: { id: 1 }, - }) - - const routeFailure = matches?.find( - (match) => - match.status === 'error' || - match.status === 'notFound' || - isNotFound(match.error), - ) - - if (routeFailure) { - // Inspect routeFailure.error + try { + const matches = await router.preloadRoute({ + to: postRoute, + params: { id: 1 }, + }) + } catch (err) { + // Failed to preload route } } @@ -245,27 +200,18 @@ function Component() { # Solid ```tsx -import { isNotFound } from '@tanstack/solid-router' - function Component() { const router = useRouter() createEffect(() => { async function preload() { - const matches = await router.preloadRoute({ - to: postRoute, - params: { id: 1 }, - }) - - const routeFailure = matches?.find( - (match) => - match.status === 'error' || - match.status === 'notFound' || - isNotFound(match.error), - ) - - if (routeFailure) { - // Inspect routeFailure.error + try { + const matches = await router.preloadRoute({ + to: postRoute, + params: { id: 1 }, + }) + } catch (err) { + // Failed to preload route } } diff --git a/docs/router/guide/router-context.md b/docs/router/guide/router-context.md index 347082106f..5fc4001010 100644 --- a/docs/router/guide/router-context.md +++ b/docs/router/guide/router-context.md @@ -278,10 +278,9 @@ Then, in your route: export const Route = createFileRoute('/todos')({ component: Todos, loader: async ({ context }) => { - await context.queryClient.query({ + await context.queryClient.ensureQueryData({ queryKey: ['todos', { userId: user.id }], queryFn: fetchTodos, - staleTime: 'static', }) }, }) diff --git a/docs/router/guide/ssr.md b/docs/router/guide/ssr.md index 46a0941e7c..5b7be35cb6 100644 --- a/docs/router/guide/ssr.md +++ b/docs/router/guide/ssr.md @@ -60,9 +60,7 @@ To implement non-streaming SSR with TanStack Router, you will need the following ### Automatic Server History -On the client, Router defaults to using an instance of `createBrowserHistory`. On the server, the Router SSR request handler and TanStack Start automatically create a lightweight history containing only the request URL. This history does not keep a navigation stack or respond to `push`, `replace`, `go`, `back`, or `forward` calls. - -Server-side calls to `router.navigate()` and `router.commitLocation()` are also no-ops: their promises resolve without changing the request location or running another load. To redirect a request, use the dedicated [redirect API](../api/router/redirectFunction.md), such as `throw redirect({ to: '/login' })` in `beforeLoad` or a loader. +On the client, Router defaults to using an instance of `createBrowserHistory`, which is the preferred type of history to use on the client. On the server, however, you will want to use an instance of `createMemoryHistory` instead. This is because `createBrowserHistory` uses the `window` object, which does not exist on the server. This is handled automatically for you in the RouterServer component. ### Automatic Loader Dehydration/Hydration @@ -158,8 +156,6 @@ export async function render({ request }: { request: Request }) { using `renderRouterToString` -React and Solid use their native synchronous string renderers. Suspended components render their Suspense fallback without waiting for the component to resolve. The router still finishes serializing hydration data before returning the response. Use `renderRouterToStream` when you need the server to render suspended content after it resolves. - # React @@ -240,7 +236,7 @@ hydrateRoot(document, ) # Solid ```tsx title="src/entry-client.tsx" -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' import { RouterClient } from '@tanstack/solid-router/ssr/client' import { createRouter } from './router' @@ -262,9 +258,6 @@ This pattern can be useful for pages that have slow or high-latency data fetchin > [!NOTE] > This streaming pattern is all automatic as long as you are using either `defaultStreamHandler` or `renderRouterToStream`. -> [!IMPORTANT] -> Render [``](./document-head-management.md#scripts) inside `` of your root route. It emits the route scripts and marks where the router inserts streamed hydration data. Without it the response still completes, but the page cannot hydrate. - using `defaultStreamHandler` diff --git a/docs/router/guide/type-safety.md b/docs/router/guide/type-safety.md index 3faaed79e7..2adffc58c5 100644 --- a/docs/router/guide/type-safety.md +++ b/docs/router/guide/type-safety.md @@ -137,13 +137,12 @@ As your application scales, TypeScript check times will naturally increase. Ther ### Only infer types you need -A great pattern with client side data caches (TanStack Query, etc.) is to prefetch data. For example with TanStack Query you might have a route which calls `queryClient.query` in a `loader`. +A great pattern with client side data caches (TanStack Query, etc.) is to prefetch data. For example with TanStack Query you might have a route which calls `queryClient.ensureQueryData` in a `loader`. ```tsx export const Route = createFileRoute('/posts/$postId/deep')({ - // (ctx: LoaderFnContext) => Promise loader: ({ context: { queryClient }, params: { postId } }) => - queryClient.query({ ...postQueryOptions(postId), staleTime: 'static' }), + queryClient.ensureQueryData(postQueryOptions(postId)), component: PostDeepComponent, }) @@ -155,16 +154,12 @@ function PostDeepComponent() { } ``` -This may look fine and for small route trees and you may not notice any TS performance issues. However in this case TS has to infer the loader's return type, despite it never being used in your route. If the loader data is a complex type with many routes that prefetch in this manner, it can slow down editor performance. In this case, the change is quite simple and let typescript infer `Promise`. +This may look fine and for small route trees and you may not notice any TS performance issues. However in this case TS has to infer the loader's return type, despite it never being used in your route. If the loader data is a complex type with many routes that prefetch in this manner, it can slow down editor performance. In this case, the change is quite simple and let typescript infer Promise. ```tsx export const Route = createFileRoute('/posts/$postId/deep')({ - // (ctx: LoaderFnContext) => Promise loader: async ({ context: { queryClient }, params: { postId } }) => { - await queryClient.query({ - ...postQueryOptions(postId), - staleTime: 'static', - }) + await queryClient.ensureQueryData(postQueryOptions(postId)) }, component: PostDeepComponent, }) diff --git a/docs/router/guide/url-rewrites.md b/docs/router/guide/url-rewrites.md index e780e01781..7bc3df8545 100644 --- a/docs/router/guide/url-rewrites.md +++ b/docs/router/guide/url-rewrites.md @@ -343,8 +343,6 @@ const navigate = useNavigate() navigate({ to: '/about' }) ``` -When the final output URL has a different origin, programmatic navigation performs a full page load automatically. You do not need to set `reloadDocument: true` for cross-origin rewrites. If a route mask is applied, its output URL determines whether navigation stays on the current origin. - ### Hard Links for Cross-Origin Rewrites When an output rewrite changes the origin (hostname), the `` component automatically renders a standard anchor tag instead of using client-side navigation: diff --git a/docs/router/how-to/debug-router-issues.md b/docs/router/how-to/debug-router-issues.md index 27dadd361f..b4d20ec72f 100644 --- a/docs/router/how-to/debug-router-issues.md +++ b/docs/router/how-to/debug-router-issues.md @@ -322,16 +322,11 @@ const route = createRoute({ ```tsx function DataLoadingDebug() { - const state = useRouterState() + const location = useLocation() console.log('Route status:', { - status: state.status, - isLoading: state.isLoading, - matches: state.matches.map((match) => ({ - routeId: match.routeId, - status: match.status, - isFetching: match.isFetching, - })), + isLoading: location.isLoading, + isTransitioning: location.isTransitioning, }) return null diff --git a/docs/router/how-to/setup-testing.md b/docs/router/how-to/setup-testing.md index 104cbedc0d..72f40032cf 100644 --- a/docs/router/how-to/setup-testing.md +++ b/docs/router/how-to/setup-testing.md @@ -224,12 +224,8 @@ export function LoadingComponent() { return
Loading...
} -export function ErrorComponent({ error }: { error: unknown }) { - return ( -
- Error: {error instanceof Error ? error.message : String(error)} -
- ) +export function ErrorComponent({ error }: { error: Error }) { + return
Error: {error.message}
} ``` @@ -590,12 +586,8 @@ describe('Code-Based Route Data Loading', () => { return
{user.name}
} - function ErrorComponent({ error }: { error: unknown }) { - return ( -
- Error: {error instanceof Error ? error.message : String(error)} -
- ) + function ErrorComponent({ error }: { error: Error }) { + return
Error: {error.message}
} const userRoute = createRoute({ @@ -659,10 +651,9 @@ describe('React Query Integration', () => { path: '/posts', component: PostsList, loader: ({ context: { queryClient } }) => - queryClient.query({ + queryClient.ensureQueryData({ queryKey: ['posts'], queryFn: mockFetchPosts, - staleTime: 'static', }), }) diff --git a/docs/router/how-to/share-search-params-across-routes.md b/docs/router/how-to/share-search-params-across-routes.md index 23a202b176..e1e24c1e0d 100644 --- a/docs/router/how-to/share-search-params-across-routes.md +++ b/docs/router/how-to/share-search-params-across-routes.md @@ -2,6 +2,8 @@ title: Share Search Parameters Across Routes --- +# How to Share Search Parameters Across Routes + Search parameters automatically inherit from parent routes in TanStack Router. When a parent route validates search parameters, child routes can access them via `Route.useSearch()` alongside their own parameters. ## How Parameter Inheritance Works diff --git a/docs/router/how-to/use-environment-variables.md b/docs/router/how-to/use-environment-variables.md index 4f6a764f28..2d35308158 100644 --- a/docs/router/how-to/use-environment-variables.md +++ b/docs/router/how-to/use-environment-variables.md @@ -164,7 +164,7 @@ const fetchPosts = async () => { export const Route = createFileRoute('/posts/')({ loader: fetchPosts, errorComponent: ({ error }) => ( -
Error loading posts: {error instanceof Error ? error.message : String(error)}
+
Error loading posts: {error.message}
), }) ``` diff --git a/docs/router/how-to/validate-search-params.md b/docs/router/how-to/validate-search-params.md index 15d3f9d6c8..5abd435cef 100644 --- a/docs/router/how-to/validate-search-params.md +++ b/docs/router/how-to/validate-search-params.md @@ -36,7 +36,7 @@ export const Route = createFileRoute('/products')({ return (

Invalid Search Parameters

-

{error instanceof Error ? error.message : String(error)}

+

{error.message}

diff --git a/docs/router/installation/manual.md b/docs/router/installation/manual.md index ab89060ef1..e2cfcabcf3 100644 --- a/docs/router/installation/manual.md +++ b/docs/router/installation/manual.md @@ -204,7 +204,7 @@ function About() { ```tsx title="src/main.tsx" /* @refresh reload */ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' // Import the generated route tree @@ -232,7 +232,7 @@ render(() => , rootElement) Regardless of whether you are using the `@tanstack/router-plugin` package and running the `npm run dev`/`npm run build` scripts, or manually running the `tsr watch`/`tsr generate` commands from your package scripts, the route tree file will be generated at `src/routeTree.gen.ts`. -If you are working with this pattern, you should change the `id` of the root `
` on your `index.html` file to `
` +If you are working with this pattern you should change the `id` of the root `
` on your `index.html` file to `
` ## Using Code-Based Route Configuration @@ -319,7 +319,7 @@ if (!rootElement.innerHTML) { ```tsx /* @refresh reload */ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Outlet, RouterProvider, diff --git a/docs/router/installation/with-esbuild.md b/docs/router/installation/with-esbuild.md index 8ecd9b8d0a..b5cad0622c 100644 --- a/docs/router/installation/with-esbuild.md +++ b/docs/router/installation/with-esbuild.md @@ -25,6 +25,7 @@ export default { plugins: [ tanstackRouter({ target: 'react', + autoCodeSplitting: true, }), ], } @@ -49,7 +50,10 @@ const ctx = await esbuild.context({ format: 'esm', target: ['esnext'], sourcemap: true, - plugins: [solidPlugin(), tanstackRouter({ target: 'solid' })], + plugins: [ + solidPlugin(), + tanstackRouter({ target: 'solid', autoCodeSplitting: true }), + ], }) if (isDev) { @@ -68,9 +72,6 @@ Or, you can clone our [Quickstart Esbuild example](https://github.com/TanStack/r Now that you've added the plugin to your Esbuild configuration, you're all set to start using file-based routing with TanStack Router. -> [!NOTE] -> Automatic code splitting is not available with Esbuild: the plugin throws an error when `autoCodeSplitting` is `true`. Route generation works as usual. To split routes, use [manual code splitting](../guide/code-splitting.md) or another bundler. - ## Ignoring the generated route tree file If your project is configured to use a linter and/or formatter, you may want to ignore the generated route tree file. This file is managed by TanStack Router and therefore shouldn't be changed by your linter or formatter. diff --git a/docs/router/installation/with-router-cli.md b/docs/router/installation/with-router-cli.md index b0363aaf41..89d469625c 100644 --- a/docs/router/installation/with-router-cli.md +++ b/docs/router/installation/with-router-cli.md @@ -37,7 +37,7 @@ If you are using TypeScript, you should also add the following options to your ` { "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js" + "jsxImportSource": "@solidjs/web" } } ``` diff --git a/docs/router/integrations/query.md b/docs/router/integrations/query.md index 707f90900c..243fcefdf4 100644 --- a/docs/router/integrations/query.md +++ b/docs/router/integrations/query.md @@ -17,7 +17,7 @@ title: TanStack Query Integration The TanStack query integration is a separate package that you need to install: - + react: @tanstack/react-router-ssr-query solid: @tanstack/solid-router-ssr-query @@ -152,7 +152,7 @@ Preload critical data in the route `loader` to avoid waterfalls and loading flas -# Blocking `query` in loader +# React ```tsx title="src/routes/posts.tsx" import { queryOptions, useSuspenseQuery, useQuery } from '@tanstack/react-query' @@ -165,12 +165,7 @@ const postsQuery = queryOptions({ export const Route = createFileRoute('/posts')({ // Ensure the data is in the cache before render - loader: ({ context }) => - context.queryClient.query({ - ...postsQuery, - // returns data from cache immediately, otherwise executes a fetch - staleTime: 'static', - }), + loader: ({ context }) => context.queryClient.ensureQueryData(postsQuery), component: PostsPage, }) @@ -185,15 +180,15 @@ function PostsPage() { ### Prefetching and streaming -You can also prefetch with `query` in a loader without consuming the data in a component. If you return the promise directly from the loader, it will be awaited and thus block the SSR request until the query finishes. If you don't await the promise nor return it, the query will be started on the server and will be streamed to the client without blocking the SSR request. +You can also prefetch with `fetchQuery` or `ensureQueryData` in a loader without consuming the data in a component. If you return the promise directly from the loader, it will be awaited and thus block the SSR request until the query finishes. If you don't await the promise nor return it, the query will be started on the server and will be streamed to the client without blocking the SSR request. -# Non-blocking `query` in loader +# React ```tsx title="src/routes/users.$id.tsx" import { createFileRoute } from '@tanstack/react-router' -import { noop, queryOptions, useQuery } from '@tanstack/react-query' +import { queryOptions, useQuery } from '@tanstack/react-query' const userQuery = (id: string) => queryOptions({ @@ -202,18 +197,15 @@ const userQuery = (id: string) => }) export const Route = createFileRoute('/user/$id')({ - loader: ({ context, params }) => { - // Do not await this nor return the promise, just kick off the query to stream it to the client - void context.queryClient.query(userQuery(params.id)).catch(noop) + loader: ({ params }) => { + // do not await this nor return the promise, just kick off the query to stream it to the client + context.queryClient.fetchQuery(userQuery(params.id)) }, }) ``` -> [!NOTE] -> Previous versions of this guide used `queryClient.ensureQueryData` and `queryClient.prefetchQuery`. These methods are now deprecated in TanStack Query in favor of `queryClient.query`. See the TanStack Query [v5 migration guide](https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5#imperative-queryclient-methods) for more details. - ## Redirect handling If a query or mutation throws a `redirect(...)`, the integration intercepts it on the client and performs a router navigation. diff --git a/docs/router/routing/code-based-routing.md b/docs/router/routing/code-based-routing.md index b1457c6fbe..d3102cafd6 100644 --- a/docs/router/routing/code-based-routing.md +++ b/docs/router/routing/code-based-routing.md @@ -14,7 +14,7 @@ title: Code-Based Routing Code-based routing is no different from file-based routing in that it uses the same route tree concept to organize, match and compose matching routes into a component tree. The only difference is that instead of using the filesystem to organize your routes, you use code. -Let's consider the same route tree from the [Route Trees](./route-trees.md#route-trees) guide, and convert it to code-based routing: +Let's consider the same route tree from the [Route Trees & Nesting](./route-trees.md#route-trees) guide, and convert it to code-based routing: Here is the file-based version: diff --git a/docs/router/routing/file-based-routing.md b/docs/router/routing/file-based-routing.md index 2eea38bba2..6be11e55d6 100644 --- a/docs/router/routing/file-based-routing.md +++ b/docs/router/routing/file-based-routing.md @@ -12,7 +12,7 @@ File-based routing is a way to configure your routes using the filesystem. Inste - **Organization**: Routes are organized in a way that mirrors the URL structure of your application. - **Scalability**: As your application grows, file-based routing makes it easy to add new routes and maintain existing ones. - **Code-Splitting**: File-based routing allows TanStack Router to automatically code-split your routes for better performance. -- **Type-Safety**: File-based routing raises the ceiling on type-safety by generating and managing type linkages for your routes, which can otherwise be a tedious process via code-based routing. +- **Type-Safety**: File-based routing raises the ceiling on type-safety by generating managing type linkages for your routes, which can otherwise be a tedious process via code-based routing. - **Consistency**: File-based routing enforces a consistent structure for your routes, making it easier to maintain and update your application and move from one project to another. ## `/`s or `.`s? @@ -80,7 +80,7 @@ See the example below: ## Mixed Flat and Directory Routes -It's extremely likely that a 100% directory or flat route structure won't be the best fit for your project, which is why TanStack Router allows you to mix both flat and directory routes together to create a route tree that uses the best of both worlds where it makes sense. +It's extremely likely that a 100% directory or flat route structure won't be the best fit for your project, which is why TanStack Router allows you to mix both flat and directory routes together to create a route tree that uses the best of both worlds where it makes sense: See the example below: diff --git a/docs/router/routing/file-naming-conventions.md b/docs/router/routing/file-naming-conventions.md index 896e7d3d9b..115310f5b3 100644 --- a/docs/router/routing/file-naming-conventions.md +++ b/docs/router/routing/file-naming-conventions.md @@ -2,7 +2,7 @@ title: File Naming Conventions --- -File-based routing requires that you follow a few simple file naming conventions to ensure that your routes are generated correctly. The concepts these conventions enable are covered in detail in the [Route Trees](./route-trees.md) guide. +File-based routing requires that you follow a few simple file naming conventions to ensure that your routes are generated correctly. The concepts these conventions enable are covered in detail in the [Route Trees & Nesting](./route-trees.md) guide. | Feature | Description | | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -40,4 +40,4 @@ Pathless routes wrap child routes with either logic or a component without requi | ʦ `_app.a.tsx` | /a | `
` | | ʦ `_app.b.tsx` | /b | `` | -To learn more about pathless routes, see the [Routing Concepts - Pathless Layout Routes](./routing-concepts.md#pathless-layout-routes) guide. +To learn more about pathless routes, see the [Routing Concepts - Pathless Routes](./routing-concepts.md#pathless-layout-routes) guide. diff --git a/docs/router/routing/routing-concepts.md b/docs/router/routing/routing-concepts.md index 11674e69c2..88eebbd5f0 100644 --- a/docs/router/routing/routing-concepts.md +++ b/docs/router/routing/routing-concepts.md @@ -564,7 +564,7 @@ routes/ │ ├── ... ``` -We can import from the excluded files into our posts route: +We can import from the excluded files into our posts route diff --git a/docs/start/config.json b/docs/start/config.json index 36af0e6e0d..e93688eb91 100644 --- a/docs/start/config.json +++ b/docs/start/config.json @@ -36,10 +36,6 @@ { "label": "Migrate from Next.js", "to": "framework/react/migrate-from-next-js" - }, - { - "label": "Migrate from the Release Candidate", - "to": "framework/react/migrate-from-release-candidate" } ] }, @@ -57,19 +53,14 @@ { "label": "Build from Scratch", "to": "framework/solid/build-from-scratch" - }, - { - "label": "Migrate from the Release Candidate", - "to": "framework/solid/migrate-from-release-candidate" } ] } ] }, { - "label": "Server & Execution", + "label": "Guides", "children": [], - "collapsible": true, "frameworks": [ { "label": "react", @@ -90,10 +81,6 @@ "label": "Import Protection", "to": "framework/react/guide/import-protection" }, - { - "label": "Path Aliases", - "to": "framework/react/guide/path-aliases" - }, { "label": "Environment Variables", "to": "framework/react/guide/environment-variables" @@ -102,10 +89,6 @@ "label": "Server Functions", "to": "framework/react/guide/server-functions" }, - { - "label": "Streaming Data from Server Functions", - "to": "framework/react/guide/streaming-data-from-server-functions" - }, { "label": "Server Components", "to": "framework/react/guide/server-components" @@ -129,72 +112,7 @@ { "label": "Server Routes", "to": "framework/react/guide/server-routes" - } - ] - }, - { - "label": "solid", - "children": [ - { - "label": "Routing", - "to": "framework/solid/guide/routing" }, - { - "label": "Execution Model", - "to": "framework/solid/guide/execution-model" - }, - { - "label": "Code Execution Patterns", - "to": "framework/solid/guide/code-execution-patterns" - }, - { - "label": "Import Protection", - "to": "framework/solid/guide/import-protection" - }, - { - "label": "Path Aliases", - "to": "framework/solid/guide/path-aliases" - }, - { - "label": "Environment Variables", - "to": "framework/solid/guide/environment-variables" - }, - { - "label": "Server Functions", - "to": "framework/solid/guide/server-functions" - }, - { - "label": "Static Server Functions", - "to": "framework/solid/guide/static-server-functions" - }, - { - "label": "Environment Functions", - "to": "framework/solid/guide/environment-functions" - }, - { - "label": "Middleware", - "to": "framework/solid/guide/middleware" - }, - { - "label": "Error Boundaries", - "to": "framework/solid/guide/error-boundaries" - }, - { - "label": "Server Routes", - "to": "framework/solid/guide/server-routes" - } - ] - } - ] - }, - { - "label": "Rendering", - "children": [], - "collapsible": true, - "frameworks": [ - { - "label": "react", - "children": [ { "label": "Hydration Errors", "to": "framework/react/guide/hydration-errors" @@ -223,10 +141,6 @@ "label": "Server Entry Point", "to": "framework/react/guide/server-entry-point" }, - { - "label": "Client Entry Point", - "to": "framework/react/guide/client-entry-point" - }, { "label": "Early Hints", "to": "framework/react/guide/early-hints" @@ -234,12 +148,108 @@ { "label": "CDN Asset URLs", "to": "framework/react/guide/cdn-asset-urls" + }, + { + "label": "CSS Styling", + "to": "framework/react/guide/css-styling" + }, + { + "label": "Client Entry Point", + "to": "framework/react/guide/client-entry-point" + }, + { + "label": "Hosting", + "to": "framework/react/guide/hosting" + }, + { + "label": "Authentication Overview", + "to": "framework/react/guide/authentication-overview" + }, + { + "label": "Authentication Server Primitives", + "to": "framework/react/guide/authentication-server-primitives" + }, + { + "label": "Authentication", + "to": "framework/react/guide/authentication" + }, + { + "label": "Databases", + "to": "framework/react/guide/databases" + }, + { + "label": "Observability", + "to": "framework/react/guide/observability" + }, + { + "label": "Path Aliases", + "to": "framework/react/guide/path-aliases" + }, + { + "label": "Tailwind CSS Integration", + "to": "framework/react/guide/tailwind-integration" + }, + { + "label": "Rendering Markdown", + "to": "framework/react/guide/rendering-markdown" + }, + { + "label": "SEO", + "to": "framework/react/guide/seo" + }, + { + "label": "Generative Engine Optimization (GEO)", + "to": "framework/react/guide/geo" } ] }, { "label": "solid", "children": [ + { + "label": "Routing", + "to": "framework/solid/guide/routing" + }, + { + "label": "Execution Model", + "to": "framework/solid/guide/execution-model" + }, + { + "label": "Code Execution Patterns", + "to": "framework/solid/guide/code-execution-patterns" + }, + { + "label": "Import Protection", + "to": "framework/solid/guide/import-protection" + }, + { + "label": "Environment Variables", + "to": "framework/solid/guide/environment-variables" + }, + { + "label": "Server Functions", + "to": "framework/solid/guide/server-functions" + }, + { + "label": "Static Server Functions", + "to": "framework/solid/guide/static-server-functions" + }, + { + "label": "Environment Functions", + "to": "framework/solid/guide/environment-functions" + }, + { + "label": "Middleware", + "to": "framework/solid/guide/middleware" + }, + { + "label": "Error Boundaries", + "to": "framework/solid/guide/error-boundaries" + }, + { + "label": "Server Routes", + "to": "framework/solid/guide/server-routes" + }, { "label": "Hydration Errors", "to": "framework/solid/guide/hydration-errors" @@ -264,90 +274,24 @@ "label": "Server Entry Point", "to": "framework/solid/guide/server-entry-point" }, + { + "label": "Early Hints", + "to": "framework/solid/guide/early-hints" + }, + { + "label": "CSS Styling", + "to": "framework/solid/guide/css-styling" + }, { "label": "Client Entry Point", "to": "framework/solid/guide/client-entry-point" }, - { - "label": "Early Hints", - "to": "framework/solid/guide/early-hints" - } - ] - } - ] - }, - { - "label": "Deployment & Operations", - "children": [], - "collapsible": true, - "frameworks": [ - { - "label": "react", - "children": [ - { - "label": "Production Checklist", - "to": "framework/react/guide/production-checklist" - }, - { - "label": "Hosting", - "to": "framework/react/guide/hosting" - }, - { - "label": "Observability", - "to": "framework/react/guide/observability" - } - ] - }, - { - "label": "solid", - "children": [ { "label": "Hosting", "to": "framework/solid/guide/hosting" }, { - "label": "Observability", - "to": "framework/solid/guide/observability" - } - ] - } - ] - }, - { - "label": "Authentication & Data", - "children": [], - "collapsible": true, - "frameworks": [ - { - "label": "react", - "children": [ - { - "label": "Choose Authentication", - "to": "framework/react/guide/authentication-overview" - }, - { - "label": "Authentication Server Primitives", - "to": "framework/react/guide/authentication-server-primitives" - }, - { - "label": "Implement Authentication", - "to": "framework/react/guide/authentication" - }, - { - "label": "Databases", - "to": "framework/react/guide/databases" - }, - { - "label": "TanStack Query", - "to": "framework/react/guide/tanstack-query" - } - ] - }, - { - "label": "solid", - "children": [ - { - "label": "Choose Authentication", + "label": "Authentication Overview", "to": "framework/solid/guide/authentication-overview" }, { @@ -355,53 +299,20 @@ "to": "framework/solid/guide/authentication-server-primitives" }, { - "label": "Implement Authentication", + "label": "Authentication", "to": "framework/solid/guide/authentication" }, { "label": "Databases", "to": "framework/solid/guide/databases" - } - ] - } - ] - }, - { - "label": "Styling & Metadata", - "children": [], - "collapsible": true, - "frameworks": [ - { - "label": "react", - "children": [ - { - "label": "CSS Styling", - "to": "framework/react/guide/css-styling" }, { - "label": "Tailwind CSS Integration", - "to": "framework/react/guide/tailwind-integration" + "label": "Observability", + "to": "framework/solid/guide/observability" }, { - "label": "Rendering Markdown", - "to": "framework/react/guide/rendering-markdown" - }, - { - "label": "SEO", - "to": "framework/react/guide/seo" - }, - { - "label": "Generative Engine Optimization (GEO)", - "to": "framework/react/guide/geo" - } - ] - }, - { - "label": "solid", - "children": [ - { - "label": "CSS Styling", - "to": "framework/solid/guide/css-styling" + "label": "Path Aliases", + "to": "framework/solid/guide/path-aliases" }, { "label": "Tailwind CSS Integration", diff --git a/docs/start/framework/react/comparison.md b/docs/start/framework/react/comparison.md index b72e286a76..e734263d9d 100644 --- a/docs/start/framework/react/comparison.md +++ b/docs/start/framework/react/comparison.md @@ -1,61 +1,338 @@ --- title: Comparison | TanStack Start vs Next.js vs React Router -description: Compare rendering, server APIs, caching, forms, and deployment in TanStack Start, Next.js App Router, and React Router Framework Mode. toc: false --- -This matrix compares full-stack framework capabilities. For the choice between Start and Next.js, read [TanStack Start vs Next.js](./start-vs-nextjs). For navigation and URL-state APIs, see the [TanStack Router comparison](/router/latest/docs/comparison). +Choosing a full-stack React framework? This comparison focuses on the **full-stack framework features** that distinguish TanStack Start from Next.js and React Router (v7 Framework Mode). -Checked September 11, 2026 against the linked documentation: TanStack Start's current guides, Next.js 16.3 App Router, and React Router 8.3 Framework Mode. +> **🚨 IMPORTANT: Looking for routing features?** +> +> TanStack Start is built on **TanStack Router**, which provides industry-leading type-safe routing capabilities. For a comprehensive comparison of routing features (nested routes, search params, type safety, loaders, etc.), please see: +> +> ### [📖 TanStack Router Comparison vs React Router / Next.js →](/router/latest/docs/framework/react/comparison) +> +> That comparison covers all the routing features in detail. This page focuses specifically on **full-stack framework capabilities** like SSR, server functions, middleware, deployment, and more. -## Rendering and data +While we aim to provide an accurate and fair comparison, please note that this table may not capture every nuance or recent update of each framework. We recommend reviewing the official documentation and trying out each solution to make the most informed decision for your specific use case. -| Capability | TanStack Start | Next.js App Router | React Router Framework Mode | -| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| Server rendering | [SSR with hydration by default](./overview) | [Server and Client Components contribute to initial HTML](https://nextjs.org/docs/app/getting-started/server-and-client-components) | [Server rendering is configurable](https://reactrouter.com/start/framework/rendering) | -| Rendering control | [Per-route full, data-only, or disabled SSR](./guide/selective-ssr) | [Server/Client Component boundaries](https://nextjs.org/docs/app/getting-started/server-and-client-components); `use client` does not disable initial SSR | [Global SSR setting and route-level client loaders](https://reactrouter.com/start/framework/rendering) | -| SPA applications | [Dedicated SPA mode](./guide/spa-mode) | [Documented SPA patterns](https://nextjs.org/docs/app/guides/single-page-applications) | [`ssr: false`](https://reactrouter.com/start/framework/rendering) | -| Static output | [Prerendering configuration](./guide/static-prerendering) | [Static export](https://nextjs.org/docs/app/guides/static-exports), with server-feature limitations | [Prerender selected URLs](https://reactrouter.com/start/framework/rendering) | -| React Server Components | [Experimental, opt-in](./guide/server-components) | [Core App Router component model](https://nextjs.org/docs/app/getting-started/server-and-client-components) | [Unstable RSC integration](https://reactrouter.com/how-to/react-server-components) | -| Client data reuse | [Router loader caching](/router/latest/docs/guide/data-loading), plus [Query integration](/router/latest/docs/integrations/query) | [Navigation caching and server cache APIs](https://nextjs.org/docs/app/getting-started/caching); a query library can manage additional client data | [Loader/action revalidation](https://reactrouter.com/start/framework/actions); separate client-data tools can be added | -| Revalidation after deployment | [HTTP caching and provider-specific ISR configuration](./guide/isr) | [ISR and cache coordination](https://nextjs.org/docs/app/guides/self-hosting) | [HTTP response headers](https://reactrouter.com/how-to/headers) and deployment infrastructure | +If you find any discrepancies or have suggestions for improvement, please don't hesitate to contribute via the "Edit this page on GitHub" link at the bottom of this page or open an issue in the [TanStack Router GitHub repository](https://github.com/TanStack/router). -A client loader cache, a cached server result, and a cached HTML response are different things. Compare invalidation behavior, persistence, and multi-instance coordination for the layer your application needs. A CDN honoring `stale-while-revalidate` is not proof of identical ISR behavior across providers. +Feature/Capability Key: -## Server APIs and forms +- ✅ 1st-class, built-in, and ready to use with no added configuration or code +- 🟡 Partial Support (rated 1-5 where noted) +- 🟠 Supported via addon/community package +- 🔶 Possible, but requires custom code/implementation/casting +- 🛑 Not officially supported -| Capability | TanStack Start | Next.js App Router | React Router Framework Mode | -| -------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| Server calls and mutations | [Typed server functions with GET or POST](./guide/server-functions) | [Server Actions](https://nextjs.org/docs/app/guides/forms) | [Route actions and fetchers](https://reactrouter.com/start/framework/actions) | -| Input validation | [Validator API with inferred types](./guide/server-functions) | [Validate action input with application code or a schema](https://nextjs.org/docs/app/guides/forms) | [Validate action input with application code](https://reactrouter.com/how-to/form-validation) | -| Middleware | [Request middleware and client/server function middleware](./guide/middleware) | [Request interception with Proxy](https://nextjs.org/docs/app/getting-started/proxy); action authorization belongs in server code | [Server and client route middleware](https://reactrouter.com/how-to/middleware) | -| Form handling | [Server functions](./guide/server-functions) can be called from event handlers; use a form library when needed | [Built-in `next/form`](https://nextjs.org/docs/app/api-reference/components/form), plus [Server Action forms](https://nextjs.org/docs/app/guides/forms) | [`Form`, actions, and fetchers](https://reactrouter.com/start/framework/actions) | -| Server endpoints | [Server routes](./guide/server-routes) | [Route Handlers](https://nextjs.org/docs/app/getting-started/route-handlers) | [Resource routes](https://reactrouter.com/how-to/resource-routes) | +| | TanStack Start | Next.js [_(Website)_][nextjs] | React Router [_(Website)_][react-router] | +| ----------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | ------------------------------------------ | +| Github Repo / Stars | [![][stars-tanstack-router]][gh-tanstack-router] | [![][stars-nextjs]][gh-nextjs] | [![][stars-react-router]][gh-react-router] | +| Bundle Size | [![][bp-tanstack-router]][bpl-tanstack-router] | ❓ | ❓ | +| -- | -- | -- | -- | +| **Routing Features** [_(See Full Comparison)_][router-comparison] | ✅ Built on TanStack Router | ✅ File-based App Router | ✅ File-based Nested Routes | +| -- | -- | -- | -- | +| **Full-Stack Features** | -- | -- | -- | +| SSR | ✅ | ✅ | ✅ | +| Streaming SSR | ✅ | ✅ | ✅ | +| Selective SSR (per-route) | ✅ | 🔶 | 🔶 | +| SPA Mode | ✅ | 🔶 (via "use client") | ✅ | +| Built-in Client-Side SWR Caching | ✅ (via TanStack Router) | 🔶 (fetch cache only) | 🛑 | +| Data Fetching Library Integration | ✅ (Official TanStack Query, Apollo, etc.) | 🔶 (manual integration) | 🔶 (manual integration) | +| Static Prerendering (SSG) | ✅ | ✅ | ✅ | +| Incremental Static Regeneration (ISR) | ✅ (via Cache-Control headers) | ✅ (Proprietary) | ✅ (via Cache-Control headers) | +| React Server Components | 🟡 (Experimental) | ✅ | 🟡 (Experimental) | +| Server Functions | ✅ (RPC-based) | ✅ (Server Actions) | ✅ (Actions) | +| Server Function Client Middleware | ✅ | 🛑 | 🛑 | +| Server Function Server Middleware | ✅ | 🛑 | ✅ | +| Request Middleware (All Routes) | ✅ | ✅ | ✅ | +| Server Function Input Validation | ✅ | 🔶 (manual) | 🔶 (manual) | +| API Routes / Server Routes / Resource Routes | ✅ | ✅ | ✅ | +| `
` API | 🛑 | 🟠 (via React 19 useActionState) | ✅ | +| -- | -- | -- | -- | +| **Developer Experience** | -- | -- | -- | +| Devtools | ✅ | 🛑 | 🟠 (3rd party) | +| CLI Tooling | ✅ | ✅ | ✅ | +| Dev Server Startup Speed | ✅ (Fast) | 🛑 (Slow) | ✅ (Fast) | +| HMR Speed | ✅ (Fast, Vite or Rsbuild) | 🛑 (Slow, Webpack/Turbopack) | ✅ (Fast, Vite) | +| Dev Navigation Speed | ✅ | 🟡 | ✅ | +| Dev Resource Usage (CPU/RAM) | ✅ (Lightweight) | 🛑 (Heavy) | ✅ (Lightweight) | +| TypeScript Support | ✅ | ✅ | ✅ | +| Type-First Architecture | ✅ | 🛑 | 🛑 | +| -- | -- | -- | -- | +| **Deployment & Hosting** | -- | -- | -- | +| Deployment Flexibility | ✅ (Vite and Rsbuild builds) | 🟡 (Optimized for Vercel, possible elsewhere) | ✅ (Multiple adapters) | +| Edge Runtime Support | ✅ | ✅ | ✅ | +| Serverless Support | ✅ | ✅ | ✅ | +| Node.js Support | ✅ | ✅ | ✅ | +| Docker Support | ✅ | ✅ | ✅ | +| Static Export | ✅ | ✅ | ✅ | +| Official Cloudflare Support | ✅ | 🟡 | ✅ | +| Official Netlify Support | ✅ | 🟡 | ✅ | +| Official Vercel Support | ✅ (via Nitro) | ✅ | ✅ | -Type inference helps callers write valid code. It does not validate an incoming HTTP request or authorize access to a record. All three frameworks need runtime validation and server-side authorization for private operations. For Start, see [Authentication Server Primitives](./guide/authentication-server-primitives). +--- -## Tooling and deployment +> **⚠️ Remember:** For detailed comparisons of **routing features** (type safety, search params, loaders, navigation, etc.), see the [**TanStack Router Comparison**][router-comparison]. This page focuses on full-stack framework capabilities. -| Capability | TanStack Start | Next.js App Router | React Router Framework Mode | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| Build integration | [Vite or Rsbuild](./build-from-scratch) | [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack) | [Framework tooling](https://reactrouter.com/start/framework/installation) | -| Type support | [Router inference](/router/latest/docs/guide/type-safety) and [server function inference](./guide/server-functions) | [Stable opt-in typed links](https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes) and TypeScript APIs | [Generated route-module types](https://reactrouter.com/how-to/route-module-type-safety) | -| Metadata | [Route head management and SEO guide](./guide/seo) | [Metadata API and file conventions](https://nextjs.org/docs/app/getting-started/metadata-and-og-images) | [Route-module metadata](https://reactrouter.com/start/framework/route-module) | -| Image and font handling | Choose CSS, an image service, or an integration for your deployment | Built-in [`next/image`](https://nextjs.org/docs/app/api-reference/components/image) and [`next/font`](https://nextjs.org/docs/app/api-reference/components/font) | Choose CSS, an image service, or an integration for your deployment | -| Hosting | [Provider and runtime guides](./guide/hosting) | [Self-hosting](https://nextjs.org/docs/app/guides/self-hosting) or a deployment provider | [Deployment templates and hosting options](https://reactrouter.com/start/framework/deploying) | +--- -Deployment support depends on the adapter, runtime, and features you use. Check streaming, image processing, filesystem access, background work, and shared-cache behavior on your chosen target. Next.js self-hosting includes image optimization and ISR configuration; those features should not be labeled Vercel-only. +## Key Philosophical Differences -## Performance Considerations +### TanStack Start -This page does not establish a performance winner. Startup time, HMR, memory use, JavaScript shipped, and response latency require separate measurements. Comparing a router package's bundle size with an entire framework is not a valid application benchmark. +**Philosophy**: Maximum developer freedom with best-in-class type safety. -For a useful comparison, build the same representative application with recommended patterns in each framework. Record package versions, hardware, dependencies, route count, rendering and caching settings, deployment target, warm and cold runs, and the raw results. +- **Router-First**: Built on TanStack Router (see [full routing comparison][router-comparison]) +- **Deployment Agnostic**: Built on Vite and Rsbuild integrations, deploy without vendor lock-in +- **Composable Middleware**: Middleware system works at both the request level AND individual server function level (both client & server) +- **Selective SSR**: Fine-grained control over SSR behavior per route (full SSR, data-only, or client-only) +- **Developer Control**: Explicit, composable patterns over convention-based magic +- **Type Safety First**: End-to-end compile-time safety for server functions, loaders, and routing + +### Next.js + +**Philosophy**: Production-ready with optimal defaults, best with Vercel. + +- **RSC-First**: Deep integration with React Server Components as the primary paradigm +- **Vercel-Optimized**: Best performance and DX on Vercel's infrastructure +- **Convention over Configuration**: Opinionated structure with file-system routing conventions +- **Automatic Optimizations**: Many performance optimizations happen automatically +- **Production Grade**: Battle-tested at massive scale + +### React Router (v7 Framework Mode) + +**Philosophy**: Web fundamentals with progressive enhancement. + +- **Web Standards**: Embraces web platform primitives (fetch, FormData, Headers) +- **Progressive Enhancement**: Works without JavaScript by default +- **Nested Routes**: First-class support for nested routing and data loading +- **Action-Based**: Form submissions via actions follow web standards +- **Framework Evolution**: Successor to Remix, with Vite-based architecture ## When to Choose Each Framework -- **TanStack Start:** you want typed route context and URL state, explicit loaders and server functions, and control over per-route rendering. -- **Next.js:** you want its Server Component model and integrated image, font, metadata, and form facilities. Existing team experience and integrations can also make staying with Next.js the better choice. -- **React Router Framework Mode:** you want route loaders and actions, fetchers, and form-driven workflows. Read its [progressive enhancement guide](https://reactrouter.com/explanation/progressive-enhancement) if operation before JavaScript loads matters to your application. +### Choose TanStack Start if you: -Check Start's [overview](./overview) and [Server Components guide](./guide/server-components) for current release and experimental-feature status before adopting those features. To try Start, use [Getting Started](./getting-started) or [Migrate from Next.js](./migrate-from-next-js). +- Want the absolute best type safety for routing (see [Router Comparison][router-comparison]) +- Need deployment flexibility without vendor lock-in (works with Vite and Rsbuild builds) +- Prefer composable, explicit patterns over convention +- Want fine-grained control over SSR behavior (selective SSR per route) +- Need composable middleware that works at both request and server function levels +- Are building a complex application that benefits from TanStack Router's advanced features +- Already use TanStack Query or other TanStack libraries + +### Choose Next.js if you: + +- Want to use React Server Components today with full ecosystem support +- Are deploying to Vercel or want a Vercel-optimized experience +- Prefer convention over configuration for faster initial development +- Want automatic image optimization and font loading + +### Choose React Router if you: + +- Prioritize progressive enhancement +- Want your app to work without JavaScript +- Prefer action-based mutations following web conventions + +## Feature Deep Dives + +### Built-in Client-Side Caching + +**TanStack Start** includes powerful built-in SWR (stale-while-revalidate) caching through TanStack Router: + +- **Out-of-the-box performance** - Loader data is automatically cached and revalidated +- **Fine-grained control** - Configure `staleTime`, `gcTime`, and revalidation per route +- **Structural sharing** - Efficient updates that only re-render what changed +- **Official integrations** - Turn-key support for TanStack Query, Apollo, and other data fetching libraries +- **More performant** - Optimized for the user experience with instant navigation and background updates + +```tsx +export const Route = createFileRoute('/posts/$postId')({ + loader: async ({ params }) => fetchPost(params.postId), + staleTime: 10_000, // Consider fresh for 10 seconds + gcTime: 5 * 60_000, // Keep in memory for 5 minutes +}) +``` + +For advanced scenarios, TanStack Start integrates seamlessly with TanStack Query: + +```tsx +import { queryOptions } from '@tanstack/react-query' + +const postQueryOptions = (postId: string) => + queryOptions({ + queryKey: ['post', postId], + queryFn: () => fetchPost(postId), + }) + +export const Route = createFileRoute('/posts/$postId')({ + loader: ({ context, params }) => + context.queryClient.ensureQueryData(postQueryOptions(params.postId)), +}) + +function Post() { + const { postId } = Route.useParams() + const { data } = useQuery(postQueryOptions(postId)) + // Automatically uses cached data from loader +} +``` + +**Next.js** has basic fetch caching but lacks fine-grained control and requires manual integration with libraries like React Query. + +**React Router** doesn't have built-in client-side caching - you need to manually integrate a caching solution. + +### Server Functions vs Server Actions + +**TanStack Start Server Functions**: + +```tsx +export const getTodos = createServerFn({ method: 'GET' }) + .validator(zodValidator(z.object({ userId: z.string() }))) + .middleware([authMiddleware]) + .handler(async ({ data, context }) => { + // Fully typed data and context + return db.todos.findMany({ where: { userId: data.userId } }) + }) + +// Call from anywhere with full type safety +const todos = await getTodos({ data: { userId: '123' } }) +``` + +**Next.js Server Actions**: + +```tsx +'use server' +export async function getTodos(userId: string) { + // Runs on server, called from client + return db.todos.findMany({ where: { userId } }) +} + +// Call from client component +const todos = await getTodos('123') +``` + +Key differences: + +- Start's server functions support both client and server middleware +- Start has built-in input validation +- Start's approach is more explicit about the client/server boundary +- Start's server functions support both GET and POST methods (configurable via the `method` option, defaults to GET), while Next.js Server Actions only support POST. +- Next.js Server Actions integrate more seamlessly with forms + +### Middleware Architecture + +**TanStack Start** has two types of middleware: + +1. **Request Middleware**: Runs for all requests (SSR, API routes, server functions) +2. **Server Function Middleware**: Runs specifically for server functions, supports both client-side and server-side execution + +This composability allows for: + +```tsx +const authMiddleware = createMiddleware({ type: 'function' }) + .client(async ({ next }) => { + // Run auth checks on client + return next({ + headers: { Authorization: `Bearer ${getToken()}` }, + }) + }) + .server(async ({ next }) => { + // Validate auth on server + return next({ context: { user: await getUser() } }) + }) +``` + +**Next.js** has a single middleware.ts file that runs on the Edge Runtime for all requests. It cannot access server-only resources like databases and has limitations compared to the Node.js runtime. + +### Deployment Flexibility + +**TanStack Start** leverages modern build tool ecosystems: + +- Deploy to Cloudflare Workers, Netlify, Vercel, Railway, Fly.io, AWS, etc. +- Use Nitro for universal deployment support +- No vendor-specific features or lock-in +- Same codebase works everywhere + +**Next.js** is optimized for Vercel: + +- Many features work best or only on Vercel (ISR, Image Optimization, Middleware) +- Self-hosting requires more configuration +- Deployment to other platforms may have limitations + +## React Server Components (RSC) + +**Current Status**: + +- **Next.js**: Full production support with extensive ecosystem +- **TanStack Start**: Experimental support available +- **React Router**: Experimental support available + +TanStack Start's RSC implementation takes a client-led composition approach: server components are treated as data that the client can fetch, cache, and compose. See the [Server Components guide](/start/latest/docs/framework/react/guide/server-components) for details. + +## Performance Considerations + +### Production Performance + +All three frameworks are capable of achieving excellent production performance and top Lighthouse scores. The differences come down to optimization strategies: + +- **TanStack Start**: Optimized bundler builds, SWR caching reduces server load, lightweight runtime +- **Next.js**: Automatic code splitting, image optimization, and built-in performance features +- **React Router**: Web standards-based caching and optimization + +### Development Performance + +This is where the frameworks differ significantly: + +**TanStack Start & React Router:** + +- ⚡ **Instant dev server startup** - Vite and Rsbuild start quickly +- ⚡ **Lightning-fast HMR** - Changes reflect instantly without page refresh +- ⚡ **Fast dev navigation** - Full-speed routing during development +- ⚡ **Lightweight resource usage** - Minimal CPU and RAM consumption +- ⚡ **High dev throughput** - Handle many concurrent requests efficiently + +**Next.js:** + +- 🐌 **Slow dev server startup** - Can take many seconds to start, especially on larger projects +- 🐌 **Slow HMR** - Hot reloading is noticeably sluggish even with Turbopack +- 🐌 **Throttled dev navigation** - Navigation is artificially slowed during development +- 🐌 **Heavy resource usage** - Significant CPU and RAM consumption during development + +**Why This Matters:** + +Development performance directly impacts developer productivity. Faster feedback loops mean: + +- More iterations per hour +- Better flow state and focus +- Lower machine requirements +- Reduced frustration during development +- Faster CI/CD pipelines for development builds + +While Next.js's production performance is excellent, the development experience can be notably slower, especially on larger codebases or less powerful machines. + +## Community and Ecosystem + +- **Next.js**: Largest community, most third-party integrations, extensive learning resources +- **React Router**: One of the oldest and most widely used React libraries, strong community, excellent documentation +- **TanStack Start**: Growing community, part of TanStack ecosystem, excellent Discord support + +## Maturity + +- **Next.js**: Production-ready, used by thousands of companies, proven at scale +- **React Router**: Production-ready, powers millions of apps, v7 Framework Mode is the evolution of Remix +- **TanStack Start**: Release Candidate stage, feature-complete, rapidly stabilizing toward v1 + +[bp-tanstack-router]: https://badgen.net/bundlephobia/minzip/@tanstack/react-router +[bpl-tanstack-router]: https://bundlephobia.com/result?p=@tanstack/react-router +[gh-tanstack-router]: https://github.com/tanstack/router +[stars-tanstack-router]: https://img.shields.io/github/stars/tanstack/router?label=%F0%9F%8C%9F +[router-comparison]: /router/latest/docs/framework/react/comparison +[_]: _ +[nextjs]: https://nextjs.org/ +[gh-nextjs]: https://github.com/vercel/next.js +[stars-nextjs]: https://img.shields.io/github/stars/vercel/next.js?label=%F0%9F%8C%9F +[_]: _ +[react-router]: https://reactrouter.com/ +[gh-react-router]: https://github.com/remix-run/react-router +[stars-react-router]: https://img.shields.io/github/stars/remix-run/react-router?label=%F0%9F%8C%9F diff --git a/docs/start/framework/react/getting-started.md b/docs/start/framework/react/getting-started.md index 6e5bcd8841..565dc4b4cf 100644 --- a/docs/start/framework/react/getting-started.md +++ b/docs/start/framework/react/getting-started.md @@ -3,7 +3,6 @@ id: getting-started title: Getting Started redirect_from: - /framework/react/quick-start -description: Create a TanStack Start application with TanStack Builder, the CLI, or a working example, then run it locally and start adding routes. --- ## Start a new project @@ -40,7 +39,6 @@ To use a different example, replace `start-basic` with one of the slugs below. #### Examples - [Basic](https://github.com/TanStack/router/tree/main/examples/react/start-basic) (`start-basic`) -- [Basic + Rsbuild](https://github.com/TanStack/router/tree/main/examples/react/start-basic-rsbuild) (`start-basic-rsbuild`) - [Basic + Auth](https://github.com/TanStack/router/tree/main/examples/react/start-basic-auth) (`start-basic-auth`) - [Counter](https://github.com/TanStack/router/tree/main/examples/react/start-counter) (`start-counter`) - [Basic + React Query](https://github.com/TanStack/router/tree/main/examples/react/start-basic-react-query) (`start-basic-react-query`) diff --git a/docs/start/framework/react/guide/authentication-overview.md b/docs/start/framework/react/guide/authentication-overview.md index e80ba97f8c..8b5838a9f9 100644 --- a/docs/start/framework/react/guide/authentication-overview.md +++ b/docs/start/framework/react/guide/authentication-overview.md @@ -1,11 +1,8 @@ --- id: authentication-overview -title: Choose Authentication for React Apps -description: Compare hosted services, auth libraries, and custom authentication for React apps built with TanStack Start. Choose an approach before implementing sessions and authorization. +title: Authentication --- -Choose how your React app will handle identity, sessions, and permissions. This page compares approaches and providers. Once you have chosen an approach, use [Implement Authentication in React](./authentication.md) for the application workflow. - ## Authentication vs Authorization - **Authentication**: Who is this user? (Login/logout, identity verification) @@ -116,7 +113,7 @@ Build your own authentication system using TanStack Start's server functions and - **Full Control**: Complete customization over authentication flow - **Server Primitives**: Sessions, OAuth, CSRF, rate limiting — see [Authentication Server Primitives](./authentication-server-primitives.md) -- **Session Management**: HTTP-only cookies written with `setCookie`, read with `getCookie` +- **Session Management**: HTTP-only cookies via `setResponseHeader`, read with `getRequestHeader` - **Type Safety**: End-to-end type safety for authentication state ### 🌐 Other Excellent Options diff --git a/docs/start/framework/react/guide/authentication-server-primitives.md b/docs/start/framework/react/guide/authentication-server-primitives.md index 103e9c4455..20cc143d2f 100644 --- a/docs/start/framework/react/guide/authentication-server-primitives.md +++ b/docs/start/framework/react/guide/authentication-server-primitives.md @@ -3,7 +3,7 @@ id: authentication-server-primitives title: Authentication Server Primitives --- -This guide covers the **server-side primitives** for building authentication in TanStack Start: session cookies, session lookup, OAuth, password-reset hardening, CSRF, and rate limiting. It pairs with the [routing-side guide](/router/latest/docs/framework/react/guide/authenticated-routes) (`_authenticated` layout, `beforeLoad`, redirects, RBAC). +This guide covers the **server-side primitives** for building authentication in TanStack Start: session cookies, session lookup, OAuth, password-reset hardening, CSRF, and rate limiting. It pairs with the [routing-side guide](../../../../router/guide/authenticated-routes.md) (`_authenticated` layout, `beforeLoad`, redirects, RBAC). If you can use a managed solution like [Clerk](https://go.clerk.com/wOwHtuJ) or [WorkOS](https://workos.com/), prefer that — they handle most of what this guide describes. Read on if you're rolling your own. @@ -28,39 +28,47 @@ Whichever you choose, the cookie flags matter: ```ts // src/server/session.ts import { - deleteCookie, - getCookie, - setCookie, + getRequestHeader, + setResponseHeader, } from '@tanstack/react-start/server' const SESSION_COOKIE = '__Host-session' const ONE_DAY = 60 * 60 * 24 -const sessionCookieOptions = { - httpOnly: true, - secure: true, - sameSite: 'lax', - path: '/', -} as const - export function setSessionCookie(token: string) { - setCookie(SESSION_COOKIE, token, { - ...sessionCookieOptions, - maxAge: ONE_DAY, - }) + setResponseHeader( + 'Set-Cookie', + [ + `${SESSION_COOKIE}=${token}`, + `HttpOnly`, + `Secure`, + `SameSite=Lax`, + `Path=/`, + `Max-Age=${ONE_DAY}`, + ].join('; '), + ) } export function clearSessionCookie() { - deleteCookie(SESSION_COOKIE, sessionCookieOptions) + setResponseHeader( + 'Set-Cookie', + `${SESSION_COOKIE}=; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=0`, + ) } export function readSessionToken(): string | null { - return getCookie(SESSION_COOKIE) ?? null + const header = getRequestHeader('cookie') + if (!header) return null + for (const part of header.split(/;\s*/)) { + // Split only on the FIRST '=' — signed/base64 values often contain '='. + const eq = part.indexOf('=') + if (eq === -1) continue + if (part.slice(0, eq) === SESSION_COOKIE) return part.slice(eq + 1) + } + return null } ``` -Write cookies with `setCookie` (or `appendResponseHeader('set-cookie', serialized)` for a cookie that a library already serialized). Do not use `setResponseHeader('Set-Cookie', ...)` for this: it replaces every cookie on the outgoing response, including cookies set by other middleware or returned by a handler. - | Flag | Why | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `HttpOnly` | JavaScript can't read the cookie. An XSS bug can't exfiltrate the session. | @@ -161,7 +169,7 @@ For OAuth authorization-code flow: // src/server/oauth.functions.ts import { createServerFn } from '@tanstack/react-start' import { redirect } from '@tanstack/react-router' -import { setCookie } from '@tanstack/react-start/server' +import { setResponseHeader } from '@tanstack/react-start/server' import crypto from 'node:crypto' const OAUTH_STATE_COOKIE = '__Host-oauth' @@ -182,13 +190,10 @@ export const startOAuth = createServerFn({ method: 'GET' }).handler( crypto.createHash('sha256').update(verifier).digest(), ) - setCookie(OAUTH_STATE_COOKIE, signed({ state, verifier }), { - httpOnly: true, - secure: true, - sameSite: 'lax', - path: '/', - maxAge: 600, - }) + setResponseHeader( + 'Set-Cookie', + `${OAUTH_STATE_COOKIE}=${signed({ state, verifier })}; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=600`, + ) throw redirect({ href: @@ -344,7 +349,7 @@ See [Execution Model: Module-Level `process.env` Reads](./execution-model.md#mod ## See Also - [Authentication Overview](./authentication-overview.md) — choosing between partner solutions, OSS libraries, and DIY. -- [Authenticated Routes (Router)](/router/latest/docs/framework/react/guide/authenticated-routes) — the routing-side guide. +- [Authenticated Routes (Router)](../../../../router/guide/authenticated-routes.md) — the routing-side guide. - [Server Functions](./server-functions.md) — the RPC primitive that auth lives inside. - [Middleware](./middleware.md) — composing `authMiddleware`. - [OWASP Cheat Sheets — Authentication](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html), [Session Management](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html), [CSRF](https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html). diff --git a/docs/start/framework/react/guide/authentication.md b/docs/start/framework/react/guide/authentication.md index c77c681ee0..da839e1fbe 100644 --- a/docs/start/framework/react/guide/authentication.md +++ b/docs/start/framework/react/guide/authentication.md @@ -1,12 +1,11 @@ --- id: authentication -title: Implement Authentication in React -description: Implement sessions, sign-in, sign-out, protected routes, and server-side authorization in a TanStack Start React app. +title: Authentication --- -Implement the authentication workflow in your React app, from sessions and sign-in to protected routes and authorization. +This guide covers authentication patterns and shows how to implement your own authentication system with TanStack Start. -To compare libraries and hosted services, read [Choose Authentication for React Apps](./authentication-overview.md). +> **📋 Before You Start:** Check our [Authentication Overview](./authentication-overview.md) for all available options including partner solutions and hosted services. ## Authentication Approaches @@ -35,7 +34,7 @@ Authentication involves many considerations including password security, session - **Authentication**: Who is this user? (Login/logout) - **Authorization**: What can this user do? (Permissions/roles) -TanStack Start provides server functions, request and cookie utilities, and route protection. Session storage and authentication come from your application or a library you choose. +TanStack Start provides the tools for both through server functions, sessions, and route protection. > Protect the data/API boundary first. Any server function, server route, or other API endpoint that returns or mutates private data must authorize the request itself. `beforeLoad` is useful for route UX: it keeps users out of screens they cannot use and avoids triggering work that would fail anyway. It is not the security boundary for the data. See [Authentication Server Primitives](./authentication-server-primitives.md) for the server-side pattern. @@ -48,7 +47,6 @@ Server functions handle sensitive authentication logic securely on the server: ```tsx import { createServerFn } from '@tanstack/react-start' import { redirect } from '@tanstack/react-router' -import { getAppSession } from '~/utils/session' // Login server function export const loginFn = createServerFn({ method: 'POST' }) @@ -62,9 +60,11 @@ export const loginFn = createServerFn({ method: 'POST' }) } // Create session - const session = await getAppSession() - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update({ + userId: user.id, + email: user.email, + }) // Redirect to protected area throw redirect({ to: '/dashboard' }) @@ -72,131 +72,98 @@ export const loginFn = createServerFn({ method: 'POST' }) // Logout server function export const logoutFn = createServerFn({ method: 'POST' }).handler(async () => { - const session = await getAppSession() - session.destroy() + const session = await useAppSession() + await session.clear() throw redirect({ to: '/' }) }) // Get current user export const getCurrentUserFn = createServerFn({ method: 'GET' }).handler( async () => { - const session = await getAppSession() - const userId = session.userId + const session = await useAppSession() + const userId = session.data.userId if (!userId) { return null } - const user = await getUserById(userId) - return user ? { id: user.id, email: user.email, role: user.role } : null + return await getUserById(userId) }, ) ``` ### 2. Session Management -Start does not provide a session API. This guide uses iron-session for encrypted cookie sessions. Start's cookie helpers connect it to server functions, server routes, and request middleware. - -For encrypted cookie sessions, install [iron-session](https://github.com/vvo/iron-session): - -```sh -pnpm add iron-session -``` - -This example uses iron-session 9's cookie adapter. Its Node runtime requires Node 22.13 or newer; check the library's runtime requirements for other deployment targets. +TanStack Start provides secure HTTP-only cookie sessions: ```tsx -// utils/session.ts — import only from server code -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/react-start/server' +// utils/session.ts +import { useSession } from '@tanstack/react-start/server' type SessionData = { - userId: string - oauthState: string + userId?: string + email?: string + role?: string } -export function getAppSession(ttl = 7 * 24 * 60 * 60) { - const password = process.env.SESSION_SECRET - if (!password || password.length < 32) { - throw new Error('SESSION_SECRET must be at least 32 characters') - } - - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'app-session', - password, - ttl, - cookieOptions: { - secure: process.env.NODE_ENV === 'production', - sameSite: 'lax', - httpOnly: true, - path: '/', - }, +export function useAppSession() { + return useSession({ + // Session configuration + name: 'app-session', + password: process.env.SESSION_SECRET!, // At least 32 characters + // Optional: customize cookie settings + cookie: { + secure: process.env.NODE_ENV === 'production', + sameSite: 'lax', + httpOnly: true, }, - ) + }) } ``` -Read fields directly from the returned session, change them, then `await session.save()` before returning or redirecting. Missing or expired sessions have no user ID. `session.destroy()` removes the browser cookie. Keep one session object for the operation; another call to `getAppSession()` reads the incoming request again. For middleware, pass that object through request context when downstream code needs the same mutations. - -The `getAppSession` helper belongs to your application. Start does not cache sessions, choose expiration rules, or synchronize concurrent writes. Keep secrets and session objects in server code, and read request-specific configuration inside the active request. - ### 3. Authentication Context -Load the current user in your root route's `beforeLoad` so the initial server render and child routes receive the same authentication state. `useServerFn` returns a callable function, not an object with `data`, `isLoading`, or `refetch`. You can call a server function directly from `beforeLoad`. - -Merge this pattern into your existing root route, keeping its metadata and document shell: +Share authentication state across your application: ```tsx -// routes/__root.tsx -import { - createRootRoute, - HeadContent, - Outlet, - Scripts, -} from '@tanstack/react-router' -import type { ReactNode } from 'react' +// contexts/auth.tsx +import { createContext, useContext, ReactNode } from 'react' +import { useServerFn } from '@tanstack/react-start' import { getCurrentUserFn } from '../server/auth' -export const Route = createRootRoute({ - headers: () => ({ 'Cache-Control': 'private, no-store' }), - beforeLoad: async () => ({ user: await getCurrentUserFn() }), - component: Outlet, - shellComponent: RootDocument, -}) +type User = { + id: string + email: string + role: string +} + +type AuthContextType = { + user: User | null + isLoading: boolean + refetch: () => void +} + +const AuthContext = createContext(undefined) + +export function AuthProvider({ children }: { children: ReactNode }) { + const { data: user, isLoading, refetch } = useServerFn(getCurrentUserFn) -function RootDocument({ children }: { children: ReactNode }) { return ( - - - - - - {children} - - - + + {children} + ) } -``` -The root includes session-specific data, so its responses use `Cache-Control: private, no-store`. Keep that policy on child routes that render this data, and do not override it with public caching at your CDN. - -Read that state from a descendant component: - -```tsx -// components/AuthStatus.tsx -import { Route } from '../routes/__root' - -export function AuthStatus() { - const { user } = Route.useRouteContext() - return {user ? user.email : 'Signed out'} +export function useAuth() { + const context = useContext(AuthContext) + if (!context) { + throw new Error('useAuth must be used within AuthProvider') + } + return context } ``` -After login or logout changes the session, call `await router.invalidate()` to reload the current user and rerun route guards. Keep private-data authorization in the server function itself, even when a route already checks the user. - ### 4. Route Protection Protect routes using `beforeLoad`: @@ -273,9 +240,8 @@ export const registerFn = createServerFn({ method: 'POST' }) }) // Create session - const session = await getAppSession() - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update({ userId: user.id }) return { success: true, user: { id: user.id, email: user.email } } }) @@ -343,9 +309,8 @@ export const initiateOAuthFn = createServerFn({ method: 'POST' }) const state = generateRandomState() // Store state in session for CSRF protection - const session = await getAppSession() - session.oauthState = state - await session.save() + const session = await useAppSession() + await session.update({ oauthState: state }) // Generate OAuth URL const authUrl = generateOAuthUrl(provider, state) @@ -408,9 +373,21 @@ const hashedPassword = await bcrypt.hash(password, saltRounds) ### 2. Session Security -Set the library's server-validated expiration as well as appropriate cookie attributes. In the iron-session example, `ttl` limits a sealed credential's lifetime from its latest save; saving again renews it. A numeric `cookieOptions.maxAge` controls browser retention. In iron-session 9, explicitly setting `maxAge: undefined` also disables seal expiry; omit the property to use the configured `ttl`. Use an application-validated timestamp or a server-side record if you also need an absolute lifetime that writes cannot extend. - -Use `httpOnly`, `sameSite`, and `path` deliberately, and require `secure: true` on HTTPS deployments. These cookie attributes complement server-side authorization and CSRF protections. Keep only the minimum session data and load current account permissions from their authoritative store. Logout removes a stateless cookie from the current browser; it cannot revoke a copy without server-side state. +```tsx +// Use secure session configuration +export function useAppSession() { + return useSession({ + name: 'app-session', + password: process.env.SESSION_SECRET!, // 32+ characters + cookie: { + secure: process.env.NODE_ENV === 'production', // HTTPS only in production + sameSite: 'lax', // CSRF protection + httpOnly: true, // XSS protection + maxAge: 7 * 24 * 60 * 60, // 7 days + }, + }) +} +``` ### 3. Rate Limiting @@ -512,69 +489,28 @@ describe('Authentication Flow', () => { ### Loading States -Call the function returned by `useServerFn` with `{ data }`. Track pending state in the component, handle invalid credentials, and refresh route context after a successful login. This form uses the `loginFn` from the server-functions example above. It requires JavaScript, so the fields stay disabled until hydration; `method="post"` also prevents credentials appearing in a native GET submission. - ```tsx -// components/LoginForm.tsx -import { useState } from 'react' -import type { FormEvent } from 'react' -import { useHydrated, useRouter } from '@tanstack/react-router' -import { useServerFn } from '@tanstack/react-start' -import { loginFn } from '../server/auth' - -export function LoginForm() { - const hydrated = useHydrated() +function LoginForm() { const [isLoading, setIsLoading] = useState(false) - const [error, setError] = useState('') - const login = useServerFn(loginFn) - const router = useRouter() - - const handleSubmit = async (event: FormEvent) => { - event.preventDefault() - const formData = new FormData(event.currentTarget) - const email = formData.get('email') - const password = formData.get('password') - if (typeof email !== 'string' || typeof password !== 'string') { - return - } + const loginMutation = useServerFn(loginFn) + const handleSubmit = async (data: LoginData) => { setIsLoading(true) - setError('') try { - const result = await login({ data: { email, password } }) - if (result?.error) { - setError(result.error) - return - } - await router.invalidate() - } catch { - setError('Login failed. Please try again.') + await loginMutation.mutate(data) + } catch (error) { + // Handle error } finally { setIsLoading(false) } } return ( - -
- - - -
-

{error}

+ + {/* Form fields */} + ) } @@ -589,14 +525,16 @@ export const loginFn = createServerFn({ method: 'POST' }) ) .handler(async ({ data }) => { const user = await authenticateUser(data.email, data.password) - if (!user) { - return { error: 'Invalid credentials' } - } + if (!user) return { error: 'Invalid credentials' } - const ttl = data.rememberMe ? 30 * 24 * 60 * 60 : 8 * 60 * 60 - const session = await getAppSession(ttl) - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update( + { userId: user.id }, + { + // Extend session if remember me is checked + maxAge: data.rememberMe ? 30 * 24 * 60 * 60 : undefined, // 30 days vs session + }, + ) return { success: true } }) @@ -624,6 +562,7 @@ If you're migrating from client-side authentication (localStorage, context only) ### From Other Frameworks - **Next.js**: Replace API routes with server functions, migrate NextAuth sessions +- **Remix**: Convert loaders/actions to server functions, adapt session patterns - **SvelteKit**: Move form actions to server functions, update route protection ## Production Considerations diff --git a/docs/start/framework/react/guide/cdn-asset-urls.md b/docs/start/framework/react/guide/cdn-asset-urls.md index ac5f3e7b57..28c9c8c030 100644 --- a/docs/start/framework/react/guide/cdn-asset-urls.md +++ b/docs/start/framework/react/guide/cdn-asset-urls.md @@ -3,6 +3,8 @@ id: cdn-asset-urls title: CDN Asset URLs --- +# CDN Asset URLs + > **Experimental:** `transformAssets` is experimental and subject to change. Use this guide when you need TanStack Start to rewrite manifest-managed asset URLs at runtime. The most common use case is serving JavaScript and CSS from a CDN whose origin is known only when the server starts, or varies per request. diff --git a/docs/start/framework/react/guide/client-entry-point.md b/docs/start/framework/react/guide/client-entry-point.md index 3d81a13ac2..02d0ecd426 100644 --- a/docs/start/framework/react/guide/client-entry-point.md +++ b/docs/start/framework/react/guide/client-entry-point.md @@ -3,6 +3,8 @@ id: client-entry-point title: Client Entry Point --- +# Client Entry Point + > [!NOTE] > The client entry point is **optional** out of the box. If not provided, TanStack Start will automatically handle the client entry point for you using the below as a default. diff --git a/docs/start/framework/react/guide/databases.md b/docs/start/framework/react/guide/databases.md index 774a9df61b..cbafa13f51 100644 --- a/docs/start/framework/react/guide/databases.md +++ b/docs/start/framework/react/guide/databases.md @@ -1,7 +1,6 @@ --- id: databases title: Databases -description: Connect a database to TanStack Start through server functions and server routes, and compare supported database providers. --- Databases are at the core of any dynamic application, providing the necessary infrastructure to store, retrieve, and manage data. TanStack Start makes it easy to integrate with a variety of databases, offering a flexible approach to managing your application's data layer. diff --git a/docs/start/framework/react/guide/deferred-hydration.md b/docs/start/framework/react/guide/deferred-hydration.md index ba07d65b24..1dc4760fa7 100644 --- a/docs/start/framework/react/guide/deferred-hydration.md +++ b/docs/start/framework/react/guide/deferred-hydration.md @@ -244,7 +244,7 @@ chunks only exist when `split` is enabled, so TypeScript rejects strategy-form Use procedural prefetch when you need custom work: ```tsx -import { noop, useQueryClient } from '@tanstack/react-query' +import { useQueryClient } from '@tanstack/react-query' import { Hydrate } from '@tanstack/react-start' import { visible } from '@tanstack/react-start/hydration' @@ -255,10 +255,8 @@ function DeferredReviews() { { - await Promise.all([ - preload(), - queryClient.query(reviewsQueryOptions).catch(noop), - ]) + await preload() + await queryClient.prefetchQuery(reviewsQueryOptions) }} > diff --git a/docs/start/framework/react/guide/early-hints.md b/docs/start/framework/react/guide/early-hints.md index 2341215022..da633a84d7 100644 --- a/docs/start/framework/react/guide/early-hints.md +++ b/docs/start/framework/react/guide/early-hints.md @@ -3,6 +3,8 @@ id: early-hints title: Early Hints --- +# Early Hints + > **Experimental:** Early Hints are experimental and subject to change. HTTP `103 Early Hints` lets your server tell the browser about important resources before the final HTML response is ready. TanStack Start can collect route assets and route `head().links`, then call your server entry so your runtime can send `103` responses. @@ -164,7 +166,6 @@ Static Early Hints are collected from the final Start manifest resolved for the - CDN URL rewrites are reflected in Early Hints. - `crossOrigin` returned from `transformAssets` is reflected in Early Hints. - JavaScript hints follow the client output format: `modulepreload` for module output, or `preload; as=script` for IIFE output. -- JavaScript hints carry `fetchpriority=low`, matching the generated HTML preload links, so they don't compete with render-blocking stylesheets. - Per-request transforms with `cache: false` are reflected in Early Hints for that request. - Inlined CSS assets are skipped when Start's [CSS inlining](./css-styling#inline-route-css-in-production) build option inlines them into the HTML. diff --git a/docs/start/framework/react/guide/environment-functions.md b/docs/start/framework/react/guide/environment-functions.md index 94fbb52501..f472a3a26a 100644 --- a/docs/start/framework/react/guide/environment-functions.md +++ b/docs/start/framework/react/guide/environment-functions.md @@ -121,37 +121,3 @@ Environment functions are tree-shaken based on the environment for each bundle p Functions created using `createIsomorphicFn()` are tree-shaken. All codes inside `.client()` are not included in server bundle, and vice-versa. On the server, functions created using `createClientOnlyFn()` are replaced with a function that throws an `Error` on the server. The reverse is true for `createServerOnlyFn` functions on the client. - -## Troubleshooting - -### A loader works on refresh but throws during navigation - -If a loader throws `createServerOnlyFn() functions can only be called on the server!` after clicking a link, check whether it calls a server-only helper directly. Route loaders also run in the browser during client navigation. `createServerOnlyFn` guards a local function, it does not send a request to the server. - -Wrap the server work in `createServerFn` and call that function from the loader: - -```tsx -import { createFileRoute } from '@tanstack/react-router' -import { createServerFn, createServerOnlyFn } from '@tanstack/react-start' - -const readOnlyOnServer = createServerOnlyFn(() => 'Read on the server') -const readThroughRpc = createServerFn().handler(() => readOnlyOnServer()) - -export const Route = createFileRoute('/example')({ - loader: () => readThroughRpc(), -}) -``` - -The server function runs directly during SSR and makes a request to the server when called in the browser. Test both a direct page request and navigation from another route. A successful refresh alone does not exercise the browser loader. - -The [execution-boundary tests](https://github.com/TanStack/router/blob/main/e2e/react-start/basic/tests/environment-functions.spec.ts) include the failing direct call and the working server-function version. See [Server Functions](./server-functions.md) for validation and middleware when the function accepts user input. - -### Browser code throws `window is not defined` on the server - -This means browser-only code ran during server execution. Use the stack trace to find the first application or dependency module that reads `window`, `document`, or another browser API. - -For a browser-only component, render it inside `ClientOnly` from `@tanstack/react-router` with a useful fallback. The Start compiler removes its children from the server bundle, which lets the bundler remove imports used only by those children. The [ClientOnly example](https://github.com/TanStack/router/blob/main/e2e/react-start/basic/src/routes/client-only.tsx) covers a component that reads `window` at module scope, and its [tests](https://github.com/TanStack/router/blob/main/e2e/react-start/basic/tests/client-only.spec.ts) check the server fallback and hydrated content. - -A browser API used elsewhere, such as a route loader or server function, still needs the correct execution boundary. Move component side effects into an effect or event handler. For logic that needs different server and browser implementations, use `createIsomorphicFn` with both implementations. Wrapping a function in `createClientOnlyFn` does not defer its call until the browser, calling that wrapper on the server throws the client-only guard error instead. - -If the stack points into build tooling or the error persists in a minimal app with the correct boundary, include that app and the installed Start and bundler versions in a [bug report](https://github.com/TanStack/router/issues/new/choose). A compiler or dependency bug needs a reproducible fix, not a blanket change to rendering mode. diff --git a/docs/start/framework/react/guide/environment-variables.md b/docs/start/framework/react/guide/environment-variables.md index f1f6851602..8953c0a099 100644 --- a/docs/start/framework/react/guide/environment-variables.md +++ b/docs/start/framework/react/guide/environment-variables.md @@ -394,14 +394,14 @@ Use Zod for runtime validation of environment variables: import { z } from 'zod' const envSchema = z.object({ - DATABASE_URL: z.url(), + DATABASE_URL: z.string().url(), JWT_SECRET: z.string().min(32), NODE_ENV: z.enum(['development', 'production', 'test']), }) const clientEnvSchema = z.object({ VITE_APP_NAME: z.string(), - VITE_API_URL: z.url(), + VITE_API_URL: z.string().url(), VITE_AUTH0_DOMAIN: z.string(), VITE_AUTH0_CLIENT_ID: z.string(), }) diff --git a/docs/start/framework/react/guide/hosting.md b/docs/start/framework/react/guide/hosting.md index 2d02f881b3..23fdd63226 100644 --- a/docs/start/framework/react/guide/hosting.md +++ b/docs/start/framework/react/guide/hosting.md @@ -1,7 +1,6 @@ --- id: hosting title: Hosting -description: Deploy TanStack Start with Vite or Rsbuild using hosting guides for Cloudflare, Netlify, Railway, Vercel, Node.js, and other runtimes. --- Hosting is the process of deploying your application to the internet so that users can access it. This is a critical part of any web development project, ensuring your application is available to the world. TanStack Start supports Vite and Rsbuild, giving you flexible build outputs for different hosting providers and runtimes. @@ -116,32 +115,6 @@ Deploy your application to Cloudflare Workers using their one-click deployment p A full TanStack Start example for Cloudflare Workers is available [here](https://github.com/TanStack/router/tree/main/examples/react/start-basic-cloudflare). -#### Deployment fails even though the Vite build succeeds - -If Wrangler reports a missing server entry or unresolved Start virtual modules, check whether your deployment command passes `--config wrangler.jsonc`. With the Cloudflare Vite plugin, that file is the build input. The plugin generates a deployment config with the built server entry and client assets, then writes `.wrangler/deploy/config.json` so Wrangler can find it. Forcing Wrangler to read the source config bypasses that redirect. - -Run these commands from the application directory to validate the generated deployment without publishing: - -```sh -pnpm run build -pnpm exec wrangler deploy --dry-run -``` - -Check that Wrangler reports the generated config under `dist`, rather than just the source `wrangler.jsonc`. Keep the source `main` set to `@tanstack/react-start/server-entry` or your custom server entry, and let the Vite plugin generate the deployment entry. Marking unresolved Start modules as external does not fix the missing build transformation. - -If your build and deployment run in separate jobs, preserve the build output and `.wrangler/deploy/config.json` with their relative paths, or explicitly pass the generated deployment config. Do not edit generated files to repair the source configuration. See Cloudflare's [generated configuration documentation](https://developers.cloudflare.com/workers/wrangler/configuration/#generated-configuration) for how Wrangler finds that output. - -For a named Cloudflare environment, select it when building. For example, if `env.staging` is defined in your source config: - -```sh -CLOUDFLARE_ENV=staging pnpm run build -pnpm exec wrangler deploy --dry-run -``` - -The plugin resolves the environment into the generated config. A later `wrangler deploy --env staging` does not select a different built environment. See [Cloudflare environments](https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/). - -The [Cloudflare fixture tests](https://github.com/TanStack/router/blob/main/e2e/react-start/basic-cloudflare/tests/app.spec.ts) exercise a generated-config dry run and preview the built app locally. A dry run validates packaging, it does not verify account permissions, a live domain, or deployed bindings. - ### Netlify ⭐ _Official Partner_
@@ -325,7 +298,7 @@ npm install srvx ```json "build": "rsbuild build", - "start": "srvx --prod -s ../client dist/server/index.js" + "start": "srvx --prod -s dist/client dist/server/index.js" ``` Express or any other custom Node.js server works too, as long as it serves the client assets and calls the server entry's `fetch` handler for dynamic requests. @@ -501,7 +474,7 @@ In your Appwrite project, navigate to the **Sites** page from the sidebar. Click 3. Confirm the build settings: - **Install command:** `npm install` - **Build command:** `npm run build` - - **Output directory:** `./dist` (if you're using Nitro, this should be `./.output`) + - **Output directory:** `./dist` (if you're using Nitro v2 or v3, this should be `./.output`) 4. Add any required **environment variables** 5. Click **Deploy** diff --git a/docs/start/framework/react/guide/import-protection.md b/docs/start/framework/react/guide/import-protection.md index 451d405f81..8bf47c729a 100644 --- a/docs/start/framework/react/guide/import-protection.md +++ b/docs/start/framework/react/guide/import-protection.md @@ -3,6 +3,8 @@ id: import-protection title: Import Protection --- +> **Experimental:** Import protection is experimental and subject to change. + Import protection prevents server-only code from leaking into client bundles and client-only code from leaking into server bundles. It runs inside TanStack Start and is enabled by default. ## How It Works diff --git a/docs/start/framework/react/guide/isr.md b/docs/start/framework/react/guide/isr.md index 98007d3f15..5704af1a11 100644 --- a/docs/start/framework/react/guide/isr.md +++ b/docs/start/framework/react/guide/isr.md @@ -492,5 +492,5 @@ Track key metrics: - [Static Prerendering](./static-prerendering.md) - Build-time page generation - [Hosting](./hosting.md) - CDN deployment configurations - [Server Functions](./server-functions.md) - Creating dynamic data endpoints -- [Data Loading](/router/latest/docs/guide/data-loading) - Client-side cache control +- [Data Loading](../../../../router/guide/data-loading.md) - Client-side cache control - [Middleware](./middleware.md) - Request/response customization diff --git a/docs/start/framework/react/guide/path-aliases.md b/docs/start/framework/react/guide/path-aliases.md index bd75dc01ed..ff9735df83 100644 --- a/docs/start/framework/react/guide/path-aliases.md +++ b/docs/start/framework/react/guide/path-aliases.md @@ -26,7 +26,9 @@ After updating your `tsconfig.json` file, configure your build tool so it resolv # Vite -Vite has [built-in support for path aliases](https://vite.dev/config/shared-options#resolve-tsconfigpaths), which is disabled by default. To enable it, add the following configuration to your `vite.config.ts` file: +## Vite 8 + +Vite 8+ has [built-in support for path aliases](https://vite.dev/config/shared-options#resolve-tsconfigpaths), which is disabled by default. To enable it, simply add the following configuration to your `vite.config.ts` file: ```ts // vite.config.ts @@ -40,6 +42,31 @@ export default defineConfig({ }) ``` +## Vite 7 and earlier + +For Vite 7 and earlier, install the `vite-tsconfig-paths` plugin to enable path aliases in your TanStack Start project. You can do this by running the following command: + +```sh +npm install -D vite-tsconfig-paths +``` + +Now, you'll need to update your `vite.config.ts` file to include the following: + +```ts +// vite.config.ts +import { defineConfig } from 'vite' +import viteTsConfigPaths from 'vite-tsconfig-paths' + +export default defineConfig({ + plugins: [ + // this is the plugin that enables path aliases + viteTsConfigPaths({ + projects: ['./tsconfig.json'], + }), + ], +}) +``` + # Rsbuild Rsbuild reads the `paths` field from `tsconfig.json` by default. No extra config is needed when your aliases live in the root `tsconfig.json`. diff --git a/docs/start/framework/react/guide/production-checklist.md b/docs/start/framework/react/guide/production-checklist.md deleted file mode 100644 index b46cd70f2e..0000000000 --- a/docs/start/framework/react/guide/production-checklist.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -id: production-checklist -title: Production Checklist -description: Check a TanStack Start production build for secret exposure, authorization, cache isolation, HTTP status codes, SEO, assets, logging, and deployment failures. ---- - -Run these checks against the production build and again through your public hostname. A passing development server does not verify your deployment adapter, runtime environment, or CDN. - -## Secrets and server boundaries - -- [ ] **Check required environment variables at runtime.** Start the production server with the same variable names and runtime bindings as your host. Missing configuration should fail clearly before it serves dependent requests. Look for undefined credentials, connections to a development database, or values that only existed during the build. See [Environment Variables](./environment-variables). -- [ ] **Keep secrets out of browser output.** Build with a harmless, unique test secret and search the emitted client files, source maps you publish, and response bodies for that value. Do not use a real secret for this check. A match means a value crossed the server boundary, even if its variable name lacks `VITE_`. Check server-function return values as well as imports. See [Environment Variables](./environment-variables#security-best-practices) and [Import Protection](./import-protection). - -## Authorization and mutations - -- [ ] **Test endpoints directly.** Record a private read and write, then repeat them while signed out and as a different account. Both must reject unauthorized access without changing data. A redirect in `beforeLoad` does not protect a separately callable endpoint. See [Authentication Server Primitives](./authentication-server-primitives#protect-data-first). -- [ ] **Exercise session expiry and sign-out.** Reload a private page, expire its session, sign out, and revisit it. Confirm the cookie's HTTPS flags and that old account data disappears from browser caches. Look for sessions that survive beyond your intended policy or another account's data appearing after switching accounts. See [Session Cookies](./authentication-server-primitives#session-cookies). -- [ ] **Reject invalid and cross-site writes.** Send malformed input and browser-like requests from an untrusted origin to each mutation entry point, including ordinary server-route forms. Use an authenticated test session for protected writes so an authentication failure cannot be mistaken for CSRF protection. Verify validation and your intended CSRF policy before any write occurs. Also test rapid or repeated submissions. A disabled button helps the interface, but the endpoint still needs its own checks. See [Authentication Server Primitives](./authentication-server-primitives) and [Server Functions](./server-functions). - -## Cache isolation and rendering - -- [ ] **Request the same private URL as two accounts concurrently.** Inspect each HTML response and any serialized loader or query data. Each response must contain only its own account's values. Repeat through the CDN and after a browser account switch. Shared personalized HTML or process-wide user caches are failures. See [Middleware](./middleware) and [Authentication Server Primitives](./authentication-server-primitives). -- [ ] **Check final cache headers and update behavior.** Use `Cache-Control: no-store` for personalized responses unless you have an explicit identity-partitioned cache key and lifecycle that prevents reuse across accounts. `private` alone does not prevent a browser cache from retaining one account's response after sign-out. For public cached content, perform a write and confirm it becomes visible within the freshness policy you chose. Inspect the final headers from your host, not just the values assigned in route code. Query invalidation, Router invalidation, and CDN invalidation affect different caches. See [Server Routes](./server-routes) and [Static Prerendering](./static-prerendering). -- [ ] **Compare a direct visit with client navigation.** Test initial HTML, hydration, back/forward navigation, and a reload for a parameterized route and a route with search values. Missing content, mismatched metadata, hydration warnings, or repeated immediate reads need investigation. See [Hydration Errors](./hydration-errors) and [Routing](./routing). - -## HTTP responses and search visibility - -- [ ] **Probe success, missing, redirect, and error responses.** A real missing public resource should return HTTP 404, a moved URL should use its intended redirect, and a failed request should not masquerade as a successful page. Check status codes before following redirects. Test a controlled failure in staging and confirm the error interface offers recovery without leaking sensitive details. See [Server Routes](./server-routes), [Error Boundaries](./error-boundaries), and [Router Not Found Errors](/router/latest/docs/guide/not-found-errors). -- [ ] **Inspect public HTML before JavaScript runs.** Verify useful content, a specific title and description, the public canonical URL, and relevant social metadata. Repeat after client navigation. Look for preview hostnames in canonicals, duplicate titles, or metadata that depends on a browser effect. See [SEO](./seo). -- [ ] **Check indexing rules and discovery files.** Fetch `robots.txt` and the sitemap from the deployed hostname. Sitemap URLs should resolve to intended public canonical pages. Remove accidental production `noindex` rules, but keep private and preview content out of search. Robots rules are not access control. See [SEO](./seo#sitemaps). - -## Assets, logging, and deployment - -- [ ] **Inspect the production network waterfall.** Test a representative page on a narrow viewport with slower network and CPU settings. Check large images, missing dimensions, font loading, third-party scripts, and failed asset requests. Record a baseline so later releases have something to compare against. Local lab results do not establish real-user performance. See [SEO performance guidance](./seo#performance-matters), [CDN Asset URLs](./cdn-asset-urls), and [Observability](./observability). -- [ ] **Trigger and find a controlled error.** Confirm your chosen logs or error service receive it with enough route and release context to investigate. Check that credentials, cookies, and sensitive payloads are absent. An error boundary that only changes the screen is not evidence of a working alert. See [Observability](./observability). -- [ ] **Run the deployed entry point and rehearse rollback.** Use your adapter's production output and start command, then test a direct deep link, a static asset, a server function, and a server route. Check that requests still work after a restart. Rehearse restoring a previous release and account for any database migration separately. Local success cannot prove host bindings, asset retention, or database rollback safety. See [Hosting](./hosting). - -## Keep a release record - -Record the tested commit, runtime, hostname, commands, and results. Turn repeatable HTTP and browser checks into CI tests; repeat host-specific checks after deployment changes. - -The [Next.js migration reference](../examples/start-next-migration) provides production browser checks for public HTML and metadata, search, redirects, missing pages, session reloads, and protected mutations. Its demo credentials and cookie session are for local comparison, not a production authentication system. Use its tests as a starting point, then add your own authorization rules, external services, CDN behavior, and operational checks. diff --git a/docs/start/framework/react/guide/rendering-markdown.md b/docs/start/framework/react/guide/rendering-markdown.md index bf644124d9..4258d6f4f1 100644 --- a/docs/start/framework/react/guide/rendering-markdown.md +++ b/docs/start/framework/react/guide/rendering-markdown.md @@ -3,85 +3,191 @@ id: rendering-markdown title: Rendering Markdown --- -Use [TanStack Markdown](https://tanstack.com/markdown/latest/docs/overview) to render Markdown in your TanStack Start application. Its React renderer works synchronously during server rendering and client navigation, so content does not need to wait for a client effect. +This guide covers two methods for importing and rendering markdown content in your TanStack Start application: -This guide covers static posts loaded with Content Collections and remote content fetched through a server function. Both use the same Markdown component. +1. **Static markdown** with `content-collections` for build-time loading (e.g., blog posts) +2. **Dynamic markdown** fetched at runtime from GitHub or any remote source -## Rendering Markdown +Both methods share a common rendering pipeline using the `unified` ecosystem. -Install TanStack Markdown: +## Setting Up the Markdown Processor + +Both approaches use the same markdown-to-HTML processing pipeline. First, install the required dependencies: ```bash -npm install @tanstack/markdown +npm install unified remark-parse remark-gfm remark-rehype rehype-raw rehype-slug rehype-autolink-headings rehype-stringify shiki html-react-parser gray-matter ``` -Create a shared component that accepts either Markdown source or a parsed document: +Create a markdown processor utility: + +```tsx +// src/utils/markdown.ts +import { unified } from 'unified' +import remarkParse from 'remark-parse' +import remarkGfm from 'remark-gfm' +import remarkRehype from 'remark-rehype' +import rehypeRaw from 'rehype-raw' +import rehypeSlug from 'rehype-slug' +import rehypeAutolinkHeadings from 'rehype-autolink-headings' +import rehypeStringify from 'rehype-stringify' + +export type MarkdownHeading = { + id: string + text: string + level: number +} + +export type MarkdownResult = { + markup: string + headings: Array +} + +export async function renderMarkdown(content: string): Promise { + const headings: Array = [] + + const result = await unified() + .use(remarkParse) // Parse markdown + .use(remarkGfm) // Support GitHub Flavored Markdown + .use(remarkRehype, { allowDangerousHtml: true }) // Convert to HTML AST + .use(rehypeRaw) // Process raw HTML in markdown + .use(rehypeSlug) // Add IDs to headings + .use(rehypeAutolinkHeadings, { + behavior: 'wrap', + properties: { className: ['anchor'] }, + }) + .use(() => (tree) => { + // Extract headings for table of contents + const { visit } = require('unist-util-visit') + const { toString } = require('hast-util-to-string') + + visit(tree, 'element', (node: any) => { + if (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(node.tagName)) { + headings.push({ + id: node.properties?.id || '', + text: toString(node), + level: parseInt(node.tagName.charAt(1), 10), + }) + } + }) + }) + .use(rehypeStringify) // Serialize to HTML string + .process(content) + + return { + markup: String(result), + headings, + } +} +``` + +## Creating a Markdown Component + +Create a React component that renders the processed HTML with custom element handling: ```tsx // src/components/Markdown.tsx -import { Markdown as ReactMarkdown } from '@tanstack/markdown/react' -import type { MarkdownDocument } from '@tanstack/markdown' +import parse, { type HTMLReactParserOptions, Element } from 'html-react-parser' +import { renderMarkdown, type MarkdownResult } from '~/utils/markdown' type MarkdownProps = { - content: string | MarkdownDocument + content: string className?: string } export function Markdown({ content, className }: MarkdownProps) { - return ( -
- {content} -
- ) + const [result, setResult] = useState(null) + + useEffect(() => { + renderMarkdown(content).then(setResult) + }, [content]) + + if (!result) { + return
Loading...
+ } + + const options: HTMLReactParserOptions = { + replace: (domNode) => { + if (domNode instanceof Element) { + // Customize rendering of specific elements + if (domNode.name === 'a') { + // Handle links + const href = domNode.attribs.href + if (href?.startsWith('/')) { + // Internal link - use your router's Link component + return ( + {domToReact(domNode.children, options)} + ) + } + } + + if (domNode.name === 'img') { + // Add lazy loading to images + return ( + + ) + } + } + }, + } + + return
{parse(result.markup, options)}
} ``` -Headings receive stable IDs, and `headingAnchors` adds links to them. Raw HTML is escaped and unsafe URL protocols are removed by default. Keep these defaults for remote or user-written content. TanStack Markdown does not execute MDX or implement every CommonMark or GFM feature, so check the [supported syntax](https://tanstack.com/markdown/latest/docs/core-concepts/syntax-profile) when migrating existing content. +## Method 1: Static Markdown with content-collections -Use the `components` prop to customize elements, for example to lazy-load images: +The `content-collections` package is ideal for static content like blog posts that are included in your repository. It processes markdown files at build time and provides type-safe access to the content. -```tsx - , - }} -> - {content} - -``` - -The examples below use `~/*` for the `src/*` import alias. The `prose` class is optional and requires your own typography styles, such as Tailwind Typography. - -## Static Markdown with Content Collections - -[Content Collections](https://www.content-collections.dev/docs/quickstart/tanstack-start) loads local Markdown files and validates their frontmatter. Pass the Markdown body from the generated collection to the shared renderer. - -### Installation and Configuration +### Installation ```bash -npm install -D @content-collections/core @content-collections/vite zod +npm install @content-collections/core @content-collections/vite ``` -```ts +### Configuration + +Create a `content-collections.ts` file in your project root: + +```tsx // content-collections.ts import { defineCollection, defineConfig } from '@content-collections/core' -import { z } from 'zod' +import matter from 'gray-matter' + +function extractFrontMatter(content: string) { + const { data, content: body, excerpt } = matter(content, { excerpt: true }) + return { data, body, excerpt: excerpt || '' } +} const posts = defineCollection({ name: 'posts', - directory: './src/blog', + directory: './src/blog', // Directory containing your .md files include: '*.md', - schema: z.object({ + schema: (z) => ({ title: z.string(), - published: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), - description: z.string(), - authors: z.array(z.string()), - content: z.string(), - }), - transform: (post) => ({ - ...post, - slug: post._meta.path, + published: z.string().date(), + description: z.string().optional(), + authors: z.string().array(), }), + transform: ({ content, ...post }) => { + const frontMatter = extractFrontMatter(content) + + // Extract header image (first image in the document) + const headerImageMatch = content.match(/!\[([^\]]*)\]\(([^)]+)\)/) + const headerImage = headerImageMatch ? headerImageMatch[2] : undefined + + return { + ...post, + slug: post._meta.path, + excerpt: frontMatter.excerpt, + description: frontMatter.data.description, + headerImage, + content: frontMatter.body, + } + }, }) export default defineConfig({ @@ -89,56 +195,40 @@ export default defineConfig({ }) ``` -Content Collections already separates frontmatter from `content`, so this transform does not need a second frontmatter parser. +### Vite Integration -Add the plugin to your existing Vite configuration, keeping any deployment plugins your app needs: +Add the content-collections plugin to your Vite config: -```ts -// vite.config.ts +```tsx +// app.config.ts +import { defineConfig } from '@tanstack/react-start/config' import contentCollections from '@content-collections/vite' -import { tanstackStart } from '@tanstack/react-start/plugin/vite' -import viteReact from '@vitejs/plugin-react' -import { defineConfig } from 'vite' -import tsConfigPaths from 'vite-tsconfig-paths' export default defineConfig({ - plugins: [ - contentCollections(), - tsConfigPaths({ projects: ['./tsconfig.json'] }), - tanstackStart(), - viteReact(), - ], + vite: { + plugins: [contentCollections()], + }, }) ``` -Add the generated collection alias to your existing `tsconfig.json`: +### Creating Blog Posts -```json -{ - "compilerOptions": { - "paths": { - "~/*": ["./src/*"], - "content-collections": ["./.content-collections/generated"] - } - } -} -``` - -Add `.content-collections` to `.gitignore`. Starting the Vite dev server or running a build generates the collection. - -### Creating a Post - -Create `src/blog/hello-world.md`: +Create markdown files in your designated directory: ````markdown ---- +## + title: Hello World -published: '2026-01-15' -description: My first blog post +published: 2024-01-15 authors: - - Jane Doe + +- Jane Doe + description: My first blog post + --- +![Hero Image](/images/hero.jpg) + Welcome to my blog! This is my first post. ## Getting Started @@ -150,11 +240,13 @@ console.log('Hello, world!') ``` ```` -### Listing Posts +### Using the Collection + +Access your posts through the generated collection: ```tsx // src/routes/blog.index.tsx -import { createFileRoute, Link } from '@tanstack/react-router' +import { createFileRoute } from '@tanstack/react-router' import { allPosts } from 'content-collections' export const Route = createFileRoute('/blog/')({ @@ -162,30 +254,31 @@ export const Route = createFileRoute('/blog/')({ }) function BlogIndex() { - const sortedPosts = [...allPosts].sort((a, b) => - b.published.localeCompare(a.published), + // Posts are sorted by published date + const sortedPosts = allPosts.sort( + (a, b) => new Date(b.published).getTime() - new Date(a.published).getTime(), ) return ( -
+

Blog

    {sortedPosts.map((post) => (
  • - {post.title} +

    {post.title}

    +

    {post.excerpt}

    + {post.published} -

    {post.description}

    -
  • ))}
-
+
) } ``` -### Rendering a Post +### Rendering a Single Post ```tsx // src/routes/blog.$slug.tsx @@ -195,7 +288,7 @@ import { Markdown } from '~/components/Markdown' export const Route = createFileRoute('/blog/$slug')({ loader: ({ params }) => { - const post = allPosts.find((post) => post.slug === params.slug) + const post = allPosts.find((p) => p.slug === params.slug) if (!post) { throw notFound() } @@ -209,169 +302,202 @@ function BlogPost() { return (
-

{post.title}

-

- By {post.authors.join(', ')} on {post.published} -

+
+

{post.title}

+

+ By {post.authors.join(', ')} on {post.published} +

+
) } ``` -The renderer parses the Markdown synchronously and renders React elements on both the server and client. +## Method 2: Dynamic Markdown from Remote Sources -## Remote Markdown with a Server Function +For content stored externally (like GitHub repositories), you can fetch and render markdown dynamically using server functions. -Fetch remote content in a server function and parse it before returning it to the route. Install `gray-matter` if the remote files contain frontmatter: - -```bash -npm install gray-matter -``` - -Keep the repository, branch, and content directory in server code. Validate the requested filename before building the URL: - -```ts -// src/utils/docs.ts -import { createServerFn } from '@tanstack/react-start' -import { notFound } from '@tanstack/react-router' -import { parseMarkdown } from '@tanstack/markdown/parser' -import matter from 'gray-matter' - -export const fetchDocs = createServerFn({ method: 'GET' }) - .validator((slug: unknown) => { - if (typeof slug !== 'string' || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(slug)) { - throw new Error('Invalid document slug') - } - return slug - }) - .handler(async ({ data: slug }) => { - // Replace this with your public repository's content directory. - const baseUrl = - 'https://raw.githubusercontent.com/your-org/your-repo/main/docs' - const response = await fetch(`${baseUrl}/${slug}.md`) - - if (response.status === 404) { - throw notFound() - } - if (!response.ok) { - throw new Error(`Failed to fetch document: ${response.status}`) - } - - const { data, content } = matter(await response.text()) - - return { - title: typeof data.title === 'string' ? data.title : slug, - document: parseMarkdown(content), - } - }) -``` +### Creating a Fetch Utility ```tsx -// src/routes/docs.$slug.tsx -import { createFileRoute } from '@tanstack/react-router' -import { Markdown } from '~/components/Markdown' -import { fetchDocs } from '~/utils/docs' +// src/utils/docs.server.ts +import { createServerFn } from '@tanstack/react-start' +import matter from 'gray-matter' -export const Route = createFileRoute('/docs/$slug')({ - loader: ({ params }) => fetchDocs({ data: params.slug }), +type FetchDocsParams = { + repo: string // e.g., 'tanstack/router' + branch: string // e.g., 'main' + filePath: string // e.g., 'docs/guide/getting-started.md' +} + +export const fetchDocs = createServerFn({ method: 'GET' }) + .validator((params: FetchDocsParams) => params) + .handler(async ({ data: { repo, branch, filePath } }) => { + const url = `https://raw.githubusercontent.com/${repo}/${branch}/${filePath}` + + const response = await fetch(url, { + headers: { + // Add GitHub token for private repos or higher rate limits + // Authorization: `token ${process.env.GITHUB_TOKEN}`, + }, + }) + + if (!response.ok) { + throw new Error(`Failed to fetch: ${response.status}`) + } + + const rawContent = await response.text() + const { data: frontmatter, content } = matter(rawContent) + + return { + frontmatter, + content, + filePath, + } + }) +``` + +### Adding Cache Headers + +For production, add appropriate cache headers: + +```tsx +export const fetchDocs = createServerFn({ method: 'GET' }) + .validator((params: FetchDocsParams) => params) + .handler(async ({ data: { repo, branch, filePath }, context }) => { + // Set cache headers for CDN caching + context.response.headers.set( + 'Cache-Control', + 'public, max-age=0, must-revalidate', + ) + context.response.headers.set( + 'CDN-Cache-Control', + 'max-age=300, stale-while-revalidate=300', + ) + + // ... fetch logic + }) +``` + +### Using Dynamic Markdown in Routes + +```tsx +// src/routes/docs.$path.tsx +import { createFileRoute } from '@tanstack/react-router' +import { fetchDocs } from '~/utils/docs.server' +import { Markdown } from '~/components/Markdown' + +export const Route = createFileRoute('/docs/$path')({ + loader: async ({ params }) => { + return fetchDocs({ + data: { + repo: 'your-org/your-repo', + branch: 'main', + filePath: `docs/${params.path}.md`, + }, + }) + }, component: DocsPage, }) function DocsPage() { - const { title, document } = Route.useLoaderData() + const { frontmatter, content } = Route.useLoaderData() return (
-

{title}

- +

{frontmatter.title}

+
) } ``` -Relative Markdown links and image URLs resolve against your app's URL, not the source repository. Use app-relative or absolute URLs in the content, or transform them for your site's route and asset layout. +### Fetching Directory Contents -## Syntax Highlighting with TanStack Highlight - -Install [TanStack Highlight](https://tanstack.com/highlight/latest/docs/overview). The Markdown adapter requires version `0.0.6` or newer: - -```bash -npm install @tanstack/highlight -``` - -Register the languages your content uses and create the Markdown adapter: - -```ts -// src/utils/markdown-highlighter.ts -import { createHighlighter } from '@tanstack/highlight/core' -import { js } from '@tanstack/highlight/languages/js' -import { plaintext } from '@tanstack/highlight/languages/plaintext' -import { ts } from '@tanstack/highlight/languages/ts' -import { tsx } from '@tanstack/highlight/languages/tsx' -import { createTanStackMarkdownHighlighter } from '@tanstack/highlight/markdown' - -const highlighter = createHighlighter({ - languages: [plaintext, js, ts, tsx], -}) - -export const highlightMarkdownCode = - createTanStackMarkdownHighlighter(highlighter) -``` - -Update the shared component to pass the highlighter and include its theme styles: +To build navigation from a GitHub directory: ```tsx -// src/components/Markdown.tsx -import { createThemeCss } from '@tanstack/highlight/theme' -import { githubDarkTheme } from '@tanstack/highlight/themes/github-dark' -import { githubLightTheme } from '@tanstack/highlight/themes/github-light' -import { Markdown as ReactMarkdown } from '@tanstack/markdown/react' -import type { MarkdownDocument } from '@tanstack/markdown' -import { highlightMarkdownCode } from '~/utils/markdown-highlighter' - -const themeCss = createThemeCss({ - light: githubLightTheme, - dark: githubDarkTheme, - lightSelector: '.markdown-renderer', - darkSelector: '.dark .markdown-renderer', - codeBlockSelector: '.markdown-renderer pre.tm-code', - lineNumbersSelector: '.markdown-renderer .tm-code--line-numbers', -}) - -type MarkdownProps = { - content: string | MarkdownDocument - className?: string +// src/utils/docs.server.ts +type GitHubContent = { + name: string + path: string + type: 'file' | 'dir' } -export function Markdown({ content, className }: MarkdownProps) { - return ( -
- - - {content} - -
+export const fetchRepoContents = createServerFn({ method: 'GET' }) + .validator((params: { repo: string; branch: string; path: string }) => params) + .handler(async ({ data: { repo, branch, path } }) => { + const url = `https://api.github.com/repos/${repo}/contents/${path}?ref=${branch}` + + const response = await fetch(url, { + headers: { + Accept: 'application/vnd.github.v3+json', + // Authorization: `token ${process.env.GITHUB_TOKEN}`, + }, + }) + + if (!response.ok) { + throw new Error(`Failed to fetch contents: ${response.status}`) + } + + const contents: Array = await response.json() + + return contents + .filter((item) => item.type === 'file' && item.name.endsWith('.md')) + .map((item) => ({ + name: item.name.replace('.md', ''), + path: item.path, + })) + }) +``` + +## Adding Syntax Highlighting with Shiki + +For code blocks with syntax highlighting, integrate Shiki into your markdown processor: + +```tsx +// src/utils/markdown.ts +import { codeToHtml } from 'shiki' + +// Process code blocks after parsing +export async function highlightCode( + code: string, + language: string, +): Promise { + return codeToHtml(code, { + lang: language, + themes: { + light: 'github-light', + dark: 'tokyo-night', + }, + }) +} +``` + +Then handle code blocks in your Markdown component: + +```tsx +// In your Markdown component's replace function +if (domNode.name === 'pre') { + const codeElement = domNode.children.find( + (child) => child instanceof Element && child.name === 'code', ) + if (codeElement) { + const className = codeElement.attribs.class || '' + const language = className.replace('language-', '') || 'text' + const code = getText(codeElement) + + return + } } ``` -The adapter returns escaped token markup inside the renderer's own `
` elements. Unknown languages fall back to plain text. Add a `dark` class to an ancestor to select the dark theme. See the [syntax highlighting guide](https://tanstack.com/markdown/latest/docs/guides/syntax-highlighting) for line numbers and highlighted lines.
+## Summary
 
-## Table of Contents
+| Approach            | Best For                                  | Pros                                           | Cons                                      |
+| ------------------- | ----------------------------------------- | ---------------------------------------------- | ----------------------------------------- |
+| content-collections | Blog posts, static docs bundled with app  | Type-safe, build-time processing, fast runtime | Requires rebuild for content updates      |
+| Dynamic fetching    | External docs, frequently updated content | Always fresh, no rebuild needed                | Runtime overhead, requires error handling |
 
-To collect headings, add the docs preset when parsing the document:
-
-```ts
-import { docsMarkdownExtensions } from '@tanstack/markdown/extensions/docs'
-import { parseMarkdown } from '@tanstack/markdown/parser'
-
-const document = parseMarkdown(content, {
-  extensions: docsMarkdownExtensions(),
-})
-
-const headings = document.headings ?? []
-// Each heading has an id, text, and level.
-```
-
-Use this in the server function, then render links to each heading's `id`. The [docs preset guide](https://tanstack.com/markdown/latest/docs/guides/docs-preset) also covers callouts and custom comment components. Those features need the same extensions passed to the renderer.
+Choose the approach that best fits your content update frequency and deployment workflow. For hybrid scenarios, you can use both methods in the same application.
diff --git a/docs/start/framework/react/guide/seo.md b/docs/start/framework/react/guide/seo.md
index 1a202503a8..2d3e98757d 100644
--- a/docs/start/framework/react/guide/seo.md
+++ b/docs/start/framework/react/guide/seo.md
@@ -1,7 +1,6 @@
 ---
 id: seo
 title: SEO
-description: Configure SEO in TanStack Start with page metadata, canonical URLs, structured data, server rendering, sitemaps, and robots.txt.
 ---
 
 > [!NOTE]
diff --git a/docs/start/framework/react/guide/server-components.md b/docs/start/framework/react/guide/server-components.md
index 581ae145bd..893a633339 100644
--- a/docs/start/framework/react/guide/server-components.md
+++ b/docs/start/framework/react/guide/server-components.md
@@ -74,7 +74,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild'
 
 export default defineConfig({
   plugins: [
-    pluginReact(),
+    pluginReact({ splitChunks: false }),
     tanstackStart({
       rsc: {
         enabled: true,
@@ -86,7 +86,7 @@ export default defineConfig({
 
 
 
-**Requirements:** React 19+, Vite 8+ or Rsbuild 2+
+**Requirements:** React 19+, Vite 7+ or Rsbuild 2+
 
 ## Quick Start
 
@@ -401,10 +401,7 @@ const postQueryOptions = (postId: string) => ({
 export const Route = createFileRoute('/posts/$postId')({
   loader: async ({ context, params }) => {
     // Prefetch during SSR - data reused on client without refetch
-    await context.queryClient.query({
-      ...postQueryOptions(params.postId),
-      staleTime: 'static',
-    })
+    await context.queryClient.ensureQueryData(postQueryOptions(params.postId))
   },
   component: PostPage,
 })
diff --git a/docs/start/framework/react/guide/server-entry-point.md b/docs/start/framework/react/guide/server-entry-point.md
index 5f74eb7846..5acc8ee550 100644
--- a/docs/start/framework/react/guide/server-entry-point.md
+++ b/docs/start/framework/react/guide/server-entry-point.md
@@ -3,72 +3,38 @@ id: server-entry-point
 title: Server Entry Point
 ---
 
+# Server Entry Point
+
 > [!NOTE]
-> A custom server entry point is **optional**. Without one, TanStack Start uses its built-in entry, which renders requests and converts uncaught errors into HTTP responses automatically.
+> The server entry point is **optional** out of the box. If not provided, TanStack Start will automatically handle the server entry point for you using the below as a default.
 
 The Server Entry Point supports the universal fetch handler format, commonly used by [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/) and other WinterCG-compatible runtimes.
 
-The default export must provide a `fetch` method that accepts a `Request` and Start's request options, then returns a `Response` or `Promise`. Use `createServerEntry` to infer these types and keep the complete callback inside the request's context, including custom error handling. For example, this custom `src/server.ts` delegates to the built-in entry:
+To ensure interoperability, the default export must conform to our `ServerEntry` interface:
+
+```ts
+export default {
+  fetch(req: Request, opts?: RequestOptions): Response | Promise {
+    // ...
+  },
+}
+```
+
+TanStack Start exposes a wrapper to make creation type-safe. This is done in the `src/server.ts` file.
 
 ```tsx
 // src/server.ts
 import handler, { createServerEntry } from '@tanstack/react-start/server-entry'
 
 export default createServerEntry({
-  fetch(request, opts) {
-    return handler.fetch(request, opts)
+  fetch(request) {
+    return handler.fetch(request)
   },
 })
 ```
 
 Whether we are statically generating our app or serving it dynamically, the `server.ts` file is the entry point for doing all SSR-related work as well as for handling server routes and server function requests.
 
-## Configuring a Custom Server Entry
-
-Start automatically detects `src/server.ts`. If that file is absent, it uses the built-in entry. For a custom entry at another path, configure `server.entry` in your bundler plugin. This path is resolved relative to `srcDirectory`, which defaults to `src`.
-
-
-
-# Vite
-
-```ts title="vite.config.ts"
-import { defineConfig } from 'vite'
-import { tanstackStart } from '@tanstack/react-start/plugin/vite'
-import viteReact from '@vitejs/plugin-react'
-
-export default defineConfig({
-  plugins: [
-    tanstackStart({
-      server: {
-        entry: './server-entry.ts',
-      },
-    }),
-    viteReact(),
-  ],
-})
-```
-
-# Rsbuild
-
-```ts title="rsbuild.config.ts"
-import { defineConfig } from '@rsbuild/core'
-import { pluginReact } from '@rsbuild/plugin-react'
-import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild'
-
-export default defineConfig({
-  plugins: [
-    pluginReact(),
-    tanstackStart({
-      server: {
-        entry: './server-entry.ts',
-      },
-    }),
-  ],
-})
-```
-
-
-
 ## Custom Server Handlers
 
 You can create custom server handlers to modify how your application is rendered:
@@ -87,155 +53,16 @@ const customHandler = defineHandlerCallback((ctx) => {
   return defaultStreamHandler(ctx)
 })
 
-const startHandler = createStartHandler(customHandler)
+const fetch = createStartHandler(customHandler)
 
 export default createServerEntry({
-  fetch(request, opts) {
-    return startHandler(request, opts)
-  },
+  fetch,
 })
 ```
 
-## Error Handling
-
-The built-in entry uses `createServerEntry` to catch errors that escape the Start handler and call `handleStartError(error)` inside the active request context. This works without a custom `src/server.ts`. Response helpers such as `setResponseStatus`, `setResponseHeader`, and `setCookie` are applied to the error response.
-
-For an uncaught error, Start returns a generic JSON error body with status `500` unless a response helper or HTTP-style error property supplies an error status. A thrown `Response` keeps its body and response metadata, with response helpers applied, and loses its body for `HEAD` requests and for statuses `204`, `205`, and `304`, including one selected by a helper. The generic error body Start generates always uses an error status, so only `HEAD` removes it.
-
-For example, a request to this server route returns `401` with a `WWW-Authenticate` header:
-
-```tsx
-// src/routes/api/protected.ts
-import { createFileRoute } from '@tanstack/react-router'
-import { createMiddleware } from '@tanstack/react-start'
-import {
-  setResponseHeader,
-  setResponseStatus,
-} from '@tanstack/react-start/server'
-
-const authMiddleware = createMiddleware().server(() => {
-  setResponseStatus(401, 'Unauthorized')
-  setResponseHeader('www-authenticate', 'Bearer')
-  throw new Error('Unauthorized')
-})
-
-export const Route = createFileRoute('/api/protected')({
-  server: {
-    middleware: [authMiddleware],
-    handlers: {
-      GET: () => new Response('Protected content'),
-    },
-  },
-})
-```
-
-Error conversion preserves:
-
-- Error statuses (`400`-`599`) and their status text from `setResponseStatus`
-- Header operations from the response helpers
-- Cookies from `setCookie` and `appendResponseHeader('set-cookie', ...)`, including multiple `Set-Cookie` headers
-- HTTP-style error metadata such as `error.status`, `error.statusText`, `error.headers`, and `error.cause.headers`
-
-Start builds a new JSON body for an error, so it never copies the framing and connection headers `Content-Length`, `Content-Encoding`, `Transfer-Encoding`, `Trailer`, `Connection`, `Keep-Alive`, `Proxy-Connection`, and `TE` from error metadata. When `error.cause` is a `Response`, such as a failed upstream `fetch` from any fetch implementation, Start uses its status and status text but none of its headers, because they were written for that upstream reply.
-
-Explicit helper error statuses, their status text, and header operations take precedence over error metadata. An error response only uses an error status (`400`-`599`). A status set with `setResponseStatus` before the error applies only when it is an error status. A success, redirect, or bodyless status such as `200`, `201`, `302`, or `204` describes the response that the failure replaced, so Start discards it together with its status text and uses the error's own status or `500`. Error metadata such as `error.status` or `error.statusCode` likewise applies only when it is `400` or higher.
-
-Start logs the error to the server console unless the error's own metadata marks it as an HTTP error with a status of `400` or higher, even when a helper selected the status. The generic JSON body does not expose the error's message or stack.
-
-Errors that Router handles through route error components do not reach this top-level catch. Server function calls and their request middleware use a separate error response path that preserves the RPC serialization protocol. Failures during initialization, before that path is established, fall back to the top-level error response. Errors in a streamed body after the entry has returned its `Response` cannot replace that response's status or headers.
-
-You can use `createServerEntry` with your own `try`/`catch`, including for error reporting with Sentry. Your catch runs first; the wrapper converts only errors that escape your callback. Call the handler returned by `createStartHandler(...)` inside that catch, because it rethrows the original uncaught value:
-
-```tsx
-// src/server.ts
-import {
-  createStartHandler,
-  defaultStreamHandler,
-  handleStartError,
-} from '@tanstack/react-start/server'
-import { createServerEntry } from '@tanstack/react-start/server-entry'
-
-const startHandler = createStartHandler(defaultStreamHandler)
-
-export default createServerEntry({
-  async fetch(request, opts) {
-    try {
-      return await startHandler(request, opts)
-    } catch (error) {
-      // Report the original error here, for example to Sentry.
-      return handleStartError(error)
-    }
-  },
-})
-```
-
-After reporting, choose how to finish the catch:
-
-- Return `handleStartError(error)` to obtain Start's error response explicitly.
-- Rethrow `error` to let `createServerEntry` produce that same error response.
-- Return your own `Response` to choose its body, status, and headers.
-
-All three options keep `createServerEntry` and its request context. The first two preserve Start's response-helper state.
-
-The wrapper creates the request context before calling your `fetch` callback. The entire callback, including its own catch and code after `await`, runs inside that context. Calling the Start handler with the same `Request` reuses it. `handleStartError` therefore uses the correct request's state even when the thrown value is a primitive, or several requests throw the same `Error` object. Start does not attach request state to errors or remember them for a later catch. A catch outside this wrapper cannot recover a completed request's helper state from the error.
-
-The default export from `@tanstack/react-start/server-entry` is already wrapped. Calling its `fetch` method converts uncaught errors before an outer catch can see them. Use the handler returned by `createStartHandler(...)` inside your callback when you need to catch the original error, as above.
-
-Delegating to the default entry or another wrapped entry with the same `Request` object shares the current request context. A cloned or rewritten `Request` starts a separate context. When passing a new request to a raw `createStartHandler` handler, wrap that invocation with `createServerEntry` too, so errors are converted before leaving the new context:
-
-```tsx
-import {
-  createStartHandler,
-  defaultStreamHandler,
-} from '@tanstack/react-start/server'
-import { createServerEntry } from '@tanstack/react-start/server-entry'
-
-const rewrittenEntry = createServerEntry({
-  fetch: createStartHandler(defaultStreamHandler),
-})
-
-export default createServerEntry({
-  fetch(request, opts) {
-    const url = new URL(request.url)
-    if (url.pathname === '/legacy-home') {
-      url.pathname = '/'
-    }
-    return rewrittenEntry.fetch(new Request(url, request), opts)
-  },
-})
-```
-
-The rewritten request owns its response helper state. Catching a raw rewritten handler's error only in the original request's scope would not recover the rewritten request's headers or cookies.
-
-To replace an uncaught error response completely, return your own response from the custom catch:
-
-```tsx
-// src/server.ts
-import {
-  createStartHandler,
-  defaultStreamHandler,
-} from '@tanstack/react-start/server'
-import { createServerEntry } from '@tanstack/react-start/server-entry'
-
-const startHandler = createStartHandler(defaultStreamHandler)
-
-export default createServerEntry({
-  async fetch(request, opts) {
-    try {
-      return await startHandler(request, opts)
-    } catch (error) {
-      console.error(error)
-      return new Response('Internal Server Error', { status: 500 })
-    }
-  },
-})
-```
-
-`createServerEntry` returns custom responses as-is, whether they come from a catch or a successful callback. Such responses do not automatically inherit helper state. Likewise, helper writes after `await handler.fetch(...)` are not automatically applied to its returned response; modify that response directly or put the helper writes in Start middleware. Call `handleStartError` in a catch when the error response should inherit helper state.
-
 ## Request context
 
-When your server needs to pass additional, typed data into request handlers (for example, authenticated user info, a database connection, or per-request flags), register a request context type via TypeScript module augmentation. Pass the runtime values through the `context` property of the second argument to `handler.fetch`. Type registration does not create these values. The context is available throughout the server-side middleware chain — including global middleware, request/function middleware, server routes, server functions, and the router itself.
+When your server needs to pass additional, typed data into request handlers (for example, authenticated user info, a database connection, or per-request flags), register a request context type via TypeScript module augmentation. The registered context is delivered as the second argument to the server `fetch` handler and is available throughout the server-side middleware chain — including global middleware, request/function middleware, server routes, server functions, and the router itself.
 
 To add types for your request context, augment the `Register` interface from `@tanstack/react-router` with a `server.requestContext` property. The runtime `context` you pass to `handler.fetch` will then match that type. Example:
 
@@ -256,11 +83,8 @@ declare module '@tanstack/react-router' {
 }
 
 export default createServerEntry({
-  fetch(request, opts) {
-    return handler.fetch(request, {
-      ...opts,
-      context: { hello: 'world', foo: 123 },
-    })
+  async fetch(request) {
+    return handler.fetch(request, { context: { hello: 'world', foo: 123 } })
   },
 })
 ```
diff --git a/docs/start/framework/react/guide/server-functions.md b/docs/start/framework/react/guide/server-functions.md
index 879aa9e867..903e5d7b86 100644
--- a/docs/start/framework/react/guide/server-functions.md
+++ b/docs/start/framework/react/guide/server-functions.md
@@ -390,7 +390,7 @@ Stream typed data from server functions to the client. See the [Streaming Data f
 
 ### Raw Responses
 
-Return a `Response` for binary data or custom content types, and the call resolves with it. Throw a `Response` instead to reject the call with it. Either way, the caller receives its body and headers, and its status unless a response helper set one. The browser follows a `Response` with a redirect status and a `Location` header before the caller sees it, so use `redirect()` to send the user elsewhere.
+Return `Response` objects binary data, or custom content types.
 
 ### Progressive Enhancement
 
@@ -425,9 +425,7 @@ Customization:
 
 You can customize function ID generation for the production build by providing a `generateFunctionId` function when configuring the TanStack Start build tool plugin.
 
-Return `undefined` (or an empty string) to use the default ID. Prefer deterministic inputs (filename + functionName) so IDs remain stable between builds.
-
-The ID becomes one segment of the server function's URL (`/_serverFn/`), unencoded, so use only ASCII letters, digits, `-`, `.`, `_`, `~` and `$`, and not `.` or `..`. An ID with whitespace, a control or non-ASCII character, or any of `"`, `#`, `/`, `<`, `>`, `?`, `\`, `^`, `` ` ``, `{` and `}`, an ID that is `.` or `..`, or one with a percent-encoding the server reads as another ID (`%41` for `A`, lowercase hex, `%2E`) or rejects, fails the build with an error naming the file, the function and the ID: the request would reach another function or none. Other characters (`%`, `+`, `:`, `;`, `@`, `'`, `|`, `[`, `]`, …) still work, with a deprecation warning: the next major version rejects them, since proxies and servers may encode or normalise them in the URL. `filename` contains `/`, so hash it (as in the example below) rather than embedding it as is.
+Prefer deterministic inputs (filename + functionName) so IDs remain stable between builds.
 
 Please note that this customization is **experimental** and subject to change.
 
diff --git a/docs/start/framework/react/guide/tanstack-query.md b/docs/start/framework/react/guide/tanstack-query.md
deleted file mode 100644
index dec42ca26c..0000000000
--- a/docs/start/framework/react/guide/tanstack-query.md
+++ /dev/null
@@ -1,158 +0,0 @@
----
-id: tanstack-query
-title: TanStack Query
-updated: '2026-09-11'
-testedWith:
-  '@tanstack/react-start': '1.168.52'
-  '@tanstack/react-query': '5.102.0'
-  react: '19.2.3'
-  vite: '8.0.14'
-description: Use TanStack Query with TanStack Start for request-isolated SSR, hydration, route preloading, streaming, and mutation invalidation.
----
-
-TanStack Start uses Router loaders to coordinate navigation. TanStack Query can own the fetched data, freshness, and mutation state. Use them together when your application needs a query cache across routes, background updates, or mutation-driven invalidation.
-
-The [React Query example](../examples/start-basic-react-query) includes a `/preferences` page that reads and updates a display name stored in a cookie. Its [tests](https://github.com/TanStack/router/blob/main/examples/react/start-basic-react-query/tests/preferences.spec.ts) check server-rendered data, isolation between requests, hydration without a duplicate read, and invalidation after a server function. The preference cookie is not an authentication mechanism.
-
-## Install and create a QueryClient per router
-
-Install `@tanstack/react-query` and `@tanstack/react-router-ssr-query`. The example uses Query 5.102 or newer, including `queryClient.query`. See the [integration reference](/router/latest/docs/integrations/query) for its options.
-
-```tsx title="src/router.tsx"
-import { QueryClient } from '@tanstack/react-query'
-import { createRouter } from '@tanstack/react-router'
-import { setupRouterSsrQueryIntegration } from '@tanstack/react-router-ssr-query'
-import { routeTree } from './routeTree.gen'
-
-export function getRouter() {
-  const queryClient = new QueryClient({
-    defaultOptions: { queries: { staleTime: 30_000 } },
-  })
-  const router = createRouter({
-    routeTree,
-    context: { queryClient },
-    defaultPreload: 'intent',
-    defaultPreloadStaleTime: 0,
-  })
-
-  setupRouterSsrQueryIntegration({ router, queryClient })
-  return router
-}
-```
-
-Create the client inside `getRouter`, not at module scope. Start creates a router for each SSR request. A process-wide QueryClient could reuse one reader's cached data in another reader's HTML. The browser then keeps the client attached to its router during navigation.
-
-Declare `queryClient: QueryClient` in the root route's `createRootRouteWithContext` type so child loaders can access it. The integration supplies the Query provider and handles SSR dehydration, hydration, and streaming. Do not add a second QueryClient or independently dehydrate the same cache. If you already own the provider wrapper, use the integration's `wrapQueryClient: false` option.
-
-`defaultPreloadStaleTime: 0` lets Query decide whether a preload needs data. The example's 30-second Query `staleTime` prevents an immediate repeat read when the browser receives fresh SSR data. Choose the freshness window for your application, rather than treating 30 seconds as a universal setting.
-
-## Share query options between the loader and component
-
-Keep a query's key and function together. Privileged reads belong in a server function, because a normal route loader can also run in the browser during navigation.
-
-```tsx title="src/utils/preferences.ts"
-import { queryOptions } from '@tanstack/react-query'
-import { createServerFn } from '@tanstack/react-start'
-import { getCookie, setResponseHeader } from '@tanstack/react-start/server'
-
-export const getReaderName = createServerFn({ method: 'GET' }).handler(() => {
-  setResponseHeader('Cache-Control', 'private, no-store')
-  return getCookie('reader-name') || 'Guest'
-})
-
-export const readerNameOptions = queryOptions({
-  queryKey: ['reader-name'],
-  queryFn: () => getReaderName(),
-})
-```
-
-The route awaits the query for content that must appear in the initial HTML:
-
-```tsx title="src/routes/preferences.tsx"
-import { useSuspenseQuery } from '@tanstack/react-query'
-import { createFileRoute } from '@tanstack/react-router'
-import { readerNameOptions } from '../utils/preferences'
-
-export const Route = createFileRoute('/preferences')({
-  loader: async ({ context }) => {
-    await context.queryClient.query(readerNameOptions)
-  },
-  headers: () => ({ 'Cache-Control': 'private, no-store' }),
-  component: Preferences,
-})
-
-function Preferences() {
-  const { data: name } = useSuspenseQuery(readerNameOptions)
-  return 

Hello, {name}

-} -``` - -Both calls use the same query key and options. The loader populates the request's cache; the component reads it; the integration transfers it to the browser. The component does not need to call the server function again in an effect. - -For a parameterized resource, include its identity in the key, such as `['post', postId]`. If search values affect the result, validate them and include them in both `loaderDeps` and the query key. Keep secrets out of keys and serialized query data. - -## Await critical data and stream secondary data - -Await queries that determine the page's main content, title, authorization, redirects, or whether it exists. Return title and description data from the loader when a route's `head` needs them, as the example's post route does. - -Secondary content can begin loading without blocking the loader, then render inside a Suspense boundary. Keep that query under the SSR integration so its result can stream to the browser. Handle the imperative query promise's rejection as well as the component's error boundary; a fire-and-forget promise should not become an unhandled server rejection. - -The example's existing `/deferred` route shows a separate Suspense boundary. See [streaming and prefetching](/router/latest/docs/integrations/query#prefetching-and-streaming) for the integration's behavior. A plain `useQuery` that has no loader prefetch is not a guarantee that its data will be in the server-rendered HTML. - -## Invalidate Query after a server mutation - -The preference example validates the display name and writes its cookie inside a POST server function. Its `src/start.ts` enables Start's CSRF middleware for server-function requests. The component calls that function through `useServerFn`, then invalidates the query that reads the cookie: - -```tsx -const queryClient = useQueryClient() -const save = useServerFn(saveReaderName) -const mutation = useMutation({ - mutationFn: (name: string) => save({ data: name }), - onSuccess: () => - queryClient.invalidateQueries({ queryKey: readerNameOptions.queryKey }), -}) -``` - -Returning the invalidation promise keeps the mutation pending until its active query's refetch finishes. The form can use `mutation.isPending` and `mutation.isError` for feedback. The example also disables its JavaScript-dependent form until hydration and uses a POST method so a native submission cannot put form values in the URL. - -Invalidate the data's actual owner. `queryClient.invalidateQueries` refreshes Query data; `router.invalidate()` reloads Router-owned loader data and route context. Use both only when the mutation changes both, such as a login that changes root authentication context and private queries. Neither call purges your CDN or invalidates a database cache. - -If a mutation returns the complete updated resource, `setQueryData` can update that cache entry directly instead. Optimistic updates need cancellation, rollback on failure, and reconciliation with the server result. This example uses a confirmed write followed by invalidation, not an optimistic update. - -## Keep account data isolated beyond SSR - -Request-scoped QueryClients prevent cross-request cache sharing on the server. They do not authorize reads or automatically clear a browser cache when its account changes. - -For authenticated applications, authorize every private read and mutation on the server, including resource-level permissions. On sign-out or account switching, cancel and remove the previous account's private queries, then reload the relevant route context. Include account or tenant identity in keys when that is part of the resource's identity, but do not treat a key as an access-control check. - -The `/preferences` route and its server functions return `Cache-Control: private, no-store` because their output varies by cookie. Verify the final response through your hosting provider and CDN. Do not publicly cache personalized HTML merely because the QueryClient itself is isolated. - -## Diagnose extra requests - -Check when and where each request occurs. A background refresh after the freshness window, a reconnect, or a deliberate invalidation can be expected. - -| Symptom | Check | -| --------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| A read repeats immediately after hydration | Query `staleTime`, hydration configuration, matching keys, and accidental extra QueryClients | -| Navigation loads different data than a direct visit | Search validation, `loaderDeps`, query keys, and server-only boundaries | -| A mutation succeeds but old data stays visible | Which cache owns the displayed value and which keys were invalidated | -| A second account sees the first account's data | Module-scoped server clients, browser cache cleanup, account keys, and shared HTTP caches | -| SSR contains only a loading state | Whether the loader awaited critical data and whether the component reads the prefetched query | - -Start with the same options object in the loader and component. Avoid adding manual hydration code or disabling all refetching to hide a duplicate request. - -## Run the example's checks - -From the repository root, install dependencies and build the framework packages as described in [Contributing](https://github.com/TanStack/router/blob/main/CONTRIBUTING.md). Then: - -```sh -cd examples/react/start-basic-react-query -pnpm exec playwright install chromium -pnpm test:e2e -pnpm build -QUERY_EXAMPLE_PRODUCTION=1 pnpm test:e2e -``` - -The tests send concurrent SSR requests with different preference cookies while using the same query key. Each HTML response must contain only its own reader's value. The browser test then requires zero additional reads during hydration, exactly one read after mutation invalidation, and no extra read after a reload hydrates fresh data. - -The post and user demos use JSONPlaceholder. The preference tests run without that external API. diff --git a/docs/start/framework/react/migrate-from-next-js.md b/docs/start/framework/react/migrate-from-next-js.md index dc5377df08..2f4d988449 100644 --- a/docs/start/framework/react/migrate-from-next-js.md +++ b/docs/start/framework/react/migrate-from-next-js.md @@ -1,187 +1,510 @@ --- id: migrate-from-next-js title: Migrate from Next.js -description: Move a Next.js App Router application to TanStack Start while preserving routes, metadata, authentication, mutations, and deployment behavior. --- -This guide migrates a Next.js App Router application to TanStack Start. The [runnable before-and-after example](https://github.com/TanStack/router/tree/main/examples/react/start-next-migration) implements the same article site in both frameworks, including public articles, URL search, sign-in, a private saved-article page, and a mutation. +This guide provides a step-by-step process to migrate a project from the Next.js App Router to **TanStack Start**. We respect the powerful features of Next.js and aim to make this transition as smooth as possible. -Start does not interpret Next.js route conventions or configuration. Keep your application behavior, then translate each framework boundary. If your application relies heavily on React Server Components, read the [comparison](./start-vs-nextjs) and [RSC guide](./guide/server-components) first. Start's RSC support is experimental and opt-in; the example uses ordinary route components and server functions. +## Step-by-Step (Basics) -## Run the reference application +This step-by-step guide provides an overview of how to migrate your Next.js App Router project to TanStack Start. The goal is to help you understand the basic steps involved in the migration process so you can adapt them to your specific project needs. -Use Node 24 or newer and pnpm 12: +### Prerequisites + +Before we begin, this guide assumes your project structure looks like this: + +```txt +├── next.config.ts +├── package.json +├── postcss.config.mjs +├── public +│ ├── file.svg +│ ├── globe.svg +│ ├── next.svg +│ ├── vercel.svg +│ └── window.svg +├── README.md +├── src +│ └── app +│ ├── favicon.ico +│ ├── globals.css +│ ├── layout.tsx +│ └── page.tsx +└── tsconfig.json +``` + +Alternatively, you can follow along by cloning the following [starter template](https://github.com/nrjdalal/awesome-templates/tree/main/next.js-apps/next.js-start): ```sh -git clone --depth 1 https://github.com/TanStack/router.git -cd router -pnpm install -pnpm nx run @tanstack/react-start:build -cd examples/react/start-next-migration +npx gitpick nrjdalal/awesome-templates/tree/main/next.js-apps/next.js-start next.js-start-er ``` -Follow the example's [README](https://github.com/TanStack/router/blob/main/examples/react/start-next-migration/README.md) to set `SESSION_PASSWORD` and `DEMO_PASSWORD`. Run `pnpm dev:next` at `http://localhost:3100` and `pnpm dev` in another terminal at `http://localhost:3101`. +This structure is a basic Next.js application using the App Router, which we will migrate to TanStack Start. -The example's single account is `reader@example.com`. It stores one saved-article flag in a session cookie so you can exercise a protected mutation without connecting a database. It is not a production authentication implementation. Both apps use iron-session with different cookie names, so sign in separately to each. +### 1. Remove Next.js -With those ports free, run: +First, uninstall Next.js and remove related configuration files: ```sh -pnpm exec playwright install chromium -pnpm test:e2e -pnpm build:next -pnpm build -MIGRATION_PRODUCTION=1 pnpm test:e2e +npm uninstall @tailwindcss/postcss next +rm postcss.config.* next.config.* ``` -The same browser tests run against both apps. They check public URLs, server-rendered metadata, query filtering, redirects, missing pages, sitemap entries, sign-in errors, session persistence, private response caching, mutations, and server rejection after sign-out. +### 2. Install Required Dependencies -## Inventory the application before changing it +TanStack Start leverages TanStack Router and supports [Vite](https://vite.dev) or [Rsbuild](https://rsbuild.dev/) as the build tool. The Vite setup below includes [Nitro](https://nitro.build/) as a deployment plugin. -Record your current paths and observable behavior. Include dynamic paths, query parameters, redirects, trailing slashes, locale prefixes, response status, title, description, canonical, robots directives, and sitemap membership. Keep representative HTML responses and run your existing application tests against the replacement. + -Inventory Next.js-specific code separately: `next/*` imports, `'use server'`, server-only modules, metadata exports, `generateStaticParams`, `revalidatePath`, `revalidateTag`, cache directives, route configuration, Proxy or middleware, and image/font configuration. A route that renders successfully can still have lost authentication, cache invalidation, or an important search URL. +# Vite -| Request | Required behavior | -| -------------------------- | -------------------------------------------------------------------- | -| `/` | Article list, title, description, self-referencing canonical | -| `/?q=metadata` | Filtered article list; canonical remains `/` | -| `/posts/keeping-your-urls` | Same article, title, description, canonical, and Open Graph title | -| `/posts/missing` | HTTP 404 | -| `/old-notes` | HTTP 308 to `/posts/keeping-your-urls` | -| `/saved` | Signed-out users reach sign-in; private HTML is not shared-cacheable | -| `/sitemap.xml` | Public pages only | - -For your application, decide which query variants deserve indexing. Do not copy the example's canonical policy onto meaningful product filters or paginated results without checking their content. - -## Set up Start alongside the existing app - -Create a Start application using [Getting Started](./getting-started) and [Build from Scratch](./build-from-scratch). Keep the Next.js app runnable until the migrated routes pass their checks. You do not need to remove Next.js, its configuration, or its CSS tooling before you can test Start. - -```text -next-app/ # Before: Next.js App Router - app/ - layout.tsx - page.tsx - posts/[slug]/page.tsx - actions.ts -src/ # After: TanStack Start - router.tsx - routes/ - __root.tsx - index.tsx - posts.$slug.tsx - server/account.ts -vite.config.ts +```sh +npm i @tanstack/react-router @tanstack/react-start nitro vite @vitejs/plugin-react ``` -The Start Vite plugin generates `src/routeTree.gen.ts`. `src/router.tsx` returns a new router using that tree. The root route renders `HeadContent` in the document head and `Scripts` in the body. Merge your existing CSS, document attributes, and providers into that root. +# Rsbuild -The reference uses Vite and Nitro's Node output. If you use another host or build tool, follow its [hosting instructions](./guide/hosting) and test its actual build output. A Next.js deployment adapter does not become a Start adapter by changing dependencies. - -## Preserve paths while changing route files - -| Next.js App Router | Default Start route directory | -| ------------------------------ | ---------------------------------------------- | -| `app/layout.tsx` | `src/routes/__root.tsx` | -| `app/page.tsx` | `src/routes/index.tsx` | -| `app/posts/page.tsx` | `src/routes/posts.index.tsx` | -| `app/posts/[slug]/page.tsx` | `src/routes/posts.$slug.tsx` | -| `app/docs/[...parts]/page.tsx` | `src/routes/docs.$.tsx` | -| `app/api/hello/route.ts` | `src/routes/api.hello.ts` with server handlers | - -`src/routes` is a source directory, not a URL prefix. A route for `/posts/example` uses `createFileRoute('/posts/$slug')`, not `/app/posts/$slug`. - -Nested layouts, pathless layouts, route groups, optional parameters, catch-alls, parallel routes, and intercepting routes need individual mapping. Read [routing concepts](/router/latest/docs/routing/routing-concepts) instead of mechanically renaming every file. The reference does not reproduce Next.js parallel or intercepting route behavior. - -Replace `next/link` with Router's `Link`. Dynamic paths use typed `params`: - -```tsx - - {article.title} - +```sh +npm i @tanstack/react-router @tanstack/react-start @rsbuild/core @rsbuild/plugin-react ``` -Check direct requests, client navigation, back/forward, and reload for each representative path. Update your redirects and sitemap from the same route inventory. + -## Validate URL search state +For Tailwind CSS, install the build tool integration you want to use: -Next.js passes `searchParams` to an App Router page. Start validates URL state in the route: + -```tsx -export const Route = createFileRoute('/')({ - validateSearch: (search) => ({ - q: typeof search.q === 'string' ? search.q : '', - }), - component: Articles, -}) +# Vite -function Articles() { - const { q } = Route.useSearch() - return

Searching for: {q}

+```sh +npm i -D @tailwindcss/vite tailwindcss +``` + +# Rsbuild + +```sh +npm i -D @tailwindcss/postcss tailwindcss +``` + + + +### 3. Update Project Configuration + +Now that you've installed the necessary dependencies, update your project configuration files to work with TanStack Start. + + + +# Vite + +```json +{ + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "start": "node .output/server/index.mjs" + } } ``` -If a loader depends on search state, declare the relevant values in `loaderDeps`. That makes those values part of the loader's dependency and cache behavior. Validate page numbers, sorting, and filters at runtime; TypeScript types alone do not validate an incoming URL. See [search parameters](/router/latest/docs/guide/search-params) and [data loading](/router/latest/docs/guide/data-loading). +# Rsbuild -## Move server reads into server functions +```json +{ + "type": "module", + "scripts": { + "dev": "rsbuild dev", + "build": "rsbuild build" + } +} +``` -An ordinary Start route loader can execute on the server for the initial request and in the browser during navigation. Do not move a database query, credential, or privileged SDK directly from an async Next.js Server Component into an ordinary loader. + -Put the privileged read inside a [server function](./guide/server-functions), then call it from the loader. The reference's `/saved` route calls `getAccount`, checks the result, and redirects signed-out readers. Its public article loader only reads bundled public content. + -Return the data the browser is allowed to see, not an entire database record. Keep connection setup and secrets on the server. For a database-backed application, preserve your schema and access layer where possible, and change the framework-facing handler around them. +# Vite -## Translate mutations and their invalidation +```ts title="vite.config.ts" +import { defineConfig } from 'vite' +import { tanstackStart } from '@tanstack/react-start/plugin/vite' +import viteReact from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' +import { nitro } from 'nitro/vite' -The reference's Next.js form calls a Server Action. That Action authorizes the session, changes the saved flag, and calls `revalidatePath('/saved')`. The Start version calls a POST server function through `useServerFn`, then awaits `router.invalidate()` to reload the active route data. +export default defineConfig({ + server: { + port: 3000, + }, + resolve: { + // Enables Vite to resolve imports using path aliases. + tsconfigPaths: true, + }, + plugins: [ + tailwindcss(), + tanstackStart({ + srcDirectory: 'src', // This is the default + router: { + // Specifies the directory TanStack Router uses for your routes. + routesDirectory: 'app', // Defaults to "routes", relative to srcDirectory + }, + }), + viteReact(), + nitro(), + ], +}) +``` -These invalidation APIs operate on different caches. `router.invalidate()` does not purge a CDN, clear a database cache, or revalidate all statically generated pages. If the app uses TanStack Query, invalidate the relevant query keys as well. Map each existing `revalidatePath`, tag, and cache directive to the layer that owns the replacement data. +# Rsbuild -The Start function checks authorization even though the route already checks it. A caller can invoke the mutation without visiting the page. Validate every untrusted input inside the server boundary and preserve resource-level permissions. +```ts title="rsbuild.config.ts" +import { defineConfig } from '@rsbuild/core' +import { pluginReact } from '@rsbuild/plugin-react' +import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' -`useServerFn` returns a callable function. The reference keeps pending and error state in the component and reloads route data after a successful mutation. It also tests replaying the mutation after sign-out. +export default defineConfig({ + server: { + port: 3000, + }, + plugins: [ + pluginReact(), + tanstackStart({ + srcDirectory: 'src', // This is the default + router: { + // Specifies the directory TanStack Router uses for your routes. + routesDirectory: 'app', // Defaults to "routes", relative to srcDirectory + }, + }), + ], +}) +``` -Next.js Action forms and these Start event-handler forms have different no-JavaScript behavior. The latter require JavaScript and keep their fields disabled until hydration. If progressive enhancement is a requirement, use a FormData-compatible [server function URL](./guide/server-functions#progressive-enhancement) or an ordinary form POST to a [server route](./guide/server-routes). Include validation, CSRF protection, and an appropriate response or redirect. Do not treat `createServerFn` as a drop-in replacement for the React form Action protocol. +```js title="postcss.config.mjs" +export default { + plugins: { + '@tailwindcss/postcss': {}, + }, +} +``` -## Preserve authentication and session boundaries + -Follow the [authentication guide](./guide/authentication) for the route-context pattern. Check sessions on the server for private reads and mutations. A hidden button or a client route guard is not authorization. +By default, `routesDirectory` is set to `routes`. To maintain consistency with Next.js App Router conventions, you can set it to `app` instead. -The example keeps `iron-session` and replaces Next.js `cookies()` with a small adapter using Start's `getCookie` and `setCookie`. Start does not provide a session API. The example uses different cookie names to keep its two local apps independent; sharing a library alone does not make every session configuration compatible. A real migration can keep its existing auth provider or session service and adapt the request boundary instead. If sessions must survive cutover or rollback, verify cookie names, domains, paths, signing/encryption formats, expiration, key rotation, and logout in both deployments. +### 4. Adapt the Root Layout -Private pages need a cache policy that prevents another user receiving personalized HTML. The Start reference returns `Cache-Control: private, no-store` for `/saved`. Check the final response through your deployment and CDN, including after sign-in and sign-out. Do not prerender or publicly cache pages that include private account data. +> TanStack Start uses a routing approach similar to Remix, with some changes to support nested structures and special features using tokens. Learn more about it at [Routing Concepts](/router/latest/docs/framework/react/routing/routing-concepts) guide. -## Preserve metadata and search responses +Instead of `layout.tsx`, create a file named `__root.tsx` in the `src/app` directory. This file will serve as the root layout for your application. -Next.js `metadata` and `generateMetadata` become a Start route's `head` configuration. The article route derives title, description, Open Graph title, and canonical from its loader result. Keep `HeadContent` in the root document so those values appear in the response. +- `src/app/layout.tsx` to `src/app/__root.tsx` -Compare HTML responses before JavaScript runs, then check the head after client navigation. Keep the public canonical origin independent of a local or preview host. Preserve locale alternates and social images where your app has them. See [SEO](./guide/seo) and [head management](/router/latest/docs/guide/document-head-management). +```tsx +- import type { Metadata } from "next" // [!code --] +import { + Outlet, + createRootRoute, + HeadContent, + Scripts, +} from "@tanstack/react-router" +import appCss from "./globals.css?url" -Next.js metadata file conventions also need replacements. The reference turns `app/sitemap.ts` into a Start server route at `/sitemap.xml`. Migrate `robots.txt`, icons, manifests, and generated social images explicitly. Return real 404s for missing content and maintain intentional permanent redirects. Avoid redirecting every missing URL to the homepage. +- export const metadata: Metadata = { // [!code --] +- title: "Create Next App", // [!code --] +- description: "Generated by create next app", // [!code --] +- } // [!code --] +export const Route = createRootRoute({ + head: () => ({ + meta: [ + { charSet: "utf-8" }, + { + name: "viewport", + content: "width=device-width, initial-scale=1", + }, + { title: "TanStack Start Starter" } + ], + links: [ + { + rel: 'stylesheet', + href: appCss, + }, + ], + }), + component: RootLayout, +}) -## Replace image and font services deliberately +- export default function RootLayout({ // [!code --] +- children, // [!code --] +- }: Readonly<{ // [!code --] +- children: React.ReactNode // [!code --] +- }>) { // [!code --] +- return ( // [!code --] +- // [!code --] +- {children} // [!code --] +- // [!code --] +- ) // [!code --] +- } // [!code --] +function RootLayout() { + return ( + + + + + + + + + + ) +} +``` -Start does not automatically provide the Next.js image optimizer. Preserve image dimensions, responsive sources, loading behavior, alt text, and cache policy. Plain `` works for preprocessed assets; an image component such as Unpic needs a compatible image service or prepared sources to provide transformations. It does not create Next.js's image processing backend by itself. Next.js also supports its optimizer when [self-hosted](https://nextjs.org/docs/app/guides/self-hosting). +### 5. Adapt the Home Page -Replace `next/font` with self-hosted font files, a package such as Fontsource, or another chosen font delivery method. CSS `@font-face` does not require Tailwind. Preserve font weights and subsets, set an appropriate `font-display`, and check layout shift and network requests. Copy public assets and update imports only after confirming their resulting URLs. +Instead of `page.tsx`, create an `index.tsx` file for the `/` route. -The reference uses text and the browser's default font. It does not claim to verify your image transformations or font loading. +- `src/app/page.tsx` to `src/app/index.tsx` -## Rebuild caching and deployment behavior +```tsx ++ import { createFileRoute } from '@tanstack/react-router' // [!code ++] -List each cache separately: browser data, Router loaders, Query, server data, generated pages, and CDN responses. Define what populates it, its key, expiration, and the operation that invalidates it. Test after changing data, signing out, and deploying a new version. +- export default function Home() { // [!code --] ++ export const Route = createFileRoute('/')({ // [!code ++] ++ component: Home, // [!code ++] ++ }) // [!code ++] -Next.js cache directives, revalidation, and `generateStaticParams` do not carry across automatically. Use [static prerendering](./guide/static-prerendering) only for suitable public routes, and review [ISR](./guide/isr) with your hosting provider's actual behavior. A cache header alone is not proof of equivalent regeneration or invalidation. ++ function Home() { // [!code ++] + return ( +
+ ) +} +``` -Move server-only environment variables into the server runtime. Audit any public variable prefix changes rather than exposing the old environment wholesale. Verify API/webhook URLs, forwarded host/protocol, cookies behind a proxy, asset paths, streaming, and runtime limits in the deployment you will use. +### 6. Are we migrated yet? -## Cut over with a rollback path +Before you can run the development server, you need to create a file that will define the behavior of TanStack Router within TanStack Start. -1. Build both applications and run the contract checks against a staging deployment of Start. Include real representative data, authenticated sessions, and the CDN in that check. -2. Keep the current database schema compatible with both versions during the transition. Separate destructive schema changes from the framework cutover. -3. Preserve the public origin and paths where possible. If paths must change, deploy tested redirects and update internal links, canonicals, and sitemaps together. -4. Record the previous deployment and routing configuration. Know how to route traffic back, and what happens to sessions and writes if you do. -5. Monitor error rates, login and mutation failures, response status, indexing signals, and application conversion events after cutover. Compare against the baseline rather than assuming a framework change will improve search traffic. +- `src/router.tsx` -Remove Next.js and its unused configuration after the migrated behavior and rollback plan are verified. Retain historical redirects and any assets still referenced by public content. +```tsx +import { createRouter } from '@tanstack/react-router' +import { routeTree } from './routeTree.gen' + +export function getRouter() { + const router = createRouter({ + routeTree, + scrollRestoration: true, + }) + + return router +} +``` + +> 🧠 Here you can configure everything from the default [preloading functionality](/router/latest/docs/framework/react/guide/preloading) to [caching staleness](/router/latest/docs/framework/react/guide/data-loading). + +Don't worry if you see some TypeScript errors at this point; the next step will resolve them. + +### 7. Verify the Migration + +Run the development server: + +```sh +npm run dev +``` + +Then, visit `http://localhost:3000`. You should see the TanStack Start welcome page with its logo and a documentation link. + +> If you encounter issues, review the steps above and ensure that file names and paths match exactly. For a reference implementation, see the [post-migration repository](https://github.com/nrjdalal/next-to-start). + +## Next Steps (Advanced) + +Now that you have migrated the basic structure of your Next.js application to TanStack Start, you can explore more advanced features and concepts. + +### Routing Concepts + +| Route Example | Next.js | TanStack Start | +| ------------------------------ | ---------------------------------- | ------------------------- | +| Root Layout | `src/app/layout.tsx` | `src/app/__root.tsx` | +| `/` (Home Page) | `src/app/page.tsx` | `src/app/index.tsx` | +| `/posts` (Static Route) | `src/app/posts/page.tsx` | `src/app/posts.tsx` | +| `/posts/[slug]` (Dynamic) | `src/app/posts/[slug]/page.tsx` | `src/app/posts/$slug.tsx` | +| `/posts/[...slug]` (Catch-All) | `src/app/posts/[...slug]/page.tsx` | `src/app/posts/$.tsx` | +| `/api/endpoint` (API Route) | `src/app/api/endpoint/route.ts` | `src/app/api/endpoint.ts` | + +Learn more about the [Routing Concepts](/router/latest/docs/framework/react/routing/routing-concepts). + +### Dynamic and Catch-All Routes + +Retrieving dynamic route parameters in TanStack Start is straightforward. + +```tsx +- export default async function Page({ // [!code --] +- params, // [!code --] +- }: { // [!code --] +- params: Promise<{ slug: string }> // [!code --] +- }) { // [!code --] ++ export const Route = createFileRoute('/app/posts/$slug')({ // [!code ++] ++ component: Page, // [!code ++] ++ }) // [!code ++] + ++ function Page() { // [!code ++] +- const { slug } = await params // [!code --] ++ const { slug } = Route.useParams() // [!code ++] + return
My Post: {slug}
+} +``` + +> Note: If you've made a catch-all route (like `src/app/posts/$.tsx`), you can access the parameters via `const { _splat } = Route.useParams()`. + +Similarly, you can access `searchParams` using `const { page, filter, sort } = Route.useSearch()`. + +Learn more about the [Dynamic and Catch-All Routes](/router/latest/docs/framework/react/routing/routing-concepts#dynamic-route-segments). + +### Links + +```tsx +- import Link from "next/link" // [!code --] ++ import { Link } from "@tanstack/react-router" // [!code ++] + +function Component() { +- return Dashboard // [!code --] ++ return Dashboard // [!code ++] +} +``` + +Learn more about the [Links](/router/latest/docs/framework/react/guide/navigation#link-component). + +### Images + +Next.js uses the `next/image` component for optimized images. In TanStack Start, you can use the package called [Unpic](https://unpic.pics/) for similar functionality +and almost a drop-in replacement. + +```tsx +import Image from 'next/image' // [!code --] +import { Image } from '@unpic/react' // [!code ++] +function Component() { + return ( + Description + ) +} +``` + +### Server ~Actions~ Functions + +```tsx +- 'use server' // [!code --] ++ import { createServerFn } from "@tanstack/react-start" // [!code ++] + +- export const create = async () => { // [!code --] ++ export const create = createServerFn().handler(async () => { // [!code ++] + return true +- } // [!code --] ++ }) // [!code ++] +``` + +Learn more about the [Server Functions](./guide/server-functions). + +### Server Routes ~Handlers~ + +```ts +- export async function GET() { // [!code --] ++ export const Route = createFileRoute('/api/hello')({ // [!code ++] ++ server: { // [!code ++] ++ handlers: { // [!code ++] ++ GET: async () => { // [!code ++] ++ return Response.json("Hello, World!") ++ } // [!code ++] ++ } // [!code ++] ++ } // [!code ++] ++ }) // [!code ++] +``` + +Learn more about the [Server Routes](./guide/server-routes). + +### Fonts + +```tsx +- import { Inter } from "next/font/google" // [!code --] + +- const inter = Inter({ // [!code --] +- subsets: ["latin"], // [!code --] +- display: "swap", // [!code --] +- }) // [!code --] + +- export default function Page() { // [!code --] +- return

Font Sans

// [!code --] +- } // [!code --] +``` + +Instead of `next/font`, use Tailwind CSS’s CSS-first approach. Install fonts (for example, from [Fontsource](https://github.com/fontsource/fontsource)): + +```sh +npm i -D @fontsource-variable/dm-sans @fontsource-variable/jetbrains-mono +``` + +Add the following to `src/app/globals.css`: + +```css +@import 'tailwindcss' source('../'); + +@import '@fontsource-variable/dm-sans'; /* [!code ++] */ +@import '@fontsource-variable/jetbrains-mono'; /* [!code ++] */ + +@theme inline { + --font-sans: 'DM Sans Variable', sans-serif; /* [!code ++] */ + --font-mono: 'JetBrains Mono Variable', monospace; /* [!code ++] */ + /* ... */ +} + +/* ... */ +``` + +### Fetching Data + +```tsx +- export default async function Page() { // [!code --] ++ export const Route = createFileRoute('/')({ // [!code ++] ++ component: Page, // [!code ++] ++ loader: async () => { // [!code ++] ++ const res = await fetch('https://api.vercel.app/blog') // [!code ++] ++ return res.json() // [!code ++] ++ }, // [!code ++] ++ }) // [!code ++] + ++ function Page() { // [!code ++] +- const data = await fetch('https://api.vercel.app/blog') // [!code --] +- const posts = await data.json() // [!code --] ++ const posts = Route.useLoaderData() // [!code ++] + + return ( +
    + {posts.map((post) => ( +
  • {post.title}
  • + ))} +
+ ) +} +``` diff --git a/docs/start/framework/react/migrate-from-release-candidate.md b/docs/start/framework/react/migrate-from-release-candidate.md deleted file mode 100644 index 5cfa614cda..0000000000 --- a/docs/start/framework/react/migrate-from-release-candidate.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -id: migrate-from-release-candidate -title: Migrate from the Release Candidate -description: Upgrade a TanStack Start release-candidate app to the first stable release, 1.169. ---- - -`@tanstack/react-start` 1.169 is the first stable release of TanStack Start. Upgrading from a release candidate means replacing the removed APIs below and checking the behavior changes that apply to your app. - -## Vite 8 - -Start requires Vite 8 when you build with Vite. Upgrade with Vite's [migration guide](https://vite.dev/guide/migration). - -## Removed APIs - -| Removed | Use instead | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `@tanstack/nitro-v2-vite-plugin` | `nitro()` from `nitro/vite`. See [Nitro hosting](./guide/hosting#nitro). | -| `useSession` | A session library such as iron-session. See [Session Management](./guide/authentication#2-session-management). The new library cannot read existing Start session cookies: use a new cookie name and sign users in again, or test a migration that reads the old cookies first. | -| `.inputValidator()` on server functions and middleware | `.validator()`, which takes the same validator. | - -## Errors - -- A handler returned by `createStartHandler(...)` now rethrows the original error. `createServerEntry` converts errors to responses, and the built-in entry already uses it. In a custom entry, catch inside the `createServerEntry` callback and `return handleStartError(error)` or rethrow. See [Error Handling](./guide/server-entry-point#error-handling). -- Uncaught errors produce a generic JSON body with a status from `400` to `599` (`500` by default), even if a success status was set before the error. Return a `Response` when an endpoint needs a specific error payload. -- A server-function call rejects with whatever was thrown, including a `Response` and falsy values such as `undefined`. Return a `Response` to resolve the call with it. See [Raw Responses](./guide/server-functions#raw-responses). -- Errors thrown by request middleware during a server-function call are sent to the client with their message, and their status is no longer always `500`. - -## Responses - -- Response helpers override the response you return or throw. `setResponseStatus(401)` followed by returning a `200` response sends `401`. -- `setResponseHeader('set-cookie', cookie)` replaces all outgoing cookies. Use `setCookie` or `appendResponseHeader('set-cookie', cookie)` to add one. -- `setResponseStatus` ignores codes outside `200`-`599` and warns outside production. -- Serialized server-function replies never carry `Location`, `Content-Encoding`, or `Content-Length` from helpers, and ignore a helper `204`, `205`, or `304`. Use `redirect()` to redirect. - -## Requests and middleware - -- `getRequestHeader(name)` returns `''` for a header that is present but empty, and `undefined` only when it is missing. -- A path with invalid percent-encoding, such as `/%E0%A4%A`, gets `400 Bad Request` before your server entry or middleware runs. -- When no function middleware sends context, `sendContext` is `undefined` instead of `{}`. diff --git a/docs/start/framework/react/overview.md b/docs/start/framework/react/overview.md index ced7b65458..3494b7a187 100644 --- a/docs/start/framework/react/overview.md +++ b/docs/start/framework/react/overview.md @@ -1,11 +1,12 @@ --- id: overview title: TanStack Start Overview -description: Build full-stack React applications with TanStack Start, including server rendering, streaming, server functions, and type-safe routing. --- > [!NOTE] -> TanStack Start is stable. If you're upgrading from a release candidate, follow [Migrate from the Release Candidate](./migrate-from-release-candidate). +> TanStack Start is currently in the **Release Candidate** stage! This means it is considered feature-complete and its API is considered stable. +> **This does not mean it is bug-free or without issues, which is why we invite you to try it out and provide feedback!** +> The road to v1 will likely be a quick one, so don't wait too long to try it out! TanStack Start is a full-stack React framework powered by TanStack Router. It provides a full-document SSR, streaming, server functions, client/server builds, and more. With [Vite](https://vite.dev/) and [Rsbuild](https://rsbuild.dev/) support, it's ready to develop and deploy to the hosting provider or runtime you want. diff --git a/docs/start/framework/react/start-vs-nextjs.md b/docs/start/framework/react/start-vs-nextjs.md index f1dd175a41..27b814725f 100644 --- a/docs/start/framework/react/start-vs-nextjs.md +++ b/docs/start/framework/react/start-vs-nextjs.md @@ -1,67 +1,286 @@ --- id: start-vs-nextjs title: TanStack Start vs Next.js -description: Compare TanStack Start and Next.js for routing, rendering, server functions, caching, deployment, and the work each framework handles for you. --- -TanStack Start is a good fit when you want TanStack Router's typed navigation, search parameters, and loaders in a full-stack application. Next.js is a good fit when you want the App Router's Server Component model and integrated image, font, and metadata tools. Both can build interactive applications and server-rendered websites. +Choosing between TanStack Start and Next.js isn't just about features - it's about understanding what each framework optimizes for and how those decisions cascade through your entire development experience. -This comparison was checked on September 11, 2026 against the linked documentation, including Next.js 16.3. For a broader feature matrix, see [Start, Next.js, and React Router](./comparison). For a practical migration, see [Migrate from Next.js](./migrate-from-next-js). +This page explains the fundamental differences, addresses common misconceptions, and helps you make an informed decision. For a feature-by-feature matrix, see the [full comparison table](./comparison). Ready to switch? See the [migration guide](./migrate-from-next-js). -## Rendering and interactivity +**A note on benchmarks:** If someone quotes performance numbers comparing Start and Next without methodology, app complexity, hosting details, and configuration specifics - those numbers are meaningless. Comparisons must assume best practices on both sides. You can't give Next the benefit of optimized usage while assuming Start users misconfigure things. -Start's React components are server-rendered and hydrated by default. You can change rendering behavior per route with [selective SSR](./guide/selective-ssr), including data-only and client-only rendering. You do not need React Server Components to use Start's server functions or SSR. +## Two Different Visions of React -Next.js App Router layouts and pages are Server Components by default. A `use client` boundary enables client-side state, effects, and event handlers. It applies to the imported module tree, so you do not add the directive to every interactive component. Client Components can still contribute server-rendered HTML on the initial request. [Next.js component model](https://nextjs.org/docs/app/getting-started/server-and-client-components). +Both frameworks want to help you build great React applications. But they start from different assumptions about what "great" means. -Start's [Server Components support](./guide/server-components) is **experimental and opt-in**. It uses client-led composition of server-produced UI. That is a different integration model from Next.js, and experimental support should not be presented as production feature parity. +### Next.js: The Platform Play + +Next.js optimizes for **Vercel's vision of the web**: server-first rendering, tight platform integration, and automatic optimizations that work best on their infrastructure. + +The core bet: most web content is static or near-static. Server Components should be the default. Interactivity is the exception you opt into. The framework should make decisions for you, and those decisions should be optimized for their infrastructure. + +This works well if: + +- You're deploying to Vercel and want tight platform integration +- Your app is content-heavy with islands of interactivity +- You want the framework to make architectural decisions for you + +### TanStack Start: The Developer-First Play + +TanStack Start optimizes for **developer control and correctness**: type safety everywhere, explicit over implicit, composable primitives, and deployment freedom. + +The core bet: developers know their apps better than frameworks do. Server rendering is an optimization you opt into where it makes sense. The framework should give you powerful primitives and get out of your way. + +This works well if: + +- You want your deployment target to be a decision you make, not one the framework makes for you +- Your app is highly interactive +- You value type safety and explicit control +- You want to understand exactly what your code is doing + +## The Mental Model Gap + +This is the most important difference to understand. Everything else flows from it. + +### Both SSR - Different Defaults for Interactivity + +Let's be clear: both frameworks SSR by default, and both support static generation and React Server Components. The difference isn't capability - it's how you access those capabilities and how much control you have. + +**Next.js** defaults to Server Components. Every component is a Server Component unless you add `"use client"`. Server Components can't use state, effects, or event handlers - so the path to interactivity requires understanding the framework's implicit boundaries, caching layers, and serialization rules. + +**TanStack Start** defaults to interactive components (traditional React). Your components SSR and hydrate, ready for state and event handlers out of the box. You opt into Server Components where they provide value - for heavy static content, keeping secrets server-side, or reducing bundle size. + +Both approaches get you to the same destination. The question is: which direction feels like swimming upstream for _your_ app? + +Consider: + +- If most of your components need state, effects, or event handlers, Next's defaults mean constant `"use client"` annotations and thinking about serialization boundaries +- If most of your content is static, Start lets you explicitly opt those components into server-only rendering - with clearer control over caching and hydration +- Either way, Start gives you more granular control over _how_ things render, not just _where_ + +### Implicit vs Explicit + +Both frameworks handle the fundamentals - code splitting, caching, SSR, static optimization. The difference is visibility and predictability. **Next.js** layers implicit behaviors: multi-layer server-side caching with a history of breaking changes and community frustration, data fetching conventions tied to file structure, optimizations that require understanding the framework's internals to override. + +**TanStack Start** is explicit without being verbose. Loader functions, cache configuration, middleware chains - they're visible in your code, not hidden behind conventions. This doesn't mean more code; it means the code you write maps directly to what happens at runtime. + +## Architecture Deep Dive + +### The Build Pipeline + +**Next.js** uses a custom build system (historically Webpack, now Turbopack). It's tightly integrated with their architecture, which enables optimizations but limits flexibility. Turbopack has improved dev speed, but it's still no match for Vite or Rsbuild. + +**TanStack Start** supports Vite and Rsbuild. This means: + +- Faster dev server startup +- Faster HMR +- Access to modern plugin ecosystems +- Standard tooling that transfers to other projects + +### The Runtime + +**Next.js** ships a substantial runtime to support Server Components, server-side caching, automatic optimizations, and the App Router's conventions. This runtime has real weight. + +**TanStack Start** ships a minimal runtime. The router is powerful but lean. Server functions are thin RPC wrappers. There's no framework magic layer between you and React. + +Bundle size isn't everything, but it's the baseline everything else builds on. Start's architecture is designed to minimize runtime overhead - even with RSC support, the runtime stays lean. Much of Next's bundle weight is architectural tax, not feature weight. + +### The Type System + +**Next.js** has TypeScript support. **TanStack Start** is built around TypeScript. + +The difference matters: + +- In Next.js, the boundary between client and server creates type gaps. Server Actions can receive data that doesn't match what TypeScript expects. You need runtime validation to be safe. +- In Start, server functions have end-to-end type safety. Input validation, return types, middleware context, route parameters - all checked at compile time. + +In the age of AI-assisted development, end-to-end type safety should be non-negotiable. Types aren't just "nice for DX" - they're correctness guarantees that prevent production errors. ## Routing -Start inherits [TanStack Router's routing model](/router/latest/docs/guide/type-safety). Route definitions connect the types for links, path parameters, validated search parameters, loaders, and route context. This is useful when application state lives in the URL or when many screens share typed data dependencies. +This is where TanStack shines brightest. TanStack Router (which powers Start) is the most powerful, type-safe router in any framework. -Next.js also provides compile-time checking for links through its stable, opt-in [`typedRoutes`](https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes) option. Describing it as only IDE hints is inaccurate. The distinction is the scope of inference and validation across your application, not whether Next.js supports TypeScript. +**Features Next.js doesn't have:** -In either framework, a valid route type does not prove that a database record exists or that a user may access it. Handle missing data and authorization at runtime. +- **Typesafe search params** - Define, validate, and parse search params with full type inference. Next gives you `?foo=bar` as strings; Start gives you validated, typed objects +- **Search param validation & middleware** - Transform and validate search params at the route level +- **Typesafe path params** - Path params are inferred and validated, not just `string | string[]` +- **Typesafe route context** - Pass typed context down through nested routes +- **Path param validation & custom parsing** - Parse `/users/123` as a number, validate it exists +- **Route mount/transition/unmount events** - Hook into the route lifecycle +- **Code-based routes** - Define routes in code when file-based doesn't fit +- **Built-in devtools** - Inspect router state, cache, and pending navigations +- **Element scroll restoration** - Restore scroll position for specific elements, not just the page +- **Navigation blocking** - `useBlocker` for unsaved changes warnings -For detailed navigation features, see the [Router comparison](/router/latest/docs/comparison). +**Type safety that actually works:** + +- Route paths are fully typed - typos are compile errors +- Links validate their destinations - no broken links in production +- Loaders know their route context - no guessing what data is available +- Search params are typed end-to-end - from URL to component + +Next.js has file-based routing that works, but the type safety is superficial (an IDE plugin for link hints) compared to TanStack Router's compile-time guarantees. + +**First-class integrations:** + +TanStack Router was designed from the ground up for isomorphism and hydration. This makes it the foundation for first-class integrations with TanStack Query and other data-fetching libraries. In Next, you wire up Query manually; in Start, it's a supported pattern with official integrations. + +See the [full router comparison](/router/latest/docs/framework/react/comparison) for the complete feature matrix. + +## The Caching Question + +Caching is where the philosophical differences become most visible. + +### Next.js: Implicit and Server-Side + +Next.js caches aggressively by default (or did - they've changed this multiple times). The caching happens in layers: + +- Request memoization +- Data cache +- Full route cache +- Router cache + +Each layer has its own invalidation semantics. The system has been rewritten multiple times with community criticism for being unpredictable. Next 15 simplified the defaults, but the fundamental complexity of server-side RSC stream caching remains. + +When people talk about "component caching," they're referring to caching serialized RSC streams on the server. This is more complicated than most realize: + +- You're caching text streams with complex invalidation semantics +- This happens in lambda-style environments with their own constraints +- Granular invalidation requires explicit tagging setup +- Cache misses cascade through the component tree in ways that aren't always predictable + +**Ask anyone claiming server-side component caching is special:** "How do you invalidate a cached RSC stream when a data dependency changes?" Most can't answer clearly. + +### TanStack Start: RSCs Are Just Data + +Start treats Server Component output the same as any other data flowing through your app. There's no special "component cache" with its own semantics - RSC payloads are data, and you cache data however you want: + +- **TanStack Router** - Built-in SWR-style caching with `staleTime` and `gcTime` +- **TanStack Query** - Full-featured async state management +- **CDN caching** - Standard HTTP cache headers at the edge +- **Redis, database, whatever** - It's just data; use your existing infrastructure + +```tsx +export const Route = createFileRoute('/posts/$postId')({ + loader: async ({ params }) => fetchPost(params.postId), + staleTime: 10_000, // Fresh for 10 seconds + gcTime: 5 * 60_000, // Keep in memory for 5 minutes +}) +``` + +This is the same SWR pattern TanStack Query has battle-tested across millions of applications. No new mental model. No framework-specific caching semantics to learn. No chasing ghosts. + +The caching layers are well-understood and compose naturally: + +- Client-side SWR caching (built into the router) +- CDN caching at the edge (standard HTTP semantics) +- Server-side caching where you want it (explicit, opt-in) + +You already know how to cache data. Start doesn't make you learn a new way. + +### The Bottom Line on RSCs + +Start has full RSC support with feature parity to Next.js. The difference is mental model and cognitive overhead. + +In Next, RSCs are the paradigm - you build around them, think about them constantly, manage their boundaries everywhere. In Start, RSCs are just another data primitive. Fetch them, cache them, compose them - using patterns you already know from TanStack Query and Router. + +We call our approach **Composite Components** - server-produced React components that the client can fetch, cache, stream, and assemble. The client owns composition; the server ships UI pieces. No new mental model. No framework-specific caching semantics. Just data flowing through tools you already understand. + +For the full deep-dive, see [Composite Components: Server Components with Client-Led Composition](https://tanstack.com/blog/composite-components). ## Server Functions vs Server Actions -Start's [server functions](./guide/server-functions) provide callable server endpoints with inferred inputs and outputs. You can choose GET or POST, supply an input validator, and compose [function middleware](./guide/middleware). Use runtime validation for untrusted inputs and server-side authorization for private data. +Both frameworks let you call server code from the client. The approaches differ significantly. -Next.js Server Actions integrate with forms and React's pending and error-state APIs. They can validate input with a schema too. Receiving `FormData` does not prevent validation, and a TypeScript annotation does not perform validation in either framework. [Next.js forms and validation](https://nextjs.org/docs/app/guides/forms). +### Next.js Server Actions -Choose the API that fits your application's data flow. A typed RPC call and a form action solve overlapping problems, but they are not interchangeable in every workflow. +```tsx +'use server' -## Caching +export async function createPost(formData: FormData) { + const title = formData.get('title') + // No compile-time type safety on inputs + return db.posts.create({ title }) +} +``` -Start uses [TanStack Router's loader cache](/router/latest/docs/guide/data-loading) for navigation data, with options such as `staleTime` and `gcTime`. You can also use the [official Query integration](/router/latest/docs/integrations/query) when you need a separate query cache. Browser data caching, server data caching, and CDN response caching serve different purposes. +Server Actions integrate with forms and transitions. They're convenient for simple cases but provide limited type safety at the boundary. -Next.js documents explicit caching through Cache Components, enabled with `cacheComponents: true`. Its `use cache`, `cacheLife`, and tag-based revalidation APIs control reuse and invalidation. Applications without that option use a different documented caching model. Compare the configuration you intend to run, rather than treating every Next.js version and configuration as having the same defaults. [Next.js caching](https://nextjs.org/docs/app/getting-started/caching). +### TanStack Server Functions -Start's [ISR guide](./guide/isr) describes HTTP caching and provider-specific options. A `Cache-Control` header alone does not guarantee the same regeneration, invalidation, or shared-cache behavior on every host. Verify those behaviors on your deployment target. +```tsx +export const createPost = createServerFn({ method: 'POST' }) + .validator(z.object({ title: z.string().min(1) })) + .middleware([authMiddleware]) + .handler(async ({ data, context }) => { + // data is typed and validated + // context comes from middleware, also typed + return db.posts.create({ title: data.title }) + }) +``` -## Build tools +Server functions give you: -Start supports [Vite and Rsbuild](./build-from-scratch). Next.js integrates [Turbopack](https://nextjs.org/docs/app/api-reference/turbopack), with its own supported configuration and plugin surface. Your existing build tooling can make one choice easier to adopt. +- **Input validation** - Define schemas, get runtime validation and compile-time types +- **Middleware** - Composable, works on both client and server +- **Full type inference** - From input to output to error handling +- **Explicit RPC** - Clear mental model of what's happening -There is no benchmark in this comparison establishing a startup, HMR, build-time, memory, or runtime-size winner. A router package's bundle size is not the bundle size of a complete Start application. Measure the same application, dependencies, rendering behavior, hardware, and production deployment before drawing performance conclusions. - -## Deployment - -Start has [deployment guides](./guide/hosting) for several providers and runtimes. Check the guide for your chosen bundler and target, especially when you need streaming, image processing, background work, or cache invalidation. - -Next.js supports self-hosting. Its image optimizer works with `next start`, and its documentation covers ISR, shared caches, streaming, and multi-instance deployments. These features are not inherently Vercel-only. Operating them yourself still requires infrastructure configuration. [Next.js self-hosting](https://nextjs.org/docs/app/guides/self-hosting). +**Security note:** Start's architecture doesn't parse Flight data on the server - payloads flow one direction (server to client). Recent React security advisories around RSC serialization vulnerabilities don't apply to Start's model. ## Where Next.js Has the Advantage -Next.js is worth choosing when your application depends on its established Server Component integration, or when you want the built-in [`next/image`](https://nextjs.org/docs/app/api-reference/components/image), [`next/font`](https://nextjs.org/docs/app/api-reference/components/font), and [metadata conventions](https://nextjs.org/docs/app/getting-started/metadata-and-og-images). Replacing those facilities is migration work, even when alternatives exist. +Next.js has been around longer. That's not a technical advantage, but it creates real ecosystem effects: -If your team already maintains a working Next.js application, keep that experience and migration cost in the decision. A different routing model is not, by itself, a reason to rewrite a healthy application. +**More content** - More tutorials, more Stack Overflow answers, more blog posts, more example repos. When you Google a problem, you're more likely to find a Next-specific answer. -## When to Choose TanStack Start +**Mindshare** - Next is the default recommendation in many circles. That means more developers have used it, which means more content, which reinforces the cycle. -Start is worth choosing when typed URL state, route context, explicit loaders, and callable server functions fit how you build applications. Its [Router integration](./guide/routing), [selective SSR](./guide/selective-ssr), and [middleware](./guide/middleware) are concrete reasons to try it. +**Vercel integration** - Next.js is built by Vercel, so new Vercel platform features often ship with Next.js support first. That said, Start works great on Vercel too - you're not giving up preview deployments or edge functions by choosing Start. You're just not locked into Vercel as the only first-class option. -Build one representative route before committing to a migration: load real data, validate search parameters, submit a mutation, handle unauthorized access, and deploy it. If those tasks become easier to maintain, you have evidence that Start fits your application. Continue with [Getting Started](./getting-started) or the [Next.js migration guide](./migrate-from-next-js). +**Built-in image/font optimization** - Start supports image optimization via pluggable solutions (like [Unpic](https://unpic.pics/)), but it's not built-in. Whether "built-in" is better than "pluggable" depends on whether you want the framework making that choice for you. + +None of these are technical superiority - they're ecosystem and business model advantages. On the technical merits, we're confident in Start's approach. + +## What Start Does Better + +With RSC support, the question isn't "what does Start lack?" - it's: **"Why give up Start's router, type safety, caching design, and simpler mental model for Next's API design?"** + +**Type safety** - End-to-end, not bolted on. This prevents bugs and enables confident refactoring. + +**Routing** - The most powerful, type-safe router in any framework. Search params, path params, loaders, middleware - all fully typed. + +**Caching model** - Explicit SWR primitives you already understand if you've used TanStack Query. No implicit layers to debug. + +**Dev experience** - Vite and Rsbuild are fast. Instant startup, fast HMR, lower resource usage. This compounds over a workday - and even more so when AI agents are iterating on your code in tight loops. + +**Deployment as a feature** - Start treats deployment flexibility as a first-class feature. Cloudflare, Netlify, AWS, Fly, Railway, your own servers - they're all equally supported. Your app works the same everywhere because it's built on standards, not platform-specific optimizations. This means you can: + +- Choose hosting based on price, performance, or proximity to your users +- Switch providers without rewriting deployment logic +- Run the same code in development, staging, and production across different platforms +- Avoid accumulating platform-specific patterns that create friction later + +**Middleware** - Composable middleware that works at both the request level AND the server function level, on both client and server. + +**Debugging** - Predictable execution. When something breaks, you can trace it. No abstraction layers hiding behavior. + +## Summary + +| Aspect | TanStack Start | Next.js | +| -------------------- | ------------------------------------ | ------------------------------------- | +| **Philosophy** | Developer control, explicit patterns | Platform integration, conventions | +| **Components** | Interactive by default, opt into RSC | Server Components by default | +| **Type safety** | End-to-end, compile-time | TypeScript support with boundary gaps | +| **Server functions** | Typed, validated, middleware support | Untyped boundary, no middleware | +| **Caching** | Explicit SWR primitives | Multi-layer implicit caching | +| **Build tool** | Vite or Rsbuild | Turbopack/Webpack | +| **Deployment** | Equal support everywhere | Optimized for Vercel | +| **Routing** | Best-in-class type safety | File-based, basic types | +| **RSC** | Supported | Supported | +| **Maturity** | 2+ years, approaching 1.0 | 8+ years, historically unstable APIs | + +--- + +> **Ready to try Start?** See the [Getting Started guide](./getting-started) or [migrate from Next.js](./migrate-from-next-js). diff --git a/docs/start/framework/react/tutorial/reading-writing-file.md b/docs/start/framework/react/tutorial/reading-writing-file.md index f4af4480f1..11b1be0794 100644 --- a/docs/start/framework/react/tutorial/reading-writing-file.md +++ b/docs/start/framework/react/tutorial/reading-writing-file.md @@ -152,7 +152,7 @@ export type JokesData = Joke[] ### Step 1.3: Create Server Functions to Read the File -Let's create a new file `src/serverActions/jokesActions.ts` to create a server function to perform a read-write operation. We will be creating a server function using [`createServerFn`](https://tanstack.com/start/latest/docs/framework/react/guide/server-functions). +Let's create a new file `src/serverActions/jokesActions.ts` to create a server function to perform a read-write operation. We will be creating a server function using [`createServerFn`](https://tanstack.com/start/latest/docs/framework/react/server-functions). ```tsx // src/serverActions/jokesActions.ts diff --git a/docs/start/framework/solid/build-from-scratch.md b/docs/start/framework/solid/build-from-scratch.md index 5343f21e8b..c376497aeb 100644 --- a/docs/start/framework/solid/build-from-scratch.md +++ b/docs/start/framework/solid/build-from-scratch.md @@ -33,7 +33,7 @@ We highly recommend using TypeScript with TanStack Start. Create a `tsconfig.jso { "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "moduleResolution": "Bundler", "module": "ESNext", "target": "ES2022", @@ -227,7 +227,6 @@ import { HeadContent, Scripts, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' export const Route = createRootRoute({ head: () => ({ @@ -259,10 +258,9 @@ function RootDocument({ children }: Readonly<{ children: Solid.JSX.Element }>) { return ( - + - {children} diff --git a/docs/start/framework/solid/guide/authentication.md b/docs/start/framework/solid/guide/authentication.md index 460a58747c..8ae205ef21 100644 --- a/docs/start/framework/solid/guide/authentication.md +++ b/docs/start/framework/solid/guide/authentication.md @@ -1,12 +1,11 @@ --- id: authentication -title: Implement Authentication in SolidJS -description: Implement sessions, sign-in, sign-out, protected routes, and server-side authorization in a TanStack Start SolidJS app. +title: Authentication --- -Implement the authentication workflow in your SolidJS app, from sessions and sign-in to protected routes and authorization. +This guide covers authentication patterns and shows how to implement your own authentication system with TanStack Start. -To compare libraries and hosted services, read [Choose Authentication for SolidJS Apps](./authentication-overview.md). +> **📋 Before You Start:** Check our [Authentication Overview](./authentication-overview.md) for all available options including partner solutions and hosted services. ## Authentication Approaches @@ -35,7 +34,7 @@ Authentication involves many considerations including password security, session - **Authentication**: Who is this user? (Login/logout) - **Authorization**: What can this user do? (Permissions/roles) -TanStack Start provides server functions, request and cookie utilities, and route protection. Session storage and authentication come from your application or a library you choose. +TanStack Start provides the tools for both through server functions, sessions, and route protection. > Protect the data/API boundary first. Any server function, server route, or other API endpoint that returns or mutates private data must authorize the request itself. `beforeLoad` is useful for route UX: it keeps users out of screens they cannot use and avoids triggering work that would fail anyway. It is not the security boundary for the data. See [Authentication Server Primitives](./authentication-server-primitives.md) for the server-side pattern. @@ -48,7 +47,6 @@ Server functions handle sensitive authentication logic securely on the server: ```tsx import { createServerFn } from '@tanstack/solid-start' import { redirect } from '@tanstack/solid-router' -import { getAppSession } from '~/utils/session' // Login server function export const loginFn = createServerFn({ method: 'POST' }) @@ -62,9 +60,11 @@ export const loginFn = createServerFn({ method: 'POST' }) } // Create session - const session = await getAppSession() - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update({ + userId: user.id, + email: user.email, + }) // Redirect to protected area throw redirect({ to: '/dashboard' }) @@ -72,131 +72,98 @@ export const loginFn = createServerFn({ method: 'POST' }) // Logout server function export const logoutFn = createServerFn({ method: 'POST' }).handler(async () => { - const session = await getAppSession() - session.destroy() + const session = await useAppSession() + await session.clear() throw redirect({ to: '/' }) }) // Get current user export const getCurrentUserFn = createServerFn({ method: 'GET' }).handler( async () => { - const session = await getAppSession() - const userId = session.userId + const session = await useAppSession() + const userId = session.get('userId') if (!userId) { return null } - const user = await getUserById(userId) - return user ? { id: user.id, email: user.email, role: user.role } : null + return await getUserById(userId) }, ) ``` ### 2. Session Management -Start does not provide a session API. This guide uses iron-session for encrypted cookie sessions. Start's cookie helpers connect it to server functions, server routes, and request middleware. - -For encrypted cookie sessions, install [iron-session](https://github.com/vvo/iron-session): - -```sh -pnpm add iron-session -``` - -This example uses iron-session 9's cookie adapter. Its Node runtime requires Node 22.13 or newer; check the library's runtime requirements for other deployment targets. +TanStack Start provides secure HTTP-only cookie sessions: ```tsx -// utils/session.ts — import only from server code -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/solid-start/server' +// utils/session.ts +import { useSession } from '@tanstack/solid-start/server' type SessionData = { - userId: string - oauthState: string + userId?: string + email?: string + role?: string } -export function getAppSession(ttl = 7 * 24 * 60 * 60) { - const password = process.env.SESSION_SECRET - if (!password || password.length < 32) { - throw new Error('SESSION_SECRET must be at least 32 characters') - } - - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'app-session', - password, - ttl, - cookieOptions: { - secure: process.env.NODE_ENV === 'production', - sameSite: 'lax', - httpOnly: true, - path: '/', - }, +export function useAppSession() { + return useSession({ + // Session configuration + name: 'app-session', + password: process.env.SESSION_SECRET!, // At least 32 characters + // Optional: customize cookie settings + cookie: { + secure: process.env.NODE_ENV === 'production', + sameSite: 'lax', + httpOnly: true, }, - ) + }) } ``` -Read fields directly from the returned session, change them, then `await session.save()` before returning or redirecting. Missing or expired sessions have no user ID. `session.destroy()` removes the browser cookie. Keep one session object for the operation; another call to `getAppSession()` reads the incoming request again. For middleware, pass that object through request context when downstream code needs the same mutations. - -The `getAppSession` helper belongs to your application. Start does not cache sessions, choose expiration rules, or synchronize concurrent writes. Keep secrets and session objects in server code, and read request-specific configuration inside the active request. - ### 3. Authentication Context -Load the current user in your root route's `beforeLoad` so the initial server render and child routes receive the same authentication state. `useServerFn` returns a callable function, not an object with `data`, `isLoading`, or `refetch`. You can call a server function directly from `beforeLoad`. - -Merge this pattern into your existing root route, keeping its metadata and document shell: +Share authentication state across your application: ```tsx -// routes/__root.tsx -import { - createRootRoute, - HeadContent, - Outlet, - Scripts, -} from '@tanstack/solid-router' -import type { JSX } from 'solid-js' +// contexts/auth.tsx +import { createContext, useContext } from 'solid-js' +import { useServerFn } from '@tanstack/solid-start' import { getCurrentUserFn } from '../server/auth' -export const Route = createRootRoute({ - headers: () => ({ 'Cache-Control': 'private, no-store' }), - beforeLoad: async () => ({ user: await getCurrentUserFn() }), - component: Outlet, - shellComponent: RootDocument, -}) +type User = { + id: string + email: string + role: string +} + +type AuthContextType = { + user: User | null + isLoading: boolean + refetch: () => void +} + +const AuthContext = createContext(undefined) + +export function AuthProvider(props) { + const { data: user, isLoading, refetch } = useServerFn(getCurrentUserFn) -function RootDocument({ children }: { children: JSX.Element }) { return ( - - - - - - {children} - - - + + {props.children} + ) } -``` -The root includes session-specific data, so its responses use `Cache-Control: private, no-store`. Keep that policy on child routes that render this data, and do not override it with public caching at your CDN. - -Read that state from a descendant component: - -```tsx -// components/AuthStatus.tsx -import { Route } from '../routes/__root' - -export function AuthStatus() { - const context = Route.useRouteContext() - return {context().user?.email ?? 'Signed out'} +export function useAuth() { + const context = useContext(AuthContext) + if (!context) { + throw new Error('useAuth must be used within AuthProvider') + } + return context } ``` -After login or logout changes the session, call `await router.invalidate()` to reload the current user and rerun route guards. Keep private-data authorization in the server function itself, even when a route already checks the user. - ### 4. Route Protection Protect routes using `beforeLoad`: @@ -273,9 +240,8 @@ export const registerFn = createServerFn({ method: 'POST' }) }) // Create session - const session = await getAppSession() - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update({ userId: user.id }) return { success: true, user: { id: user.id, email: user.email } } }) @@ -343,9 +309,8 @@ export const initiateOAuthFn = createServerFn({ method: 'POST' }) const state = generateRandomState() // Store state in session for CSRF protection - const session = await getAppSession() - session.oauthState = state - await session.save() + const session = await useAppSession() + await session.update({ oauthState: state }) // Generate OAuth URL const authUrl = generateOAuthUrl(provider, state) @@ -408,9 +373,21 @@ const hashedPassword = await bcrypt.hash(password, saltRounds) ### 2. Session Security -Set the library's server-validated expiration as well as appropriate cookie attributes. In the iron-session example, `ttl` limits a sealed credential's lifetime from its latest save; saving again renews it. A numeric `cookieOptions.maxAge` controls browser retention. In iron-session 9, explicitly setting `maxAge: undefined` also disables seal expiry; omit the property to use the configured `ttl`. Use an application-validated timestamp or a server-side record if you also need an absolute lifetime that writes cannot extend. - -Use `httpOnly`, `sameSite`, and `path` deliberately, and require `secure: true` on HTTPS deployments. These cookie attributes complement server-side authorization and CSRF protections. Keep only the minimum session data and load current account permissions from their authoritative store. Logout removes a stateless cookie from the current browser; it cannot revoke a copy without server-side state. +```tsx +// Use secure session configuration +export function useAppSession() { + return useSession({ + name: 'app-session', + password: process.env.SESSION_SECRET!, // 32+ characters + cookie: { + secure: process.env.NODE_ENV === 'production', // HTTPS only in production + sameSite: 'lax', // CSRF protection + httpOnly: true, // XSS protection + maxAge: 7 * 24 * 60 * 60, // 7 days + }, + }) +} +``` ### 3. Rate Limiting @@ -512,70 +489,28 @@ describe('Authentication Flow', () => { ### Loading States -Call the function returned by `useServerFn` with `{ data }`. Track pending state in the component, handle invalid credentials, and refresh route context after a successful login. This form uses the `loginFn` from the server-functions example above. It requires JavaScript, so the fields stay disabled until hydration; `method="post"` also prevents credentials appearing in a native GET submission. - ```tsx -// components/LoginForm.tsx -import { createSignal } from 'solid-js' -import { useHydrated, useRouter } from '@tanstack/solid-router' -import { useServerFn } from '@tanstack/solid-start' -import { loginFn } from '../server/auth' - -export function LoginForm() { - const hydrated = useHydrated() +function LoginForm() { const [isLoading, setIsLoading] = createSignal(false) - const [error, setError] = createSignal('') - const login = useServerFn(loginFn) - const router = useRouter() - - const handleSubmit = async ( - event: SubmitEvent & { currentTarget: HTMLFormElement }, - ) => { - event.preventDefault() - const formData = new FormData(event.currentTarget) - const email = formData.get('email') - const password = formData.get('password') - if (typeof email !== 'string' || typeof password !== 'string') { - return - } + const loginMutation = useServerFn(loginFn) + const handleSubmit = async (data: LoginData) => { setIsLoading(true) - setError('') try { - const result = await login({ data: { email, password } }) - if (result?.error) { - setError(result.error) - return - } - await router.invalidate() - } catch { - setError('Login failed. Please try again.') + await loginMutation.mutate(data) + } catch (error) { + // Handle error } finally { setIsLoading(false) } } return ( -
-
- - - -
-

{error()}

+ + {/* Form fields */} +
) } @@ -590,14 +525,16 @@ export const loginFn = createServerFn({ method: 'POST' }) ) .handler(async ({ data }) => { const user = await authenticateUser(data.email, data.password) - if (!user) { - return { error: 'Invalid credentials' } - } + if (!user) return { error: 'Invalid credentials' } - const ttl = data.rememberMe ? 30 * 24 * 60 * 60 : 8 * 60 * 60 - const session = await getAppSession(ttl) - session.userId = user.id - await session.save() + const session = await useAppSession() + await session.update( + { userId: user.id }, + { + // Extend session if remember me is checked + maxAge: data.rememberMe ? 30 * 24 * 60 * 60 : undefined, // 30 days vs session + }, + ) return { success: true } }) @@ -617,6 +554,7 @@ If you're migrating from client-side authentication (localStorage, context only) ### From Other Frameworks - **Next.js**: Replace API routes with server functions, migrate NextAuth sessions +- **Remix**: Convert loaders/actions to server functions, adapt session patterns - **SvelteKit**: Move form actions to server functions, update route protection ## Production Considerations diff --git a/docs/start/framework/solid/guide/client-entry-point.md b/docs/start/framework/solid/guide/client-entry-point.md index 929efc7a2d..c44d7a9a47 100644 --- a/docs/start/framework/solid/guide/client-entry-point.md +++ b/docs/start/framework/solid/guide/client-entry-point.md @@ -3,6 +3,8 @@ id: client-entry-point title: Client Entry Point --- +# Client Entry Point + > [!NOTE] > The client entry point is **optional** out of the box. If not provided, TanStack Start will automatically handle the client entry point for you using the below as a default. @@ -10,7 +12,7 @@ Getting our html to the client is only half the battle. Once there, we need to h ```tsx // src/client.tsx -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' import { StartClient, hydrateStart } from '@tanstack/solid-start/client' hydrateStart().then((router) => { @@ -27,7 +29,7 @@ You can wrap your client entry point with error boundaries to handle client-side ```tsx // src/client.tsx import { StartClient } from '@tanstack/solid-start/client' -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' import { ErrorBoundary } from './components/ErrorBoundary' hydrate( @@ -47,7 +49,7 @@ You may want different behavior in development vs production: ```tsx // src/client.tsx import { StartClient } from '@tanstack/solid-start/client' -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' const App = ( <> diff --git a/docs/start/framework/solid/guide/hydration-errors.md b/docs/start/framework/solid/guide/hydration-errors.md index 75e44280c9..75e7d59c82 100644 --- a/docs/start/framework/solid/guide/hydration-errors.md +++ b/docs/start/framework/solid/guide/hydration-errors.md @@ -93,7 +93,7 @@ function SetTimeZoneCookie() { ```tsx import { ClientOnly } from '@tanstack/solid-router' -import { NoHydration } from 'solid-js/web' +import { NoHydration } from '@solidjs/web' —}> diff --git a/docs/start/framework/solid/guide/reading-writing-file.md b/docs/start/framework/solid/guide/reading-writing-file.md new file mode 100644 index 0000000000..5aa48d8188 --- /dev/null +++ b/docs/start/framework/solid/guide/reading-writing-file.md @@ -0,0 +1,5 @@ +--- +ref: docs/start/framework/react/guide/reading-writing-file.md +replace: + { '@tanstack/react-start': '@tanstack/solid-start', 'React': 'SolidJS' } +--- diff --git a/docs/start/framework/solid/migrate-from-release-candidate.md b/docs/start/framework/solid/migrate-from-release-candidate.md deleted file mode 100644 index 9f988a14fc..0000000000 --- a/docs/start/framework/solid/migrate-from-release-candidate.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -ref: docs/start/framework/react/migrate-from-release-candidate.md -replace: - { - '@tanstack/react-start': '@tanstack/solid-start', - '@tanstack/react-router': '@tanstack/solid-router', - } ---- diff --git a/docs/start/framework/solid/tutorial/reading-writing-file.md b/docs/start/framework/solid/tutorial/reading-writing-file.md index 09b58c38f5..de3d4d472e 100644 --- a/docs/start/framework/solid/tutorial/reading-writing-file.md +++ b/docs/start/framework/solid/tutorial/reading-writing-file.md @@ -1,8 +1,6 @@ --- id: reading-and-writing-file title: Building a Full Stack DevJokes App with TanStack Start -redirect_from: - - /framework/solid/guide/reading-writing-file --- This tutorial will guide you through building a complete full-stack application using TanStack Start. You'll create a DevJokes app where users can view and add developer-themed jokes, demonstrating key concepts of TanStack Start including server functions, file-based data storage, and Solid components. @@ -154,7 +152,7 @@ export type JokesData = Joke[] ### Step 1.3: Create Server Functions to Read the File -Let's create a new file `src/serverActions/jokesActions.ts` to create a server function to perform a read-write operation. We will be creating a server function using [`createServerFn`](https://tanstack.com/start/latest/docs/framework/solid/guide/server-functions). +Let's create a new file `src/serverActions/jokesActions.ts` to create a server function to perform a read-write operation. We will be creating a server function using [`createServerFn`](https://tanstack.com/start/latest/docs/framework/solid/server-functions). ```tsx // src/serverActions/jokesActions.ts diff --git a/e2e/AGENTS.md b/e2e/AGENTS.md deleted file mode 100644 index f373ecba4f..0000000000 --- a/e2e/AGENTS.md +++ /dev/null @@ -1,9 +0,0 @@ -# E2E tests - -- Read the project's `package.json` and test config. Inspect resolved targets with `CI=1 NX_DAEMON=false pnpm nx show project --json`: `nx.metadata.playwrightModes` generates modes, variants, and shards. The aggregate `test:e2e` can also run extra package-script suites. For focused Playwright runs, select an executable test target (a mode/shard target when inferred) and append filters after `--` (e.g. `-- tests/navigation.spec.ts --grep "redirect"`). -- Check Playwright's `webServer.command` to select dev or production coverage. A mode named `ssr` can still start a dev server. `e2e/eslint-plugin-start` uses Vitest instead of Playwright. -- For inferred Playwright modes, Nx builds first and supplies `MODE`, `E2E_TOOLCHAIN`, `E2E_DIST_DIR`, and `E2E_PORT_KEY`. Preserve these in server/config changes; let Nx own the build while `webServer.command` only starts the selected server. Target generation lives in [`scripts/nx/playwright-plugin.ts`](../scripts/nx/playwright-plugin.ts). -- Use the same `E2E_PORT_KEY`-aware key throughout config, app, and dummy-server setup/teardown. Clean only that key's port files, before allocation, when `TEST_WORKER_INDEX === undefined`; worker config reloads must not remap a running server's port. -- For new browser tests, reuse the local error-checking fixture. The shared `test` from `@tanstack/router-e2e-utils` fails on unexpected `console.error`, including hydration errors; allow only expected errors with `whitelistErrors`. -- HMR/watch tests edit real app sources. Reuse existing edit/restore helpers such as `createHmrFileEditor`, restore edits in teardown even after failures, and preserve the suites' single-worker and Nx `parallelism: false` settings. -- `@tanstack/router-e2e-utils:test:unit` is a placeholder. Validate helper changes through consuming e2e projects. diff --git a/e2e/e2e-utils/mock-api.mjs b/e2e/e2e-utils/mock-api.mjs deleted file mode 100644 index f92ec840e5..0000000000 --- a/e2e/e2e-utils/mock-api.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import { setupServer } from 'msw/node' -import { apiHandlers } from './src/api-handlers.ts' - -setupServer(...apiHandlers).listen({ onUnhandledRequest: 'bypass' }) diff --git a/e2e/e2e-utils/package.json b/e2e/e2e-utils/package.json index fcfa5f8dc0..a0708e0475 100644 --- a/e2e/e2e-utils/package.json +++ b/e2e/e2e-utils/package.json @@ -5,7 +5,7 @@ "clean": "rimraf ./dist && rimraf ./coverage", "build": "vite build", "test:eslint": "eslint ./src", - "test:unit": "vitest run" + "test:unit": "exit 0; vitest --typecheck" }, "type": "module", "types": "dist/types/index.d.ts", @@ -22,8 +22,7 @@ "default": "./dist/cjs/index.cjs" } }, - "./package.json": "./package.json", - "./mock-api": "./mock-api.mjs" + "./package.json": "./package.json" }, "sideEffects": false, "files": [ @@ -31,14 +30,12 @@ "src" ], "engines": { - "node": "^22.18.0 || >=24.0.0" + "node": ">=20.19" }, + "dependencies": {}, "devDependencies": { - "@msw/playwright": "0.6.7", - "msw": "2.15.0", - "rimraf": "catalog:", + "get-port-please": "^3.2.0", "vite": "^8.0.14", - "vite-plugin-dts": "^4.5.4", - "vitest": "catalog:" + "vite-plugin-dts": "^4.5.4" } } diff --git a/e2e/e2e-utils/src/api-fixture.ts b/e2e/e2e-utils/src/api-fixture.ts deleted file mode 100644 index 90ca1912a3..0000000000 --- a/e2e/e2e-utils/src/api-fixture.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { test as base } from '@playwright/test' -import { defineNetworkFixture } from '@msw/playwright' -import { apiHandlers } from './api-handlers' - -// Opt in only for suites that consume the canned API. Playwright routing -// disables HTTP caching; other suites keep their normal browser behavior. -export const apiTest = base.extend<{ mockApi: void }>({ - mockApi: [ - async ({ context }, use) => { - const network = defineNetworkFixture({ context, handlers: apiHandlers }) - await network.enable() - await use() - await network.disable() - }, - { auto: true }, - ], -}) diff --git a/e2e/e2e-utils/src/api-handlers.ts b/e2e/e2e-utils/src/api-handlers.ts deleted file mode 100644 index 4e2c0498f4..0000000000 --- a/e2e/e2e-utils/src/api-handlers.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { HttpResponse, http } from 'msw' -import { posts } from './posts.ts' -import { users } from './users.ts' - -export const apiHandlers = [ - ...Object.entries({ posts, users }).flatMap(([resource, data]) => [ - http.get(`https://jsonplaceholder.typicode.com/${resource}`, () => - HttpResponse.json(data), - ), - http.get( - `https://jsonplaceholder.typicode.com/${resource}/:id`, - ({ params }) => { - const id = parseInt(String(params.id)) - if (Number.isNaN(id)) { - return HttpResponse.json( - { error: `invalid ${resource.slice(0, -1)} id` }, - { status: 404 }, - ) - } - const item = data.find((entry) => entry.id === id) - return item - ? HttpResponse.json(item) - : new HttpResponse(null, { - headers: { 'content-type': 'application/json' }, - }) - }, - ), - ]), - http.all('https://jsonplaceholder.typicode.com/*', () => - HttpResponse.error(), - ), -] diff --git a/e2e/e2e-utils/src/derivePort.ts b/e2e/e2e-utils/src/derivePort.ts new file mode 100644 index 0000000000..3ecb86cb53 --- /dev/null +++ b/e2e/e2e-utils/src/derivePort.ts @@ -0,0 +1,27 @@ +import fs from 'node:fs' +import { getRandomPort } from 'get-port-please' + +/** + * Check if a port has been allocated, if it hasn't generate a random port and save it. + * @param {string} input - port test allocation + * @returns {number} A random port. + */ +export async function derivePort(input: string): Promise { + const portFile = `port-${input}.txt` + + if (!fs.existsSync(portFile)) { + fs.writeFileSync(portFile, (await getRandomPort()).toString()) + } + + const portNumber = parseInt(await fs.promises.readFile(portFile, 'utf-8')) + console.info(`Mapped "${input}" to port ${portNumber}`) + return portNumber +} + +export async function getDummyServerPort(input: string): Promise { + return await derivePort(`${input}-external`) +} + +export async function getTestServerPort(input: string): Promise { + return await derivePort(input) +} diff --git a/e2e/e2e-utils/src/e2eSetupTeardown.ts b/e2e/e2e-utils/src/e2eSetupTeardown.ts new file mode 100644 index 0000000000..e8afdabbe4 --- /dev/null +++ b/e2e/e2e-utils/src/e2eSetupTeardown.ts @@ -0,0 +1,48 @@ +import { getRandomPort } from 'get-port-please' +import { localDummyServer } from './localDummyServer' +import { getDummyServerPort } from './derivePort' + +export async function e2eStartDummyServer(input: string) { + const port = await getDummyServerPort(input) + + return await localDummyServer(port) +} + +/** + * Prerendering happens inside `vite build`, where no dummy server is running, + * so pages whose loaders fetch the "external host" would hit the real one — + * unstable in CI. Call this from an app's vite config when building in + * prerender mode: it starts the dummy server on a free port for the lifetime + * of the build and exposes it via VITE_NODE_ENV/VITE_EXTERNAL_PORT for + * request-time lookups. Everything is unref'd so the build process can exit. + */ +export async function e2eStartDummyServerForBuild() { + // vite reloads the config file for the prerender preview server; the first + // load in this process already started the server. Guard on our own flag — + // NOT on VITE_EXTERNAL_PORT, which could be pre-set in the environment and + // must not stop us from starting the server and setting VITE_NODE_ENV. + const globalState = globalThis as typeof globalThis & { + __tanstackRouterE2eBuildDummyServer?: { port: number } + } + + if (!globalState.__tanstackRouterE2eBuildDummyServer) { + const port = await getRandomPort() + const server = await localDummyServer(port) + server.unref() + server.on('connection', (socket) => socket.unref()) + globalState.__tanstackRouterE2eBuildDummyServer = { port } + } + + process.env.VITE_NODE_ENV = 'test' + process.env.VITE_EXTERNAL_PORT = String( + globalState.__tanstackRouterE2eBuildDummyServer.port, + ) +} + +export async function e2eStopDummyServer(input: string) { + const port = await getDummyServerPort(input) + + await fetch(`http://localhost:${port}/stop`, { + method: 'POST', + }) +} diff --git a/e2e/e2e-utils/src/index.ts b/e2e/e2e-utils/src/index.ts index 960a01a9be..3a3d16b6e6 100644 --- a/e2e/e2e-utils/src/index.ts +++ b/e2e/e2e-utils/src/index.ts @@ -1,9 +1,14 @@ -export { apiTest } from './api-fixture' +export { derivePort, getDummyServerPort, getTestServerPort } from './derivePort' +export { localDummyServer } from './localDummyServer' +export { toRuntimePath } from './to-runtime-path' +export { resolveRuntimeSuffix } from './resolve-runtime-suffix' +export { + e2eStartDummyServer, + e2eStartDummyServerForBuild, + e2eStopDummyServer, +} from './e2eSetupTeardown' export { preOptimizeDevServer, waitForServer } from './devServerWarmup' -export { collectBrowserErrors, test } from './fixture' export { createHmrFileEditor, replaceAll } from './hmrFileEditor' export type { HmrFileEditorOptions } from './hmrFileEditor' export type { Post } from './posts' -export { resolveRuntimeSuffix } from './resolve-runtime-suffix' -export { toRuntimePath } from './to-runtime-path' -export { appServerReady, appServerReadyPattern } from './webServer' +export { collectBrowserErrors, test } from './fixture' diff --git a/e2e/e2e-utils/src/localDummyServer.ts b/e2e/e2e-utils/src/localDummyServer.ts new file mode 100644 index 0000000000..d452f54c59 --- /dev/null +++ b/e2e/e2e-utils/src/localDummyServer.ts @@ -0,0 +1,128 @@ +import http from 'node:http' +import { posts } from './posts' +import { users } from './users' + +// some tests redirect to an external host +// however, in CI this is unstable due to network conditions +// so here we spawn a local server to simulate the external host + +export async function localDummyServer(port: number) { + const server = http.createServer((req, res) => { + // Set CORS headers + res.setHeader('Access-Control-Allow-Origin', '*') + res.setHeader('Access-Control-Request-Method', '*') + res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET, POST') + res.setHeader('Access-Control-Allow-Headers', '*') + + if (req.method === 'OPTIONS') { + res.writeHead(200) + res.end() + return + } + }) + + server.on('request', (req, res) => { + const url = new URL(req.url!, 'http://localhost') + + if (res.req.method === 'GET' && url.pathname === '/') { + res.writeHead(200, { 'Content-Type': 'text/html' }) + res.end('Hello World') + } + }) + + server.on('request', (req, res) => { + const url = new URL(req.url!, `http://localhost`) + + if (res.req.method === 'POST' && url.pathname === '/stop') { + server.close() + console.info( + `stopped local dummy server running at http://localhost:${port}`, + ) + + res.writeHead(200) + res.end() + } + }) + + server.on('request', (req, res) => { + const url = new URL(req.url ?? '/', `http://localhost`) + + if (req.method === 'GET' && url.pathname.startsWith('/posts')) { + const parts = url.pathname.split('/') + + if (parts.length === 2) { + res.writeHead(200, { 'content-type': 'application/json' }) + res.end(JSON.stringify(posts)) + return + } + + if (parts[2]) { + const postId = parseInt(parts[2]) + + if (isNaN(postId)) { + res.writeHead(404) + res.end(JSON.stringify({ error: 'invalid post id' })) + return + } + + const post = posts.find((post) => post.id === postId) + + res.writeHead(200, { 'content-type': 'application/json' }) + res.end(JSON.stringify(post)) + return + } + + res.writeHead(404) + res.end(JSON.stringify({ error: 'invalid posts path' })) + return + } + }) + + server.on('request', (req, res) => { + const url = new URL(req.url ?? '/', `http://localhost`) + + if (req.method === 'GET' && url.pathname.startsWith('/users')) { + const parts = url.pathname.split('/') + + if (parts.length === 2) { + res.writeHead(200, { 'content-type': 'application/json' }) + res.end(JSON.stringify(users)) + return + } + + if (parts[2]) { + const userId = parseInt(parts[2]) + + if (isNaN(userId)) { + res.writeHead(404) + res.end(JSON.stringify({ error: 'invalid user id' })) + return + } + + const user = users.find((user) => user.id === userId) + + res.writeHead(200, { 'content-type': 'application/json' }) + res.end(JSON.stringify(user)) + return + } + + res.writeHead(404) + res.end(JSON.stringify({ error: 'invalid users path' })) + return + } + }) + + const startServer = new Promise((resolve) => { + server.listen(port, 'localhost', () => { + console.info( + `started local dummy server running at http://localhost:${port}`, + ) + resolve() + }) + }) + + await startServer + + await new Promise((r) => setTimeout(r, 500)) + return server +} diff --git a/e2e/e2e-utils/src/webServer.ts b/e2e/e2e-utils/src/webServer.ts deleted file mode 100644 index 77536e4c69..0000000000 --- a/e2e/e2e-utils/src/webServer.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Vite, Rsbuild, srvx, serve, and the custom E2E servers print their bound -// address only after listening. Playwright exports named captures to workers. -export const appServerReadyPattern = - /(?:Local:|Listening on|Accepting connections at|E2E app:)[^\n]*?https?:\/\/(?:localhost|127\.0\.0\.1|\[::\]):(?\d+)/ - -export const appServerReady = { - stdout: appServerReadyPattern, - stderr: appServerReadyPattern, -} diff --git a/e2e/e2e-utils/tests/mock-api.test.ts b/e2e/e2e-utils/tests/mock-api.test.ts deleted file mode 100644 index ba25c1254d..0000000000 --- a/e2e/e2e-utils/tests/mock-api.test.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { execFile } from 'node:child_process' -import { promisify } from 'node:util' -import { fileURLToPath } from 'node:url' -import { expect, test } from 'vitest' - -const execFileAsync = promisify(execFile) -const preload = fileURLToPath(new URL('../mock-api.mjs', import.meta.url)) - -test('independent Node processes mock the API with networking disabled', async () => { - const script = ` - const { Socket } = await import('node:net') - Socket.prototype.connect = () => { throw new Error('Network disabled') } - const posts = await fetch('https://jsonplaceholder.typicode.com/posts').then(r => r.json()) - const user = await fetch('https://jsonplaceholder.typicode.com/users/1').then(r => r.json()) - const invalid = await fetch('https://jsonplaceholder.typicode.com/posts/invalid') - const missing = await fetch('https://jsonplaceholder.typicode.com/posts/999') - console.log(JSON.stringify({ post: posts[0].id, user: user.id, invalid: invalid.status, missing: await missing.text() })) - ` - const results = await Promise.all( - [0, 1].map(() => - execFileAsync(process.execPath, ['--import', preload, '--eval', script]), - ), - ) - for (const result of results) { - expect(JSON.parse(result.stdout)).toEqual({ - post: 1, - user: 1, - invalid: 404, - missing: '', - }) - } -}) - -test('unhandled API requests fail without reaching the network', async () => { - const script = ` - const { Socket } = await import('node:net') - let connections = 0 - Socket.prototype.connect = () => { connections++; throw new Error('Network disabled') } - try { - await fetch('https://jsonplaceholder.typicode.com/unhandled') - process.exitCode = 1 - } catch { - console.log(JSON.stringify({ connections })) - } - ` - const result = await execFileAsync(process.execPath, [ - '--import', - preload, - '--eval', - script, - ]) - expect(JSON.parse(result.stdout)).toEqual({ connections: 0 }) -}) diff --git a/e2e/e2e-utils/tests/webServer.test.ts b/e2e/e2e-utils/tests/webServer.test.ts deleted file mode 100644 index fd3a8b239c..0000000000 --- a/e2e/e2e-utils/tests/webServer.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { stripVTControlCharacters } from 'node:util' -import { expect, test } from 'vitest' -import { appServerReadyPattern } from '../src/webServer' - -test.each([ - '➜ Local: http://localhost:49152/', - '\u001b[32m➜\u001b[39m \u001b[1mLocal\u001b[22m: \u001b[36mhttp://localhost:\u001b[1m49152\u001b[22m/\u001b[39m', - 'Listening on http://[::]:49152', - 'E2E app: http://localhost:49152', - 'Accepting connections at http://localhost:49152', - 'Local: https://localhost:49152/', -])('captures a bound application port from %s', (line) => { - expect( - appServerReadyPattern.exec(stripVTControlCharacters(line))?.groups - ?.E2E_APP_PORT, - ).toBe('49152') -}) - -test('does not confuse an arbitrary URL with app readiness', () => { - expect(appServerReadyPattern.test('fetching http://localhost:49152')).toBe( - false, - ) -}) diff --git a/e2e/e2e-utils/tsconfig.json b/e2e/e2e-utils/tsconfig.json index 5561f5d28f..9b21ee123b 100644 --- a/e2e/e2e-utils/tsconfig.json +++ b/e2e/e2e-utils/tsconfig.json @@ -1,7 +1,4 @@ { "extends": "../../tsconfig.json", - "include": ["src", "vite.config.ts", "tests"], - "compilerOptions": { - "rewriteRelativeImportExtensions": true - } + "include": ["src", "vite.config.ts", "tests"] } diff --git a/e2e/eslint-plugin-start/package.json b/e2e/eslint-plugin-start/package.json index e3591d7d1b..87bc81bfe9 100644 --- a/e2e/eslint-plugin-start/package.json +++ b/e2e/eslint-plugin-start/package.json @@ -61,6 +61,6 @@ "eslint": "^9.22.0", "react": "^19.0.0", "typescript": "^5.7.2", - "vitest": "catalog:" + "vitest": "^4.1.4" } } diff --git a/e2e/react-router/basepath-file-based/package.json b/e2e/react-router/basepath-file-based/package.json index 3dfbb58180..dd0956e96f 100644 --- a/e2e/react-router/basepath-file-based/package.json +++ b/e2e/react-router/basepath-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -18,7 +18,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basepath-file-based/playwright.config.ts b/e2e/react-router/basepath-file-based/playwright.config.ts index 4eead86444..6069bbe59f 100644 --- a/e2e/react-router/basepath-file-based/playwright.config.ts +++ b/e2e/react-router/basepath-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basepath-file-based/src/routeTree.gen.ts b/e2e/react-router/basepath-file-based/src/routeTree.gen.ts index 3badc3f843..2989a394d3 100644 --- a/e2e/react-router/basepath-file-based/src/routeTree.gen.ts +++ b/e2e/react-router/basepath-file-based/src/routeTree.gen.ts @@ -9,25 +9,15 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AboutRouteImport } from './routes/about' -import { Route as RedirectRouteImport } from './routes/redirect' -import { Route as RedirectReloadRouteImport } from './routes/redirectReload' import { Route as ScrollErrorRouteImport } from './routes/scroll-error' +import { Route as RedirectReloadRouteImport } from './routes/redirectReload' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AboutRoute = AboutRouteImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', +const ScrollErrorRoute = ScrollErrorRouteImport.update({ + id: '/scroll-error', + path: '/scroll-error', getParentRoute: () => rootRouteImport, } as any) const RedirectReloadRoute = RedirectReloadRouteImport.update({ @@ -35,9 +25,19 @@ const RedirectReloadRoute = RedirectReloadRouteImport.update({ path: '/redirectReload', getParentRoute: () => rootRouteImport, } as any) -const ScrollErrorRoute = ScrollErrorRouteImport.update({ - id: '/scroll-error', - path: '/scroll-error', +const RedirectRoute = RedirectRouteImport.update({ + id: '/redirect', + path: '/redirect', + getParentRoute: () => rootRouteImport, +} as any) +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -87,25 +87,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport + '/scroll-error': { + id: '/scroll-error' + path: '/scroll-error' + fullPath: '/scroll-error' + preLoaderRoute: typeof ScrollErrorRouteImport parentRoute: typeof rootRouteImport } '/redirectReload': { @@ -115,11 +101,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectReloadRouteImport parentRoute: typeof rootRouteImport } - '/scroll-error': { - id: '/scroll-error' - path: '/scroll-error' - fullPath: '/scroll-error' - preLoaderRoute: typeof ScrollErrorRouteImport + '/redirect': { + id: '/redirect' + path: '/redirect' + fullPath: '/redirect' + preLoaderRoute: typeof RedirectRouteImport + parentRoute: typeof rootRouteImport + } + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } 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 d6a50de840..06b90f6528 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,41 +1,5 @@ -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([]) -} +/* eslint-disable */ +import { expect, test } from '@playwright/test' test.describe('Scroll Restoration with Session Storage Error', () => { test('should not crash when sessionStorage.setItem throws an error', async ({ @@ -45,12 +9,22 @@ test.describe('Scroll Restoration with Session Storage Error', () => { await page.waitForLoadState('networkidle') await page.evaluate(() => { - Storage.prototype.setItem = () => { + sessionStorage.setItem = () => { throw new Error('Test Error') } }) - await reloadAfterStorageFailure(page) + 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) }) test('should not crash when sessionStorage quota is exceeded', async ({ @@ -73,6 +47,16 @@ test.describe('Scroll Restoration with Session Storage Error', () => { } }) - await reloadAfterStorageFailure(page) + 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) }) }) diff --git a/e2e/react-router/basepath-file-based/tests/setup/global.setup.ts b/e2e/react-router/basepath-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basepath-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basepath-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basepath-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basepath-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-esbuild-file-based/package.json b/e2e/react-router/basic-esbuild-file-based/package.json index 59210c24d7..93e1263d11 100644 --- a/e2e/react-router/basic-esbuild-file-based/package.json +++ b/e2e/react-router/basic-esbuild-file-based/package.json @@ -7,7 +7,7 @@ "build": "esbuild src/main.tsx --bundle --outfile=dist/main.js && tsc --noEmit", "serve": "esbuild src/main.tsx --bundle --outfile=dist/main.js --servedir=.", "start": "dev", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -15,11 +15,11 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-esbuild-file-based/playwright.config.ts b/e2e/react-router/basic-esbuild-file-based/playwright.config.ts index a38252921f..ca0fb7a1da 100644 --- a/e2e/react-router/basic-esbuild-file-based/playwright.config.ts +++ b/e2e/react-router/basic-esbuild-file-based/playwright.config.ts @@ -1,8 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -13,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm run build && pnpm run serve --serve=${PORT} --define:process.env.NODE_ENV=\\"test\\"`, - wait: appServerReady, - reuseExistingServer: false, + command: `pnpm run build && pnpm run serve --serve=${PORT} --define:process.env.NODE_ENV=\\"test\\" --define:process.env.EXTERNAL_PORT="${EXTERNAL_PORT}"`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-esbuild-file-based/src/esbuild.config.js b/e2e/react-router/basic-esbuild-file-based/src/esbuild.config.js index 954ddc026f..5f0f4fce03 100644 --- a/e2e/react-router/basic-esbuild-file-based/src/esbuild.config.js +++ b/e2e/react-router/basic-esbuild-file-based/src/esbuild.config.js @@ -2,5 +2,9 @@ import { tanstackRouter } from '@tanstack/router-plugin/esbuild' export default { // ... - plugins: [tanstackRouter()], + plugins: [ + tanstackRouter({ + autoCodeSplitting: true, + }), + ], } diff --git a/e2e/react-router/basic-esbuild-file-based/src/posts.tsx b/e2e/react-router/basic-esbuild-file-based/src/posts.tsx index 97c96d77eb..8f74b8c9aa 100644 --- a/e2e/react-router/basic-esbuild-file-based/src/posts.tsx +++ b/e2e/react-router/basic-esbuild-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (process.env.NODE_ENV === 'test') { + queryURL = `http://localhost:${process.env.EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-esbuild-file-based/tests/app.spec.ts b/e2e/react-router/basic-esbuild-file-based/tests/app.spec.ts index c52191a7d4..7b322a8b1d 100644 --- a/e2e/react-router/basic-esbuild-file-based/tests/app.spec.ts +++ b/e2e/react-router/basic-esbuild-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-esbuild-file-based/tests/setup/global.setup.ts b/e2e/react-router/basic-esbuild-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-esbuild-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-esbuild-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basic-esbuild-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-esbuild-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-file-based-code-splitting/package.json b/e2e/react-router/basic-file-based-code-splitting/package.json index 82ebb90e93..14a8f0373f 100644 --- a/e2e/react-router/basic-file-based-code-splitting/package.json +++ b/e2e/react-router/basic-file-based-code-splitting/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,12 +17,11 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-file-based-code-splitting/playwright.config.ts b/e2e/react-router/basic-file-based-code-splitting/playwright.config.ts index 4eead86444..22c9bdcd7e 100644 --- a/e2e/react-router/basic-file-based-code-splitting/playwright.config.ts +++ b/e2e/react-router/basic-file-based-code-splitting/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-file-based-code-splitting/src/posts.tsx b/e2e/react-router/basic-file-based-code-splitting/src/posts.tsx index 97c96d77eb..ae7142c5b6 100644 --- a/e2e/react-router/basic-file-based-code-splitting/src/posts.tsx +++ b/e2e/react-router/basic-file-based-code-splitting/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-file-based-code-splitting/src/routeTree.gen.ts b/e2e/react-router/basic-file-based-code-splitting/src/routeTree.gen.ts index c7a15cd84e..618ad52e34 100644 --- a/e2e/react-router/basic-file-based-code-splitting/src/routeTree.gen.ts +++ b/e2e/react-router/basic-file-based-code-splitting/src/routeTree.gen.ts @@ -9,35 +9,21 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as SharedSingletonRouteImport } from './routes/shared-singleton' -import { Route as ViewportTestRouteImport } from './routes/viewport-test' import { Route as WithoutLoaderRouteImport } from './routes/without-loader' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as ViewportTestRouteImport } from './routes/viewport-test' +import { Route as SharedSingletonRouteImport } from './routes/shared-singleton' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const SharedSingletonRoute = SharedSingletonRouteImport.update({ - id: '/shared-singleton', - path: '/shared-singleton', +const WithoutLoaderRoute = WithoutLoaderRouteImport.update({ + id: '/without-loader', + path: '/without-loader', getParentRoute: () => rootRouteImport, } as any) const ViewportTestRoute = ViewportTestRouteImport.update({ @@ -45,14 +31,24 @@ const ViewportTestRoute = ViewportTestRouteImport.update({ path: '/viewport-test', getParentRoute: () => rootRouteImport, } as any) -const WithoutLoaderRoute = WithoutLoaderRouteImport.update({ - id: '/without-loader', - path: '/without-loader', +const SharedSingletonRoute = SharedSingletonRouteImport.update({ + id: '/shared-singleton', + path: '/shared-singleton', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', @@ -64,16 +60,20 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -158,32 +158,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/shared-singleton': { - id: '/shared-singleton' - path: '/shared-singleton' - fullPath: '/shared-singleton' - preLoaderRoute: typeof SharedSingletonRouteImport + '/without-loader': { + id: '/without-loader' + path: '/without-loader' + fullPath: '/without-loader' + preLoaderRoute: typeof WithoutLoaderRouteImport parentRoute: typeof rootRouteImport } '/viewport-test': { @@ -193,19 +172,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ViewportTestRouteImport parentRoute: typeof rootRouteImport } - '/without-loader': { - id: '/without-loader' - path: '/without-loader' - fullPath: '/without-loader' - preLoaderRoute: typeof WithoutLoaderRouteImport + '/shared-singleton': { + id: '/shared-singleton' + path: '/shared-singleton' + fullPath: '/shared-singleton' + preLoaderRoute: typeof SharedSingletonRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof LayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -221,12 +214,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -235,6 +228,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } } } diff --git a/e2e/react-router/basic-file-based-code-splitting/tests/app.spec.ts b/e2e/react-router/basic-file-based-code-splitting/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/react-router/basic-file-based-code-splitting/tests/app.spec.ts +++ b/e2e/react-router/basic-file-based-code-splitting/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-file-based-code-splitting/tests/preload.spec.ts b/e2e/react-router/basic-file-based-code-splitting/tests/preload.spec.ts index fd17fcc47b..0bc3265760 100644 --- a/e2e/react-router/basic-file-based-code-splitting/tests/preload.spec.ts +++ b/e2e/react-router/basic-file-based-code-splitting/tests/preload.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.setup.ts b/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.teardown.ts b/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-file-based-code-splitting/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-file-based-code-splitting/tests/shared-bindings.spec.ts b/e2e/react-router/basic-file-based-code-splitting/tests/shared-bindings.spec.ts index 2ad4ec3e78..512943c10d 100644 --- a/e2e/react-router/basic-file-based-code-splitting/tests/shared-bindings.spec.ts +++ b/e2e/react-router/basic-file-based-code-splitting/tests/shared-bindings.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-file-based/package.json b/e2e/react-router/basic-file-based/package.json index 0f3d243432..da2df215af 100644 --- a/e2e/react-router/basic-file-based/package.json +++ b/e2e/react-router/basic-file-based/package.json @@ -9,7 +9,7 @@ "preview": "vite preview", "start": "vite", "test:e2e": "pnpm run test:e2e:default", - "test:e2e:default": "playwright test --project=chromium" + "test:e2e:default": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,12 +18,12 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-file-based/playwright.config.ts b/e2e/react-router/basic-file-based/playwright.config.ts index ea3ef9ffec..6e4e1d7703 100644 --- a/e2e/react-router/basic-file-based/playwright.config.ts +++ b/e2e/react-router/basic-file-based/playwright.config.ts @@ -1,9 +1,14 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` -const command = `pnpm build && pnpm preview --host 0.0.0.0 --port ${PORT}` +const command = `pnpm build && pnpm preview --port ${PORT}` console.info('Running with mode: ', process.env.MODE || 'default') @@ -16,6 +21,9 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, @@ -23,12 +31,15 @@ export default defineConfig({ webServer: { command, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { MODE: process.env.MODE || '', VITE_MODE: process.env.MODE || '', + VITE_NODE_ENV: 'test', + VITE_EXTERNAL_PORT: String(EXTERNAL_PORT), + VITE_SERVER_PORT: String(PORT), PORT: String(PORT), }, }, diff --git a/e2e/react-router/basic-file-based/public/external.html b/e2e/react-router/basic-file-based/public/external.html deleted file mode 100644 index 3b4062b778..0000000000 --- a/e2e/react-router/basic-file-based/public/external.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - External destination - - - Hello World - - diff --git a/e2e/react-router/basic-file-based/src/main.tsx b/e2e/react-router/basic-file-based/src/main.tsx index d6a5aef382..12e202dae4 100644 --- a/e2e/react-router/basic-file-based/src/main.tsx +++ b/e2e/react-router/basic-file-based/src/main.tsx @@ -24,14 +24,6 @@ const router = createRouter({ defaultStaleTime: 5000, scrollRestoration: true, routeMasks: [mask], - rewrite: { - output: ({ url }) => { - if (url.pathname === '/document-navigation-target') { - return new URL(`http://127.0.0.1:${window.location.port}/external.html`) - } - return url - }, - }, }) // Register things for typesafety diff --git a/e2e/react-router/basic-file-based/src/posts.tsx b/e2e/react-router/basic-file-based/src/posts.tsx index 97c96d77eb..ae7142c5b6 100644 --- a/e2e/react-router/basic-file-based/src/posts.tsx +++ b/e2e/react-router/basic-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-file-based/src/routeTree.gen.ts b/e2e/react-router/basic-file-based/src/routeTree.gen.ts index 83b504992f..7ee0051549 100644 --- a/e2e/react-router/basic-file-based/src/routeTree.gen.ts +++ b/e2e/react-router/basic-file-based/src/routeTree.gen.ts @@ -9,208 +9,130 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as AnchorRouteImport } from './routes/anchor' -import { Route as ComponentTypesTestRouteImport } from './routes/component-types-test' -import { Route as DocumentNavigationRouteImport } from './routes/document-navigation' -import { Route as DocumentNavigationTargetRouteImport } from './routes/document-navigation-target' -import { Route as EditingARouteImport } from './routes/editing-a' -import { Route as EditingBRouteImport } from './routes/editing-b' -import { Route as FullpathTestRouteRouteImport } from './routes/fullpath-test/route' -import { Route as HistoryBlockingRouteImport } from './routes/history-blocking' -import { Route as HoverPreloadHashRouteImport } from './routes/hover-preload-hash' -import { Route as LazyErrorRouteImport } from './routes/lazy-error' -import { Route as MasksRouteImport } from './routes/masks' -import { Route as NonNestedRouteRouteImport } from './routes/non-nested/route' -import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' -import { Route as PathlessLayoutRouteRouteImport } from './routes/pathless-layout/route' -import { Route as PostsRouteImport } from './routes/posts' import { Route as RemountDepsRouteImport } from './routes/remountDeps' -import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' +import { Route as MasksRouteImport } from './routes/masks' +import { Route as LazyErrorRouteImport } from './routes/lazy-error' +import { Route as HoverPreloadHashRouteImport } from './routes/hover-preload-hash' +import { Route as EditingBRouteImport } from './routes/editing-b' +import { Route as EditingARouteImport } from './routes/editing-a' +import { Route as ComponentTypesTestRouteImport } from './routes/component-types-test' +import { Route as AnchorRouteImport } from './routes/anchor' +import { Route as LayoutRouteImport } from './routes/_layout' import { Route as Char45824Char54620Char48124Char44397RouteRouteImport } from './routes/대한민국/route' -import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' -import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' -import { Route as groupInsideRouteImport } from './routes/(group)/inside' -import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' -import { Route as FullpathTestLayoutRouteRouteImport } from './routes/fullpath-test/_layout/route' -import { Route as NonNestedDeepRouteRouteImport } from './routes/non-nested/deep/route' -import { Route as NonNestedNamedRouteRouteImport } from './routes/non-nested/named/route' -import { Route as NonNestedPathRouteRouteImport } from './routes/non-nested/path/route' -import { Route as NonNestedPrefixRouteRouteImport } from './routes/non-nested/prefix/route' -import { Route as NonNestedSuffixRouteRouteImport } from './routes/non-nested/suffix/route' -import { Route as ParamsPsIndexRouteImport } from './routes/params-ps/index' -import { Route as ParamsPsNonNestedRouteRouteImport } from './routes/params-ps/non-nested/route' -import { Route as ParamsPsStrictFalseRouteRouteImport } from './routes/params-ps/strict-false/route' -import { Route as PathlessLayoutLayoutRouteRouteImport } from './routes/pathless-layout/_layout/route' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as RedirectIndexRouteImport } from './routes/redirect/index' -import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' -import { Route as RelativeIndexRouteImport } from './routes/relative/index' -import { Route as RelativeLinkRouteRouteImport } from './routes/relative/link/route' -import { Route as RelativeUseNavigateRouteRouteImport } from './routes/relative/useNavigate/route' +import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' +import { Route as PathlessLayoutRouteRouteImport } from './routes/pathless-layout/route' +import { Route as NonNestedRouteRouteImport } from './routes/non-nested/route' +import { Route as FullpathTestRouteRouteImport } from './routes/fullpath-test/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as SearchParamsIndexRouteImport } from './routes/search-params/index' -import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' +import { Route as RelativeIndexRouteImport } from './routes/relative/index' +import { Route as RedirectIndexRouteImport } from './routes/redirect/index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' +import { Route as ParamsPsIndexRouteImport } from './routes/params-ps/index' import { Route as StructuralSharingEnabledRouteImport } from './routes/structural-sharing.$enabled' -import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' -import { Route as FullpathTestLayoutIndexRouteImport } from './routes/fullpath-test/_layout/index' -import { Route as FullpathTestLayoutIdRouteImport } from './routes/fullpath-test/_layout/$id' -import { Route as MasksAdminUserIdRouteImport } from './routes/masks.admin.$userId' -import { Route as MasksPublicUsernameRouteImport } from './routes/masks.public.$username' -import { Route as NonNestedDeepBazRouteRouteImport } from './routes/non-nested/deep/$baz.route' -import { Route as NonNestedNamedBazRouteRouteImport } from './routes/non-nested/named/$baz.route' -import { Route as NonNestedPathBazRouteRouteImport } from './routes/non-nested/path/baz.route' -import { Route as NonNestedPrefixPrefixChar123bazChar125RouteRouteImport } from './routes/non-nested/prefix/prefix{$baz}.route' -import { Route as NonNestedSuffixChar123bazChar125suffixRouteRouteImport } from './routes/non-nested/suffix/{$baz}suffix.route' -import { Route as ParamsPsNamedIndexRouteImport } from './routes/params-ps/named/index' -import { Route as ParamsPsNamedFooRouteRouteImport } from './routes/params-ps/named/$foo/route' -import { Route as ParamsPsNamedPrefixChar123fooChar125RouteImport } from './routes/params-ps/named/prefix{$foo}' -import { Route as ParamsPsNamedChar123fooChar125suffixRouteImport } from './routes/params-ps/named/{$foo}suffix' -import { Route as ParamsPsNonNestedFooRouteRouteImport } from './routes/params-ps/non-nested/$foo_/route' -import { Route as ParamsPsStrictFalseVersionRouteRouteImport } from './routes/params-ps/strict-false/$version.route' -import { Route as ParamsPsWildcardIndexRouteImport } from './routes/params-ps/wildcard/index' -import { Route as ParamsPsWildcardSplatRouteImport } from './routes/params-ps/wildcard/$' -import { Route as ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport } from './routes/params-ps/wildcard/prefix@대{$}' -import { Route as ParamsPsWildcardPrefixChar123Char125RouteImport } from './routes/params-ps/wildcard/prefix{$}' -import { Route as ParamsPsWildcardChar123Char125suffixRouteImport } from './routes/params-ps/wildcard/{$}suffix' -import { Route as ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport } from './routes/params-ps/wildcard/{$}suffix@대' -import { Route as ParamsSingleValueRouteImport } from './routes/params.single.$value' -import { Route as PathlessLayoutLayoutIndexRouteImport } from './routes/pathless-layout/_layout/index' -import { Route as PathlessLayoutLayoutChildRouteImport } from './routes/pathless-layout/_layout/child' -import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' +import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' +import { Route as groupInsideRouteImport } from './routes/(group)/inside' +import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' +import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' +import { Route as RelativeUseNavigateRouteRouteImport } from './routes/relative/useNavigate/route' +import { Route as RelativeLinkRouteRouteImport } from './routes/relative/link/route' +import { Route as PathlessLayoutLayoutRouteRouteImport } from './routes/pathless-layout/_layout/route' +import { Route as ParamsPsStrictFalseRouteRouteImport } from './routes/params-ps/strict-false/route' +import { Route as ParamsPsNonNestedRouteRouteImport } from './routes/params-ps/non-nested/route' +import { Route as NonNestedSuffixRouteRouteImport } from './routes/non-nested/suffix/route' +import { Route as NonNestedPrefixRouteRouteImport } from './routes/non-nested/prefix/route' +import { Route as NonNestedPathRouteRouteImport } from './routes/non-nested/path/route' +import { Route as NonNestedNamedRouteRouteImport } from './routes/non-nested/named/route' +import { Route as NonNestedDeepRouteRouteImport } from './routes/non-nested/deep/route' +import { Route as FullpathTestLayoutRouteRouteImport } from './routes/fullpath-test/_layout/route' import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index' -import { Route as RedirectTargetDestinationRouteImport } from './routes/redirect/$target/destination' -import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' -import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' -import { Route as RedirectTargetViaRouteRedirectBeforeLoadRouteImport } from './routes/redirect/$target/via-route-redirect-beforeLoad' -import { Route as RedirectTargetViaRouteRedirectLoaderRouteImport } from './routes/redirect/$target/via-route-redirect-loader' -import { Route as RedirectTargetViaRouteApiRedirectBeforeLoadRouteImport } from './routes/redirect/$target/via-routeApi-redirect-beforeLoad' -import { Route as RedirectTargetViaRouteApiRedirectLoaderRouteImport } from './routes/redirect/$target/via-routeApi-redirect-loader' -import { Route as RedirectPreloadFirstRouteImport } from './routes/redirect/preload/first' -import { Route as RedirectPreloadSecondRouteImport } from './routes/redirect/preload/second' -import { Route as RedirectPreloadThirdRouteImport } from './routes/redirect/preload/third' -import { Route as RelativeLinkRelativeLinkARouteImport } from './routes/relative/link/relative-link-a' -import { Route as RelativeLinkRelativeLinkBRouteImport } from './routes/relative/link/relative-link-b' -import { Route as RelativeUseNavigateRelativeUseNavigateARouteImport } from './routes/relative/useNavigate/relative-useNavigate-a' -import { Route as RelativeUseNavigateRelativeUseNavigateBRouteImport } from './routes/relative/useNavigate/relative-useNavigate-b' -import { Route as Char45824Char54620Char48124Char44397WildcardSplatRouteImport } from './routes/대한민국/wildcard.$' +import { Route as PathlessLayoutLayoutIndexRouteImport } from './routes/pathless-layout/_layout/index' +import { Route as ParamsPsWildcardIndexRouteImport } from './routes/params-ps/wildcard/index' +import { Route as ParamsPsNamedIndexRouteImport } from './routes/params-ps/named/index' +import { Route as FullpathTestLayoutIndexRouteImport } from './routes/fullpath-test/_layout/index' import { Route as Char45824Char54620Char48124Char44397Char55357Char56960IdRouteImport } from './routes/대한민국/🚀.$id' -import { Route as NonNestedDeepBazIndexRouteImport } from './routes/non-nested/deep/$baz.index' -import { Route as NonNestedDeepBazBarRouteRouteImport } from './routes/non-nested/deep/$baz_.bar.route' -import { Route as NonNestedNamedBazIndexRouteImport } from './routes/non-nested/named/$baz.index' -import { Route as NonNestedNamedBazFooRouteImport } from './routes/non-nested/named/$baz.foo' -import { Route as NonNestedNamedBazBarRouteImport } from './routes/non-nested/named/$baz_.bar' -import { Route as NonNestedPathBazIndexRouteImport } from './routes/non-nested/path/baz.index' -import { Route as NonNestedPathBazFooRouteImport } from './routes/non-nested/path/baz.foo' -import { Route as NonNestedPathBazBarRouteImport } from './routes/non-nested/path/baz_.bar' -import { Route as NonNestedPrefixPrefixChar123bazChar125IndexRouteImport } from './routes/non-nested/prefix/prefix{$baz}.index' -import { Route as NonNestedPrefixPrefixChar123bazChar125FooRouteImport } from './routes/non-nested/prefix/prefix{$baz}.foo' -import { Route as NonNestedPrefixPrefixChar123bazChar125BarRouteImport } from './routes/non-nested/prefix/prefix{$baz}_.bar' -import { Route as NonNestedSuffixChar123bazChar125suffixIndexRouteImport } from './routes/non-nested/suffix/{$baz}suffix.index' -import { Route as NonNestedSuffixChar123bazChar125suffixFooRouteImport } from './routes/non-nested/suffix/{$baz}suffix.foo' -import { Route as NonNestedSuffixChar123bazChar125suffixBarRouteImport } from './routes/non-nested/suffix/{$baz}suffix_.bar' -import { Route as ParamsPsNamedFooBarRouteRouteImport } from './routes/params-ps/named/$foo/$bar.route' -import { Route as ParamsPsNonNestedFooBarRouteImport } from './routes/params-ps/non-nested/$foo_/$bar' -import { Route as RelativeLinkNestedIndexRouteImport } from './routes/relative/link/nested/index' -import { Route as RelativeLinkPathIndexRouteImport } from './routes/relative/link/path/index' -import { Route as RelativeLinkWithSearchIndexRouteImport } from './routes/relative/link/with-search/index' -import { Route as RelativeUseNavigateNestedIndexRouteImport } from './routes/relative/useNavigate/nested/index' -import { Route as RelativeUseNavigatePathIndexRouteImport } from './routes/relative/useNavigate/path/index' +import { Route as Char45824Char54620Char48124Char44397WildcardSplatRouteImport } from './routes/대한민국/wildcard.$' +import { Route as RelativeUseNavigateRelativeUseNavigateBRouteImport } from './routes/relative/useNavigate/relative-useNavigate-b' +import { Route as RelativeUseNavigateRelativeUseNavigateARouteImport } from './routes/relative/useNavigate/relative-useNavigate-a' +import { Route as RelativeLinkRelativeLinkBRouteImport } from './routes/relative/link/relative-link-b' +import { Route as RelativeLinkRelativeLinkARouteImport } from './routes/relative/link/relative-link-a' +import { Route as RedirectPreloadThirdRouteImport } from './routes/redirect/preload/third' +import { Route as RedirectPreloadSecondRouteImport } from './routes/redirect/preload/second' +import { Route as RedirectPreloadFirstRouteImport } from './routes/redirect/preload/first' +import { Route as RedirectTargetViaRouteApiRedirectLoaderRouteImport } from './routes/redirect/$target/via-routeApi-redirect-loader' +import { Route as RedirectTargetViaRouteApiRedirectBeforeLoadRouteImport } from './routes/redirect/$target/via-routeApi-redirect-beforeLoad' +import { Route as RedirectTargetViaRouteRedirectLoaderRouteImport } from './routes/redirect/$target/via-route-redirect-loader' +import { Route as RedirectTargetViaRouteRedirectBeforeLoadRouteImport } from './routes/redirect/$target/via-route-redirect-beforeLoad' +import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' +import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' +import { Route as RedirectTargetDestinationRouteImport } from './routes/redirect/$target/destination' +import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as PathlessLayoutLayoutChildRouteImport } from './routes/pathless-layout/_layout/child' +import { Route as ParamsSingleValueRouteImport } from './routes/params.single.$value' +import { Route as ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport } from './routes/params-ps/wildcard/{$}suffix@대' +import { Route as ParamsPsWildcardChar123Char125suffixRouteImport } from './routes/params-ps/wildcard/{$}suffix' +import { Route as ParamsPsWildcardPrefixChar123Char125RouteImport } from './routes/params-ps/wildcard/prefix{$}' +import { Route as ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport } from './routes/params-ps/wildcard/prefix@대{$}' +import { Route as ParamsPsWildcardSplatRouteImport } from './routes/params-ps/wildcard/$' +import { Route as ParamsPsNamedChar123fooChar125suffixRouteImport } from './routes/params-ps/named/{$foo}suffix' +import { Route as ParamsPsNamedPrefixChar123fooChar125RouteImport } from './routes/params-ps/named/prefix{$foo}' +import { Route as MasksPublicUsernameRouteImport } from './routes/masks.public.$username' +import { Route as MasksAdminUserIdRouteImport } from './routes/masks.admin.$userId' +import { Route as FullpathTestLayoutIdRouteImport } from './routes/fullpath-test/_layout/$id' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' +import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' +import { Route as ParamsPsStrictFalseVersionRouteRouteImport } from './routes/params-ps/strict-false/$version.route' +import { Route as ParamsPsNonNestedFooRouteRouteImport } from './routes/params-ps/non-nested/$foo_/route' +import { Route as ParamsPsNamedFooRouteRouteImport } from './routes/params-ps/named/$foo/route' +import { Route as NonNestedSuffixChar123bazChar125suffixRouteRouteImport } from './routes/non-nested/suffix/{$baz}suffix.route' +import { Route as NonNestedPrefixPrefixChar123bazChar125RouteRouteImport } from './routes/non-nested/prefix/prefix{$baz}.route' +import { Route as NonNestedPathBazRouteRouteImport } from './routes/non-nested/path/baz.route' +import { Route as NonNestedNamedBazRouteRouteImport } from './routes/non-nested/named/$baz.route' +import { Route as NonNestedDeepBazRouteRouteImport } from './routes/non-nested/deep/$baz.route' import { Route as RelativeUseNavigateWithSearchIndexRouteImport } from './routes/relative/useNavigate/with-search/index' -import { Route as NonNestedDeepBazBarIndexRouteImport } from './routes/non-nested/deep/$baz_.bar.index' -import { Route as NonNestedDeepBazBarFooRouteRouteImport } from './routes/non-nested/deep/$baz_.bar.$foo.route' -import { Route as NonNestedDeepBazBarQuxRouteImport } from './routes/non-nested/deep/$baz_.bar_.qux' -import { Route as ParamsPsNamedFooBarBazRouteImport } from './routes/params-ps/named/$foo/$bar.$baz' -import { Route as RelativeLinkNestedDeepIndexRouteImport } from './routes/relative/link/nested/deep/index' -import { Route as RelativeLinkPathPathIndexRouteImport } from './routes/relative/link/path/$path/index' -import { Route as RelativeUseNavigateNestedDeepIndexRouteImport } from './routes/relative/useNavigate/nested/deep/index' +import { Route as RelativeUseNavigatePathIndexRouteImport } from './routes/relative/useNavigate/path/index' +import { Route as RelativeUseNavigateNestedIndexRouteImport } from './routes/relative/useNavigate/nested/index' +import { Route as RelativeLinkWithSearchIndexRouteImport } from './routes/relative/link/with-search/index' +import { Route as RelativeLinkPathIndexRouteImport } from './routes/relative/link/path/index' +import { Route as RelativeLinkNestedIndexRouteImport } from './routes/relative/link/nested/index' +import { Route as NonNestedSuffixChar123bazChar125suffixIndexRouteImport } from './routes/non-nested/suffix/{$baz}suffix.index' +import { Route as NonNestedPrefixPrefixChar123bazChar125IndexRouteImport } from './routes/non-nested/prefix/prefix{$baz}.index' +import { Route as NonNestedPathBazIndexRouteImport } from './routes/non-nested/path/baz.index' +import { Route as NonNestedNamedBazIndexRouteImport } from './routes/non-nested/named/$baz.index' +import { Route as NonNestedDeepBazIndexRouteImport } from './routes/non-nested/deep/$baz.index' +import { Route as ParamsPsNonNestedFooBarRouteImport } from './routes/params-ps/non-nested/$foo_/$bar' +import { Route as NonNestedSuffixChar123bazChar125suffixBarRouteImport } from './routes/non-nested/suffix/{$baz}suffix_.bar' +import { Route as NonNestedSuffixChar123bazChar125suffixFooRouteImport } from './routes/non-nested/suffix/{$baz}suffix.foo' +import { Route as NonNestedPrefixPrefixChar123bazChar125BarRouteImport } from './routes/non-nested/prefix/prefix{$baz}_.bar' +import { Route as NonNestedPrefixPrefixChar123bazChar125FooRouteImport } from './routes/non-nested/prefix/prefix{$baz}.foo' +import { Route as NonNestedPathBazBarRouteImport } from './routes/non-nested/path/baz_.bar' +import { Route as NonNestedPathBazFooRouteImport } from './routes/non-nested/path/baz.foo' +import { Route as NonNestedNamedBazBarRouteImport } from './routes/non-nested/named/$baz_.bar' +import { Route as NonNestedNamedBazFooRouteImport } from './routes/non-nested/named/$baz.foo' +import { Route as ParamsPsNamedFooBarRouteRouteImport } from './routes/params-ps/named/$foo/$bar.route' +import { Route as NonNestedDeepBazBarRouteRouteImport } from './routes/non-nested/deep/$baz_.bar.route' import { Route as RelativeUseNavigatePathPathIndexRouteImport } from './routes/relative/useNavigate/path/$path/index' +import { Route as RelativeUseNavigateNestedDeepIndexRouteImport } from './routes/relative/useNavigate/nested/deep/index' +import { Route as RelativeLinkPathPathIndexRouteImport } from './routes/relative/link/path/$path/index' +import { Route as RelativeLinkNestedDeepIndexRouteImport } from './routes/relative/link/nested/deep/index' +import { Route as NonNestedDeepBazBarIndexRouteImport } from './routes/non-nested/deep/$baz_.bar.index' +import { Route as ParamsPsNamedFooBarBazRouteImport } from './routes/params-ps/named/$foo/$bar.$baz' +import { Route as NonNestedDeepBazBarQuxRouteImport } from './routes/non-nested/deep/$baz_.bar_.qux' +import { Route as NonNestedDeepBazBarFooRouteRouteImport } from './routes/non-nested/deep/$baz_.bar.$foo.route' import { Route as NonNestedDeepBazBarFooIndexRouteImport } from './routes/non-nested/deep/$baz_.bar.$foo.index' import { Route as NonNestedDeepBazBarFooQuxRouteImport } from './routes/non-nested/deep/$baz_.bar.$foo_.qux' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const AnchorRoute = AnchorRouteImport.update({ - id: '/anchor', - path: '/anchor', - getParentRoute: () => rootRouteImport, -} as any) -const ComponentTypesTestRoute = ComponentTypesTestRouteImport.update({ - id: '/component-types-test', - path: '/component-types-test', - getParentRoute: () => rootRouteImport, -} as any) -const DocumentNavigationRoute = DocumentNavigationRouteImport.update({ - id: '/document-navigation', - path: '/document-navigation', - getParentRoute: () => rootRouteImport, -} as any) -const DocumentNavigationTargetRoute = - DocumentNavigationTargetRouteImport.update({ - id: '/document-navigation-target', - path: '/document-navigation-target', - getParentRoute: () => rootRouteImport, - } as any) -const EditingARoute = EditingARouteImport.update({ - id: '/editing-a', - path: '/editing-a', - getParentRoute: () => rootRouteImport, -} as any) -const EditingBRoute = EditingBRouteImport.update({ - id: '/editing-b', - path: '/editing-b', - getParentRoute: () => rootRouteImport, -} as any) -const FullpathTestRouteRoute = FullpathTestRouteRouteImport.update({ - id: '/fullpath-test', - path: '/fullpath-test', - getParentRoute: () => rootRouteImport, -} as any) -const HistoryBlockingRoute = HistoryBlockingRouteImport.update({ - id: '/history-blocking', - path: '/history-blocking', - getParentRoute: () => rootRouteImport, -} as any) -const HoverPreloadHashRoute = HoverPreloadHashRouteImport.update({ - id: '/hover-preload-hash', - path: '/hover-preload-hash', - getParentRoute: () => rootRouteImport, -} as any) -const LazyErrorRoute = LazyErrorRouteImport.update({ - id: '/lazy-error', - path: '/lazy-error', - getParentRoute: () => rootRouteImport, -} as any).lazy(() => import('./routes/lazy-error.lazy').then((d) => d.Route)) -const MasksRoute = MasksRouteImport.update({ - id: '/masks', - path: '/masks', - getParentRoute: () => rootRouteImport, -} as any) -const NonNestedRouteRoute = NonNestedRouteRouteImport.update({ - id: '/non-nested', - path: '/non-nested', - getParentRoute: () => rootRouteImport, -} as any) -const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ - id: '/notRemountDeps', - path: '/notRemountDeps', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRouteRoute = PathlessLayoutRouteRouteImport.update({ - id: '/pathless-layout', - path: '/pathless-layout', +const RemountDepsRoute = RemountDepsRouteImport.update({ + id: '/remountDeps', + path: '/remountDeps', getParentRoute: () => rootRouteImport, } as any) const PostsRoute = PostsRouteImport.update({ @@ -218,14 +140,48 @@ const PostsRoute = PostsRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const RemountDepsRoute = RemountDepsRouteImport.update({ - id: '/remountDeps', - path: '/remountDeps', +const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ + id: '/notRemountDeps', + path: '/notRemountDeps', getParentRoute: () => rootRouteImport, } as any) -const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ - id: '/search-params', - path: '/search-params', +const MasksRoute = MasksRouteImport.update({ + id: '/masks', + path: '/masks', + getParentRoute: () => rootRouteImport, +} as any) +const LazyErrorRoute = LazyErrorRouteImport.update({ + id: '/lazy-error', + path: '/lazy-error', + getParentRoute: () => rootRouteImport, +} as any).lazy(() => import('./routes/lazy-error.lazy').then((d) => d.Route)) +const HoverPreloadHashRoute = HoverPreloadHashRouteImport.update({ + id: '/hover-preload-hash', + path: '/hover-preload-hash', + getParentRoute: () => rootRouteImport, +} as any) +const EditingBRoute = EditingBRouteImport.update({ + id: '/editing-b', + path: '/editing-b', + getParentRoute: () => rootRouteImport, +} as any) +const EditingARoute = EditingARouteImport.update({ + id: '/editing-a', + path: '/editing-a', + getParentRoute: () => rootRouteImport, +} as any) +const ComponentTypesTestRoute = ComponentTypesTestRouteImport.update({ + id: '/component-types-test', + path: '/component-types-test', + getParentRoute: () => rootRouteImport, +} as any) +const AnchorRoute = AnchorRouteImport.update({ + id: '/anchor', + path: '/anchor', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', getParentRoute: () => rootRouteImport, } as any) const Char45824Char54620Char48124Char44397RouteRoute = @@ -234,21 +190,81 @@ const Char45824Char54620Char48124Char44397RouteRoute = path: '/대한민국', getParentRoute: () => rootRouteImport, } as any) -const anotherGroupOnlyrouteinsideRoute = - anotherGroupOnlyrouteinsideRouteImport.update({ - id: '/(another-group)/onlyrouteinside', - path: '/onlyrouteinside', - getParentRoute: () => rootRouteImport, - } as any) -const groupLayoutRoute = groupLayoutRouteImport.update({ - id: '/(group)/_layout', +const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ + id: '/search-params', + path: '/search-params', getParentRoute: () => rootRouteImport, } as any) -const groupInsideRoute = groupInsideRouteImport.update({ - id: '/(group)/inside', - path: '/inside', +const PathlessLayoutRouteRoute = PathlessLayoutRouteRouteImport.update({ + id: '/pathless-layout', + path: '/pathless-layout', getParentRoute: () => rootRouteImport, } as any) +const NonNestedRouteRoute = NonNestedRouteRouteImport.update({ + id: '/non-nested', + path: '/non-nested', + getParentRoute: () => rootRouteImport, +} as any) +const FullpathTestRouteRoute = FullpathTestRouteRouteImport.update({ + id: '/fullpath-test', + path: '/fullpath-test', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RelativeIndexRoute = RelativeIndexRouteImport.update({ + id: '/relative/', + path: '/relative/', + getParentRoute: () => rootRouteImport, +} as any) +const RedirectIndexRoute = RedirectIndexRouteImport.update({ + id: '/redirect/', + path: '/redirect/', + getParentRoute: () => rootRouteImport, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const ParamsPsIndexRoute = ParamsPsIndexRouteImport.update({ + id: '/params-ps/', + path: '/params-ps/', + getParentRoute: () => rootRouteImport, +} as any) +const StructuralSharingEnabledRoute = + StructuralSharingEnabledRouteImport.update({ + id: '/structural-sharing/$enabled', + path: '/structural-sharing/$enabled', + getParentRoute: () => rootRouteImport, + } as any) +const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ + id: '/default', + path: '/default', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RedirectTargetRoute = RedirectTargetRouteImport.update({ + id: '/redirect/$target', + path: '/redirect/$target', + getParentRoute: () => rootRouteImport, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, +} as any) const groupLazyinsideRoute = groupLazyinsideRouteImport .update({ id: '/(group)/lazyinside', @@ -256,27 +272,51 @@ const groupLazyinsideRoute = groupLazyinsideRouteImport getParentRoute: () => rootRouteImport, } as any) .lazy(() => import('./routes/(group)/lazyinside.lazy').then((d) => d.Route)) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const groupInsideRoute = groupInsideRouteImport.update({ + id: '/(group)/inside', + path: '/inside', + getParentRoute: () => rootRouteImport, } as any) -const FullpathTestLayoutRouteRoute = FullpathTestLayoutRouteRouteImport.update({ - id: '/_layout', - getParentRoute: () => FullpathTestRouteRoute, +const groupLayoutRoute = groupLayoutRouteImport.update({ + id: '/(group)/_layout', + getParentRoute: () => rootRouteImport, } as any) -const NonNestedDeepRouteRoute = NonNestedDeepRouteRouteImport.update({ - id: '/deep', - path: '/deep', - getParentRoute: () => NonNestedRouteRoute, +const anotherGroupOnlyrouteinsideRoute = + anotherGroupOnlyrouteinsideRouteImport.update({ + id: '/(another-group)/onlyrouteinside', + path: '/onlyrouteinside', + getParentRoute: () => rootRouteImport, + } as any) +const RelativeUseNavigateRouteRoute = + RelativeUseNavigateRouteRouteImport.update({ + id: '/relative/useNavigate', + path: '/relative/useNavigate', + getParentRoute: () => rootRouteImport, + } as any) +const RelativeLinkRouteRoute = RelativeLinkRouteRouteImport.update({ + id: '/relative/link', + path: '/relative/link', + getParentRoute: () => rootRouteImport, } as any) -const NonNestedNamedRouteRoute = NonNestedNamedRouteRouteImport.update({ - id: '/named', - path: '/named', - getParentRoute: () => NonNestedRouteRoute, +const PathlessLayoutLayoutRouteRoute = + PathlessLayoutLayoutRouteRouteImport.update({ + id: '/_layout', + getParentRoute: () => PathlessLayoutRouteRoute, + } as any) +const ParamsPsStrictFalseRouteRoute = + ParamsPsStrictFalseRouteRouteImport.update({ + id: '/params-ps/strict-false', + path: '/params-ps/strict-false', + getParentRoute: () => rootRouteImport, + } as any) +const ParamsPsNonNestedRouteRoute = ParamsPsNonNestedRouteRouteImport.update({ + id: '/params-ps/non-nested', + path: '/params-ps/non-nested', + getParentRoute: () => rootRouteImport, } as any) -const NonNestedPathRouteRoute = NonNestedPathRouteRouteImport.update({ - id: '/path', - path: '/path', +const NonNestedSuffixRouteRoute = NonNestedSuffixRouteRouteImport.update({ + id: '/suffix', + path: '/suffix', getParentRoute: () => NonNestedRouteRoute, } as any) const NonNestedPrefixRouteRoute = NonNestedPrefixRouteRouteImport.update({ @@ -284,223 +324,29 @@ const NonNestedPrefixRouteRoute = NonNestedPrefixRouteRouteImport.update({ path: '/prefix', getParentRoute: () => NonNestedRouteRoute, } as any) -const NonNestedSuffixRouteRoute = NonNestedSuffixRouteRouteImport.update({ - id: '/suffix', - path: '/suffix', +const NonNestedPathRouteRoute = NonNestedPathRouteRouteImport.update({ + id: '/path', + path: '/path', getParentRoute: () => NonNestedRouteRoute, } as any) -const ParamsPsIndexRoute = ParamsPsIndexRouteImport.update({ - id: '/params-ps/', - path: '/params-ps/', - getParentRoute: () => rootRouteImport, +const NonNestedNamedRouteRoute = NonNestedNamedRouteRouteImport.update({ + id: '/named', + path: '/named', + getParentRoute: () => NonNestedRouteRoute, } as any) -const ParamsPsNonNestedRouteRoute = ParamsPsNonNestedRouteRouteImport.update({ - id: '/params-ps/non-nested', - path: '/params-ps/non-nested', - getParentRoute: () => rootRouteImport, +const NonNestedDeepRouteRoute = NonNestedDeepRouteRouteImport.update({ + id: '/deep', + path: '/deep', + getParentRoute: () => NonNestedRouteRoute, } as any) -const ParamsPsStrictFalseRouteRoute = - ParamsPsStrictFalseRouteRouteImport.update({ - id: '/params-ps/strict-false', - path: '/params-ps/strict-false', - getParentRoute: () => rootRouteImport, - } as any) -const PathlessLayoutLayoutRouteRoute = - PathlessLayoutLayoutRouteRouteImport.update({ - id: '/_layout', - getParentRoute: () => PathlessLayoutRouteRoute, - } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const FullpathTestLayoutRouteRoute = FullpathTestLayoutRouteRouteImport.update({ + id: '/_layout', + getParentRoute: () => FullpathTestRouteRoute, +} as any) +const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const RedirectIndexRoute = RedirectIndexRouteImport.update({ - id: '/redirect/', - path: '/redirect/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectTargetRoute = RedirectTargetRouteImport.update({ - id: '/redirect/$target', - path: '/redirect/$target', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeIndexRoute = RelativeIndexRouteImport.update({ - id: '/relative/', - path: '/relative/', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeLinkRouteRoute = RelativeLinkRouteRouteImport.update({ - id: '/relative/link', - path: '/relative/link', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeUseNavigateRouteRoute = - RelativeUseNavigateRouteRouteImport.update({ - id: '/relative/useNavigate', - path: '/relative/useNavigate', - getParentRoute: () => rootRouteImport, - } as any) -const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ - id: '/default', - path: '/default', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const StructuralSharingEnabledRoute = - StructuralSharingEnabledRouteImport.update({ - id: '/structural-sharing/$enabled', - path: '/structural-sharing/$enabled', - getParentRoute: () => rootRouteImport, - } as any) -const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ - id: '/insidelayout', - path: '/insidelayout', - getParentRoute: () => groupLayoutRoute, -} as any) -const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ - id: '/(group)/subfolder/inside', - path: '/subfolder/inside', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, -} as any) -const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => LayoutLayout2Route, -} as any) -const FullpathTestLayoutIndexRoute = FullpathTestLayoutIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => FullpathTestLayoutRouteRoute, -} as any) -const FullpathTestLayoutIdRoute = FullpathTestLayoutIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => FullpathTestLayoutRouteRoute, -} as any) -const MasksAdminUserIdRoute = MasksAdminUserIdRouteImport.update({ - id: '/admin/$userId', - path: '/admin/$userId', - getParentRoute: () => MasksRoute, -} as any) -const MasksPublicUsernameRoute = MasksPublicUsernameRouteImport.update({ - id: '/public/$username', - path: '/public/$username', - getParentRoute: () => MasksRoute, -} as any) -const NonNestedDeepBazRouteRoute = NonNestedDeepBazRouteRouteImport.update({ - id: '/$baz', - path: '/$baz', - getParentRoute: () => NonNestedDeepRouteRoute, -} as any) -const NonNestedNamedBazRouteRoute = NonNestedNamedBazRouteRouteImport.update({ - id: '/$baz', - path: '/$baz', - getParentRoute: () => NonNestedNamedRouteRoute, -} as any) -const NonNestedPathBazRouteRoute = NonNestedPathBazRouteRouteImport.update({ - id: '/baz', - path: '/baz', - getParentRoute: () => NonNestedPathRouteRoute, -} as any) -const NonNestedPrefixPrefixChar123bazChar125RouteRoute = - NonNestedPrefixPrefixChar123bazChar125RouteRouteImport.update({ - id: '/prefix{$baz}', - path: '/prefix{$baz}', - getParentRoute: () => NonNestedPrefixRouteRoute, - } as any) -const NonNestedSuffixChar123bazChar125suffixRouteRoute = - NonNestedSuffixChar123bazChar125suffixRouteRouteImport.update({ - id: '/{$baz}suffix', - path: '/{$baz}suffix', - getParentRoute: () => NonNestedSuffixRouteRoute, - } as any) -const ParamsPsNamedIndexRoute = ParamsPsNamedIndexRouteImport.update({ - id: '/params-ps/named/', - path: '/params-ps/named/', - getParentRoute: () => rootRouteImport, -} as any) -const ParamsPsNamedFooRouteRoute = ParamsPsNamedFooRouteRouteImport.update({ - id: '/params-ps/named/$foo', - path: '/params-ps/named/$foo', - getParentRoute: () => rootRouteImport, -} as any) -const ParamsPsNamedPrefixChar123fooChar125Route = - ParamsPsNamedPrefixChar123fooChar125RouteImport.update({ - id: '/params-ps/named/prefix{$foo}', - path: '/params-ps/named/prefix{$foo}', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsPsNamedChar123fooChar125suffixRoute = - ParamsPsNamedChar123fooChar125suffixRouteImport.update({ - id: '/params-ps/named/{$foo}suffix', - path: '/params-ps/named/{$foo}suffix', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsPsNonNestedFooRouteRoute = - ParamsPsNonNestedFooRouteRouteImport.update({ - id: '/$foo_', - path: '/$foo', - getParentRoute: () => ParamsPsNonNestedRouteRoute, - } as any) -const ParamsPsStrictFalseVersionRouteRoute = - ParamsPsStrictFalseVersionRouteRouteImport.update({ - id: '/$version', - path: '/$version', - getParentRoute: () => ParamsPsStrictFalseRouteRoute, - } as any) -const ParamsPsWildcardIndexRoute = ParamsPsWildcardIndexRouteImport.update({ - id: '/params-ps/wildcard/', - path: '/params-ps/wildcard/', - getParentRoute: () => rootRouteImport, -} as any) -const ParamsPsWildcardSplatRoute = ParamsPsWildcardSplatRouteImport.update({ - id: '/params-ps/wildcard/$', - path: '/params-ps/wildcard/$', - getParentRoute: () => rootRouteImport, -} as any) -const ParamsPsWildcardPrefixAtChar45824Char123Char125Route = - ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport.update({ - id: '/params-ps/wildcard/prefix@대{$}', - path: '/params-ps/wildcard/prefix@대{$}', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsPsWildcardPrefixChar123Char125Route = - ParamsPsWildcardPrefixChar123Char125RouteImport.update({ - id: '/params-ps/wildcard/prefix{$}', - path: '/params-ps/wildcard/prefix{$}', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsPsWildcardChar123Char125suffixRoute = - ParamsPsWildcardChar123Char125suffixRouteImport.update({ - id: '/params-ps/wildcard/{$}suffix', - path: '/params-ps/wildcard/{$}suffix', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsPsWildcardChar123Char125suffixAtChar45824Route = - ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport.update({ - id: '/params-ps/wildcard/{$}suffix@대', - path: '/params-ps/wildcard/{$}suffix@대', - getParentRoute: () => rootRouteImport, - } as any) -const ParamsSingleValueRoute = ParamsSingleValueRouteImport.update({ - id: '/params/single/$value', - path: '/params/single/$value', - getParentRoute: () => rootRouteImport, + getParentRoute: () => RedirectTargetRoute, } as any) const PathlessLayoutLayoutIndexRoute = PathlessLayoutLayoutIndexRouteImport.update({ @@ -508,49 +354,76 @@ const PathlessLayoutLayoutIndexRoute = path: '/', getParentRoute: () => PathlessLayoutLayoutRouteRoute, } as any) -const PathlessLayoutLayoutChildRoute = - PathlessLayoutLayoutChildRouteImport.update({ - id: '/child', - path: '/child', - getParentRoute: () => PathlessLayoutLayoutRouteRoute, - } as any) -const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ - id: '/posts_/$postId/edit', - path: '/posts/$postId/edit', +const ParamsPsWildcardIndexRoute = ParamsPsWildcardIndexRouteImport.update({ + id: '/params-ps/wildcard/', + path: '/params-ps/wildcard/', getParentRoute: () => rootRouteImport, } as any) -const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({ +const ParamsPsNamedIndexRoute = ParamsPsNamedIndexRouteImport.update({ + id: '/params-ps/named/', + path: '/params-ps/named/', + getParentRoute: () => rootRouteImport, +} as any) +const FullpathTestLayoutIndexRoute = FullpathTestLayoutIndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => RedirectTargetRoute, + getParentRoute: () => FullpathTestLayoutRouteRoute, } as any) -const RedirectTargetDestinationRoute = - RedirectTargetDestinationRouteImport.update({ - id: '/destination', - path: '/destination', - getParentRoute: () => RedirectTargetRoute, +const Char45824Char54620Char48124Char44397Char55357Char56960IdRoute = + Char45824Char54620Char48124Char44397Char55357Char56960IdRouteImport.update({ + id: '/🚀/$id', + path: '/🚀/$id', + getParentRoute: () => Char45824Char54620Char48124Char44397RouteRoute, } as any) -const RedirectTargetViaBeforeLoadRoute = - RedirectTargetViaBeforeLoadRouteImport.update({ - id: '/via-beforeLoad', - path: '/via-beforeLoad', - getParentRoute: () => RedirectTargetRoute, +const Char45824Char54620Char48124Char44397WildcardSplatRoute = + Char45824Char54620Char48124Char44397WildcardSplatRouteImport.update({ + id: '/wildcard/$', + path: '/wildcard/$', + getParentRoute: () => Char45824Char54620Char48124Char44397RouteRoute, } as any) -const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ - id: '/via-loader', - path: '/via-loader', - getParentRoute: () => RedirectTargetRoute, +const RelativeUseNavigateRelativeUseNavigateBRoute = + RelativeUseNavigateRelativeUseNavigateBRouteImport.update({ + id: '/relative-useNavigate-b', + path: '/relative-useNavigate-b', + getParentRoute: () => RelativeUseNavigateRouteRoute, + } as any) +const RelativeUseNavigateRelativeUseNavigateARoute = + RelativeUseNavigateRelativeUseNavigateARouteImport.update({ + id: '/relative-useNavigate-a', + path: '/relative-useNavigate-a', + getParentRoute: () => RelativeUseNavigateRouteRoute, + } as any) +const RelativeLinkRelativeLinkBRoute = + RelativeLinkRelativeLinkBRouteImport.update({ + id: '/relative-link-b', + path: '/relative-link-b', + getParentRoute: () => RelativeLinkRouteRoute, + } as any) +const RelativeLinkRelativeLinkARoute = + RelativeLinkRelativeLinkARouteImport.update({ + id: '/relative-link-a', + path: '/relative-link-a', + getParentRoute: () => RelativeLinkRouteRoute, + } as any) +const RedirectPreloadThirdRoute = RedirectPreloadThirdRouteImport.update({ + id: '/redirect/preload/third', + path: '/redirect/preload/third', + getParentRoute: () => rootRouteImport, } as any) -const RedirectTargetViaRouteRedirectBeforeLoadRoute = - RedirectTargetViaRouteRedirectBeforeLoadRouteImport.update({ - id: '/via-route-redirect-beforeLoad', - path: '/via-route-redirect-beforeLoad', - getParentRoute: () => RedirectTargetRoute, - } as any) -const RedirectTargetViaRouteRedirectLoaderRoute = - RedirectTargetViaRouteRedirectLoaderRouteImport.update({ - id: '/via-route-redirect-loader', - path: '/via-route-redirect-loader', +const RedirectPreloadSecondRoute = RedirectPreloadSecondRouteImport.update({ + id: '/redirect/preload/second', + path: '/redirect/preload/second', + getParentRoute: () => rootRouteImport, +} as any) +const RedirectPreloadFirstRoute = RedirectPreloadFirstRouteImport.update({ + id: '/redirect/preload/first', + path: '/redirect/preload/first', + getParentRoute: () => rootRouteImport, +} as any) +const RedirectTargetViaRouteApiRedirectLoaderRoute = + RedirectTargetViaRouteApiRedirectLoaderRouteImport.update({ + id: '/via-routeApi-redirect-loader', + path: '/via-routeApi-redirect-loader', getParentRoute: () => RedirectTargetRoute, } as any) const RedirectTargetViaRouteApiRedirectBeforeLoadRoute = @@ -559,171 +432,175 @@ const RedirectTargetViaRouteApiRedirectBeforeLoadRoute = path: '/via-routeApi-redirect-beforeLoad', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectTargetViaRouteApiRedirectLoaderRoute = - RedirectTargetViaRouteApiRedirectLoaderRouteImport.update({ - id: '/via-routeApi-redirect-loader', - path: '/via-routeApi-redirect-loader', +const RedirectTargetViaRouteRedirectLoaderRoute = + RedirectTargetViaRouteRedirectLoaderRouteImport.update({ + id: '/via-route-redirect-loader', + path: '/via-route-redirect-loader', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectPreloadFirstRoute = RedirectPreloadFirstRouteImport.update({ - id: '/redirect/preload/first', - path: '/redirect/preload/first', +const RedirectTargetViaRouteRedirectBeforeLoadRoute = + RedirectTargetViaRouteRedirectBeforeLoadRouteImport.update({ + id: '/via-route-redirect-beforeLoad', + path: '/via-route-redirect-beforeLoad', + getParentRoute: () => RedirectTargetRoute, + } as any) +const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ + id: '/via-loader', + path: '/via-loader', + getParentRoute: () => RedirectTargetRoute, +} as any) +const RedirectTargetViaBeforeLoadRoute = + RedirectTargetViaBeforeLoadRouteImport.update({ + id: '/via-beforeLoad', + path: '/via-beforeLoad', + getParentRoute: () => RedirectTargetRoute, + } as any) +const RedirectTargetDestinationRoute = + RedirectTargetDestinationRouteImport.update({ + id: '/destination', + path: '/destination', + getParentRoute: () => RedirectTargetRoute, + } as any) +const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ + id: '/posts_/$postId/edit', + path: '/posts/$postId/edit', getParentRoute: () => rootRouteImport, } as any) -const RedirectPreloadSecondRoute = RedirectPreloadSecondRouteImport.update({ - id: '/redirect/preload/second', - path: '/redirect/preload/second', +const PathlessLayoutLayoutChildRoute = + PathlessLayoutLayoutChildRouteImport.update({ + id: '/child', + path: '/child', + getParentRoute: () => PathlessLayoutLayoutRouteRoute, + } as any) +const ParamsSingleValueRoute = ParamsSingleValueRouteImport.update({ + id: '/params/single/$value', + path: '/params/single/$value', getParentRoute: () => rootRouteImport, } as any) -const RedirectPreloadThirdRoute = RedirectPreloadThirdRouteImport.update({ - id: '/redirect/preload/third', - path: '/redirect/preload/third', +const ParamsPsWildcardChar123Char125suffixAtChar45824Route = + ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport.update({ + id: '/params-ps/wildcard/{$}suffix@대', + path: '/params-ps/wildcard/{$}suffix@대', + getParentRoute: () => rootRouteImport, + } as any) +const ParamsPsWildcardChar123Char125suffixRoute = + ParamsPsWildcardChar123Char125suffixRouteImport.update({ + id: '/params-ps/wildcard/{$}suffix', + path: '/params-ps/wildcard/{$}suffix', + getParentRoute: () => rootRouteImport, + } as any) +const ParamsPsWildcardPrefixChar123Char125Route = + ParamsPsWildcardPrefixChar123Char125RouteImport.update({ + id: '/params-ps/wildcard/prefix{$}', + path: '/params-ps/wildcard/prefix{$}', + getParentRoute: () => rootRouteImport, + } as any) +const ParamsPsWildcardPrefixAtChar45824Char123Char125Route = + ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport.update({ + id: '/params-ps/wildcard/prefix@대{$}', + path: '/params-ps/wildcard/prefix@대{$}', + getParentRoute: () => rootRouteImport, + } as any) +const ParamsPsWildcardSplatRoute = ParamsPsWildcardSplatRouteImport.update({ + id: '/params-ps/wildcard/$', + path: '/params-ps/wildcard/$', getParentRoute: () => rootRouteImport, } as any) -const RelativeLinkRelativeLinkARoute = - RelativeLinkRelativeLinkARouteImport.update({ - id: '/relative-link-a', - path: '/relative-link-a', - getParentRoute: () => RelativeLinkRouteRoute, +const ParamsPsNamedChar123fooChar125suffixRoute = + ParamsPsNamedChar123fooChar125suffixRouteImport.update({ + id: '/params-ps/named/{$foo}suffix', + path: '/params-ps/named/{$foo}suffix', + getParentRoute: () => rootRouteImport, } as any) -const RelativeLinkRelativeLinkBRoute = - RelativeLinkRelativeLinkBRouteImport.update({ - id: '/relative-link-b', - path: '/relative-link-b', - getParentRoute: () => RelativeLinkRouteRoute, +const ParamsPsNamedPrefixChar123fooChar125Route = + ParamsPsNamedPrefixChar123fooChar125RouteImport.update({ + id: '/params-ps/named/prefix{$foo}', + path: '/params-ps/named/prefix{$foo}', + getParentRoute: () => rootRouteImport, } as any) -const RelativeUseNavigateRelativeUseNavigateARoute = - RelativeUseNavigateRelativeUseNavigateARouteImport.update({ - id: '/relative-useNavigate-a', - path: '/relative-useNavigate-a', - getParentRoute: () => RelativeUseNavigateRouteRoute, - } as any) -const RelativeUseNavigateRelativeUseNavigateBRoute = - RelativeUseNavigateRelativeUseNavigateBRouteImport.update({ - id: '/relative-useNavigate-b', - path: '/relative-useNavigate-b', - getParentRoute: () => RelativeUseNavigateRouteRoute, - } as any) -const Char45824Char54620Char48124Char44397WildcardSplatRoute = - Char45824Char54620Char48124Char44397WildcardSplatRouteImport.update({ - id: '/wildcard/$', - path: '/wildcard/$', - getParentRoute: () => Char45824Char54620Char48124Char44397RouteRoute, - } as any) -const Char45824Char54620Char48124Char44397Char55357Char56960IdRoute = - Char45824Char54620Char48124Char44397Char55357Char56960IdRouteImport.update({ - id: '/🚀/$id', - path: '/🚀/$id', - getParentRoute: () => Char45824Char54620Char48124Char44397RouteRoute, - } as any) -const NonNestedDeepBazIndexRoute = NonNestedDeepBazIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NonNestedDeepBazRouteRoute, +const MasksPublicUsernameRoute = MasksPublicUsernameRouteImport.update({ + id: '/public/$username', + path: '/public/$username', + getParentRoute: () => MasksRoute, } as any) -const NonNestedDeepBazBarRouteRoute = - NonNestedDeepBazBarRouteRouteImport.update({ - id: '/$baz_/bar', - path: '/$baz/bar', - getParentRoute: () => NonNestedDeepRouteRoute, - } as any) -const NonNestedNamedBazIndexRoute = NonNestedNamedBazIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NonNestedNamedBazRouteRoute, +const MasksAdminUserIdRoute = MasksAdminUserIdRouteImport.update({ + id: '/admin/$userId', + path: '/admin/$userId', + getParentRoute: () => MasksRoute, } as any) -const NonNestedNamedBazFooRoute = NonNestedNamedBazFooRouteImport.update({ - id: '/foo', - path: '/foo', - getParentRoute: () => NonNestedNamedBazRouteRoute, +const FullpathTestLayoutIdRoute = FullpathTestLayoutIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => FullpathTestLayoutRouteRoute, } as any) -const NonNestedNamedBazBarRoute = NonNestedNamedBazBarRouteImport.update({ - id: '/$baz_/bar', - path: '/$baz/bar', - getParentRoute: () => NonNestedNamedRouteRoute, +const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => LayoutLayout2Route, } as any) -const NonNestedPathBazIndexRoute = NonNestedPathBazIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NonNestedPathBazRouteRoute, +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any) -const NonNestedPathBazFooRoute = NonNestedPathBazFooRouteImport.update({ - id: '/foo', - path: '/foo', - getParentRoute: () => NonNestedPathBazRouteRoute, +const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ + id: '/(group)/subfolder/inside', + path: '/subfolder/inside', + getParentRoute: () => rootRouteImport, } as any) -const NonNestedPathBazBarRoute = NonNestedPathBazBarRouteImport.update({ - id: '/baz_/bar', - path: '/baz/bar', - getParentRoute: () => NonNestedPathRouteRoute, +const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ + id: '/insidelayout', + path: '/insidelayout', + getParentRoute: () => groupLayoutRoute, } as any) -const NonNestedPrefixPrefixChar123bazChar125IndexRoute = - NonNestedPrefixPrefixChar123bazChar125IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute, +const ParamsPsStrictFalseVersionRouteRoute = + ParamsPsStrictFalseVersionRouteRouteImport.update({ + id: '/$version', + path: '/$version', + getParentRoute: () => ParamsPsStrictFalseRouteRoute, } as any) -const NonNestedPrefixPrefixChar123bazChar125FooRoute = - NonNestedPrefixPrefixChar123bazChar125FooRouteImport.update({ - id: '/foo', - path: '/foo', - getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute, +const ParamsPsNonNestedFooRouteRoute = + ParamsPsNonNestedFooRouteRouteImport.update({ + id: '/$foo_', + path: '/$foo', + getParentRoute: () => ParamsPsNonNestedRouteRoute, } as any) -const NonNestedPrefixPrefixChar123bazChar125BarRoute = - NonNestedPrefixPrefixChar123bazChar125BarRouteImport.update({ - id: '/prefix{$baz}_/bar', - path: '/prefix{$baz}/bar', - getParentRoute: () => NonNestedPrefixRouteRoute, - } as any) -const NonNestedSuffixChar123bazChar125suffixIndexRoute = - NonNestedSuffixChar123bazChar125suffixIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute, - } as any) -const NonNestedSuffixChar123bazChar125suffixFooRoute = - NonNestedSuffixChar123bazChar125suffixFooRouteImport.update({ - id: '/foo', - path: '/foo', - getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute, - } as any) -const NonNestedSuffixChar123bazChar125suffixBarRoute = - NonNestedSuffixChar123bazChar125suffixBarRouteImport.update({ - id: '/{$baz}suffix_/bar', - path: '/{$baz}suffix/bar', +const ParamsPsNamedFooRouteRoute = ParamsPsNamedFooRouteRouteImport.update({ + id: '/params-ps/named/$foo', + path: '/params-ps/named/$foo', + getParentRoute: () => rootRouteImport, +} as any) +const NonNestedSuffixChar123bazChar125suffixRouteRoute = + NonNestedSuffixChar123bazChar125suffixRouteRouteImport.update({ + id: '/{$baz}suffix', + path: '/{$baz}suffix', getParentRoute: () => NonNestedSuffixRouteRoute, } as any) -const ParamsPsNamedFooBarRouteRoute = - ParamsPsNamedFooBarRouteRouteImport.update({ - id: '/$bar', - path: '/$bar', - getParentRoute: () => ParamsPsNamedFooRouteRoute, +const NonNestedPrefixPrefixChar123bazChar125RouteRoute = + NonNestedPrefixPrefixChar123bazChar125RouteRouteImport.update({ + id: '/prefix{$baz}', + path: '/prefix{$baz}', + getParentRoute: () => NonNestedPrefixRouteRoute, } as any) -const ParamsPsNonNestedFooBarRoute = ParamsPsNonNestedFooBarRouteImport.update({ - id: '/$bar', - path: '/$bar', - getParentRoute: () => ParamsPsNonNestedFooRouteRoute, +const NonNestedPathBazRouteRoute = NonNestedPathBazRouteRouteImport.update({ + id: '/baz', + path: '/baz', + getParentRoute: () => NonNestedPathRouteRoute, } as any) -const RelativeLinkNestedIndexRoute = RelativeLinkNestedIndexRouteImport.update({ - id: '/nested/', - path: '/nested/', - getParentRoute: () => RelativeLinkRouteRoute, +const NonNestedNamedBazRouteRoute = NonNestedNamedBazRouteRouteImport.update({ + id: '/$baz', + path: '/$baz', + getParentRoute: () => NonNestedNamedRouteRoute, } as any) -const RelativeLinkPathIndexRoute = RelativeLinkPathIndexRouteImport.update({ - id: '/path/', - path: '/path/', - getParentRoute: () => RelativeLinkRouteRoute, +const NonNestedDeepBazRouteRoute = NonNestedDeepBazRouteRouteImport.update({ + id: '/$baz', + path: '/$baz', + getParentRoute: () => NonNestedDeepRouteRoute, } as any) -const RelativeLinkWithSearchIndexRoute = - RelativeLinkWithSearchIndexRouteImport.update({ +const RelativeUseNavigateWithSearchIndexRoute = + RelativeUseNavigateWithSearchIndexRouteImport.update({ id: '/with-search/', path: '/with-search/', - getParentRoute: () => RelativeLinkRouteRoute, - } as any) -const RelativeUseNavigateNestedIndexRoute = - RelativeUseNavigateNestedIndexRouteImport.update({ - id: '/nested/', - path: '/nested/', getParentRoute: () => RelativeUseNavigateRouteRoute, } as any) const RelativeUseNavigatePathIndexRoute = @@ -732,45 +609,121 @@ const RelativeUseNavigatePathIndexRoute = path: '/path/', getParentRoute: () => RelativeUseNavigateRouteRoute, } as any) -const RelativeUseNavigateWithSearchIndexRoute = - RelativeUseNavigateWithSearchIndexRouteImport.update({ - id: '/with-search/', - path: '/with-search/', +const RelativeUseNavigateNestedIndexRoute = + RelativeUseNavigateNestedIndexRouteImport.update({ + id: '/nested/', + path: '/nested/', getParentRoute: () => RelativeUseNavigateRouteRoute, } as any) -const NonNestedDeepBazBarIndexRoute = - NonNestedDeepBazBarIndexRouteImport.update({ +const RelativeLinkWithSearchIndexRoute = + RelativeLinkWithSearchIndexRouteImport.update({ + id: '/with-search/', + path: '/with-search/', + getParentRoute: () => RelativeLinkRouteRoute, + } as any) +const RelativeLinkPathIndexRoute = RelativeLinkPathIndexRouteImport.update({ + id: '/path/', + path: '/path/', + getParentRoute: () => RelativeLinkRouteRoute, +} as any) +const RelativeLinkNestedIndexRoute = RelativeLinkNestedIndexRouteImport.update({ + id: '/nested/', + path: '/nested/', + getParentRoute: () => RelativeLinkRouteRoute, +} as any) +const NonNestedSuffixChar123bazChar125suffixIndexRoute = + NonNestedSuffixChar123bazChar125suffixIndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => NonNestedDeepBazBarRouteRoute, + getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute, } as any) -const NonNestedDeepBazBarFooRouteRoute = - NonNestedDeepBazBarFooRouteRouteImport.update({ - id: '/$foo', - path: '/$foo', - getParentRoute: () => NonNestedDeepBazBarRouteRoute, +const NonNestedPrefixPrefixChar123bazChar125IndexRoute = + NonNestedPrefixPrefixChar123bazChar125IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute, } as any) -const NonNestedDeepBazBarQuxRoute = NonNestedDeepBazBarQuxRouteImport.update({ - id: '/$baz_/bar_/qux', - path: '/$baz/bar/qux', - getParentRoute: () => NonNestedDeepRouteRoute, +const NonNestedPathBazIndexRoute = NonNestedPathBazIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NonNestedPathBazRouteRoute, } as any) -const ParamsPsNamedFooBarBazRoute = ParamsPsNamedFooBarBazRouteImport.update({ - id: '/$baz', - path: '/$baz', - getParentRoute: () => ParamsPsNamedFooBarRouteRoute, +const NonNestedNamedBazIndexRoute = NonNestedNamedBazIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NonNestedNamedBazRouteRoute, } as any) -const RelativeLinkNestedDeepIndexRoute = - RelativeLinkNestedDeepIndexRouteImport.update({ - id: '/nested/deep/', - path: '/nested/deep/', - getParentRoute: () => RelativeLinkRouteRoute, +const NonNestedDeepBazIndexRoute = NonNestedDeepBazIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NonNestedDeepBazRouteRoute, +} as any) +const ParamsPsNonNestedFooBarRoute = ParamsPsNonNestedFooBarRouteImport.update({ + id: '/$bar', + path: '/$bar', + getParentRoute: () => ParamsPsNonNestedFooRouteRoute, +} as any) +const NonNestedSuffixChar123bazChar125suffixBarRoute = + NonNestedSuffixChar123bazChar125suffixBarRouteImport.update({ + id: '/{$baz}suffix_/bar', + path: '/{$baz}suffix/bar', + getParentRoute: () => NonNestedSuffixRouteRoute, } as any) -const RelativeLinkPathPathIndexRoute = - RelativeLinkPathPathIndexRouteImport.update({ +const NonNestedSuffixChar123bazChar125suffixFooRoute = + NonNestedSuffixChar123bazChar125suffixFooRouteImport.update({ + id: '/foo', + path: '/foo', + getParentRoute: () => NonNestedSuffixChar123bazChar125suffixRouteRoute, + } as any) +const NonNestedPrefixPrefixChar123bazChar125BarRoute = + NonNestedPrefixPrefixChar123bazChar125BarRouteImport.update({ + id: '/prefix{$baz}_/bar', + path: '/prefix{$baz}/bar', + getParentRoute: () => NonNestedPrefixRouteRoute, + } as any) +const NonNestedPrefixPrefixChar123bazChar125FooRoute = + NonNestedPrefixPrefixChar123bazChar125FooRouteImport.update({ + id: '/foo', + path: '/foo', + getParentRoute: () => NonNestedPrefixPrefixChar123bazChar125RouteRoute, + } as any) +const NonNestedPathBazBarRoute = NonNestedPathBazBarRouteImport.update({ + id: '/baz_/bar', + path: '/baz/bar', + getParentRoute: () => NonNestedPathRouteRoute, +} as any) +const NonNestedPathBazFooRoute = NonNestedPathBazFooRouteImport.update({ + id: '/foo', + path: '/foo', + getParentRoute: () => NonNestedPathBazRouteRoute, +} as any) +const NonNestedNamedBazBarRoute = NonNestedNamedBazBarRouteImport.update({ + id: '/$baz_/bar', + path: '/$baz/bar', + getParentRoute: () => NonNestedNamedRouteRoute, +} as any) +const NonNestedNamedBazFooRoute = NonNestedNamedBazFooRouteImport.update({ + id: '/foo', + path: '/foo', + getParentRoute: () => NonNestedNamedBazRouteRoute, +} as any) +const ParamsPsNamedFooBarRouteRoute = + ParamsPsNamedFooBarRouteRouteImport.update({ + id: '/$bar', + path: '/$bar', + getParentRoute: () => ParamsPsNamedFooRouteRoute, + } as any) +const NonNestedDeepBazBarRouteRoute = + NonNestedDeepBazBarRouteRouteImport.update({ + id: '/$baz_/bar', + path: '/$baz/bar', + getParentRoute: () => NonNestedDeepRouteRoute, + } as any) +const RelativeUseNavigatePathPathIndexRoute = + RelativeUseNavigatePathPathIndexRouteImport.update({ id: '/path/$path/', path: '/path/$path/', - getParentRoute: () => RelativeLinkRouteRoute, + getParentRoute: () => RelativeUseNavigateRouteRoute, } as any) const RelativeUseNavigateNestedDeepIndexRoute = RelativeUseNavigateNestedDeepIndexRouteImport.update({ @@ -778,11 +731,39 @@ const RelativeUseNavigateNestedDeepIndexRoute = path: '/nested/deep/', getParentRoute: () => RelativeUseNavigateRouteRoute, } as any) -const RelativeUseNavigatePathPathIndexRoute = - RelativeUseNavigatePathPathIndexRouteImport.update({ +const RelativeLinkPathPathIndexRoute = + RelativeLinkPathPathIndexRouteImport.update({ id: '/path/$path/', path: '/path/$path/', - getParentRoute: () => RelativeUseNavigateRouteRoute, + getParentRoute: () => RelativeLinkRouteRoute, + } as any) +const RelativeLinkNestedDeepIndexRoute = + RelativeLinkNestedDeepIndexRouteImport.update({ + id: '/nested/deep/', + path: '/nested/deep/', + getParentRoute: () => RelativeLinkRouteRoute, + } as any) +const NonNestedDeepBazBarIndexRoute = + NonNestedDeepBazBarIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NonNestedDeepBazBarRouteRoute, + } as any) +const ParamsPsNamedFooBarBazRoute = ParamsPsNamedFooBarBazRouteImport.update({ + id: '/$baz', + path: '/$baz', + getParentRoute: () => ParamsPsNamedFooBarRouteRoute, +} as any) +const NonNestedDeepBazBarQuxRoute = NonNestedDeepBazBarQuxRouteImport.update({ + id: '/$baz_/bar_/qux', + path: '/$baz/bar/qux', + getParentRoute: () => NonNestedDeepRouteRoute, +} as any) +const NonNestedDeepBazBarFooRouteRoute = + NonNestedDeepBazBarFooRouteRouteImport.update({ + id: '/$foo', + path: '/$foo', + getParentRoute: () => NonNestedDeepBazBarRouteRoute, } as any) const NonNestedDeepBazBarFooIndexRoute = NonNestedDeepBazBarFooIndexRouteImport.update({ @@ -806,11 +787,8 @@ export interface FileRoutesByFullPath { '/대한민국': typeof Char45824Char54620Char48124Char44397RouteRouteWithChildren '/anchor': typeof AnchorRoute '/component-types-test': typeof ComponentTypesTestRoute - '/document-navigation': typeof DocumentNavigationRoute - '/document-navigation-target': typeof DocumentNavigationTargetRoute '/editing-a': typeof EditingARoute '/editing-b': typeof EditingBRoute - '/history-blocking': typeof HistoryBlockingRoute '/hover-preload-hash': typeof HoverPreloadHashRoute '/lazy-error': typeof LazyErrorRoute '/masks': typeof MasksRouteWithChildren @@ -925,11 +903,8 @@ export interface FileRoutesByTo { '/대한민국': typeof Char45824Char54620Char48124Char44397RouteRouteWithChildren '/anchor': typeof AnchorRoute '/component-types-test': typeof ComponentTypesTestRoute - '/document-navigation': typeof DocumentNavigationRoute - '/document-navigation-target': typeof DocumentNavigationTargetRoute '/editing-a': typeof EditingARoute '/editing-b': typeof EditingBRoute - '/history-blocking': typeof HistoryBlockingRoute '/hover-preload-hash': typeof HoverPreloadHashRoute '/lazy-error': typeof LazyErrorRoute '/masks': typeof MasksRouteWithChildren @@ -1036,11 +1011,8 @@ export interface FileRoutesById { '/_layout': typeof LayoutRouteWithChildren '/anchor': typeof AnchorRoute '/component-types-test': typeof ComponentTypesTestRoute - '/document-navigation': typeof DocumentNavigationRoute - '/document-navigation-target': typeof DocumentNavigationTargetRoute '/editing-a': typeof EditingARoute '/editing-b': typeof EditingBRoute - '/history-blocking': typeof HistoryBlockingRoute '/hover-preload-hash': typeof HoverPreloadHashRoute '/lazy-error': typeof LazyErrorRoute '/masks': typeof MasksRouteWithChildren @@ -1162,11 +1134,8 @@ export interface FileRouteTypes { | '/대한민국' | '/anchor' | '/component-types-test' - | '/document-navigation' - | '/document-navigation-target' | '/editing-a' | '/editing-b' - | '/history-blocking' | '/hover-preload-hash' | '/lazy-error' | '/masks' @@ -1281,11 +1250,8 @@ export interface FileRouteTypes { | '/대한민국' | '/anchor' | '/component-types-test' - | '/document-navigation' - | '/document-navigation-target' | '/editing-a' | '/editing-b' - | '/history-blocking' | '/hover-preload-hash' | '/lazy-error' | '/masks' @@ -1391,11 +1357,8 @@ export interface FileRouteTypes { | '/_layout' | '/anchor' | '/component-types-test' - | '/document-navigation' - | '/document-navigation-target' | '/editing-a' | '/editing-b' - | '/history-blocking' | '/hover-preload-hash' | '/lazy-error' | '/masks' @@ -1517,11 +1480,8 @@ export interface RootRouteChildren { LayoutRoute: typeof LayoutRouteWithChildren AnchorRoute: typeof AnchorRoute ComponentTypesTestRoute: typeof ComponentTypesTestRoute - DocumentNavigationRoute: typeof DocumentNavigationRoute - DocumentNavigationTargetRoute: typeof DocumentNavigationTargetRoute EditingARoute: typeof EditingARoute EditingBRoute: typeof EditingBRoute - HistoryBlockingRoute: typeof HistoryBlockingRoute HoverPreloadHashRoute: typeof HoverPreloadHashRoute LazyErrorRoute: typeof LazyErrorRoute MasksRoute: typeof MasksRouteWithChildren @@ -1561,116 +1521,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/anchor': { - id: '/anchor' - path: '/anchor' - fullPath: '/anchor' - preLoaderRoute: typeof AnchorRouteImport - parentRoute: typeof rootRouteImport - } - '/component-types-test': { - id: '/component-types-test' - path: '/component-types-test' - fullPath: '/component-types-test' - preLoaderRoute: typeof ComponentTypesTestRouteImport - parentRoute: typeof rootRouteImport - } - '/document-navigation': { - id: '/document-navigation' - path: '/document-navigation' - fullPath: '/document-navigation' - preLoaderRoute: typeof DocumentNavigationRouteImport - parentRoute: typeof rootRouteImport - } - '/document-navigation-target': { - id: '/document-navigation-target' - path: '/document-navigation-target' - fullPath: '/document-navigation-target' - preLoaderRoute: typeof DocumentNavigationTargetRouteImport - parentRoute: typeof rootRouteImport - } - '/editing-a': { - id: '/editing-a' - path: '/editing-a' - fullPath: '/editing-a' - preLoaderRoute: typeof EditingARouteImport - parentRoute: typeof rootRouteImport - } - '/editing-b': { - id: '/editing-b' - path: '/editing-b' - fullPath: '/editing-b' - preLoaderRoute: typeof EditingBRouteImport - parentRoute: typeof rootRouteImport - } - '/fullpath-test': { - id: '/fullpath-test' - path: '/fullpath-test' - fullPath: '/fullpath-test' - preLoaderRoute: typeof FullpathTestRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/history-blocking': { - id: '/history-blocking' - path: '/history-blocking' - fullPath: '/history-blocking' - preLoaderRoute: typeof HistoryBlockingRouteImport - parentRoute: typeof rootRouteImport - } - '/hover-preload-hash': { - id: '/hover-preload-hash' - path: '/hover-preload-hash' - fullPath: '/hover-preload-hash' - preLoaderRoute: typeof HoverPreloadHashRouteImport - parentRoute: typeof rootRouteImport - } - '/lazy-error': { - id: '/lazy-error' - path: '/lazy-error' - fullPath: '/lazy-error' - preLoaderRoute: typeof LazyErrorRouteImport - parentRoute: typeof rootRouteImport - } - '/masks': { - id: '/masks' - path: '/masks' - fullPath: '/masks' - preLoaderRoute: typeof MasksRouteImport - parentRoute: typeof rootRouteImport - } - '/non-nested': { - id: '/non-nested' - path: '/non-nested' - fullPath: '/non-nested' - preLoaderRoute: typeof NonNestedRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/notRemountDeps': { - id: '/notRemountDeps' - path: '/notRemountDeps' - fullPath: '/notRemountDeps' - preLoaderRoute: typeof NotRemountDepsRouteImport - parentRoute: typeof rootRouteImport - } - '/pathless-layout': { - id: '/pathless-layout' - path: '/pathless-layout' - fullPath: '/pathless-layout' - preLoaderRoute: typeof PathlessLayoutRouteRouteImport + '/remountDeps': { + id: '/remountDeps' + path: '/remountDeps' + fullPath: '/remountDeps' + preLoaderRoute: typeof RemountDepsRouteImport parentRoute: typeof rootRouteImport } '/posts': { @@ -1680,18 +1535,67 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/remountDeps': { - id: '/remountDeps' - path: '/remountDeps' - fullPath: '/remountDeps' - preLoaderRoute: typeof RemountDepsRouteImport + '/notRemountDeps': { + id: '/notRemountDeps' + path: '/notRemountDeps' + fullPath: '/notRemountDeps' + preLoaderRoute: typeof NotRemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/search-params': { - id: '/search-params' - path: '/search-params' - fullPath: '/search-params' - preLoaderRoute: typeof SearchParamsRouteRouteImport + '/masks': { + id: '/masks' + path: '/masks' + fullPath: '/masks' + preLoaderRoute: typeof MasksRouteImport + parentRoute: typeof rootRouteImport + } + '/lazy-error': { + id: '/lazy-error' + path: '/lazy-error' + fullPath: '/lazy-error' + preLoaderRoute: typeof LazyErrorRouteImport + parentRoute: typeof rootRouteImport + } + '/hover-preload-hash': { + id: '/hover-preload-hash' + path: '/hover-preload-hash' + fullPath: '/hover-preload-hash' + preLoaderRoute: typeof HoverPreloadHashRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-b': { + id: '/editing-b' + path: '/editing-b' + fullPath: '/editing-b' + preLoaderRoute: typeof EditingBRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-a': { + id: '/editing-a' + path: '/editing-a' + fullPath: '/editing-a' + preLoaderRoute: typeof EditingARouteImport + parentRoute: typeof rootRouteImport + } + '/component-types-test': { + id: '/component-types-test' + path: '/component-types-test' + fullPath: '/component-types-test' + preLoaderRoute: typeof ComponentTypesTestRouteImport + parentRoute: typeof rootRouteImport + } + '/anchor': { + id: '/anchor' + path: '/anchor' + fullPath: '/anchor' + preLoaderRoute: typeof AnchorRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } '/대한민국': { @@ -1701,158 +1605,39 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteRouteImport parentRoute: typeof rootRouteImport } - '/(another-group)/onlyrouteinside': { - id: '/(another-group)/onlyrouteinside' - path: '/onlyrouteinside' - fullPath: '/onlyrouteinside' - preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + '/search-params': { + id: '/search-params' + path: '/search-params' + fullPath: '/search-params' + preLoaderRoute: typeof SearchParamsRouteRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout': { - id: '/(group)/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof groupLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/inside': { - id: '/(group)/inside' - path: '/inside' - fullPath: '/inside' - preLoaderRoute: typeof groupInsideRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/lazyinside': { - id: '/(group)/lazyinside' - path: '/lazyinside' - fullPath: '/lazyinside' - preLoaderRoute: typeof groupLazyinsideRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute - } - '/fullpath-test/_layout': { - id: '/fullpath-test/_layout' - path: '' - fullPath: '/fullpath-test' - preLoaderRoute: typeof FullpathTestLayoutRouteRouteImport - parentRoute: typeof FullpathTestRouteRoute - } - '/non-nested/deep': { - id: '/non-nested/deep' - path: '/deep' - fullPath: '/non-nested/deep' - preLoaderRoute: typeof NonNestedDeepRouteRouteImport - parentRoute: typeof NonNestedRouteRoute - } - '/non-nested/named': { - id: '/non-nested/named' - path: '/named' - fullPath: '/non-nested/named' - preLoaderRoute: typeof NonNestedNamedRouteRouteImport - parentRoute: typeof NonNestedRouteRoute - } - '/non-nested/path': { - id: '/non-nested/path' - path: '/path' - fullPath: '/non-nested/path' - preLoaderRoute: typeof NonNestedPathRouteRouteImport - parentRoute: typeof NonNestedRouteRoute - } - '/non-nested/prefix': { - id: '/non-nested/prefix' - path: '/prefix' - fullPath: '/non-nested/prefix' - preLoaderRoute: typeof NonNestedPrefixRouteRouteImport - parentRoute: typeof NonNestedRouteRoute - } - '/non-nested/suffix': { - id: '/non-nested/suffix' - path: '/suffix' - fullPath: '/non-nested/suffix' - preLoaderRoute: typeof NonNestedSuffixRouteRouteImport - parentRoute: typeof NonNestedRouteRoute - } - '/params-ps/': { - id: '/params-ps/' - path: '/params-ps' - fullPath: '/params-ps/' - preLoaderRoute: typeof ParamsPsIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/params-ps/non-nested': { - id: '/params-ps/non-nested' - path: '/params-ps/non-nested' - fullPath: '/params-ps/non-nested' - preLoaderRoute: typeof ParamsPsNonNestedRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/params-ps/strict-false': { - id: '/params-ps/strict-false' - path: '/params-ps/strict-false' - fullPath: '/params-ps/strict-false' - preLoaderRoute: typeof ParamsPsStrictFalseRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/pathless-layout/_layout': { - id: '/pathless-layout/_layout' - path: '' + '/pathless-layout': { + id: '/pathless-layout' + path: '/pathless-layout' fullPath: '/pathless-layout' - preLoaderRoute: typeof PathlessLayoutLayoutRouteRouteImport - parentRoute: typeof PathlessLayoutRouteRoute + preLoaderRoute: typeof PathlessLayoutRouteRouteImport + parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/non-nested': { + id: '/non-nested' + path: '/non-nested' + fullPath: '/non-nested' + preLoaderRoute: typeof NonNestedRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/fullpath-test': { + id: '/fullpath-test' + path: '/fullpath-test' + fullPath: '/fullpath-test' + preLoaderRoute: typeof FullpathTestRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect/' - preLoaderRoute: typeof RedirectIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect/$target': { - id: '/redirect/$target' - path: '/redirect/$target' - fullPath: '/redirect/$target' - preLoaderRoute: typeof RedirectTargetRouteImport - parentRoute: typeof rootRouteImport - } - '/relative/': { - id: '/relative/' - path: '/relative' - fullPath: '/relative/' - preLoaderRoute: typeof RelativeIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/relative/link': { - id: '/relative/link' - path: '/relative/link' - fullPath: '/relative/link' - preLoaderRoute: typeof RelativeLinkRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/relative/useNavigate': { - id: '/relative/useNavigate' - path: '/relative/useNavigate' - fullPath: '/relative/useNavigate' - preLoaderRoute: typeof RelativeUseNavigateRouteRouteImport + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/search-params/': { @@ -1862,12 +1647,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchParamsIndexRouteImport parentRoute: typeof SearchParamsRouteRoute } - '/search-params/default': { - id: '/search-params/default' - path: '/default' - fullPath: '/search-params/default' - preLoaderRoute: typeof SearchParamsDefaultRouteImport - parentRoute: typeof SearchParamsRouteRoute + '/relative/': { + id: '/relative/' + path: '/relative' + fullPath: '/relative/' + preLoaderRoute: typeof RelativeIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/redirect/': { + id: '/redirect/' + path: '/redirect' + fullPath: '/redirect/' + preLoaderRoute: typeof RedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/params-ps/': { + id: '/params-ps/' + path: '/params-ps' + fullPath: '/params-ps/' + preLoaderRoute: typeof ParamsPsIndexRouteImport + parentRoute: typeof rootRouteImport } '/structural-sharing/$enabled': { id: '/structural-sharing/$enabled' @@ -1876,208 +1682,138 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof StructuralSharingEnabledRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout/insidelayout': { - id: '/(group)/_layout/insidelayout' - path: '/insidelayout' - fullPath: '/insidelayout' - preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport - parentRoute: typeof groupLayoutRoute + '/search-params/default': { + id: '/search-params/default' + path: '/default' + fullPath: '/search-params/default' + preLoaderRoute: typeof SearchParamsDefaultRouteImport + parentRoute: typeof SearchParamsRouteRoute } - '/(group)/subfolder/inside': { - id: '/(group)/subfolder/inside' - path: '/subfolder/inside' - fullPath: '/subfolder/inside' - preLoaderRoute: typeof groupSubfolderInsideRouteImport + '/redirect/$target': { + id: '/redirect/$target' + path: '/redirect/$target' + fullPath: '/redirect/$target' + preLoaderRoute: typeof RedirectTargetRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport - parentRoute: typeof LayoutLayout2Route + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } - '/fullpath-test/_layout/': { - id: '/fullpath-test/_layout/' - path: '/' - fullPath: '/fullpath-test/' - preLoaderRoute: typeof FullpathTestLayoutIndexRouteImport - parentRoute: typeof FullpathTestLayoutRouteRoute - } - '/fullpath-test/_layout/$id': { - id: '/fullpath-test/_layout/$id' - path: '/$id' - fullPath: '/fullpath-test/$id' - preLoaderRoute: typeof FullpathTestLayoutIdRouteImport - parentRoute: typeof FullpathTestLayoutRouteRoute - } - '/masks/admin/$userId': { - id: '/masks/admin/$userId' - path: '/admin/$userId' - fullPath: '/masks/admin/$userId' - preLoaderRoute: typeof MasksAdminUserIdRouteImport - parentRoute: typeof MasksRoute - } - '/masks/public/$username': { - id: '/masks/public/$username' - path: '/public/$username' - fullPath: '/masks/public/$username' - preLoaderRoute: typeof MasksPublicUsernameRouteImport - parentRoute: typeof MasksRoute - } - '/non-nested/deep/$baz': { - id: '/non-nested/deep/$baz' - path: '/$baz' - fullPath: '/non-nested/deep/$baz' - preLoaderRoute: typeof NonNestedDeepBazRouteRouteImport - parentRoute: typeof NonNestedDeepRouteRoute - } - '/non-nested/named/$baz': { - id: '/non-nested/named/$baz' - path: '/$baz' - fullPath: '/non-nested/named/$baz' - preLoaderRoute: typeof NonNestedNamedBazRouteRouteImport - parentRoute: typeof NonNestedNamedRouteRoute - } - '/non-nested/path/baz': { - id: '/non-nested/path/baz' - path: '/baz' - fullPath: '/non-nested/path/baz' - preLoaderRoute: typeof NonNestedPathBazRouteRouteImport - parentRoute: typeof NonNestedPathRouteRoute - } - '/non-nested/prefix/prefix{$baz}': { - id: '/non-nested/prefix/prefix{$baz}' - path: '/prefix{$baz}' - fullPath: '/non-nested/prefix/prefix{$baz}' - preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteImport - parentRoute: typeof NonNestedPrefixRouteRoute - } - '/non-nested/suffix/{$baz}suffix': { - id: '/non-nested/suffix/{$baz}suffix' - path: '/{$baz}suffix' - fullPath: '/non-nested/suffix/{$baz}suffix' - preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteImport - parentRoute: typeof NonNestedSuffixRouteRoute - } - '/params-ps/named/': { - id: '/params-ps/named/' - path: '/params-ps/named' - fullPath: '/params-ps/named/' - preLoaderRoute: typeof ParamsPsNamedIndexRouteImport + '/(group)/lazyinside': { + id: '/(group)/lazyinside' + path: '/lazyinside' + fullPath: '/lazyinside' + preLoaderRoute: typeof groupLazyinsideRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/named/$foo': { - id: '/params-ps/named/$foo' - path: '/params-ps/named/$foo' - fullPath: '/params-ps/named/$foo' - preLoaderRoute: typeof ParamsPsNamedFooRouteRouteImport + '/(group)/inside': { + id: '/(group)/inside' + path: '/inside' + fullPath: '/inside' + preLoaderRoute: typeof groupInsideRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/named/prefix{$foo}': { - id: '/params-ps/named/prefix{$foo}' - path: '/params-ps/named/prefix{$foo}' - fullPath: '/params-ps/named/prefix{$foo}' - preLoaderRoute: typeof ParamsPsNamedPrefixChar123fooChar125RouteImport + '/(group)/_layout': { + id: '/(group)/_layout' + path: '' + fullPath: '' + preLoaderRoute: typeof groupLayoutRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/named/{$foo}suffix': { - id: '/params-ps/named/{$foo}suffix' - path: '/params-ps/named/{$foo}suffix' - fullPath: '/params-ps/named/{$foo}suffix' - preLoaderRoute: typeof ParamsPsNamedChar123fooChar125suffixRouteImport + '/(another-group)/onlyrouteinside': { + id: '/(another-group)/onlyrouteinside' + path: '/onlyrouteinside' + fullPath: '/onlyrouteinside' + preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/non-nested/$foo_': { - id: '/params-ps/non-nested/$foo_' - path: '/$foo' - fullPath: '/params-ps/non-nested/$foo' - preLoaderRoute: typeof ParamsPsNonNestedFooRouteRouteImport - parentRoute: typeof ParamsPsNonNestedRouteRoute - } - '/params-ps/strict-false/$version': { - id: '/params-ps/strict-false/$version' - path: '/$version' - fullPath: '/params-ps/strict-false/$version' - preLoaderRoute: typeof ParamsPsStrictFalseVersionRouteRouteImport - parentRoute: typeof ParamsPsStrictFalseRouteRoute - } - '/params-ps/wildcard/': { - id: '/params-ps/wildcard/' - path: '/params-ps/wildcard' - fullPath: '/params-ps/wildcard/' - preLoaderRoute: typeof ParamsPsWildcardIndexRouteImport + '/relative/useNavigate': { + id: '/relative/useNavigate' + path: '/relative/useNavigate' + fullPath: '/relative/useNavigate' + preLoaderRoute: typeof RelativeUseNavigateRouteRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/wildcard/$': { - id: '/params-ps/wildcard/$' - path: '/params-ps/wildcard/$' - fullPath: '/params-ps/wildcard/$' - preLoaderRoute: typeof ParamsPsWildcardSplatRouteImport + '/relative/link': { + id: '/relative/link' + path: '/relative/link' + fullPath: '/relative/link' + preLoaderRoute: typeof RelativeLinkRouteRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/wildcard/prefix@대{$}': { - id: '/params-ps/wildcard/prefix@대{$}' - path: '/params-ps/wildcard/prefix@대{$}' - fullPath: '/params-ps/wildcard/prefix@대{$}' - preLoaderRoute: typeof ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport + '/pathless-layout/_layout': { + id: '/pathless-layout/_layout' + path: '' + fullPath: '/pathless-layout' + preLoaderRoute: typeof PathlessLayoutLayoutRouteRouteImport + parentRoute: typeof PathlessLayoutRouteRoute + } + '/params-ps/strict-false': { + id: '/params-ps/strict-false' + path: '/params-ps/strict-false' + fullPath: '/params-ps/strict-false' + preLoaderRoute: typeof ParamsPsStrictFalseRouteRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/wildcard/prefix{$}': { - id: '/params-ps/wildcard/prefix{$}' - path: '/params-ps/wildcard/prefix{$}' - fullPath: '/params-ps/wildcard/prefix{$}' - preLoaderRoute: typeof ParamsPsWildcardPrefixChar123Char125RouteImport + '/params-ps/non-nested': { + id: '/params-ps/non-nested' + path: '/params-ps/non-nested' + fullPath: '/params-ps/non-nested' + preLoaderRoute: typeof ParamsPsNonNestedRouteRouteImport parentRoute: typeof rootRouteImport } - '/params-ps/wildcard/{$}suffix': { - id: '/params-ps/wildcard/{$}suffix' - path: '/params-ps/wildcard/{$}suffix' - fullPath: '/params-ps/wildcard/{$}suffix' - preLoaderRoute: typeof ParamsPsWildcardChar123Char125suffixRouteImport - parentRoute: typeof rootRouteImport + '/non-nested/suffix': { + id: '/non-nested/suffix' + path: '/suffix' + fullPath: '/non-nested/suffix' + preLoaderRoute: typeof NonNestedSuffixRouteRouteImport + parentRoute: typeof NonNestedRouteRoute } - '/params-ps/wildcard/{$}suffix@대': { - id: '/params-ps/wildcard/{$}suffix@대' - path: '/params-ps/wildcard/{$}suffix@대' - fullPath: '/params-ps/wildcard/{$}suffix@대' - preLoaderRoute: typeof ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport - parentRoute: typeof rootRouteImport + '/non-nested/prefix': { + id: '/non-nested/prefix' + path: '/prefix' + fullPath: '/non-nested/prefix' + preLoaderRoute: typeof NonNestedPrefixRouteRouteImport + parentRoute: typeof NonNestedRouteRoute } - '/params/single/$value': { - id: '/params/single/$value' - path: '/params/single/$value' - fullPath: '/params/single/$value' - preLoaderRoute: typeof ParamsSingleValueRouteImport - parentRoute: typeof rootRouteImport + '/non-nested/path': { + id: '/non-nested/path' + path: '/path' + fullPath: '/non-nested/path' + preLoaderRoute: typeof NonNestedPathRouteRouteImport + parentRoute: typeof NonNestedRouteRoute } - '/pathless-layout/_layout/': { - id: '/pathless-layout/_layout/' - path: '/' - fullPath: '/pathless-layout/' - preLoaderRoute: typeof PathlessLayoutLayoutIndexRouteImport - parentRoute: typeof PathlessLayoutLayoutRouteRoute + '/non-nested/named': { + id: '/non-nested/named' + path: '/named' + fullPath: '/non-nested/named' + preLoaderRoute: typeof NonNestedNamedRouteRouteImport + parentRoute: typeof NonNestedRouteRoute } - '/pathless-layout/_layout/child': { - id: '/pathless-layout/_layout/child' - path: '/child' - fullPath: '/pathless-layout/child' - preLoaderRoute: typeof PathlessLayoutLayoutChildRouteImport - parentRoute: typeof PathlessLayoutLayoutRouteRoute + '/non-nested/deep': { + id: '/non-nested/deep' + path: '/deep' + fullPath: '/non-nested/deep' + preLoaderRoute: typeof NonNestedDeepRouteRouteImport + parentRoute: typeof NonNestedRouteRoute } - '/posts_/$postId/edit': { - id: '/posts_/$postId/edit' - path: '/posts/$postId/edit' - fullPath: '/posts/$postId/edit' - preLoaderRoute: typeof PostsPostIdEditRouteImport - parentRoute: typeof rootRouteImport + '/fullpath-test/_layout': { + id: '/fullpath-test/_layout' + path: '' + fullPath: '/fullpath-test' + preLoaderRoute: typeof FullpathTestLayoutRouteRouteImport + parentRoute: typeof FullpathTestRouteRoute } '/redirect/$target/': { id: '/redirect/$target/' @@ -2086,60 +1822,81 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectTargetIndexRouteImport parentRoute: typeof RedirectTargetRoute } - '/redirect/$target/destination': { - id: '/redirect/$target/destination' - path: '/destination' - fullPath: '/redirect/$target/destination' - preLoaderRoute: typeof RedirectTargetDestinationRouteImport - parentRoute: typeof RedirectTargetRoute + '/pathless-layout/_layout/': { + id: '/pathless-layout/_layout/' + path: '/' + fullPath: '/pathless-layout/' + preLoaderRoute: typeof PathlessLayoutLayoutIndexRouteImport + parentRoute: typeof PathlessLayoutLayoutRouteRoute } - '/redirect/$target/via-beforeLoad': { - id: '/redirect/$target/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/redirect/$target/via-beforeLoad' - preLoaderRoute: typeof RedirectTargetViaBeforeLoadRouteImport - parentRoute: typeof RedirectTargetRoute + '/params-ps/wildcard/': { + id: '/params-ps/wildcard/' + path: '/params-ps/wildcard' + fullPath: '/params-ps/wildcard/' + preLoaderRoute: typeof ParamsPsWildcardIndexRouteImport + parentRoute: typeof rootRouteImport } - '/redirect/$target/via-loader': { - id: '/redirect/$target/via-loader' - path: '/via-loader' - fullPath: '/redirect/$target/via-loader' - preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport - parentRoute: typeof RedirectTargetRoute + '/params-ps/named/': { + id: '/params-ps/named/' + path: '/params-ps/named' + fullPath: '/params-ps/named/' + preLoaderRoute: typeof ParamsPsNamedIndexRouteImport + parentRoute: typeof rootRouteImport } - '/redirect/$target/via-route-redirect-beforeLoad': { - id: '/redirect/$target/via-route-redirect-beforeLoad' - path: '/via-route-redirect-beforeLoad' - fullPath: '/redirect/$target/via-route-redirect-beforeLoad' - preLoaderRoute: typeof RedirectTargetViaRouteRedirectBeforeLoadRouteImport - parentRoute: typeof RedirectTargetRoute + '/fullpath-test/_layout/': { + id: '/fullpath-test/_layout/' + path: '/' + fullPath: '/fullpath-test/' + preLoaderRoute: typeof FullpathTestLayoutIndexRouteImport + parentRoute: typeof FullpathTestLayoutRouteRoute } - '/redirect/$target/via-route-redirect-loader': { - id: '/redirect/$target/via-route-redirect-loader' - path: '/via-route-redirect-loader' - fullPath: '/redirect/$target/via-route-redirect-loader' - preLoaderRoute: typeof RedirectTargetViaRouteRedirectLoaderRouteImport - parentRoute: typeof RedirectTargetRoute + '/대한민국/🚀/$id': { + id: '/대한민국/🚀/$id' + path: '/🚀/$id' + fullPath: '/대한민국/🚀/$id' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397Char55357Char56960IdRouteImport + parentRoute: typeof Char45824Char54620Char48124Char44397RouteRoute } - '/redirect/$target/via-routeApi-redirect-beforeLoad': { - id: '/redirect/$target/via-routeApi-redirect-beforeLoad' - path: '/via-routeApi-redirect-beforeLoad' - fullPath: '/redirect/$target/via-routeApi-redirect-beforeLoad' - preLoaderRoute: typeof RedirectTargetViaRouteApiRedirectBeforeLoadRouteImport - parentRoute: typeof RedirectTargetRoute + '/대한민국/wildcard/$': { + id: '/대한민국/wildcard/$' + path: '/wildcard/$' + fullPath: '/대한민국/wildcard/$' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397WildcardSplatRouteImport + parentRoute: typeof Char45824Char54620Char48124Char44397RouteRoute } - '/redirect/$target/via-routeApi-redirect-loader': { - id: '/redirect/$target/via-routeApi-redirect-loader' - path: '/via-routeApi-redirect-loader' - fullPath: '/redirect/$target/via-routeApi-redirect-loader' - preLoaderRoute: typeof RedirectTargetViaRouteApiRedirectLoaderRouteImport - parentRoute: typeof RedirectTargetRoute + '/relative/useNavigate/relative-useNavigate-b': { + id: '/relative/useNavigate/relative-useNavigate-b' + path: '/relative-useNavigate-b' + fullPath: '/relative/useNavigate/relative-useNavigate-b' + preLoaderRoute: typeof RelativeUseNavigateRelativeUseNavigateBRouteImport + parentRoute: typeof RelativeUseNavigateRouteRoute } - '/redirect/preload/first': { - id: '/redirect/preload/first' - path: '/redirect/preload/first' - fullPath: '/redirect/preload/first' - preLoaderRoute: typeof RedirectPreloadFirstRouteImport + '/relative/useNavigate/relative-useNavigate-a': { + id: '/relative/useNavigate/relative-useNavigate-a' + path: '/relative-useNavigate-a' + fullPath: '/relative/useNavigate/relative-useNavigate-a' + preLoaderRoute: typeof RelativeUseNavigateRelativeUseNavigateARouteImport + parentRoute: typeof RelativeUseNavigateRouteRoute + } + '/relative/link/relative-link-b': { + id: '/relative/link/relative-link-b' + path: '/relative-link-b' + fullPath: '/relative/link/relative-link-b' + preLoaderRoute: typeof RelativeLinkRelativeLinkBRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/relative/link/relative-link-a': { + id: '/relative/link/relative-link-a' + path: '/relative-link-a' + fullPath: '/relative/link/relative-link-a' + preLoaderRoute: typeof RelativeLinkRelativeLinkARouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/redirect/preload/third': { + id: '/redirect/preload/third' + path: '/redirect/preload/third' + fullPath: '/redirect/preload/third' + preLoaderRoute: typeof RedirectPreloadThirdRouteImport parentRoute: typeof rootRouteImport } '/redirect/preload/second': { @@ -2149,193 +1906,242 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectPreloadSecondRouteImport parentRoute: typeof rootRouteImport } - '/redirect/preload/third': { - id: '/redirect/preload/third' - path: '/redirect/preload/third' - fullPath: '/redirect/preload/third' - preLoaderRoute: typeof RedirectPreloadThirdRouteImport + '/redirect/preload/first': { + id: '/redirect/preload/first' + path: '/redirect/preload/first' + fullPath: '/redirect/preload/first' + preLoaderRoute: typeof RedirectPreloadFirstRouteImport parentRoute: typeof rootRouteImport } - '/relative/link/relative-link-a': { - id: '/relative/link/relative-link-a' - path: '/relative-link-a' - fullPath: '/relative/link/relative-link-a' - preLoaderRoute: typeof RelativeLinkRelativeLinkARouteImport - parentRoute: typeof RelativeLinkRouteRoute + '/redirect/$target/via-routeApi-redirect-loader': { + id: '/redirect/$target/via-routeApi-redirect-loader' + path: '/via-routeApi-redirect-loader' + fullPath: '/redirect/$target/via-routeApi-redirect-loader' + preLoaderRoute: typeof RedirectTargetViaRouteApiRedirectLoaderRouteImport + parentRoute: typeof RedirectTargetRoute } - '/relative/link/relative-link-b': { - id: '/relative/link/relative-link-b' - path: '/relative-link-b' - fullPath: '/relative/link/relative-link-b' - preLoaderRoute: typeof RelativeLinkRelativeLinkBRouteImport - parentRoute: typeof RelativeLinkRouteRoute + '/redirect/$target/via-routeApi-redirect-beforeLoad': { + id: '/redirect/$target/via-routeApi-redirect-beforeLoad' + path: '/via-routeApi-redirect-beforeLoad' + fullPath: '/redirect/$target/via-routeApi-redirect-beforeLoad' + preLoaderRoute: typeof RedirectTargetViaRouteApiRedirectBeforeLoadRouteImport + parentRoute: typeof RedirectTargetRoute } - '/relative/useNavigate/relative-useNavigate-a': { - id: '/relative/useNavigate/relative-useNavigate-a' - path: '/relative-useNavigate-a' - fullPath: '/relative/useNavigate/relative-useNavigate-a' - preLoaderRoute: typeof RelativeUseNavigateRelativeUseNavigateARouteImport - parentRoute: typeof RelativeUseNavigateRouteRoute + '/redirect/$target/via-route-redirect-loader': { + id: '/redirect/$target/via-route-redirect-loader' + path: '/via-route-redirect-loader' + fullPath: '/redirect/$target/via-route-redirect-loader' + preLoaderRoute: typeof RedirectTargetViaRouteRedirectLoaderRouteImport + parentRoute: typeof RedirectTargetRoute } - '/relative/useNavigate/relative-useNavigate-b': { - id: '/relative/useNavigate/relative-useNavigate-b' - path: '/relative-useNavigate-b' - fullPath: '/relative/useNavigate/relative-useNavigate-b' - preLoaderRoute: typeof RelativeUseNavigateRelativeUseNavigateBRouteImport - parentRoute: typeof RelativeUseNavigateRouteRoute + '/redirect/$target/via-route-redirect-beforeLoad': { + id: '/redirect/$target/via-route-redirect-beforeLoad' + path: '/via-route-redirect-beforeLoad' + fullPath: '/redirect/$target/via-route-redirect-beforeLoad' + preLoaderRoute: typeof RedirectTargetViaRouteRedirectBeforeLoadRouteImport + parentRoute: typeof RedirectTargetRoute } - '/대한민국/wildcard/$': { - id: '/대한민국/wildcard/$' - path: '/wildcard/$' - fullPath: '/대한민국/wildcard/$' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397WildcardSplatRouteImport - parentRoute: typeof Char45824Char54620Char48124Char44397RouteRoute + '/redirect/$target/via-loader': { + id: '/redirect/$target/via-loader' + path: '/via-loader' + fullPath: '/redirect/$target/via-loader' + preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport + parentRoute: typeof RedirectTargetRoute } - '/대한민국/🚀/$id': { - id: '/대한민국/🚀/$id' - path: '/🚀/$id' - fullPath: '/대한민국/🚀/$id' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397Char55357Char56960IdRouteImport - parentRoute: typeof Char45824Char54620Char48124Char44397RouteRoute + '/redirect/$target/via-beforeLoad': { + id: '/redirect/$target/via-beforeLoad' + path: '/via-beforeLoad' + fullPath: '/redirect/$target/via-beforeLoad' + preLoaderRoute: typeof RedirectTargetViaBeforeLoadRouteImport + parentRoute: typeof RedirectTargetRoute } - '/non-nested/deep/$baz/': { - id: '/non-nested/deep/$baz/' - path: '/' - fullPath: '/non-nested/deep/$baz/' - preLoaderRoute: typeof NonNestedDeepBazIndexRouteImport - parentRoute: typeof NonNestedDeepBazRouteRoute + '/redirect/$target/destination': { + id: '/redirect/$target/destination' + path: '/destination' + fullPath: '/redirect/$target/destination' + preLoaderRoute: typeof RedirectTargetDestinationRouteImport + parentRoute: typeof RedirectTargetRoute } - '/non-nested/deep/$baz_/bar': { - id: '/non-nested/deep/$baz_/bar' - path: '/$baz/bar' - fullPath: '/non-nested/deep/$baz/bar' - preLoaderRoute: typeof NonNestedDeepBazBarRouteRouteImport - parentRoute: typeof NonNestedDeepRouteRoute + '/posts_/$postId/edit': { + id: '/posts_/$postId/edit' + path: '/posts/$postId/edit' + fullPath: '/posts/$postId/edit' + preLoaderRoute: typeof PostsPostIdEditRouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/named/$baz/': { - id: '/non-nested/named/$baz/' - path: '/' - fullPath: '/non-nested/named/$baz/' - preLoaderRoute: typeof NonNestedNamedBazIndexRouteImport - parentRoute: typeof NonNestedNamedBazRouteRoute + '/pathless-layout/_layout/child': { + id: '/pathless-layout/_layout/child' + path: '/child' + fullPath: '/pathless-layout/child' + preLoaderRoute: typeof PathlessLayoutLayoutChildRouteImport + parentRoute: typeof PathlessLayoutLayoutRouteRoute } - '/non-nested/named/$baz/foo': { - id: '/non-nested/named/$baz/foo' - path: '/foo' - fullPath: '/non-nested/named/$baz/foo' - preLoaderRoute: typeof NonNestedNamedBazFooRouteImport - parentRoute: typeof NonNestedNamedBazRouteRoute + '/params/single/$value': { + id: '/params/single/$value' + path: '/params/single/$value' + fullPath: '/params/single/$value' + preLoaderRoute: typeof ParamsSingleValueRouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/named/$baz_/bar': { - id: '/non-nested/named/$baz_/bar' - path: '/$baz/bar' - fullPath: '/non-nested/named/$baz/bar' - preLoaderRoute: typeof NonNestedNamedBazBarRouteImport - parentRoute: typeof NonNestedNamedRouteRoute + '/params-ps/wildcard/{$}suffix@대': { + id: '/params-ps/wildcard/{$}suffix@대' + path: '/params-ps/wildcard/{$}suffix@대' + fullPath: '/params-ps/wildcard/{$}suffix@대' + preLoaderRoute: typeof ParamsPsWildcardChar123Char125suffixAtChar45824RouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/path/baz/': { - id: '/non-nested/path/baz/' - path: '/' - fullPath: '/non-nested/path/baz/' - preLoaderRoute: typeof NonNestedPathBazIndexRouteImport - parentRoute: typeof NonNestedPathBazRouteRoute + '/params-ps/wildcard/{$}suffix': { + id: '/params-ps/wildcard/{$}suffix' + path: '/params-ps/wildcard/{$}suffix' + fullPath: '/params-ps/wildcard/{$}suffix' + preLoaderRoute: typeof ParamsPsWildcardChar123Char125suffixRouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/path/baz/foo': { - id: '/non-nested/path/baz/foo' - path: '/foo' - fullPath: '/non-nested/path/baz/foo' - preLoaderRoute: typeof NonNestedPathBazFooRouteImport - parentRoute: typeof NonNestedPathBazRouteRoute + '/params-ps/wildcard/prefix{$}': { + id: '/params-ps/wildcard/prefix{$}' + path: '/params-ps/wildcard/prefix{$}' + fullPath: '/params-ps/wildcard/prefix{$}' + preLoaderRoute: typeof ParamsPsWildcardPrefixChar123Char125RouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/path/baz_/bar': { - id: '/non-nested/path/baz_/bar' - path: '/baz/bar' - fullPath: '/non-nested/path/baz/bar' - preLoaderRoute: typeof NonNestedPathBazBarRouteImport - parentRoute: typeof NonNestedPathRouteRoute + '/params-ps/wildcard/prefix@대{$}': { + id: '/params-ps/wildcard/prefix@대{$}' + path: '/params-ps/wildcard/prefix@대{$}' + fullPath: '/params-ps/wildcard/prefix@대{$}' + preLoaderRoute: typeof ParamsPsWildcardPrefixAtChar45824Char123Char125RouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/prefix/prefix{$baz}/': { - id: '/non-nested/prefix/prefix{$baz}/' - path: '/' - fullPath: '/non-nested/prefix/prefix{$baz}/' - preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRouteImport - parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute + '/params-ps/wildcard/$': { + id: '/params-ps/wildcard/$' + path: '/params-ps/wildcard/$' + fullPath: '/params-ps/wildcard/$' + preLoaderRoute: typeof ParamsPsWildcardSplatRouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/prefix/prefix{$baz}/foo': { - id: '/non-nested/prefix/prefix{$baz}/foo' - path: '/foo' - fullPath: '/non-nested/prefix/prefix{$baz}/foo' - preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRouteImport - parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute + '/params-ps/named/{$foo}suffix': { + id: '/params-ps/named/{$foo}suffix' + path: '/params-ps/named/{$foo}suffix' + fullPath: '/params-ps/named/{$foo}suffix' + preLoaderRoute: typeof ParamsPsNamedChar123fooChar125suffixRouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/prefix/prefix{$baz}_/bar': { - id: '/non-nested/prefix/prefix{$baz}_/bar' - path: '/prefix{$baz}/bar' - fullPath: '/non-nested/prefix/prefix{$baz}/bar' - preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRouteImport - parentRoute: typeof NonNestedPrefixRouteRoute + '/params-ps/named/prefix{$foo}': { + id: '/params-ps/named/prefix{$foo}' + path: '/params-ps/named/prefix{$foo}' + fullPath: '/params-ps/named/prefix{$foo}' + preLoaderRoute: typeof ParamsPsNamedPrefixChar123fooChar125RouteImport + parentRoute: typeof rootRouteImport } - '/non-nested/suffix/{$baz}suffix/': { - id: '/non-nested/suffix/{$baz}suffix/' - path: '/' - fullPath: '/non-nested/suffix/{$baz}suffix/' - preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRouteImport - parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute + '/masks/public/$username': { + id: '/masks/public/$username' + path: '/public/$username' + fullPath: '/masks/public/$username' + preLoaderRoute: typeof MasksPublicUsernameRouteImport + parentRoute: typeof MasksRoute } - '/non-nested/suffix/{$baz}suffix/foo': { - id: '/non-nested/suffix/{$baz}suffix/foo' - path: '/foo' - fullPath: '/non-nested/suffix/{$baz}suffix/foo' - preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRouteImport - parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute + '/masks/admin/$userId': { + id: '/masks/admin/$userId' + path: '/admin/$userId' + fullPath: '/masks/admin/$userId' + preLoaderRoute: typeof MasksAdminUserIdRouteImport + parentRoute: typeof MasksRoute } - '/non-nested/suffix/{$baz}suffix_/bar': { - id: '/non-nested/suffix/{$baz}suffix_/bar' - path: '/{$baz}suffix/bar' - fullPath: '/non-nested/suffix/{$baz}suffix/bar' - preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRouteImport + '/fullpath-test/_layout/$id': { + id: '/fullpath-test/_layout/$id' + path: '/$id' + fullPath: '/fullpath-test/$id' + preLoaderRoute: typeof FullpathTestLayoutIdRouteImport + parentRoute: typeof FullpathTestLayoutRouteRoute + } + '/_layout/_layout-2/layout-b': { + id: '/_layout/_layout-2/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport + parentRoute: typeof LayoutLayout2Route + } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/(group)/subfolder/inside': { + id: '/(group)/subfolder/inside' + path: '/subfolder/inside' + fullPath: '/subfolder/inside' + preLoaderRoute: typeof groupSubfolderInsideRouteImport + parentRoute: typeof rootRouteImport + } + '/(group)/_layout/insidelayout': { + id: '/(group)/_layout/insidelayout' + path: '/insidelayout' + fullPath: '/insidelayout' + preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport + parentRoute: typeof groupLayoutRoute + } + '/params-ps/strict-false/$version': { + id: '/params-ps/strict-false/$version' + path: '/$version' + fullPath: '/params-ps/strict-false/$version' + preLoaderRoute: typeof ParamsPsStrictFalseVersionRouteRouteImport + parentRoute: typeof ParamsPsStrictFalseRouteRoute + } + '/params-ps/non-nested/$foo_': { + id: '/params-ps/non-nested/$foo_' + path: '/$foo' + fullPath: '/params-ps/non-nested/$foo' + preLoaderRoute: typeof ParamsPsNonNestedFooRouteRouteImport + parentRoute: typeof ParamsPsNonNestedRouteRoute + } + '/params-ps/named/$foo': { + id: '/params-ps/named/$foo' + path: '/params-ps/named/$foo' + fullPath: '/params-ps/named/$foo' + preLoaderRoute: typeof ParamsPsNamedFooRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/non-nested/suffix/{$baz}suffix': { + id: '/non-nested/suffix/{$baz}suffix' + path: '/{$baz}suffix' + fullPath: '/non-nested/suffix/{$baz}suffix' + preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRouteImport parentRoute: typeof NonNestedSuffixRouteRoute } - '/params-ps/named/$foo/$bar': { - id: '/params-ps/named/$foo/$bar' - path: '/$bar' - fullPath: '/params-ps/named/$foo/$bar' - preLoaderRoute: typeof ParamsPsNamedFooBarRouteRouteImport - parentRoute: typeof ParamsPsNamedFooRouteRoute + '/non-nested/prefix/prefix{$baz}': { + id: '/non-nested/prefix/prefix{$baz}' + path: '/prefix{$baz}' + fullPath: '/non-nested/prefix/prefix{$baz}' + preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRouteImport + parentRoute: typeof NonNestedPrefixRouteRoute } - '/params-ps/non-nested/$foo_/$bar': { - id: '/params-ps/non-nested/$foo_/$bar' - path: '/$bar' - fullPath: '/params-ps/non-nested/$foo/$bar' - preLoaderRoute: typeof ParamsPsNonNestedFooBarRouteImport - parentRoute: typeof ParamsPsNonNestedFooRouteRoute + '/non-nested/path/baz': { + id: '/non-nested/path/baz' + path: '/baz' + fullPath: '/non-nested/path/baz' + preLoaderRoute: typeof NonNestedPathBazRouteRouteImport + parentRoute: typeof NonNestedPathRouteRoute } - '/relative/link/nested/': { - id: '/relative/link/nested/' - path: '/nested' - fullPath: '/relative/link/nested/' - preLoaderRoute: typeof RelativeLinkNestedIndexRouteImport - parentRoute: typeof RelativeLinkRouteRoute + '/non-nested/named/$baz': { + id: '/non-nested/named/$baz' + path: '/$baz' + fullPath: '/non-nested/named/$baz' + preLoaderRoute: typeof NonNestedNamedBazRouteRouteImport + parentRoute: typeof NonNestedNamedRouteRoute } - '/relative/link/path/': { - id: '/relative/link/path/' - path: '/path' - fullPath: '/relative/link/path/' - preLoaderRoute: typeof RelativeLinkPathIndexRouteImport - parentRoute: typeof RelativeLinkRouteRoute + '/non-nested/deep/$baz': { + id: '/non-nested/deep/$baz' + path: '/$baz' + fullPath: '/non-nested/deep/$baz' + preLoaderRoute: typeof NonNestedDeepBazRouteRouteImport + parentRoute: typeof NonNestedDeepRouteRoute } - '/relative/link/with-search/': { - id: '/relative/link/with-search/' + '/relative/useNavigate/with-search/': { + id: '/relative/useNavigate/with-search/' path: '/with-search' - fullPath: '/relative/link/with-search/' - preLoaderRoute: typeof RelativeLinkWithSearchIndexRouteImport - parentRoute: typeof RelativeLinkRouteRoute - } - '/relative/useNavigate/nested/': { - id: '/relative/useNavigate/nested/' - path: '/nested' - fullPath: '/relative/useNavigate/nested/' - preLoaderRoute: typeof RelativeUseNavigateNestedIndexRouteImport + fullPath: '/relative/useNavigate/with-search/' + preLoaderRoute: typeof RelativeUseNavigateWithSearchIndexRouteImport parentRoute: typeof RelativeUseNavigateRouteRoute } '/relative/useNavigate/path/': { @@ -2345,54 +2151,152 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RelativeUseNavigatePathIndexRouteImport parentRoute: typeof RelativeUseNavigateRouteRoute } - '/relative/useNavigate/with-search/': { - id: '/relative/useNavigate/with-search/' - path: '/with-search' - fullPath: '/relative/useNavigate/with-search/' - preLoaderRoute: typeof RelativeUseNavigateWithSearchIndexRouteImport + '/relative/useNavigate/nested/': { + id: '/relative/useNavigate/nested/' + path: '/nested' + fullPath: '/relative/useNavigate/nested/' + preLoaderRoute: typeof RelativeUseNavigateNestedIndexRouteImport parentRoute: typeof RelativeUseNavigateRouteRoute } - '/non-nested/deep/$baz_/bar/': { - id: '/non-nested/deep/$baz_/bar/' + '/relative/link/with-search/': { + id: '/relative/link/with-search/' + path: '/with-search' + fullPath: '/relative/link/with-search/' + preLoaderRoute: typeof RelativeLinkWithSearchIndexRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/relative/link/path/': { + id: '/relative/link/path/' + path: '/path' + fullPath: '/relative/link/path/' + preLoaderRoute: typeof RelativeLinkPathIndexRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/relative/link/nested/': { + id: '/relative/link/nested/' + path: '/nested' + fullPath: '/relative/link/nested/' + preLoaderRoute: typeof RelativeLinkNestedIndexRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/non-nested/suffix/{$baz}suffix/': { + id: '/non-nested/suffix/{$baz}suffix/' path: '/' - fullPath: '/non-nested/deep/$baz/bar/' - preLoaderRoute: typeof NonNestedDeepBazBarIndexRouteImport - parentRoute: typeof NonNestedDeepBazBarRouteRoute + fullPath: '/non-nested/suffix/{$baz}suffix/' + preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixIndexRouteImport + parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute } - '/non-nested/deep/$baz_/bar/$foo': { - id: '/non-nested/deep/$baz_/bar/$foo' - path: '/$foo' - fullPath: '/non-nested/deep/$baz/bar/$foo' - preLoaderRoute: typeof NonNestedDeepBazBarFooRouteRouteImport - parentRoute: typeof NonNestedDeepBazBarRouteRoute + '/non-nested/prefix/prefix{$baz}/': { + id: '/non-nested/prefix/prefix{$baz}/' + path: '/' + fullPath: '/non-nested/prefix/prefix{$baz}/' + preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125IndexRouteImport + parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute } - '/non-nested/deep/$baz_/bar_/qux': { - id: '/non-nested/deep/$baz_/bar_/qux' - path: '/$baz/bar/qux' - fullPath: '/non-nested/deep/$baz/bar/qux' - preLoaderRoute: typeof NonNestedDeepBazBarQuxRouteImport + '/non-nested/path/baz/': { + id: '/non-nested/path/baz/' + path: '/' + fullPath: '/non-nested/path/baz/' + preLoaderRoute: typeof NonNestedPathBazIndexRouteImport + parentRoute: typeof NonNestedPathBazRouteRoute + } + '/non-nested/named/$baz/': { + id: '/non-nested/named/$baz/' + path: '/' + fullPath: '/non-nested/named/$baz/' + preLoaderRoute: typeof NonNestedNamedBazIndexRouteImport + parentRoute: typeof NonNestedNamedBazRouteRoute + } + '/non-nested/deep/$baz/': { + id: '/non-nested/deep/$baz/' + path: '/' + fullPath: '/non-nested/deep/$baz/' + preLoaderRoute: typeof NonNestedDeepBazIndexRouteImport + parentRoute: typeof NonNestedDeepBazRouteRoute + } + '/params-ps/non-nested/$foo_/$bar': { + id: '/params-ps/non-nested/$foo_/$bar' + path: '/$bar' + fullPath: '/params-ps/non-nested/$foo/$bar' + preLoaderRoute: typeof ParamsPsNonNestedFooBarRouteImport + parentRoute: typeof ParamsPsNonNestedFooRouteRoute + } + '/non-nested/suffix/{$baz}suffix_/bar': { + id: '/non-nested/suffix/{$baz}suffix_/bar' + path: '/{$baz}suffix/bar' + fullPath: '/non-nested/suffix/{$baz}suffix/bar' + preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixBarRouteImport + parentRoute: typeof NonNestedSuffixRouteRoute + } + '/non-nested/suffix/{$baz}suffix/foo': { + id: '/non-nested/suffix/{$baz}suffix/foo' + path: '/foo' + fullPath: '/non-nested/suffix/{$baz}suffix/foo' + preLoaderRoute: typeof NonNestedSuffixChar123bazChar125suffixFooRouteImport + parentRoute: typeof NonNestedSuffixChar123bazChar125suffixRouteRoute + } + '/non-nested/prefix/prefix{$baz}_/bar': { + id: '/non-nested/prefix/prefix{$baz}_/bar' + path: '/prefix{$baz}/bar' + fullPath: '/non-nested/prefix/prefix{$baz}/bar' + preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125BarRouteImport + parentRoute: typeof NonNestedPrefixRouteRoute + } + '/non-nested/prefix/prefix{$baz}/foo': { + id: '/non-nested/prefix/prefix{$baz}/foo' + path: '/foo' + fullPath: '/non-nested/prefix/prefix{$baz}/foo' + preLoaderRoute: typeof NonNestedPrefixPrefixChar123bazChar125FooRouteImport + parentRoute: typeof NonNestedPrefixPrefixChar123bazChar125RouteRoute + } + '/non-nested/path/baz_/bar': { + id: '/non-nested/path/baz_/bar' + path: '/baz/bar' + fullPath: '/non-nested/path/baz/bar' + preLoaderRoute: typeof NonNestedPathBazBarRouteImport + parentRoute: typeof NonNestedPathRouteRoute + } + '/non-nested/path/baz/foo': { + id: '/non-nested/path/baz/foo' + path: '/foo' + fullPath: '/non-nested/path/baz/foo' + preLoaderRoute: typeof NonNestedPathBazFooRouteImport + parentRoute: typeof NonNestedPathBazRouteRoute + } + '/non-nested/named/$baz_/bar': { + id: '/non-nested/named/$baz_/bar' + path: '/$baz/bar' + fullPath: '/non-nested/named/$baz/bar' + preLoaderRoute: typeof NonNestedNamedBazBarRouteImport + parentRoute: typeof NonNestedNamedRouteRoute + } + '/non-nested/named/$baz/foo': { + id: '/non-nested/named/$baz/foo' + path: '/foo' + fullPath: '/non-nested/named/$baz/foo' + preLoaderRoute: typeof NonNestedNamedBazFooRouteImport + parentRoute: typeof NonNestedNamedBazRouteRoute + } + '/params-ps/named/$foo/$bar': { + id: '/params-ps/named/$foo/$bar' + path: '/$bar' + fullPath: '/params-ps/named/$foo/$bar' + preLoaderRoute: typeof ParamsPsNamedFooBarRouteRouteImport + parentRoute: typeof ParamsPsNamedFooRouteRoute + } + '/non-nested/deep/$baz_/bar': { + id: '/non-nested/deep/$baz_/bar' + path: '/$baz/bar' + fullPath: '/non-nested/deep/$baz/bar' + preLoaderRoute: typeof NonNestedDeepBazBarRouteRouteImport parentRoute: typeof NonNestedDeepRouteRoute } - '/params-ps/named/$foo/$bar/$baz': { - id: '/params-ps/named/$foo/$bar/$baz' - path: '/$baz' - fullPath: '/params-ps/named/$foo/$bar/$baz' - preLoaderRoute: typeof ParamsPsNamedFooBarBazRouteImport - parentRoute: typeof ParamsPsNamedFooBarRouteRoute - } - '/relative/link/nested/deep/': { - id: '/relative/link/nested/deep/' - path: '/nested/deep' - fullPath: '/relative/link/nested/deep/' - preLoaderRoute: typeof RelativeLinkNestedDeepIndexRouteImport - parentRoute: typeof RelativeLinkRouteRoute - } - '/relative/link/path/$path/': { - id: '/relative/link/path/$path/' + '/relative/useNavigate/path/$path/': { + id: '/relative/useNavigate/path/$path/' path: '/path/$path' - fullPath: '/relative/link/path/$path/' - preLoaderRoute: typeof RelativeLinkPathPathIndexRouteImport - parentRoute: typeof RelativeLinkRouteRoute + fullPath: '/relative/useNavigate/path/$path/' + preLoaderRoute: typeof RelativeUseNavigatePathPathIndexRouteImport + parentRoute: typeof RelativeUseNavigateRouteRoute } '/relative/useNavigate/nested/deep/': { id: '/relative/useNavigate/nested/deep/' @@ -2401,12 +2305,47 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RelativeUseNavigateNestedDeepIndexRouteImport parentRoute: typeof RelativeUseNavigateRouteRoute } - '/relative/useNavigate/path/$path/': { - id: '/relative/useNavigate/path/$path/' + '/relative/link/path/$path/': { + id: '/relative/link/path/$path/' path: '/path/$path' - fullPath: '/relative/useNavigate/path/$path/' - preLoaderRoute: typeof RelativeUseNavigatePathPathIndexRouteImport - parentRoute: typeof RelativeUseNavigateRouteRoute + fullPath: '/relative/link/path/$path/' + preLoaderRoute: typeof RelativeLinkPathPathIndexRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/relative/link/nested/deep/': { + id: '/relative/link/nested/deep/' + path: '/nested/deep' + fullPath: '/relative/link/nested/deep/' + preLoaderRoute: typeof RelativeLinkNestedDeepIndexRouteImport + parentRoute: typeof RelativeLinkRouteRoute + } + '/non-nested/deep/$baz_/bar/': { + id: '/non-nested/deep/$baz_/bar/' + path: '/' + fullPath: '/non-nested/deep/$baz/bar/' + preLoaderRoute: typeof NonNestedDeepBazBarIndexRouteImport + parentRoute: typeof NonNestedDeepBazBarRouteRoute + } + '/params-ps/named/$foo/$bar/$baz': { + id: '/params-ps/named/$foo/$bar/$baz' + path: '/$baz' + fullPath: '/params-ps/named/$foo/$bar/$baz' + preLoaderRoute: typeof ParamsPsNamedFooBarBazRouteImport + parentRoute: typeof ParamsPsNamedFooBarRouteRoute + } + '/non-nested/deep/$baz_/bar_/qux': { + id: '/non-nested/deep/$baz_/bar_/qux' + path: '/$baz/bar/qux' + fullPath: '/non-nested/deep/$baz/bar/qux' + preLoaderRoute: typeof NonNestedDeepBazBarQuxRouteImport + parentRoute: typeof NonNestedDeepRouteRoute + } + '/non-nested/deep/$baz_/bar/$foo': { + id: '/non-nested/deep/$baz_/bar/$foo' + path: '/$foo' + fullPath: '/non-nested/deep/$baz/bar/$foo' + preLoaderRoute: typeof NonNestedDeepBazBarFooRouteRouteImport + parentRoute: typeof NonNestedDeepBazBarRouteRoute } '/non-nested/deep/$baz_/bar/$foo/': { id: '/non-nested/deep/$baz_/bar/$foo/' @@ -2939,11 +2878,8 @@ const rootRouteChildren: RootRouteChildren = { LayoutRoute: LayoutRouteWithChildren, AnchorRoute: AnchorRoute, ComponentTypesTestRoute: ComponentTypesTestRoute, - DocumentNavigationRoute: DocumentNavigationRoute, - DocumentNavigationTargetRoute: DocumentNavigationTargetRoute, EditingARoute: EditingARoute, EditingBRoute: EditingBRoute, - HistoryBlockingRoute: HistoryBlockingRoute, HoverPreloadHashRoute: HoverPreloadHashRoute, LazyErrorRoute: LazyErrorRoute, MasksRoute: MasksRouteWithChildren, diff --git a/e2e/react-router/basic-file-based/src/routes/anchor.tsx b/e2e/react-router/basic-file-based/src/routes/anchor.tsx index cae0a3e583..aafad6cb6f 100644 --- a/e2e/react-router/basic-file-based/src/routes/anchor.tsx +++ b/e2e/react-router/basic-file-based/src/routes/anchor.tsx @@ -25,10 +25,6 @@ const anchors: Array<{ title: 'Smooth Scroll', hashScrollIntoView: { behavior: 'smooth' }, }, - { - id: '/\\section', - title: 'Fragment with slashes', - }, ] as const function AnchorSection({ id, title }: { id: string; title: string }) { diff --git a/e2e/react-router/basic-file-based/src/routes/document-navigation-target.tsx b/e2e/react-router/basic-file-based/src/routes/document-navigation-target.tsx deleted file mode 100644 index 905b0c31b9..0000000000 --- a/e2e/react-router/basic-file-based/src/routes/document-navigation-target.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/document-navigation-target')({}) diff --git a/e2e/react-router/basic-file-based/src/routes/document-navigation.tsx b/e2e/react-router/basic-file-based/src/routes/document-navigation.tsx deleted file mode 100644 index 66c2b704d1..0000000000 --- a/e2e/react-router/basic-file-based/src/routes/document-navigation.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { Link, createFileRoute } from '@tanstack/react-router' -import type { AnyRouter } from '@tanstack/react-router' - -export const Route = createFileRoute('/document-navigation')({ - component: DocumentNavigation, -}) - -const adminHref = `http://127.0.0.1:${window.location.port}/external.html` - -function DocumentNavigation() { - const navigate = Route.useNavigate() - - return ( -
- - - - - - - - Navigate to admin - - Replace with admin - - - Reload admin - - - Navigate with external mask - - - Replace with external mask - - to={`${adminHref}?value=a+b&value=a%20b#raw%2f`}> - Navigate to absolute href - - - Reload relative href - -
- ) -} diff --git a/e2e/react-router/basic-file-based/src/routes/history-blocking.tsx b/e2e/react-router/basic-file-based/src/routes/history-blocking.tsx deleted file mode 100644 index 019893a628..0000000000 --- a/e2e/react-router/basic-file-based/src/routes/history-blocking.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import * as React from 'react' -import { - Link, - createFileRoute, - useBlocker, - useRouter, -} from '@tanstack/react-router' - -export const Route = createFileRoute('/history-blocking')({ - validateSearch: (search: Record) => ({ - step: Number(search.step) || 0, - }), - component: HistoryBlocking, -}) - -function HistoryBlocking() { - const router = useRouter() - const { step } = Route.useSearch() - const [draft, setDraft] = React.useState('') - const [ignoreBlocker, setIgnoreBlocker] = React.useState(false) - const [documentHref, setDocumentHref] = React.useState('/') - const [navigationError, setNavigationError] = React.useState('') - const { status, reset, proceed } = useBlocker({ - shouldBlockFn: () => draft.length > 0, - enableBeforeUnload: draft.length > 0, - withResolver: true, - }) - - return ( -
-

History blocking

-

Step {step}

- - -

{draft ? 'Unsaved changes' : 'No changes'}

-

Blocker status: {status}

- {status === 'blocked' && ( - <> - - - - )} - - {[false, true].map((replace) => ( - - ))} - {navigationError &&

{navigationError}

} - - Add history entry - - - - {[-2, -1, 0, 1, 2].map((delta) => ( - - ))} - Leave document -
- ) -} diff --git a/e2e/react-router/basic-file-based/tests/app.spec.ts b/e2e/react-router/basic-file-based/tests/app.spec.ts index bd9c365484..ae87d350ce 100644 --- a/e2e/react-router/basic-file-based/tests/app.spec.ts +++ b/e2e/react-router/basic-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' test.beforeEach(async ({ page }) => { diff --git a/e2e/react-router/basic-file-based/tests/document-navigation.spec.ts b/e2e/react-router/basic-file-based/tests/document-navigation.spec.ts deleted file mode 100644 index bd81eaa44b..0000000000 --- a/e2e/react-router/basic-file-based/tests/document-navigation.spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' - -const appPort = Number(process.env.E2E_APP_PORT ?? 0) -const adminHref = `http://127.0.0.1:${appPort}/external.html` - -for (const role of ['button', 'link'] as const) { - for (const { name, href, replace } of [ - { name: 'Navigate to admin', href: adminHref, replace: false }, - { name: 'Replace with admin', href: adminHref, replace: true }, - { name: 'Reload admin', href: adminHref, replace: false }, - { name: 'Navigate with external mask', href: adminHref, replace: false }, - { name: 'Replace with external mask', href: adminHref, replace: true }, - { - name: 'Navigate to absolute href', - href: `${adminHref}?value=a+b&value=a%20b#raw%2f`, - replace: false, - }, - ]) { - test(`${role}: ${name}`, async ({ page }) => { - const errors: Array = [] - page.on('pageerror', (error) => errors.push(error)) - await page.goto('/') - await page.goto('/document-navigation') - const historyLength = await page.evaluate(() => window.history.length) - const response = page.waitForResponse(href.split('#')[0]) - - const control = page.getByRole(role, { name, exact: true }) - if (role === 'link') { - await expect(control).toHaveAttribute('href', href) - } - await control.click() - - expect((await response).request().isNavigationRequest()).toBe(true) - await expect(page).toHaveURL(href) - await expect(page.locator('body')).toHaveText('Hello World') - // Cross-origin Links use native anchors, which push even with replace=true. - const replacesHistory = role === 'button' && replace - expect(await page.evaluate(() => window.history.length)).toBe( - historyLength + (replacesHistory ? 0 : 1), - ) - expect(errors).toEqual([]) - - await page.goBack() - - await expect(page).toHaveURL( - replacesHistory ? '/' : '/document-navigation', - ) - }) - } - - test(`${role}: explicit reload resolves a raw relative href in the browser`, async ({ - page, - }) => { - await page.goto('/document-navigation') - const response = page.waitForResponse((candidate) => - candidate.request().isNavigationRequest(), - ) - - await page - .getByRole(role, { name: 'Reload relative href', exact: true }) - .click() - - expect((await response).request().resourceType()).toBe('document') - await expect(page).toHaveURL('/?value=a+b&value=a%20b#raw%2f') - await expect(page.getByRole('heading')).toContainText('Welcome Home!') - }) -} diff --git a/e2e/react-router/basic-file-based/tests/fullpath-types.spec.ts b/e2e/react-router/basic-file-based/tests/fullpath-types.spec.ts index 8f4df9f966..d1bd9c1c41 100644 --- a/e2e/react-router/basic-file-based/tests/fullpath-types.spec.ts +++ b/e2e/react-router/basic-file-based/tests/fullpath-types.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.describe('FullPath type/runtime match (Issues #4892, #2675, #6403)', () => { test.describe('Pathless layout routes should have parent fullPath, not empty string', () => { diff --git a/e2e/react-router/basic-file-based/tests/history-blocking.spec.ts b/e2e/react-router/basic-file-based/tests/history-blocking.spec.ts deleted file mode 100644 index df1f863a03..0000000000 --- a/e2e/react-router/basic-file-based/tests/history-blocking.spec.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' -import type { Page } from '@playwright/test' - -async function prepareDocumentTraversal(page: Page, delta: number) { - if (delta < 0) { - for (let i = 0; i < Math.abs(delta); i++) { - await page.goto(`/?entry=${i}`) - } - await page.goto('/history-blocking') - } else { - await page.goto('/history-blocking') - for (let i = 0; i < delta; i++) { - await page.goto(`/?entry=${i}`) - } - for (let i = 0; i < delta; i++) { - await page.goBack() - } - } - await expect( - page.getByRole('heading', { name: 'History blocking' }), - ).toBeVisible() - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - await expect(page.getByText('Unsaved changes', { exact: true })).toBeVisible() -} - -async function prepareSameDocumentTraversal(page: Page, delta: number) { - await page.goto('/history-blocking') - for (let step = 1; step <= Math.abs(delta); step++) { - await page.getByRole('link', { name: 'Add history entry' }).click() - await expect(page.getByText(`Step ${step}`, { exact: true })).toBeVisible() - } - if (delta > 0) { - for (let step = delta - 1; step >= 0; step--) { - await page - .getByRole('button', { name: 'History back', exact: true }) - .click() - await expect( - page.getByText(`Step ${step}`, { exact: true }), - ).toBeVisible() - } - } - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - await expect(page.getByText('Unsaved changes', { exact: true })).toBeVisible() -} - -function dismissUnloadDialogs(page: Page) { - const dialogs: Array = [] - page.on('dialog', async (dialog) => { - dialogs.push(dialog.type()) - await dialog.dismiss() - }) - return dialogs -} - -for (const [direction, delta] of [ - ['back', -1], - ['forward', 1], - ['go(-1)', -1], - ['go(1)', 1], - ['go(-2)', -2], - ['go(2)', 2], -] as const) { - test(`history ${direction} to another document warns before losing edits`, async ({ - page, - }) => { - await prepareDocumentTraversal(page, delta) - const dialogs = dismissUnloadDialogs(page) - const originalUrl = page.url() - - await page - .getByRole('button', { name: `History ${direction}`, exact: true }) - .click() - - await expect.poll(() => dialogs).toEqual(['beforeunload']) - await expect(page).toHaveURL(originalUrl) - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - }) - - test(`history ${direction} can explicitly bypass a document unload warning`, async ({ - page, - }) => { - await prepareDocumentTraversal(page, delta) - await page.getByLabel('Ignore blockers').check() - const dialogs = dismissUnloadDialogs(page) - - await page - .getByRole('button', { name: `History ${direction}`, exact: true }) - .click() - - await expect(page).toHaveURL(/\/\?entry=\d$/) - expect(dialogs).toEqual([]) - }) - - test(`ignored same-document ${direction} preserves the next document unload warning`, async ({ - page, - }) => { - await prepareSameDocumentTraversal(page, delta) - await page.getByLabel('Ignore blockers').check() - const dialogs = dismissUnloadDialogs(page) - - await page - .getByRole('button', { name: `History ${direction}`, exact: true }) - .click() - - await expect( - page.getByText(`Step ${delta < 0 ? 0 : delta}`, { - exact: true, - }), - ).toBeVisible() - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - await expect( - page.getByText('Blocker status: idle', { exact: true }), - ).toBeVisible() - expect(dialogs).toEqual([]) - - await page.getByRole('link', { name: 'Leave document' }).click() - - await expect.poll(() => dialogs).toEqual(['beforeunload']) - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - }) - - test(`same-document ${direction} still checks blockers by default`, async ({ - page, - }) => { - await prepareSameDocumentTraversal(page, delta) - const originalUrl = page.url() - - await page - .getByRole('button', { name: `History ${direction}`, exact: true }) - .click() - - await expect( - page.getByText('Blocker status: blocked', { exact: true }), - ).toBeVisible() - await expect( - page.getByText(`Step ${delta < 0 ? -delta : 0}`, { exact: true }), - ).toBeVisible() - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - await page.getByRole('button', { name: 'Stay here' }).click() - await expect( - page.getByText('Blocker status: idle', { exact: true }), - ).toBeVisible() - await expect(page).toHaveURL(originalUrl) - await expect( - page.getByText(`Step ${delta < 0 ? -delta : 0}`, { exact: true }), - ).toBeVisible() - }) -} - -for (const ignoreBlocker of [false, true]) { - test(`history go(0) ${ignoreBlocker ? 'can bypass' : 'preserves'} the reload warning`, async ({ - page, - }) => { - await page.goto('/history-blocking') - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - await expect( - page.getByText('Unsaved changes', { exact: true }), - ).toBeVisible() - if (ignoreBlocker) { - await page.getByLabel('Ignore blockers').check() - } - const dialogs = dismissUnloadDialogs(page) - - await page - .getByRole('button', { name: 'History go(0)', exact: true }) - .click() - - if (ignoreBlocker) { - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue('') - expect(dialogs).toEqual([]) - } else { - await expect.poll(() => dialogs).toEqual(['beforeunload']) - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - } - }) -} - -for (const action of ['Navigate document', 'Replace document']) { - test(`${action}: invalid URLs preserve the next unload warning`, async ({ - page, - }) => { - await page.goto('/history-blocking') - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - await page.getByLabel('Ignore blockers').check() - await page.getByLabel('Document destination').fill('https://[') - const dialogs = dismissUnloadDialogs(page) - - await page.getByRole('button', { name: action, exact: true }).click() - - await expect(page.getByRole('status')).toBeVisible() - expect(dialogs).toEqual([]) - await page.getByRole('link', { name: 'Leave document' }).click() - - await expect.poll(() => dialogs).toEqual(['beforeunload']) - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - }) - - test(`${action}: the current fragment preserves the next unload warning`, async ({ - page, - }) => { - await page.goto('/history-blocking?step=0#same') - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - await page.getByLabel('Ignore blockers').check() - await page.getByLabel('Document destination').fill('#same') - const dialogs = dismissUnloadDialogs(page) - - await page.getByRole('button', { name: action, exact: true }).click() - - await expect(page).toHaveURL('/history-blocking?step=0#same') - expect(dialogs).toEqual([]) - await page.getByRole('link', { name: 'Leave document' }).click() - - await expect.poll(() => dialogs).toEqual(['beforeunload']) - await expect(page.getByLabel('Draft', { exact: true })).toHaveValue( - 'Unsaved draft', - ) - }) - - for (const ignoreBlocker of [false, true]) { - test(`${action}: ${ignoreBlocker ? 'skipped' : 'accepted'} blockers need no native confirmation`, async ({ - page, - }) => { - await page.goto('/history-blocking') - await page.getByLabel('Draft', { exact: true }).fill('Unsaved draft') - if (ignoreBlocker) { - await page.getByLabel('Ignore blockers').check() - } - const dialogs = dismissUnloadDialogs(page) - - await page.getByRole('button', { name: action, exact: true }).click() - if (!ignoreBlocker) { - await page - .getByRole('button', { name: 'Continue navigation', exact: true }) - .click() - } - - await expect(page).toHaveURL('/') - expect(dialogs).toEqual([]) - }) - } -} diff --git a/e2e/react-router/basic-file-based/tests/hover-preload-hash.spec.ts b/e2e/react-router/basic-file-based/tests/hover-preload-hash.spec.ts index 1263faf391..b090c2a6b7 100644 --- a/e2e/react-router/basic-file-based/tests/hover-preload-hash.spec.ts +++ b/e2e/react-router/basic-file-based/tests/hover-preload-hash.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import { toRuntimePath } from '@tanstack/router-e2e-utils' test('clicking hash link then hovering another link does not scroll back to hash', async ({ diff --git a/e2e/react-router/basic-file-based/tests/mask.spec.ts b/e2e/react-router/basic-file-based/tests/mask.spec.ts index d5076a5854..1b77760de6 100644 --- a/e2e/react-router/basic-file-based/tests/mask.spec.ts +++ b/e2e/react-router/basic-file-based/tests/mask.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test('route masks transform params and expose masked pathname in the browser (react)', async ({ page, diff --git a/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts b/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts index ea0e585c75..dccdfd4acf 100644 --- a/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts +++ b/e2e/react-router/basic-file-based/tests/non-nested-paths.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' const testCases: Array<{ name: string diff --git a/e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts b/e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts index bbb2dac7a1..2f0fe256cd 100644 --- a/e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts +++ b/e2e/react-router/basic-file-based/tests/open-redirect-prevention.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.describe('Open redirect prevention', () => { test.describe('CRLF injection attacks', () => { diff --git a/e2e/react-router/basic-file-based/tests/params.spec.ts b/e2e/react-router/basic-file-based/tests/params.spec.ts index fa0377f3ca..a867696ff8 100644 --- a/e2e/react-router/basic-file-based/tests/params.spec.ts +++ b/e2e/react-router/basic-file-based/tests/params.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' test.beforeEach(async ({ page }) => { diff --git a/e2e/react-router/basic-file-based/tests/redirect.spec.ts b/e2e/react-router/basic-file-based/tests/redirect.spec.ts index aaa9c1a6b6..1845cc16a4 100644 --- a/e2e/react-router/basic-file-based/tests/redirect.spec.ts +++ b/e2e/react-router/basic-file-based/tests/redirect.spec.ts @@ -1,13 +1,17 @@ import queryString from 'node:querystring' -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import combinateImport from 'combinate' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } // somehow playwright does not correctly import default exports const combinate = (combinateImport as any).default as typeof combinateImport -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const EXTERNAL_ORIGIN = `http://127.0.0.1:${PORT}` +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_HOST_PORT = await getDummyServerPort(packageJson.name) test.describe('redirects', () => { const internalNavigationTestMatrix = combinate({ @@ -35,7 +39,7 @@ test.describe('redirects', () => { const requestPromise = new Promise((resolve) => { page.on('request', (request) => { if ( - request.url() === 'https://jsonplaceholder.typicode.com/posts' + request.url() === `http://localhost:${EXTERNAL_HOST_PORT}/posts` ) { requestHappened = true resolve() @@ -104,7 +108,7 @@ test.describe('redirects', () => { await page.waitForLoadState('networkidle') const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, }) if (scenario === 'navigate') { @@ -114,7 +118,7 @@ test.describe('redirects', () => { await page.goto(`/redirect/external/via-${thrower}?${q}`) } - const url = `${EXTERNAL_ORIGIN}/` + const url = `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) @@ -180,7 +184,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, }) if (scenario === 'navigate') { @@ -193,7 +197,7 @@ test.describe('redirects', () => { ) } - const url = `${EXTERNAL_ORIGIN}/` + const url = `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) }) @@ -250,7 +254,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, }) if (scenario === 'navigate') { @@ -263,7 +267,7 @@ test.describe('redirects', () => { ) } - const url = `${EXTERNAL_ORIGIN}/` + const url = `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) }) diff --git a/e2e/react-router/basic-file-based/tests/relative.spec.ts b/e2e/react-router/basic-file-based/tests/relative.spec.ts index f62c248680..4850d3630d 100644 --- a/e2e/react-router/basic-file-based/tests/relative.spec.ts +++ b/e2e/react-router/basic-file-based/tests/relative.spec.ts @@ -1,11 +1,12 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import combinateImport from 'combinate' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } // somehow playwright does not correctly import default exports const combinate = (combinateImport as any).default as typeof combinateImport -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) test.describe('relative_routing', () => { const internalNavigationTestMatrix = combinate({ diff --git a/e2e/react-router/basic-file-based/tests/scroll-into-view.spec.ts b/e2e/react-router/basic-file-based/tests/scroll-into-view.spec.ts index 68dfededc2..d1af86adfb 100644 --- a/e2e/react-router/basic-file-based/tests/scroll-into-view.spec.ts +++ b/e2e/react-router/basic-file-based/tests/scroll-into-view.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' const anchors = { @@ -33,21 +32,6 @@ test.beforeEach(async ({ page }) => { await page.goto('/anchor') }) -test('slash and backslash fragment data selects the matching anchor', async ({ - page, -}) => { - const link = page.getByRole('link', { name: 'Fragment with slashes' }) - const heading = page.getByRole('heading', { name: 'Fragment with slashes' }) - await link.click() - await expect(page).toHaveURL(/#\/\\section$/) - await expect(link).toHaveClass(activeClass) - await expect(heading).toBeInViewport() - - await page.reload() - await expect(link).toHaveClass(activeClass) - await expect(heading).toBeInViewport() -}) - // Testing the `Link` component with the `hashScrollIntoView` prop test('Navigating via anchor `Link` with default hash scrolling behavior', async ({ page, diff --git a/e2e/react-router/basic-file-based/tests/search-params.spec.ts b/e2e/react-router/basic-file-based/tests/search-params.spec.ts index a99488a47a..d6307cbcf8 100644 --- a/e2e/react-router/basic-file-based/tests/search-params.spec.ts +++ b/e2e/react-router/basic-file-based/tests/search-params.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.describe('/search-params/default', () => { test('Directly visiting the route without search param set', async ({ diff --git a/e2e/react-router/basic-file-based/tests/setup/global.setup.ts b/e2e/react-router/basic-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basic-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-react-query-file-based/package.json b/e2e/react-router/basic-react-query-file-based/package.json index 3a90a3cd6d..dd6c71afdd 100644 --- a/e2e/react-router/basic-react-query-file-based/package.json +++ b/e2e/react-router/basic-react-query-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -19,12 +19,12 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-react-query-file-based/playwright.config.ts b/e2e/react-router/basic-react-query-file-based/playwright.config.ts index fbda9bd451..f3083ff8b6 100644 --- a/e2e/react-router/basic-react-query-file-based/playwright.config.ts +++ b/e2e/react-router/basic-react-query-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -12,15 +17,17 @@ export default defineConfig({ workers: 1, reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-react-query-file-based/src/posts.tsx b/e2e/react-router/basic-react-query-file-based/src/posts.tsx index 1f6cb8e308..1becc2c242 100644 --- a/e2e/react-router/basic-react-query-file-based/src/posts.tsx +++ b/e2e/react-router/basic-react-query-file-based/src/posts.tsx @@ -8,7 +8,11 @@ export type PostType = { export class PostNotFoundError extends Error {} -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts b/e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts index 115e4bce47..62ce94f2c8 100644 --- a/e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts +++ b/e2e/react-router/basic-react-query-file-based/src/routeTree.gen.ts @@ -9,33 +9,29 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' import { Route as PostsRouteImport } from './routes/posts' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const LayoutRoute = LayoutRouteImport.update({ id: '/_layout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, -} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -46,16 +42,20 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -114,11 +114,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_layout': { @@ -128,19 +128,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -156,12 +149,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -170,6 +163,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } } } diff --git a/e2e/react-router/basic-react-query-file-based/tests/app.spec.ts b/e2e/react-router/basic-react-query-file-based/tests/app.spec.ts index 2b42d6d589..d80e8dada5 100644 --- a/e2e/react-router/basic-react-query-file-based/tests/app.spec.ts +++ b/e2e/react-router/basic-react-query-file-based/tests/app.spec.ts @@ -1,23 +1,24 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' +import { getDummyServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } test.beforeEach(async ({ page }) => { await page.goto('/') }) -test('GetPosts with networking disabled', async ({ page, context }) => { - await page.goto('about:blank') - await context.setOffline(true) - const { status, posts, post } = await page.evaluate(async () => { - const response = await fetch('https://jsonplaceholder.typicode.com/posts') - const posts = await response.json() - const post = await fetch( - 'https://jsonplaceholder.typicode.com/posts/1', - ).then((r) => r.json()) - return { status: response.status, posts, post } - }) - expect(status).toBe(200) +test('GetPosts', async () => { + const port = await getDummyServerPort(packageJson.name) + const res = await fetch(`http://localhost:${port}/posts`) + + expect(res.status).toBe(200) + + const posts = await res.json() + expect(posts.length).toBeGreaterThan(0) + + const postRes = await fetch(`http://localhost:${port}/posts/1`) + expect(postRes.status).toBe(200) + const post = await postRes.json() expect(post).toEqual(posts[0]) }) diff --git a/e2e/react-router/basic-react-query-file-based/tests/setup/global.setup.ts b/e2e/react-router/basic-react-query-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-react-query-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-react-query-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basic-react-query-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-react-query-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-react-query/package.json b/e2e/react-router/basic-react-query/package.json index 8f28340f56..b66abda5fb 100644 --- a/e2e/react-router/basic-react-query/package.json +++ b/e2e/react-router/basic-react-query/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,11 +18,11 @@ "@tanstack/router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-react-query/playwright.config.ts b/e2e/react-router/basic-react-query/playwright.config.ts index 4eead86444..ab42c7c607 100644 --- a/e2e/react-router/basic-react-query/playwright.config.ts +++ b/e2e/react-router/basic-react-query/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-react-query/src/posts.ts b/e2e/react-router/basic-react-query/src/posts.ts index ffc5a274b7..5e2a2d3aa3 100644 --- a/e2e/react-router/basic-react-query/src/posts.ts +++ b/e2e/react-router/basic-react-query/src/posts.ts @@ -9,7 +9,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/react-router/basic-react-query/tests/app.spec.ts b/e2e/react-router/basic-react-query/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/react-router/basic-react-query/tests/app.spec.ts +++ b/e2e/react-router/basic-react-query/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-react-query/tests/setup/global.setup.ts b/e2e/react-router/basic-react-query/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-react-query/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-react-query/tests/setup/global.teardown.ts b/e2e/react-router/basic-react-query/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-react-query/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-scroll-restoration/package.json b/e2e/react-router/basic-scroll-restoration/package.json index c13e92cec8..ab00360d48 100644 --- a/e2e/react-router/basic-scroll-restoration/package.json +++ b/e2e/react-router/basic-scroll-restoration/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,11 +17,11 @@ "@tanstack/react-virtual": "^3.13.0", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-scroll-restoration/playwright.config.ts b/e2e/react-router/basic-scroll-restoration/playwright.config.ts index 6a684ac89e..0c5cee43e4 100644 --- a/e2e/react-router/basic-scroll-restoration/playwright.config.ts +++ b/e2e/react-router/basic-scroll-restoration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-virtual-file-based/package.json b/e2e/react-router/basic-virtual-file-based/package.json index 0343de0846..7b9c5945ee 100644 --- a/e2e/react-router/basic-virtual-file-based/package.json +++ b/e2e/react-router/basic-virtual-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,12 +18,12 @@ "@tanstack/virtual-file-routes": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-virtual-file-based/playwright.config.ts b/e2e/react-router/basic-virtual-file-based/playwright.config.ts index 4eead86444..c5de6b5611 100644 --- a/e2e/react-router/basic-virtual-file-based/playwright.config.ts +++ b/e2e/react-router/basic-virtual-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -17,10 +22,13 @@ export default defineConfig({ baseURL, }, + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-virtual-file-based/src/posts.tsx b/e2e/react-router/basic-virtual-file-based/src/posts.tsx index cc3cb0f9c8..01831e335c 100644 --- a/e2e/react-router/basic-virtual-file-based/src/posts.tsx +++ b/e2e/react-router/basic-virtual-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-virtual-file-based/src/routeTree.gen.ts b/e2e/react-router/basic-virtual-file-based/src/routeTree.gen.ts index eb98ba28c5..72e6928d43 100644 --- a/e2e/react-router/basic-virtual-file-based/src/routeTree.gen.ts +++ b/e2e/react-router/basic-virtual-file-based/src/routeTree.gen.ts @@ -9,76 +9,76 @@ // 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 homeRouteImport } from './routes/home' -import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' import { Route as postsPostsRouteImport } from './routes/posts/posts' -import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' -import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' -import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' +import { Route as homeRouteImport } from './routes/home' import { Route as postsPostsDetailRouteImport } from './routes/posts/posts-detail' -import { Route as aRouteImport } from './routes/a' -import { Route as bRouteImport } from './routes/b' +import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' +import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' import { Route as ClassicHelloIndexRouteImport } from './routes/file-based-subtree/hello/index' -import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as ClassicHelloWorldRouteImport } from './routes/file-based-subtree/hello/world' +import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' +import { Route as bRouteImport } from './routes/b' +import { Route as aRouteImport } from './routes/a' -const homeRoute = homeRouteImport.update({ - id: '/', - path: '/', +const postsPostsRoute = postsPostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ id: '/_first', getParentRoute: () => rootRouteImport, } as any) -const postsPostsRoute = postsPostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ - id: '/_second', - getParentRoute: () => layoutFirstLayoutRoute, -} as any) -const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ - id: '/classic/hello', - path: '/classic/hello', - getParentRoute: () => rootRouteImport, -} as any) -const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ +const homeRoute = homeRouteImport.update({ id: '/', path: '/', - getParentRoute: () => postsPostsRoute, + getParentRoute: () => rootRouteImport, } as any) const postsPostsDetailRoute = postsPostsDetailRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => postsPostsRoute, } as any) -const aRoute = aRouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => layoutSecondLayoutRoute, +const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ + id: '/_second', + getParentRoute: () => layoutFirstLayoutRoute, } as any) -const bRoute = bRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => layoutSecondLayoutRoute, +const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => postsPostsRoute, +} as any) +const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ + id: '/classic/hello', + path: '/classic/hello', + getParentRoute: () => rootRouteImport, } as any) const ClassicHelloIndexRoute = ClassicHelloIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ClassicHelloRouteRoute, } as any) +const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ + id: '/world', + path: '/world', + getParentRoute: () => ClassicHelloRouteRoute, +} as any) const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ id: '/universe', path: '/universe', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ - id: '/world', - path: '/world', - getParentRoute: () => ClassicHelloRouteRoute, +const bRoute = bRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => layoutSecondLayoutRoute, +} as any) +const aRoute = aRouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => layoutSecondLayoutRoute, } as any) export interface FileRoutesByFullPath { @@ -166,11 +166,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof homeRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof postsPostsRouteImport parentRoute: typeof rootRouteImport } '/_first': { @@ -180,33 +180,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof layoutFirstLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof postsPostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_first/_second': { - id: '/_first/_second' - path: '' - fullPath: '/' - preLoaderRoute: typeof layoutSecondLayoutRouteImport - parentRoute: typeof layoutFirstLayoutRoute - } - '/classic/hello': { - id: '/classic/hello' - path: '/classic/hello' - fullPath: '/classic/hello' - preLoaderRoute: typeof ClassicHelloRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof postsPostsHomeRouteImport - parentRoute: typeof postsPostsRoute + fullPath: '/' + preLoaderRoute: typeof homeRouteImport + parentRoute: typeof rootRouteImport } '/posts/$postId': { id: '/posts/$postId' @@ -215,19 +194,26 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof postsPostsDetailRouteImport parentRoute: typeof postsPostsRoute } - '/_first/_second/layout-a': { - id: '/_first/_second/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof aRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/_first/_second': { + id: '/_first/_second' + path: '' + fullPath: '/' + preLoaderRoute: typeof layoutSecondLayoutRouteImport + parentRoute: typeof layoutFirstLayoutRoute } - '/_first/_second/layout-b': { - id: '/_first/_second/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof bRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof postsPostsHomeRouteImport + parentRoute: typeof postsPostsRoute + } + '/classic/hello': { + id: '/classic/hello' + path: '/classic/hello' + fullPath: '/classic/hello' + preLoaderRoute: typeof ClassicHelloRouteRouteImport + parentRoute: typeof rootRouteImport } '/classic/hello/': { id: '/classic/hello/' @@ -236,6 +222,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ClassicHelloIndexRouteImport parentRoute: typeof ClassicHelloRouteRoute } + '/classic/hello/world': { + id: '/classic/hello/world' + path: '/world' + fullPath: '/classic/hello/world' + preLoaderRoute: typeof ClassicHelloWorldRouteImport + parentRoute: typeof ClassicHelloRouteRoute + } '/classic/hello/universe': { id: '/classic/hello/universe' path: '/universe' @@ -243,12 +236,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ClassicHelloUniverseRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/classic/hello/world': { - id: '/classic/hello/world' - path: '/world' - fullPath: '/classic/hello/world' - preLoaderRoute: typeof ClassicHelloWorldRouteImport - parentRoute: typeof ClassicHelloRouteRoute + '/_first/_second/layout-b': { + id: '/_first/_second/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof bRouteImport + parentRoute: typeof layoutSecondLayoutRoute + } + '/_first/_second/layout-a': { + id: '/_first/_second/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof aRouteImport + parentRoute: typeof layoutSecondLayoutRoute } } } diff --git a/e2e/react-router/basic-virtual-file-based/tests/app.spec.ts b/e2e/react-router/basic-virtual-file-based/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/react-router/basic-virtual-file-based/tests/app.spec.ts +++ b/e2e/react-router/basic-virtual-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-virtual-file-based/tests/setup/global.setup.ts b/e2e/react-router/basic-virtual-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-virtual-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-virtual-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basic-virtual-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-virtual-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/package.json b/e2e/react-router/basic-virtual-named-export-config-file-based/package.json index 6bdb1248f6..f3dbf81ce0 100644 --- a/e2e/react-router/basic-virtual-named-export-config-file-based/package.json +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,12 +18,12 @@ "@tanstack/virtual-file-routes": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts b/e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts index 4eead86444..ab42c7c607 100644 --- a/e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/src/posts.tsx b/e2e/react-router/basic-virtual-named-export-config-file-based/src/posts.tsx index 97c96d77eb..ae7142c5b6 100644 --- a/e2e/react-router/basic-virtual-named-export-config-file-based/src/posts.tsx +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts index 7d2074182f..0aedada786 100644 --- a/e2e/react-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic/package.json b/e2e/react-router/basic/package.json index 4ff68f5cda..c7c1661933 100644 --- a/e2e/react-router/basic/package.json +++ b/e2e/react-router/basic/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -16,12 +16,11 @@ "@tanstack/react-router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", - "tailwindcss": "^4.2.2", - "zod": "catalog:" + "redaxios": "^0.5.1", + "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/basic/playwright.config.ts b/e2e/react-router/basic/playwright.config.ts index 4eead86444..22c9bdcd7e 100644 --- a/e2e/react-router/basic/playwright.config.ts +++ b/e2e/react-router/basic/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/basic/src/main.tsx b/e2e/react-router/basic/src/main.tsx index 49fa054776..36e5106654 100644 --- a/e2e/react-router/basic/src/main.tsx +++ b/e2e/react-router/basic/src/main.tsx @@ -1,5 +1,3 @@ -import { useState } from 'react' -import { createPortal } from 'react-dom' import ReactDOM from 'react-dom/client' import { ErrorComponent, @@ -11,19 +9,12 @@ import { createRouter, redirect, } from '@tanstack/react-router' -import { - TanStackRouterDevtoolsInProd as TanStackRouterDevtools, - TanStackRouterDevtoolsPanelInProd as TanStackRouterDevtoolsPanel, -} from '@tanstack/react-router-devtools' -import { z } from 'zod' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' import { NotFoundError, fetchPost, fetchPosts } from './posts' import './styles.css' import type { ErrorComponentProps } from '@tanstack/react-router' const rootRoute = createRootRoute({ - validateSearch: z.object({ - devtools: z.enum(['panel', 'shadow']).optional().catch(undefined), - }), component: RootComponent, notFoundComponent: () => { return ( @@ -36,8 +27,6 @@ const rootRoute = createRootRoute({ }) function RootComponent() { - const { devtools } = rootRoute.useSearch() - return ( <>
@@ -97,57 +86,12 @@ function RootComponent() {
-
- Devtools: - {(['floating', 'panel', 'shadow'] as const).map((mode) => ( - ({ - ...prev, - devtools: mode === 'floating' ? undefined : mode, - })} - className={ - (devtools ?? 'floating') === mode ? 'font-bold' : undefined - } - > - {mode} - - ))} -
+ TanStack Logo +

+ Next.js TanStack Start +

+
+ Docs + +
- {devtools === 'panel' ? ( - - ) : devtools === 'shadow' ? ( - - ) : ( - - )} + ) } - -function ShadowDevtoolsPanel() { - const [shadowRoot, setShadowRoot] = useState() - - return ( -
{ - if (host) { - setShadowRoot(host.shadowRoot ?? host.attachShadow({ mode: 'open' })) - } - }} - > - {shadowRoot - ? createPortal( - , - shadowRoot, - ) - : null} -
- ) -} const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', diff --git a/e2e/react-router/basic/src/posts.ts b/e2e/react-router/basic/src/posts.ts index f72d16fee3..e859645746 100644 --- a/e2e/react-router/basic/src/posts.ts +++ b/e2e/react-router/basic/src/posts.ts @@ -8,7 +8,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/react-router/basic/tests/app.spec.ts b/e2e/react-router/basic/tests/app.spec.ts index 9c0a6b6901..ec0e24d8a4 100644 --- a/e2e/react-router/basic/tests/app.spec.ts +++ b/e2e/react-router/basic/tests/app.spec.ts @@ -1,7 +1,8 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/basic/tests/devtools.spec.ts b/e2e/react-router/basic/tests/devtools.spec.ts deleted file mode 100644 index b8a7e803e6..0000000000 --- a/e2e/react-router/basic/tests/devtools.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' - -for (const mode of ['panel', 'shadow', 'floating']) { - test(`devtools preserve typography and explorer indentation in ${mode} mode`, async ({ - page, - }) => { - await page.goto(mode === 'floating' ? '/' : `/?devtools=${mode}`) - if (mode === 'floating') { - await page - .getByRole('button', { name: 'Open TanStack Router Devtools' }) - .click() - } - - const panel = page.locator('.TanStackRouterDevtoolsPanel') - const router = panel.getByRole('button', { name: /^Router\s*\d+ items/ }) - const state = panel.getByRole('button', { name: /^state\s*\d+ items/ }) - await expect(router).toBeVisible() - await expect(state).toBeVisible() - await expect(router).toHaveCSS('font-size', '12px') - await expect(router).toHaveCSS('gap', '4px') - await expect( - panel.getByText('Pathname', { exact: true }).locator('..'), - ).toHaveCSS('padding-left', '8px') - - const routerBox = await router.boundingBox() - const stateBox = await state.boundingBox() - expect(stateBox!.x - routerBox!.x).toBe(18) - - if (mode !== 'floating') { - await page.addStyleTag({ content: ':root { font-size: 20px; }' }) - await expect(router).toHaveCSS('font-size', '15px') - await expect(router).toHaveCSS('gap', '5px') - - await page.addStyleTag({ - content: ':root { --tsrd-font-size: 24px; }', - }) - await expect(router).toHaveCSS('font-size', '18px') - await expect(router).toHaveCSS('gap', '6px') - } - }) -} diff --git a/e2e/react-router/basic/tests/params.spec.ts b/e2e/react-router/basic/tests/params.spec.ts index f673138047..ac18f39864 100644 --- a/e2e/react-router/basic/tests/params.spec.ts +++ b/e2e/react-router/basic/tests/params.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.describe('params operations + prefix/suffix', () => { test.beforeEach(async ({ page }) => { diff --git a/e2e/react-router/basic/tests/setup/global.setup.ts b/e2e/react-router/basic/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/basic/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/basic/tests/setup/global.teardown.ts b/e2e/react-router/basic/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/basic/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/escaped-special-strings/package.json b/e2e/react-router/escaped-special-strings/package.json index af401c49d3..961d2423cd 100644 --- a/e2e/react-router/escaped-special-strings/package.json +++ b/e2e/react-router/escaped-special-strings/package.json @@ -9,7 +9,7 @@ "preview": "vite preview", "start": "vite", "test:e2e": "pnpm run test:e2e:default", - "test:e2e:default": "playwright test --project=chromium" + "test:e2e:default": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -18,7 +18,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/escaped-special-strings/playwright.config.ts b/e2e/react-router/escaped-special-strings/playwright.config.ts index 629ddefccf..6e4e1d7703 100644 --- a/e2e/react-router/escaped-special-strings/playwright.config.ts +++ b/e2e/react-router/escaped-special-strings/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` const command = `pnpm build && pnpm preview --port ${PORT}` @@ -16,6 +21,9 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, @@ -23,12 +31,15 @@ export default defineConfig({ webServer: { command, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { MODE: process.env.MODE || '', VITE_MODE: process.env.MODE || '', + VITE_NODE_ENV: 'test', + VITE_EXTERNAL_PORT: String(EXTERNAL_PORT), + VITE_SERVER_PORT: String(PORT), PORT: String(PORT), }, }, diff --git a/e2e/react-router/escaped-special-strings/src/routeTree.gen.ts b/e2e/react-router/escaped-special-strings/src/routeTree.gen.ts index 50a5f8b305..b0e04cd8e8 100644 --- a/e2e/react-router/escaped-special-strings/src/routeTree.gen.ts +++ b/e2e/react-router/escaped-special-strings/src/routeTree.gen.ts @@ -10,30 +10,20 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as Char91indexChar93RouteImport } from './routes/[index]' -import { Route as IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/[_]layout' -import { Route as BlogRouteImport } from './routes/blog[_]' -import { Route as Char91lazyChar93RouteImport } from './routes/[lazy]' import { Route as Char91routeChar93RouteImport } from './routes/[route]' +import { Route as Char91lazyChar93RouteImport } from './routes/[lazy]' +import { Route as BlogRouteImport } from './routes/blog[_]' +import { Route as LayoutRouteImport } from './routes/[_]layout' +import { Route as IndexRouteImport } from './routes/index' const Char91indexChar93Route = Char91indexChar93RouteImport.update({ id: '/index', path: '/index', getParentRoute: () => rootRouteImport, } as any) -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - path: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const BlogRoute = BlogRouteImport.update({ - id: '/blog_', - path: '/blog_', +const Char91routeChar93Route = Char91routeChar93RouteImport.update({ + id: '/route', + path: '/route', getParentRoute: () => rootRouteImport, } as any) const Char91lazyChar93Route = Char91lazyChar93RouteImport.update({ @@ -41,9 +31,19 @@ const Char91lazyChar93Route = Char91lazyChar93RouteImport.update({ path: '/lazy', getParentRoute: () => rootRouteImport, } as any) -const Char91routeChar93Route = Char91routeChar93RouteImport.update({ - id: '/route', - path: '/route', +const BlogRoute = BlogRouteImport.update({ + id: '/blog_', + path: '/blog_', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + path: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -98,25 +98,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof Char91indexChar93RouteImport parentRoute: typeof rootRouteImport } - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '/_layout' - fullPath: '/_layout' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/blog_': { - id: '/blog_' - path: '/blog_' - fullPath: '/blog_' - preLoaderRoute: typeof BlogRouteImport + '/route': { + id: '/route' + path: '/route' + fullPath: '/route' + preLoaderRoute: typeof Char91routeChar93RouteImport parentRoute: typeof rootRouteImport } '/lazy': { @@ -126,11 +112,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof Char91lazyChar93RouteImport parentRoute: typeof rootRouteImport } - '/route': { - id: '/route' - path: '/route' - fullPath: '/route' - preLoaderRoute: typeof Char91routeChar93RouteImport + '/blog_': { + id: '/blog_' + path: '/blog_' + fullPath: '/blog_' + preLoaderRoute: typeof BlogRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' + path: '/_layout' + fullPath: '/_layout' + preLoaderRoute: typeof LayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/react-router/escaped-special-strings/tests/setup/global.setup.ts b/e2e/react-router/escaped-special-strings/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/escaped-special-strings/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/escaped-special-strings/tests/setup/global.teardown.ts b/e2e/react-router/escaped-special-strings/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/escaped-special-strings/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/generator-cli-only/package.json b/e2e/react-router/generator-cli-only/package.json index 159ba05500..9fbe253126 100644 --- a/e2e/react-router/generator-cli-only/package.json +++ b/e2e/react-router/generator-cli-only/package.json @@ -8,7 +8,7 @@ "build": "tsr generate && vite build && tsc --noEmit", "preview": "vite preview", "start": "tsr generate && vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,11 +17,11 @@ "@tanstack/router-cli": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/generator-cli-only/playwright.config.ts b/e2e/react-router/generator-cli-only/playwright.config.ts index 4eead86444..c9d9a76ae7 100644 --- a/e2e/react-router/generator-cli-only/playwright.config.ts +++ b/e2e/react-router/generator-cli-only/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/generator-cli-only/src/posts.ts b/e2e/react-router/generator-cli-only/src/posts.ts index f72d16fee3..e859645746 100644 --- a/e2e/react-router/generator-cli-only/src/posts.ts +++ b/e2e/react-router/generator-cli-only/src/posts.ts @@ -8,7 +8,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/react-router/generator-cli-only/src/routeTree.gen.ts b/e2e/react-router/generator-cli-only/src/routeTree.gen.ts index 9676858c7c..28cfbec8ed 100644 --- a/e2e/react-router/generator-cli-only/src/routeTree.gen.ts +++ b/e2e/react-router/generator-cli-only/src/routeTree.gen.ts @@ -9,20 +9,15 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, @@ -32,11 +27,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,13 +117,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_pathlessLayout': { id: '/_pathlessLayout' path: '' @@ -138,12 +131,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/e2e/react-router/generator-cli-only/tests/app.spec.ts b/e2e/react-router/generator-cli-only/tests/app.spec.ts index ced5ac9310..5a83a314f2 100644 --- a/e2e/react-router/generator-cli-only/tests/app.spec.ts +++ b/e2e/react-router/generator-cli-only/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/generator-cli-only/tests/setup/global.setup.ts b/e2e/react-router/generator-cli-only/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/generator-cli-only/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/generator-cli-only/tests/setup/global.teardown.ts b/e2e/react-router/generator-cli-only/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/generator-cli-only/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/i18n-paraglide/package.json b/e2e/react-router/i18n-paraglide/package.json index d1af160f10..94a36498ed 100644 --- a/e2e/react-router/i18n-paraglide/package.json +++ b/e2e/react-router/i18n-paraglide/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -19,33 +19,14 @@ }, "devDependencies": { "@inlang/paraglide-js": "^2.4.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@tanstack/router-plugin": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - }, - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } } } diff --git a/e2e/react-router/i18n-paraglide/playwright.config.ts b/e2e/react-router/i18n-paraglide/playwright.config.ts index 8e94d5f9a1..91ef8fbd9f 100644 --- a/e2e/react-router/i18n-paraglide/playwright.config.ts +++ b/e2e/react-router/i18n-paraglide/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/issue-4759/index.html b/e2e/react-router/issue-4759/index.html deleted file mode 100644 index 9609ea710b..0000000000 --- a/e2e/react-router/issue-4759/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - Issue 4759 - - - -
-
HTML fallback
-
- - - - diff --git a/e2e/react-router/issue-4759/package.json b/e2e/react-router/issue-4759/package.json deleted file mode 100644 index ee6a105ad5..0000000000 --- a/e2e/react-router/issue-4759/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "tanstack-router-e2e-react-issue-4759", - "private": true, - "type": "module", - "scripts": { - "build": "vite build && tsc --noEmit", - "dev": "vite --port 3000", - "dev:e2e": "vite", - "preview": "vite preview", - "start": "vite", - "test:e2e": "playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-router": "workspace:^", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "vite": "^8.0.14" - } -} diff --git a/e2e/react-router/issue-4759/playwright.config.ts b/e2e/react-router/issue-4759/playwright.config.ts deleted file mode 100644 index a301f62881..0000000000 --- a/e2e/react-router/issue-4759/playwright.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { baseURL }, - webServer: { - command: `VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-router/issue-4759/src/main.tsx b/e2e/react-router/issue-4759/src/main.tsx deleted file mode 100644 index e251178045..0000000000 --- a/e2e/react-router/issue-4759/src/main.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import { - Outlet, - RouterProvider, - createRootRoute, - createRoute, - createRouter, -} from '@tanstack/react-router' - -const rootRoute = createRootRoute({ - context: () => ({ locale: 'en' }), - component: RootComponent, -}) -function RootComponent() { - const { locale } = rootRoute.useRouteContext() - return ( -
- -
- ) -} -const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: () => new Promise((resolve) => setTimeout(resolve, 1_000)), - component: () =>
loaded
, -}) -const routePendingRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/route-pending', - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: RoutePending, - loader: () => new Promise((resolve) => setTimeout(resolve, 1_000)), - component: () =>
loaded
, -}) -function RoutePending() { - const { locale } = routePendingRoute.useRouteContext() - return ( -
- route pending -
- ) -} -const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, routePendingRoute]), -}) -const usesRoutePending = window.location.pathname === '/route-pending' -function DefaultPending() { - const { locale } = indexRoute.useRouteContext() - return ( -
- default pending -
- ) -} - -createRoot(document.getElementById('app')!).render( - -
- -
-
, -) diff --git a/e2e/react-router/issue-4759/tests/issue-4759.spec.ts b/e2e/react-router/issue-4759/tests/issue-4759.spec.ts deleted file mode 100644 index 95689010c8..0000000000 --- a/e2e/react-router/issue-4759/tests/issue-4759.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { expect, test } from '@playwright/test' -import type { Page } from '@playwright/test' - -async function expectNoBlankFrame( - page: Page, - pendingSource: 'default' | 'route', -) { - const pending = page.locator( - `[data-state="pending"][data-pending-source="${pendingSource}"]`, - ) - await expect(pending).toBeVisible() - await expect(pending).toHaveAttribute('data-locale', 'en') - await expect(page.locator('[data-root-locale="en"]')).toBeVisible() - - const paintStates = await page.evaluate( - () => - (globalThis as typeof globalThis & { __paintStates: Array }) - .__paintStates, - ) - - expect(paintStates).toContain('pending') - expect(paintStates).not.toContain('shell') - expect(paintStates).not.toContain('empty') - await expect(page.locator('[data-state="loaded"]')).toBeVisible() -} - -test('#4759: the initial default pending component has no blank frame before it', async ({ - page, -}) => { - await page.goto('/') - await expectNoBlankFrame(page, 'default') -}) - -test('an initial route pending component has no blank frame before it', async ({ - page, -}) => { - await page.goto('/route-pending') - await expectNoBlankFrame(page, 'route') -}) diff --git a/e2e/react-router/issue-4759/tsconfig.json b/e2e/react-router/issue-4759/tsconfig.json deleted file mode 100644 index e4ba4788a3..0000000000 --- a/e2e/react-router/issue-4759/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "jsx": "react-jsx", - "target": "ESNext", - "moduleResolution": "Bundler", - "module": "ESNext", - "resolveJsonModule": true, - "skipLibCheck": true, - "types": ["vite/client"] - }, - "exclude": ["node_modules", "dist"] -} diff --git a/e2e/react-router/issue-4759/vite.config.ts b/e2e/react-router/issue-4759/vite.config.ts deleted file mode 100644 index 9ffcc67574..0000000000 --- a/e2e/react-router/issue-4759/vite.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -export default defineConfig({ - plugins: [react()], -}) diff --git a/e2e/react-router/issue-7120/index.html b/e2e/react-router/issue-7120/index.html deleted file mode 100644 index 04a3530c9d..0000000000 --- a/e2e/react-router/issue-7120/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - Issues 7120 and 7367 - - - - diff --git a/e2e/react-router/issue-7120/package.json b/e2e/react-router/issue-7120/package.json deleted file mode 100644 index 979b32556c..0000000000 --- a/e2e/react-router/issue-7120/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "tanstack-router-e2e-react-issue-7120", - "private": true, - "type": "module", - "scripts": { - "dev": "vite --port 3000", - "dev:e2e": "vite", - "build": "vite build && tsc --noEmit", - "preview": "vite preview", - "start": "vite", - "test:e2e": "playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-router": "workspace:^", - "@tanstack/router-plugin": "workspace:^", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "vite": "^8.0.14" - } -} diff --git a/e2e/react-router/issue-7120/playwright.config.ts b/e2e/react-router/issue-7120/playwright.config.ts deleted file mode 100644 index a8ba116fb4..0000000000 --- a/e2e/react-router/issue-7120/playwright.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { baseURL }, - webServer: { - command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-router/issue-7120/src/main.tsx b/e2e/react-router/issue-7120/src/main.tsx deleted file mode 100644 index 0c983251af..0000000000 --- a/e2e/react-router/issue-7120/src/main.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import { RouterProvider, createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' - -const router = createRouter({ - routeTree, - defaultViewTransition: true, -}) - -declare module '@tanstack/react-router' { - interface Register { - router: typeof router - } -} - -createRoot(document.getElementById('root')!).render( - - - , -) diff --git a/e2e/react-router/issue-7120/src/redirectGate.ts b/e2e/react-router/issue-7120/src/redirectGate.ts deleted file mode 100644 index 399d303aac..0000000000 --- a/e2e/react-router/issue-7120/src/redirectGate.ts +++ /dev/null @@ -1,35 +0,0 @@ -type RedirectGate = { - waiting: boolean - released: boolean - release: () => void -} - -declare global { - interface Window { - redirectGate: RedirectGate - } -} - -let releasePromise!: () => void -const promise = new Promise((resolve) => { - releasePromise = resolve -}) - -const redirectGate: RedirectGate = { - waiting: false, - released: false, - release: () => { - if (!redirectGate.released) { - redirectGate.released = true - releasePromise() - } - }, -} - -window.redirectGate = redirectGate - -export async function waitForRedirectGate() { - redirectGate.waiting = true - await promise - redirectGate.waiting = false -} diff --git a/e2e/react-router/issue-7120/src/routeTree.gen.ts b/e2e/react-router/issue-7120/src/routeTree.gen.ts deleted file mode 100644 index e8c6d92110..0000000000 --- a/e2e/react-router/issue-7120/src/routeTree.gen.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as PostsRouteImport } from './routes/posts' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any).lazy(() => import('./routes/posts.lazy').then((d) => d.Route)) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/posts': typeof PostsRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/posts': typeof PostsRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/posts': typeof PostsRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/posts' - fileRoutesByTo: FileRoutesByTo - to: '/' | '/posts' - id: '__root__' | '/' | '/posts' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - PostsRoute: typeof PostsRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - PostsRoute: PostsRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() diff --git a/e2e/react-router/issue-7120/src/routes/__root.tsx b/e2e/react-router/issue-7120/src/routes/__root.tsx deleted file mode 100644 index 2f01516a55..0000000000 --- a/e2e/react-router/issue-7120/src/routes/__root.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Outlet, createRootRoute, redirect } from '@tanstack/react-router' -import { waitForRedirectGate } from '../redirectGate' - -let shouldRedirect = true - -export const Route = createRootRoute({ - pendingMs: 0, - pendingMinMs: 500, - pendingComponent: RootPendingComponent, - beforeLoad: async ({ location }) => { - if (location.pathname !== '/' || !shouldRedirect) { - return - } - - await waitForRedirectGate() - - if (!shouldRedirect) { - return - } - - shouldRedirect = false - throw redirect({ to: '/posts', replace: true }) - }, - component: () => , -}) - -function RootPendingComponent() { - return ( -
- Loading route -
- ) -} diff --git a/e2e/react-router/issue-7120/src/routes/index.tsx b/e2e/react-router/issue-7120/src/routes/index.tsx deleted file mode 100644 index 1626ce706b..0000000000 --- a/e2e/react-router/issue-7120/src/routes/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - component: () =>
Home
, -}) diff --git a/e2e/react-router/issue-7120/src/routes/posts.lazy.tsx b/e2e/react-router/issue-7120/src/routes/posts.lazy.tsx deleted file mode 100644 index dc0b0cfd7f..0000000000 --- a/e2e/react-router/issue-7120/src/routes/posts.lazy.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { createLazyFileRoute } from '@tanstack/react-router' - -export const Route = createLazyFileRoute('/posts')({ - component: PostsComponent, -}) - -function PostsComponent() { - return ( -
-

Posts loaded

-

The redirected lazy route rendered.

-
- ) -} diff --git a/e2e/react-router/issue-7120/src/routes/posts.tsx b/e2e/react-router/issue-7120/src/routes/posts.tsx deleted file mode 100644 index cc0519b74e..0000000000 --- a/e2e/react-router/issue-7120/src/routes/posts.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/posts')({}) diff --git a/e2e/react-router/issue-7120/src/vite-env.d.ts b/e2e/react-router/issue-7120/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a0..0000000000 --- a/e2e/react-router/issue-7120/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/e2e/react-router/issue-7120/tests/issue-7120.repro.spec.ts b/e2e/react-router/issue-7120/tests/issue-7120.repro.spec.ts deleted file mode 100644 index 081ae73691..0000000000 --- a/e2e/react-router/issue-7120/tests/issue-7120.repro.spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('#7120 / #7367: a root redirect cannot commit a stale match during a view transition', async ({ - page, -}) => { - const pageErrors: Array = [] - const consoleErrors: Array = [] - - page.on('pageerror', (error) => { - pageErrors.push(error.message || String(error)) - }) - page.on('console', (message) => { - if (message.type() === 'error') { - consoleErrors.push(message.text()) - } - }) - - await page.goto('/') - - const pending = page.getByTestId('root-pending') - await expect(pending).toBeVisible() - expect(await page.evaluate(() => window.redirectGate.waiting)).toBe(true) - - await page.evaluate(() => window.redirectGate.release()) - - await expect(page).toHaveURL(/\/posts$/) - await expect( - page.getByRole('heading', { name: 'Posts loaded' }), - ).toBeVisible() - await expect(pending).not.toBeVisible() - expect(pageErrors).toEqual([]) - expect(consoleErrors).toEqual([]) -}) diff --git a/e2e/react-router/issue-7120/tsconfig.json b/e2e/react-router/issue-7120/tsconfig.json deleted file mode 100644 index 4f6089bc08..0000000000 --- a/e2e/react-router/issue-7120/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "target": "ESNext", - "moduleResolution": "Bundler", - "module": "ESNext", - "resolveJsonModule": true, - "allowJs": true, - "skipLibCheck": true, - "types": ["vite/client"] - }, - "exclude": ["node_modules", "dist"] -} diff --git a/e2e/react-router/issue-7120/vite.config.ts b/e2e/react-router/issue-7120/vite.config.ts deleted file mode 100644 index 5b1c613906..0000000000 --- a/e2e/react-router/issue-7120/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import { tanstackRouter } from '@tanstack/router-plugin/vite' - -export default defineConfig({ - plugins: [tanstackRouter({ target: 'react' }), react()], -}) diff --git a/e2e/react-router/issue-7457/index.html b/e2e/react-router/issue-7457/index.html deleted file mode 100644 index 76369b5957..0000000000 --- a/e2e/react-router/issue-7457/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - Issue 7457 - - - - diff --git a/e2e/react-router/issue-7457/package.json b/e2e/react-router/issue-7457/package.json deleted file mode 100644 index 838f5173e2..0000000000 --- a/e2e/react-router/issue-7457/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "tanstack-router-e2e-react-issue-7457", - "private": true, - "type": "module", - "scripts": { - "dev": "vite --port 3000", - "dev:e2e": "vite", - "build": "vite build && tsc --noEmit", - "preview": "vite preview", - "start": "vite", - "test:e2e": "playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-query": "^5.99.0", - "@tanstack/react-router": "workspace:^", - "@tanstack/router-plugin": "workspace:^", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "vite": "^8.0.14" - } -} diff --git a/e2e/react-router/issue-7457/playwright.config.ts b/e2e/react-router/issue-7457/playwright.config.ts deleted file mode 100644 index a8ba116fb4..0000000000 --- a/e2e/react-router/issue-7457/playwright.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { baseURL }, - webServer: { - command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-router/issue-7457/src/main.tsx b/e2e/react-router/issue-7457/src/main.tsx deleted file mode 100644 index 1b6805edc0..0000000000 --- a/e2e/react-router/issue-7457/src/main.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { StrictMode, useEffect } from 'react' -import { createRoot } from 'react-dom/client' -import { QueryClient } from '@tanstack/react-query' -import { RouterProvider, createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' - -const queryClient = new QueryClient() -const router = createRouter({ - routeTree, - context: { queryClient }, - defaultPendingComponent: DefaultPendingComponent, - defaultPreloadStaleTime: 0, -}) - -declare module '@tanstack/react-router' { - interface Register { - router: typeof router - } -} - -function DefaultPendingComponent() { - useEffect(() => { - ;(globalThis as any).__pendingSeen = true - }, []) - return
loading
-} - -createRoot(document.body).render( - - - , -) diff --git a/e2e/react-router/issue-7457/src/routeTree.gen.ts b/e2e/react-router/issue-7457/src/routeTree.gen.ts deleted file mode 100644 index 04a2c94ce8..0000000000 --- a/e2e/react-router/issue-7457/src/routeTree.gen.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as AnotherRouteImport } from './routes/another' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AnotherRoute = AnotherRouteImport.update({ - id: '/another', - path: '/another', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/another': typeof AnotherRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/another': typeof AnotherRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/another': typeof AnotherRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/another' - fileRoutesByTo: FileRoutesByTo - to: '/' | '/another' - id: '__root__' | '/' | '/another' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - AnotherRoute: typeof AnotherRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/another': { - id: '/another' - path: '/another' - fullPath: '/another' - preLoaderRoute: typeof AnotherRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - AnotherRoute: AnotherRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() diff --git a/e2e/react-router/issue-7457/src/routes/__root.tsx b/e2e/react-router/issue-7457/src/routes/__root.tsx deleted file mode 100644 index 988ba76263..0000000000 --- a/e2e/react-router/issue-7457/src/routes/__root.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Outlet, createRootRouteWithContext } from '@tanstack/react-router' -import type { QueryClient } from '@tanstack/react-query' - -export const Route = createRootRouteWithContext<{ - queryClient: QueryClient -}>()({ - beforeLoad: async ({ context }) => { - await context.queryClient.ensureQueryData({ - queryKey: ['issue-7457-root'], - queryFn: async () => { - await new Promise((resolve) => setTimeout(resolve, 1_500)) - return true - }, - }) - }, - component: RootComponent, -}) - -function RootComponent() { - return ( -
- -
- ) -} diff --git a/e2e/react-router/issue-7457/src/routes/another.tsx b/e2e/react-router/issue-7457/src/routes/another.tsx deleted file mode 100644 index 6b6caa55b3..0000000000 --- a/e2e/react-router/issue-7457/src/routes/another.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/another')({ - component: () =>
Hello "/another"!
, -}) diff --git a/e2e/react-router/issue-7457/src/routes/index.tsx b/e2e/react-router/issue-7457/src/routes/index.tsx deleted file mode 100644 index daaae2aeed..0000000000 --- a/e2e/react-router/issue-7457/src/routes/index.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { createFileRoute, redirect } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - beforeLoad: () => { - throw redirect({ to: '/another', replace: true }) - }, - component: () =>
You should never see this!
, -}) diff --git a/e2e/react-router/issue-7457/src/vite-env.d.ts b/e2e/react-router/issue-7457/src/vite-env.d.ts deleted file mode 100644 index 11f02fe2a0..0000000000 --- a/e2e/react-router/issue-7457/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/e2e/react-router/issue-7457/tests/issue-7457.repro.spec.ts b/e2e/react-router/issue-7457/tests/issue-7457.repro.spec.ts deleted file mode 100644 index 8b20fac1eb..0000000000 --- a/e2e/react-router/issue-7457/tests/issue-7457.repro.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('#7457: initial child redirect after async root beforeLoad does not blank', async ({ - page, -}) => { - const pageErrors: Array = [] - const consoleErrors: Array = [] - page.on('pageerror', (error) => - pageErrors.push(error.message || String(error)), - ) - page.on('console', (message) => { - if (message.type() === 'error') { - consoleErrors.push(message.text()) - } - }) - - await page.goto('/') - - await expect(page).toHaveURL(/\/another$/) - const target = page.getByText('Hello "/another"!') - await expect - .poll(async () => ({ - targetCount: await target.count(), - pageErrors: [...pageErrors], - consoleErrors: [...consoleErrors], - })) - .toEqual({ targetCount: 1, pageErrors: [], consoleErrors: [] }) - await expect(target).toBeVisible() - await expect - .poll(() => page.evaluate(() => (globalThis as any).__pendingSeen)) - .toBe(true) - await expect(page.getByTestId('app-pending')).not.toBeVisible() - expect(pageErrors).toEqual([]) - expect(consoleErrors).toEqual([]) -}) diff --git a/e2e/react-router/issue-7457/tsconfig.json b/e2e/react-router/issue-7457/tsconfig.json deleted file mode 100644 index 4f6089bc08..0000000000 --- a/e2e/react-router/issue-7457/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "target": "ESNext", - "moduleResolution": "Bundler", - "module": "ESNext", - "resolveJsonModule": true, - "allowJs": true, - "skipLibCheck": true, - "types": ["vite/client"] - }, - "exclude": ["node_modules", "dist"] -} diff --git a/e2e/react-router/issue-7457/vite.config.js b/e2e/react-router/issue-7457/vite.config.js deleted file mode 100644 index 9e39ea83d9..0000000000 --- a/e2e/react-router/issue-7457/vite.config.js +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import { tanstackRouter } from '@tanstack/router-plugin/vite' - -export default defineConfig({ - plugins: [ - tanstackRouter({ target: 'react', autoCodeSplitting: true }), - react(), - ], -}) diff --git a/e2e/react-router/js-only-file-based/package.json b/e2e/react-router/js-only-file-based/package.json index 39742d9c84..6505c4a1e4 100644 --- a/e2e/react-router/js-only-file-based/package.json +++ b/e2e/react-router/js-only-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -16,11 +16,11 @@ "@tanstack/react-router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@tanstack/router-plugin": "workspace:^", "@types/react": "^19.0.8", diff --git a/e2e/react-router/js-only-file-based/playwright.config.ts b/e2e/react-router/js-only-file-based/playwright.config.ts index 0925936d55..4f93bc1413 100644 --- a/e2e/react-router/js-only-file-based/playwright.config.ts +++ b/e2e/react-router/js-only-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,15 +18,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/js-only-file-based/src/posts.js b/e2e/react-router/js-only-file-based/src/posts.js index 36c1c281f6..979e5e381c 100644 --- a/e2e/react-router/js-only-file-based/src/posts.js +++ b/e2e/react-router/js-only-file-based/src/posts.js @@ -2,7 +2,11 @@ import axios from 'redaxios' export class NotFoundError extends Error {} -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/react-router/js-only-file-based/src/routeTree.gen.js b/e2e/react-router/js-only-file-based/src/routeTree.gen.js index 80683abb30..f2d42e5a6c 100644 --- a/e2e/react-router/js-only-file-based/src/routeTree.gen.js +++ b/e2e/react-router/js-only-file-based/src/routeTree.gen.js @@ -9,20 +9,15 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -}) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, @@ -32,11 +27,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, }) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - }) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +}) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, }) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, }) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, }) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + }) const PostsRouteRouteChildren = { PostsPostIdRoute: PostsPostIdRoute, diff --git a/e2e/react-router/js-only-file-based/tests/app.spec.ts b/e2e/react-router/js-only-file-based/tests/app.spec.ts index ced5ac9310..5a83a314f2 100644 --- a/e2e/react-router/js-only-file-based/tests/app.spec.ts +++ b/e2e/react-router/js-only-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/js-only-file-based/tests/setup/global.setup.ts b/e2e/react-router/js-only-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/js-only-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/js-only-file-based/tests/setup/global.teardown.ts b/e2e/react-router/js-only-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/js-only-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/match-params/package.json b/e2e/react-router/match-params/package.json index 908be67a9d..033a1bb5fe 100644 --- a/e2e/react-router/match-params/package.json +++ b/e2e/react-router/match-params/package.json @@ -6,7 +6,7 @@ "dev": "vite --port 3000", "build": "vite build && tsc --noEmit", "preview": "vite preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -14,7 +14,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/match-params/playwright.config.ts b/e2e/react-router/match-params/playwright.config.ts index 9e8c1fab2b..246cf40060 100644 --- a/e2e/react-router/match-params/playwright.config.ts +++ b/e2e/react-router/match-params/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -13,8 +14,8 @@ export default defineConfig({ }, webServer: { command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, projects: [ diff --git a/e2e/react-router/react-compiler/index.html b/e2e/react-router/react-compiler/index.html deleted file mode 100644 index 0c5b6b471c..0000000000 --- a/e2e/react-router/react-compiler/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - React Compiler useMatchRoute test - - -
- - - diff --git a/e2e/react-router/react-compiler/package.json b/e2e/react-router/react-compiler/package.json deleted file mode 100644 index 82e6fbf86b..0000000000 --- a/e2e/react-router/react-compiler/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "tanstack-router-e2e-react-compiler", - "private": true, - "type": "module", - "scripts": { - "dev": "vite --port 3000", - "dev:e2e": "vite", - "build": "vite build && tsc --noEmit", - "preview": "vite preview", - "start": "vite", - "test:e2e": "playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-router": "workspace:^", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@babel/core": "^7.29.0", - "@playwright/test": "^1.61.0", - "@rolldown/plugin-babel": "^0.2.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "babel-plugin-react-compiler": "^1.0.0", - "vite": "^8.0.14" - } -} diff --git a/e2e/react-router/react-compiler/playwright.config.ts b/e2e/react-router/react-compiler/playwright.config.ts deleted file mode 100644 index a8ba116fb4..0000000000 --- a/e2e/react-router/react-compiler/playwright.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { baseURL }, - webServer: { - command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-router/react-compiler/src/main.tsx b/e2e/react-router/react-compiler/src/main.tsx deleted file mode 100644 index e6e549da83..0000000000 --- a/e2e/react-router/react-compiler/src/main.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import { - Link, - Outlet, - RouterProvider, - createRootRoute, - createRoute, - createRouter, - linkOptions, - useMatchRoute, -} from '@tanstack/react-router' - -const links = linkOptions([ - { to: '/home', label: 'Home' }, - { to: '/about', label: 'About' }, -]) - -function useRouteName() { - const matchRoute = useMatchRoute() - - return links.find((link) => matchRoute(link))?.label ?? 'Unknown' -} - -function RootComponent() { - const matchedRoute = useRouteName() - - return ( - <> - -

- Matched route: {matchedRoute} -

- - - ) -} - -const rootRoute = createRootRoute({ component: RootComponent }) -const homeRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/home', -}) -const aboutRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/about', -}) -const router = createRouter({ - routeTree: rootRoute.addChildren([homeRoute, aboutRoute]), -}) - -declare module '@tanstack/react-router' { - interface Register { - router: typeof router - } -} - -const rootElement = document.getElementById('app') -if (!rootElement) { - throw new Error('Root element not found') -} - -createRoot(rootElement).render( - - - , -) diff --git a/e2e/react-router/react-compiler/tests/use-match-route.spec.ts b/e2e/react-router/react-compiler/tests/use-match-route.spec.ts deleted file mode 100644 index b800e3c908..0000000000 --- a/e2e/react-router/react-compiler/tests/use-match-route.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('useMatchRoute updates after navigation with React Compiler', async ({ - page, -}) => { - await page.goto('/home') - await expect(page.getByTestId('matched-route')).toHaveText('Home') - - await page.getByRole('link', { name: 'About' }).click() - await expect(page).toHaveURL(/\/about$/) - await expect(page.getByTestId('matched-route')).toHaveText('About') - - await page.getByRole('link', { name: 'Home' }).click() - await expect(page).toHaveURL(/\/home$/) - await expect(page.getByTestId('matched-route')).toHaveText('Home') -}) diff --git a/e2e/react-router/react-compiler/tsconfig.json b/e2e/react-router/react-compiler/tsconfig.json deleted file mode 100644 index 4f6089bc08..0000000000 --- a/e2e/react-router/react-compiler/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "target": "ESNext", - "moduleResolution": "Bundler", - "module": "ESNext", - "resolveJsonModule": true, - "allowJs": true, - "skipLibCheck": true, - "types": ["vite/client"] - }, - "exclude": ["node_modules", "dist"] -} diff --git a/e2e/react-router/react-compiler/vite.config.js b/e2e/react-router/react-compiler/vite.config.js deleted file mode 100644 index b4478aced4..0000000000 --- a/e2e/react-router/react-compiler/vite.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react, { reactCompilerPreset } from '@vitejs/plugin-react' -import babel from '@rolldown/plugin-babel' - -export default defineConfig({ - plugins: [react(), babel({ presets: [reactCompilerPreset()] })], -}) diff --git a/e2e/react-router/rspack-basic-file-based/package.json b/e2e/react-router/rspack-basic-file-based/package.json index 5ec9ed9862..74659b51e1 100644 --- a/e2e/react-router/rspack-basic-file-based/package.json +++ b/e2e/react-router/rspack-basic-file-based/package.json @@ -7,18 +7,18 @@ "build": "rsbuild build && tsc --noEmit", "preview": "rsbuild preview", "start": "rsbuild preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", "@tanstack/react-router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:" + "redaxios": "^0.5.1" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tailwindcss/postcss": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", @@ -27,7 +27,6 @@ "@types/react-dom": "^19.0.3", "postcss": "^8.5.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" + "typescript": "^6.0.2" } } diff --git a/e2e/react-router/rspack-basic-file-based/playwright.config.ts b/e2e/react-router/rspack-basic-file-based/playwright.config.ts index 4eead86444..decceaef2f 100644 --- a/e2e/react-router/rspack-basic-file-based/playwright.config.ts +++ b/e2e/react-router/rspack-basic-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `PUBLIC_NODE_ENV="test" PUBLIC_EXTERNAL_PORT=${EXTERNAL_PORT} PUBLIC_SERVER_PORT=${PORT} pnpm build && PUBLIC_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/rspack-basic-file-based/src/posts.tsx b/e2e/react-router/rspack-basic-file-based/src/posts.tsx index 97c96d77eb..a1225b7fe7 100644 --- a/e2e/react-router/rspack-basic-file-based/src/posts.tsx +++ b/e2e/react-router/rspack-basic-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.PUBLIC_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.PUBLIC_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/rspack-basic-file-based/tests/app.spec.ts b/e2e/react-router/rspack-basic-file-based/tests/app.spec.ts index d230263bfe..10beff655f 100644 --- a/e2e/react-router/rspack-basic-file-based/tests/app.spec.ts +++ b/e2e/react-router/rspack-basic-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/rspack-basic-file-based/tests/setup/global.setup.ts b/e2e/react-router/rspack-basic-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/rspack-basic-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/rspack-basic-file-based/tests/setup/global.teardown.ts b/e2e/react-router/rspack-basic-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/rspack-basic-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/package.json b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/package.json index 30c62d0af1..a7b9eb58d4 100644 --- a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/package.json +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/package.json @@ -7,18 +7,18 @@ "build": "rsbuild build && tsc --noEmit", "preview": "rsbuild preview", "start": "rsbuild preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", "@tanstack/react-router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:" + "redaxios": "^0.5.1" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tailwindcss/postcss": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", @@ -28,7 +28,6 @@ "@types/react-dom": "^19.0.3", "postcss": "^8.5.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" + "typescript": "^6.0.2" } } diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts index 1c1d021f2f..bf3adc082c 100644 --- a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm start --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `PUBLIC_NODE_ENV="test" PUBLIC_EXTERNAL_PORT=${EXTERNAL_PORT} PUBLIC_SERVER_PORT=${PORT} pnpm build && PUBLIC_SERVER_PORT=${PORT} pnpm start --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx index cc3cb0f9c8..b196982420 100644 --- a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.PUBLIC_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.PUBLIC_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts index 8b808782f6..a689f459e3 100644 --- a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/package.json b/e2e/react-router/scroll-restoration-sandbox-vite/package.json index 51e9e70cc5..215de36a70 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/package.json +++ b/e2e/react-router/scroll-restoration-sandbox-vite/package.json @@ -11,7 +11,7 @@ "start": "vite", "test:e2e:browser": "VITE_APP_HISTORY=browser playwright test --config=playwright.browser.config.ts --project=chromium", "test:e2e:hash": "VITE_APP_HISTORY=hash playwright test --config=playwright.hash.config.ts --project=chromium", - "test:e2e": "pnpm run test:e2e:browser && pnpm run test:e2e:hash" + "test:e2e": "rm -rf port*.txt; pnpm run test:e2e:browser && pnpm run test:e2e:hash" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -20,26 +20,16 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/dist-hash" - ] - } - } } } diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts b/e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts index eb31d94080..972124647c 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts +++ b/e2e/react-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts @@ -1,7 +1,15 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, + resolveRuntimeSuffix, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort( + packageJson.name + `-${resolveRuntimeSuffix('browser')}`, +) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,15 +21,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `VITE_APP_HISTORY=browser pnpm build && VITE_APP_HISTORY=browser pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=browser pnpm build && VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=browser pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts b/e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts index 6b160e3908..a6fa77afbf 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts +++ b/e2e/react-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts @@ -1,7 +1,15 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, + resolveRuntimeSuffix, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort( + packageJson.name + `-${resolveRuntimeSuffix('hash')}`, +) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,15 +21,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `VITE_APP_HISTORY=hash vite build --outDir dist-hash && VITE_APP_HISTORY=hash pnpm preview --port ${PORT} --outDir dist-hash`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=hash vite build --outDir dist-hash && VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=hash pnpm preview --port ${PORT} --outDir dist-hash`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/src/posts.tsx b/e2e/react-router/scroll-restoration-sandbox-vite/src/posts.tsx index c4a2d0dcca..e45ef52969 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/src/posts.tsx +++ b/e2e/react-router/scroll-restoration-sandbox-vite/src/posts.tsx @@ -10,7 +10,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export class PostNotFoundError extends Error {} diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts b/e2e/react-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts index 0c6823c368..a4dc8750b3 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts +++ b/e2e/react-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts @@ -12,12 +12,12 @@ import { createFileRoute } from '@tanstack/react-router' import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as testsIssue7040SourceRouteImport } from './routes/(tests)/issue-7040-source' -import { Route as testsIssue7040TargetRouteImport } from './routes/(tests)/issue-7040-target' -import { Route as testsLazyPageRouteImport } from './routes/(tests)/lazy-page' -import { Route as testsLazyWithLoaderPageRouteImport } from './routes/(tests)/lazy-with-loader-page' -import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' import { Route as testsPageWithSearchRouteImport } from './routes/(tests)/page-with-search' +import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' +import { Route as testsLazyWithLoaderPageRouteImport } from './routes/(tests)/lazy-with-loader-page' +import { Route as testsLazyPageRouteImport } from './routes/(tests)/lazy-page' +import { Route as testsIssue7040TargetRouteImport } from './routes/(tests)/issue-7040-target' +import { Route as testsIssue7040SourceRouteImport } from './routes/(tests)/issue-7040-source' const testsVirtualPageLazyRouteImport = createFileRoute( '/(tests)/virtual-page', @@ -28,23 +28,23 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const testsIssue7040SourceRoute = testsIssue7040SourceRouteImport.update({ - id: '/(tests)/issue-7040-source', - path: '/issue-7040-source', - getParentRoute: () => rootRouteImport, -} as any) -const testsIssue7040TargetRoute = testsIssue7040TargetRouteImport.update({ - id: '/(tests)/issue-7040-target', - path: '/issue-7040-target', - getParentRoute: () => rootRouteImport, -} as any) -const testsLazyPageRoute = testsLazyPageRouteImport +const testsVirtualPageLazyRoute = testsVirtualPageLazyRouteImport .update({ - id: '/(tests)/lazy-page', - path: '/lazy-page', + id: '/(tests)/virtual-page', + path: '/virtual-page', getParentRoute: () => rootRouteImport, } as any) - .lazy(() => import('./routes/(tests)/lazy-page.lazy').then((d) => d.Route)) + .lazy(() => import('./routes/(tests)/virtual-page.lazy').then((d) => d.Route)) +const testsPageWithSearchRoute = testsPageWithSearchRouteImport.update({ + id: '/(tests)/page-with-search', + path: '/page-with-search', + getParentRoute: () => rootRouteImport, +} as any) +const testsNormalPageRoute = testsNormalPageRouteImport.update({ + id: '/(tests)/normal-page', + path: '/normal-page', + getParentRoute: () => rootRouteImport, +} as any) const testsLazyWithLoaderPageRoute = testsLazyWithLoaderPageRouteImport .update({ id: '/(tests)/lazy-with-loader-page', @@ -54,23 +54,23 @@ const testsLazyWithLoaderPageRoute = testsLazyWithLoaderPageRouteImport .lazy(() => import('./routes/(tests)/lazy-with-loader-page.lazy').then((d) => d.Route), ) -const testsNormalPageRoute = testsNormalPageRouteImport.update({ - id: '/(tests)/normal-page', - path: '/normal-page', - getParentRoute: () => rootRouteImport, -} as any) -const testsPageWithSearchRoute = testsPageWithSearchRouteImport.update({ - id: '/(tests)/page-with-search', - path: '/page-with-search', - getParentRoute: () => rootRouteImport, -} as any) -const testsVirtualPageLazyRoute = testsVirtualPageLazyRouteImport +const testsLazyPageRoute = testsLazyPageRouteImport .update({ - id: '/(tests)/virtual-page', - path: '/virtual-page', + id: '/(tests)/lazy-page', + path: '/lazy-page', getParentRoute: () => rootRouteImport, } as any) - .lazy(() => import('./routes/(tests)/virtual-page.lazy').then((d) => d.Route)) + .lazy(() => import('./routes/(tests)/lazy-page.lazy').then((d) => d.Route)) +const testsIssue7040TargetRoute = testsIssue7040TargetRouteImport.update({ + id: '/(tests)/issue-7040-target', + path: '/issue-7040-target', + getParentRoute: () => rootRouteImport, +} as any) +const testsIssue7040SourceRoute = testsIssue7040SourceRouteImport.update({ + id: '/(tests)/issue-7040-source', + path: '/issue-7040-source', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -156,39 +156,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/issue-7040-source': { - id: '/(tests)/issue-7040-source' - path: '/issue-7040-source' - fullPath: '/issue-7040-source' - preLoaderRoute: typeof testsIssue7040SourceRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/issue-7040-target': { - id: '/(tests)/issue-7040-target' - path: '/issue-7040-target' - fullPath: '/issue-7040-target' - preLoaderRoute: typeof testsIssue7040TargetRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/lazy-page': { - id: '/(tests)/lazy-page' - path: '/lazy-page' - fullPath: '/lazy-page' - preLoaderRoute: typeof testsLazyPageRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/lazy-with-loader-page': { - id: '/(tests)/lazy-with-loader-page' - path: '/lazy-with-loader-page' - fullPath: '/lazy-with-loader-page' - preLoaderRoute: typeof testsLazyWithLoaderPageRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/normal-page': { - id: '/(tests)/normal-page' - path: '/normal-page' - fullPath: '/normal-page' - preLoaderRoute: typeof testsNormalPageRouteImport + '/(tests)/virtual-page': { + id: '/(tests)/virtual-page' + path: '/virtual-page' + fullPath: '/virtual-page' + preLoaderRoute: typeof testsVirtualPageLazyRouteImport parentRoute: typeof rootRouteImport } '/(tests)/page-with-search': { @@ -198,11 +170,39 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof testsPageWithSearchRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/virtual-page': { - id: '/(tests)/virtual-page' - path: '/virtual-page' - fullPath: '/virtual-page' - preLoaderRoute: typeof testsVirtualPageLazyRouteImport + '/(tests)/normal-page': { + id: '/(tests)/normal-page' + path: '/normal-page' + fullPath: '/normal-page' + preLoaderRoute: typeof testsNormalPageRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/lazy-with-loader-page': { + id: '/(tests)/lazy-with-loader-page' + path: '/lazy-with-loader-page' + fullPath: '/lazy-with-loader-page' + preLoaderRoute: typeof testsLazyWithLoaderPageRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/lazy-page': { + id: '/(tests)/lazy-page' + path: '/lazy-page' + fullPath: '/lazy-page' + preLoaderRoute: typeof testsLazyPageRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/issue-7040-target': { + id: '/(tests)/issue-7040-target' + path: '/issue-7040-target' + fullPath: '/issue-7040-target' + preLoaderRoute: typeof testsIssue7040TargetRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/issue-7040-source': { + id: '/(tests)/issue-7040-source' + path: '/issue-7040-source' + fullPath: '/issue-7040-source' + preLoaderRoute: typeof testsIssue7040SourceRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/tests/app.spec.ts b/e2e/react-router/scroll-restoration-sandbox-vite/tests/app.spec.ts index e396c28686..f72d2d06ab 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/tests/app.spec.ts +++ b/e2e/react-router/scroll-restoration-sandbox-vite/tests/app.spec.ts @@ -1,23 +1,7 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import { linkOptions } from '@tanstack/react-router' import { toRuntimePath } from '@tanstack/router-e2e-utils' -type ScrollPaintTestState = { - sourceFrameScrollYs: Array - sourceWasReset: boolean - destinationMounted: boolean - destinationCommitScrollY: number | null - destinationFrameScrollYs: Array - cleanup: () => void -} - -declare global { - interface Window { - __scrollPaintTestState?: ScrollPaintTestState - } -} - test('Smoke - Renders home', async ({ page }) => { await page.goto(toRuntimePath('/')) await expect( @@ -25,175 +9,6 @@ test('Smoke - Renders home', async ({ page }) => { ).toBeVisible() }) -test('PUSH resets scroll before the destination can render a frame (#7815)', async ({ - page, -}) => { - await page.goto(toRuntimePath('/issue-7040-source')) - await expect(page.getByTestId('issue-7040-source-top')).toBeVisible() - - const sourceScrollY = await page.evaluate(async () => { - window.scrollTo(0, 500) - await new Promise((resolve) => requestAnimationFrame(() => resolve())) - return window.scrollY - }) - - expect(sourceScrollY).toBeGreaterThan(0) - - await page.evaluate((expectedSourceScrollY) => { - const root = document.querySelector('#app') - if (!root) { - throw new Error('App root not found') - } - - const geometry = document.createElement('div') - geometry.setAttribute('aria-hidden', 'true') - geometry.style.height = `${window.innerHeight + expectedSourceScrollY + 100}px` - geometry.style.pointerEvents = 'none' - geometry.style.width = '1px' - document.body.append(geometry) - - const state: ScrollPaintTestState = { - sourceFrameScrollYs: [], - sourceWasReset: false, - destinationMounted: false, - destinationCommitScrollY: null, - destinationFrameScrollYs: [], - cleanup: () => {}, - } - - const getDestinationHeading = () => - Array.from(document.querySelectorAll('h3')).find( - (heading) => heading.textContent === 'normal-page', - ) - - const commitObserver = new MutationObserver(() => { - const destinationHeading = getDestinationHeading() - - if (!destinationHeading) { - return - } - - commitObserver.disconnect() - state.destinationMounted = true - state.destinationCommitScrollY = window.scrollY - }) - - commitObserver.observe(root, { childList: true, subtree: true }) - - const handleScroll = () => { - if ( - document.querySelector('[data-testid="issue-7040-source-top"]') && - Math.abs(window.scrollY - expectedSourceScrollY) > 1 - ) { - state.sourceWasReset = true - } - } - window.addEventListener('scroll', handleScroll, { passive: true }) - - const originalScrollTo = window.scrollTo - window.scrollTo = ((...args: Array) => { - const requestedTop = - typeof args[0] === 'number' - ? args[1] - : typeof args[0] === 'object' && args[0] !== null - ? (args[0] as ScrollToOptions).top - : undefined - if ( - typeof requestedTop === 'number' && - Math.abs(requestedTop - expectedSourceScrollY) > 1 && - document.querySelector('[data-testid="issue-7040-source-top"]') - ) { - state.sourceWasReset = true - } - Reflect.apply(originalScrollTo, window, args) - }) as typeof window.scrollTo - - let animationFrameId = 0 - const recordFrame = () => { - if (getDestinationHeading()) { - state.destinationFrameScrollYs.push(window.scrollY) - } else if ( - document.querySelector('[data-testid="issue-7040-source-top"]') - ) { - state.sourceFrameScrollYs.push(window.scrollY) - } - animationFrameId = requestAnimationFrame(recordFrame) - } - animationFrameId = requestAnimationFrame(recordFrame) - - state.cleanup = () => { - commitObserver.disconnect() - cancelAnimationFrame(animationFrameId) - window.removeEventListener('scroll', handleScroll) - window.scrollTo = originalScrollTo - geometry.remove() - delete window.__scrollPaintTestState - } - window.__scrollPaintTestState = state - }, sourceScrollY) - - await page.evaluate( - () => - new Promise((resolve) => { - requestAnimationFrame(() => resolve()) - }), - ) - expect(await page.evaluate(() => window.scrollY)).toBe(sourceScrollY) - - await page - .getByRole('link', { name: 'Head-/normal-page' }) - .dispatchEvent('click') - - await page.waitForFunction(() => { - const state = window.__scrollPaintTestState - if (!state?.destinationMounted) { - return false - } - - const lastFrames = state.destinationFrameScrollYs.slice(-2) - return ( - lastFrames.length === 2 && - lastFrames.every((scrollY) => Math.abs(scrollY) <= 1) - ) - }) - - const observation = await page.evaluate(() => { - const state = window.__scrollPaintTestState - if (!state) { - throw new Error('Scroll paint observer not found') - } - - return { - sourceFrameScrollYs: state.sourceFrameScrollYs, - sourceWasReset: state.sourceWasReset, - destinationCommitScrollY: state.destinationCommitScrollY, - destinationFrameScrollYs: state.destinationFrameScrollYs, - destinationMaxScrollY: - document.documentElement.scrollHeight - window.innerHeight, - finalScrollY: window.scrollY, - } - }) - - expect(observation.sourceFrameScrollYs.length).toBeGreaterThan(0) - expect( - observation.sourceFrameScrollYs.every( - (scrollY) => Math.abs(scrollY - sourceScrollY) <= 1, - ), - ).toBe(true) - expect(observation.sourceWasReset).toBe(false) - expect(observation.destinationMaxScrollY).toBeGreaterThanOrEqual( - sourceScrollY, - ) - expect(observation.finalScrollY).toBe(0) - expect(observation.destinationFrameScrollYs.length).toBeGreaterThanOrEqual(2) - expect( - observation.destinationFrameScrollYs.every( - (scrollY) => Math.abs(scrollY) <= 1, - ), - `Destination paint opportunities: ${observation.destinationFrameScrollYs.join(', ')}, commit: ${observation.destinationCommitScrollY}, final: ${observation.finalScrollY}`, - ).toBe(true) -}) - test('restores the prior scroll position after browser back then forward', async ({ page, }) => { 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 2db25517c8..db335f8e2e 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,4 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' import { toRuntimePath } from '@tanstack/router-e2e-utils' @@ -27,7 +26,7 @@ type ReproAttempt = { async function openFreshSourcePage(page: Page) { await page.goto(toRuntimePath('/issue-7040-source')) - await expect(page.getByTestId('issue-7040-source-top')).toBeVisible() + await page.waitForLoadState('networkidle') await page.evaluate(() => { sessionStorage.clear() @@ -35,7 +34,7 @@ async function openFreshSourcePage(page: Page) { }) await page.reload() - await expect(page.getByTestId('issue-7040-source-top')).toBeVisible() + await page.waitForLoadState('networkidle') } async function fastScrollSourcePage(page: Page) { @@ -97,7 +96,7 @@ async function clickTargetLinkImmediatelyAfterScroll(page: Page) { async function waitForTargetPageToSettle(page: Page) { await page.waitForURL('**/issue-7040-target') - await expect(page.getByTestId('issue-7040-target-top')).toBeVisible() + await page.waitForLoadState('networkidle') await page.waitForFunction(() => window.scrollY === 0) } diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts b/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts b/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-router/scroll-restoration-sandbox-vite/tsconfig.json b/e2e/react-router/scroll-restoration-sandbox-vite/tsconfig.json index 5d58406b2e..f33b5a7aa3 100644 --- a/e2e/react-router/scroll-restoration-sandbox-vite/tsconfig.json +++ b/e2e/react-router/scroll-restoration-sandbox-vite/tsconfig.json @@ -11,5 +11,5 @@ "allowJs": true, "types": ["vite/client", "node"] }, - "exclude": ["node_modules", "dist", "dist-hash"] + "exclude": ["node_modules", "dist"] } diff --git a/e2e/react-router/sentry-integration/package.json b/e2e/react-router/sentry-integration/package.json index 5ebbdf31d9..d97446da9f 100644 --- a/e2e/react-router/sentry-integration/package.json +++ b/e2e/react-router/sentry-integration/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@sentry/react": "^10.32.0", @@ -19,11 +19,11 @@ "@tanstack/react-router-devtools": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", diff --git a/e2e/react-router/sentry-integration/playwright.config.ts b/e2e/react-router/sentry-integration/playwright.config.ts index 6a684ac89e..0c5cee43e4 100644 --- a/e2e/react-router/sentry-integration/playwright.config.ts +++ b/e2e/react-router/sentry-integration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/view-transitions/package.json b/e2e/react-router/view-transitions/package.json index e2d7a181e1..1c675b7258 100644 --- a/e2e/react-router/view-transitions/package.json +++ b/e2e/react-router/view-transitions/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,18 +17,17 @@ "@tanstack/router-plugin": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-router/view-transitions/playwright.config.ts b/e2e/react-router/view-transitions/playwright.config.ts index 4eead86444..c5de6b5611 100644 --- a/e2e/react-router/view-transitions/playwright.config.ts +++ b/e2e/react-router/view-transitions/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -17,10 +22,13 @@ export default defineConfig({ baseURL, }, + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-router/view-transitions/src/routeTree.gen.ts b/e2e/react-router/view-transitions/src/routeTree.gen.ts index 8982fca68f..20ee76a1a5 100644 --- a/e2e/react-router/view-transitions/src/routeTree.gen.ts +++ b/e2e/react-router/view-transitions/src/routeTree.gen.ts @@ -9,16 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ExploreRouteImport } from './routes/explore' import { Route as HowItWorksRouteImport } from './routes/how-it-works' +import { Route as ExploreRouteImport } from './routes/explore' import { Route as PostsRouteRouteImport } from './routes/posts.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const HowItWorksRoute = HowItWorksRouteImport.update({ + id: '/how-it-works', + path: '/how-it-works', getParentRoute: () => rootRouteImport, } as any) const ExploreRoute = ExploreRouteImport.update({ @@ -26,16 +26,16 @@ const ExploreRoute = ExploreRouteImport.update({ path: '/explore', getParentRoute: () => rootRouteImport, } as any) -const HowItWorksRoute = HowItWorksRouteImport.update({ - id: '/how-it-works', - path: '/how-it-works', - getParentRoute: () => rootRouteImport, -} as any) const PostsRouteRoute = PostsRouteRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -101,11 +101,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/how-it-works': { + id: '/how-it-works' + path: '/how-it-works' + fullPath: '/how-it-works' + preLoaderRoute: typeof HowItWorksRouteImport parentRoute: typeof rootRouteImport } '/explore': { @@ -115,13 +115,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ExploreRouteImport parentRoute: typeof rootRouteImport } - '/how-it-works': { - id: '/how-it-works' - path: '/how-it-works' - fullPath: '/how-it-works' - preLoaderRoute: typeof HowItWorksRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -129,6 +122,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/e2e/react-router/view-transitions/tests/app.spec.ts b/e2e/react-router/view-transitions/tests/app.spec.ts index 6c1ccf1a6e..472bd6ed0b 100644 --- a/e2e/react-router/view-transitions/tests/app.spec.ts +++ b/e2e/react-router/view-transitions/tests/app.spec.ts @@ -1,4 +1,4 @@ -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/react-router/view-transitions/tests/setup/global.setup.ts b/e2e/react-router/view-transitions/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-router/view-transitions/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-router/view-transitions/tests/setup/global.teardown.ts b/e2e/react-router/view-transitions/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-router/view-transitions/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-start/basic-auth/package.json b/e2e/react-start/basic-auth/package.json index f7ff609e76..4475cf5adf 100644 --- a/e2e/react-start/basic-auth/package.json +++ b/e2e/react-start/basic-auth/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "start": "node .output/server/index.mjs", "prisma-generate": "prisma generate", - "test:e2e": "exit 0; pnpm run prisma-generate && playwright test --project=chromium" + "test:e2e": "exit 0; rm -rf port*.txt; pnpm run prisma-generate && playwright test --project=chromium" }, "dependencies": { "@libsql/client": "^0.15.15", @@ -19,14 +19,13 @@ "@tanstack/react-router": "workspace:^", "@tanstack/react-router-devtools": "workspace:^", "@tanstack/react-start": "workspace:^", - "iron-session": "^9.0.1", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -36,8 +35,7 @@ "dotenv": "^17.2.3", "prisma": "^7.0.0", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/basic-auth/playwright.config.ts b/e2e/react-start/basic-auth/playwright.config.ts index 82678ac00b..18b8905468 100644 --- a/e2e/react-start/basic-auth/playwright.config.ts +++ b/e2e/react-start/basic-auth/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/basic-auth/src/routeTree.gen.ts b/e2e/react-start/basic-auth/src/routeTree.gen.ts index 998d34a709..6be84444eb 100644 --- a/e2e/react-start/basic-auth/src/routeTree.gen.ts +++ b/e2e/react-start/basic-auth/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/e2e/react-start/basic-auth/src/routes/__root.tsx b/e2e/react-start/basic-auth/src/routes/__root.tsx index fb7868435d..76e5f8b1d6 100644 --- a/e2e/react-start/basic-auth/src/routes/__root.tsx +++ b/e2e/react-start/basic-auth/src/routes/__root.tsx @@ -14,18 +14,18 @@ import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary.js' import { NotFound } from '~/components/NotFound.js' import appCss from '~/styles/app.css?url' import { seo } from '~/utils/seo.js' -import { getAppSession } from '~/utils/session.js' +import { useAppSession } from '~/utils/session.js' const fetchUser = createServerFn({ method: 'GET' }).handler(async () => { // We need to auth on the server so we have access to secure cookies - const session = await getAppSession() + const session = await useAppSession() - if (!session.userEmail) { + if (!session.data.userEmail) { return null } return { - email: session.userEmail, + email: session.data.userEmail, } }) diff --git a/e2e/react-start/basic-auth/src/routes/_authed.tsx b/e2e/react-start/basic-auth/src/routes/_authed.tsx index fe73185136..c457cf5e57 100644 --- a/e2e/react-start/basic-auth/src/routes/_authed.tsx +++ b/e2e/react-start/basic-auth/src/routes/_authed.tsx @@ -3,7 +3,7 @@ import { createServerFn } from '@tanstack/react-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { Login } from '~/components/Login' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const loginFn = createServerFn({ method: 'POST', @@ -37,11 +37,12 @@ export const loginFn = createServerFn({ } // Create a session - const session = await getAppSession() + const session = await useAppSession() // Store the user's email in the session - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) }) export const Route = createFileRoute('/_authed')({ @@ -51,7 +52,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return } diff --git a/e2e/react-start/basic-auth/src/routes/logout.tsx b/e2e/react-start/basic-auth/src/routes/logout.tsx index 0f86b0d4e3..a08f9c737e 100644 --- a/e2e/react-start/basic-auth/src/routes/logout.tsx +++ b/e2e/react-start/basic-auth/src/routes/logout.tsx @@ -1,12 +1,12 @@ import { redirect, createFileRoute } from '@tanstack/react-router' import { createServerFn } from '@tanstack/react-start' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' const logoutFn = createServerFn({ method: 'POST' }).handler(async () => { - const session = await getAppSession() + const session = await useAppSession() - session.destroy() + session.clear() throw redirect({ href: '/', diff --git a/e2e/react-start/basic-auth/src/routes/signup.tsx b/e2e/react-start/basic-auth/src/routes/signup.tsx index d7d5d40129..817362dc05 100644 --- a/e2e/react-start/basic-auth/src/routes/signup.tsx +++ b/e2e/react-start/basic-auth/src/routes/signup.tsx @@ -4,7 +4,7 @@ import { createServerFn, useServerFn } from '@tanstack/react-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { useMutation } from '~/hooks/useMutation' import { Auth } from '~/components/Auth' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const signupFn = createServerFn({ method: 'POST', @@ -24,7 +24,7 @@ export const signupFn = createServerFn({ const password = await hashPassword(payload.password) // Create a session - const session = await getAppSession() + const session = await useAppSession() if (found) { if (found.password !== password) { @@ -36,8 +36,9 @@ export const signupFn = createServerFn({ } // Store the user's email in the session - session.userEmail = found.email - await session.save() + await session.update({ + userEmail: found.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ @@ -54,8 +55,9 @@ export const signupFn = createServerFn({ }) // Store the user's email in the session - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ diff --git a/e2e/react-start/basic-auth/src/utils/session.ts b/e2e/react-start/basic-auth/src/utils/session.ts index f1deacf85b..c38bac1e48 100644 --- a/e2e/react-start/basic-auth/src/utils/session.ts +++ b/e2e/react-start/basic-auth/src/utils/session.ts @@ -1,25 +1,13 @@ -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/react-start/server' +// src/services/session.server.ts +import { useSession } from '@tanstack/react-start/server' import type { User } from '@prisma/client' type SessionUser = { userEmail: User['email'] } -export function getAppSession() { - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'test-auth-session', - // This fixture only runs locally with test credentials. - password: 'local-e2e-only-session-password-at-least-32-characters', - ttl: 60 * 60, - cookieOptions: { - httpOnly: true, - secure: false, - sameSite: 'lax', - path: '/', - }, - }, - ) +export function useAppSession() { + return useSession({ + password: 'ChangeThisBeforeShippingToProdOrYouWillBeFired', + }) } diff --git a/e2e/react-start/basic-cloudflare/package.json b/e2e/react-start/basic-cloudflare/package.json index b9b8031ac4..4d90b4124e 100644 --- a/e2e/react-start/basic-cloudflare/package.json +++ b/e2e/react-start/basic-cloudflare/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "cf-typegen": "wrangler types", "postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -21,7 +21,7 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.29.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -29,19 +29,8 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "wrangler": "^4.74.0" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/.wrangler/deploy" - ] - } - } } } diff --git a/e2e/react-start/basic-cloudflare/playwright.config.ts b/e2e/react-start/basic-cloudflare/playwright.config.ts index 0925936d55..a545dff891 100644 --- a/e2e/react-start/basic-cloudflare/playwright.config.ts +++ b/e2e/react-start/basic-cloudflare/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,6 +14,9 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, @@ -20,8 +24,8 @@ export default defineConfig({ webServer: { command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts b/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts index b29f0d8d68..4219501f5e 100644 --- a/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts +++ b/e2e/react-start/basic-cloudflare/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as StaticRouteImport } from './routes/static' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const StaticRoute = StaticRouteImport.update({ id: '/static', path: '/static', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/static': { id: '/static' path: '/static' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof StaticRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/e2e/react-start/basic-cloudflare/tests/app.spec.ts b/e2e/react-start/basic-cloudflare/tests/app.spec.ts index c9497070dd..add28cb73e 100644 --- a/e2e/react-start/basic-cloudflare/tests/app.spec.ts +++ b/e2e/react-start/basic-cloudflare/tests/app.spec.ts @@ -1,5 +1,3 @@ -import { execFileSync } from 'node:child_process' -import { fileURLToPath } from 'node:url' import { existsSync } from 'node:fs' import { join } from 'node:path' import { expect } from '@playwright/test' @@ -31,19 +29,3 @@ test('prerender with Cloudflare Workers runtime', async ({ page }) => { 'The value is Hello from Cloudflare', ) }) - -test('the built Cloudflare app passes a deployment dry run', () => { - const wrangler = fileURLToPath( - new URL('../node_modules/wrangler/bin/wrangler.js', import.meta.url), - ) - const output = execFileSync( - process.execPath, - [wrangler, 'deploy', '--dry-run'], - { - encoding: 'utf8', - env: { ...process.env, WRANGLER_SEND_METRICS: 'false' }, - }, - ) - expect(output).toContain('dist/server/wrangler.json') - expect(output).toContain('--dry-run: exiting now.') -}) diff --git a/e2e/react-start/basic-cloudflare/tests/setup/global.setup.ts b/e2e/react-start/basic-cloudflare/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-start/basic-cloudflare/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-start/basic-cloudflare/tests/setup/global.teardown.ts b/e2e/react-start/basic-cloudflare/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-start/basic-cloudflare/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-start/basic-react-query/package.json b/e2e/react-start/basic-react-query/package.json index ee37b82ba6..242636c63f 100644 --- a/e2e/react-start/basic-react-query/package.json +++ b/e2e/react-start/basic-react-query/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-query": "^5.90.0", @@ -20,22 +20,21 @@ "@tanstack/react-start": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/basic-react-query/playwright.config.ts b/e2e/react-start/basic-react-query/playwright.config.ts index 216fade4d5..fd2150e435 100644 --- a/e2e/react-start/basic-react-query/playwright.config.ts +++ b/e2e/react-start/basic-react-query/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,19 +18,19 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/react-start/basic-react-query/src/routeTree.gen.ts b/e2e/react-start/basic-react-query/src/routeTree.gen.ts index 72bd9579f6..a1bed86dfa 100644 --- a/e2e/react-start/basic-react-query/src/routeTree.gen.ts +++ b/e2e/react-start/basic-react-query/src/routeTree.gen.ts @@ -9,47 +9,28 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' -import { Route as SuspenseTransitionRouteImport } from './routes/suspense-transition' import { Route as UsersRouteImport } from './routes/users' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' -import { Route as ApiUsersRouteImport } from './routes/api.users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as SuspenseTransitionRouteImport } from './routes/suspense-transition' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' -import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api.users' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as TransitionCountQueryRouteImport } from './routes/transition/count/query' +import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const SuspenseTransitionRoute = SuspenseTransitionRouteImport.update({ @@ -57,64 +38,83 @@ const SuspenseTransitionRoute = SuspenseTransitionRouteImport.update({ path: '/suspense-transition', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const RedirectRoute = RedirectRouteImport.update({ + id: '/redirect', + path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, -} as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => LayoutLayout2Route, +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, +} as any) +const TransitionCountQueryRoute = TransitionCountQueryRouteImport.update({ + id: '/transition/count/query', + path: '/transition/count/query', + getParentRoute: () => rootRouteImport, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const TransitionCountQueryRoute = TransitionCountQueryRouteImport.update({ - id: '/transition/count/query', - path: '/transition/count/query', - getParentRoute: () => rootRouteImport, +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) +const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => LayoutLayout2Route, +} as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any) export interface FileRoutesByFullPath { @@ -244,39 +244,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/suspense-transition': { @@ -286,11 +258,74 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SuspenseTransitionRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/redirect': { + id: '/redirect' + path: '/redirect' + fullPath: '/redirect' + preLoaderRoute: typeof RedirectRouteImport + parentRoute: typeof rootRouteImport + } + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_layout/_layout-2': { @@ -300,62 +335,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutLayout2RouteImport parentRoute: typeof LayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/transition/count/query': { + id: '/transition/count/query' + path: '/transition/count/query' + fullPath: '/transition/count/query' + preLoaderRoute: typeof TransitionCountQueryRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route - } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport - parentRoute: typeof LayoutLayout2Route - } - '/api/users/$id': { - id: '/api/users/$id' - path: '/$id' - fullPath: '/api/users/$id' - preLoaderRoute: typeof ApiUsersIdRouteImport - parentRoute: typeof ApiUsersRoute - } '/posts_/$postId/deep': { id: '/posts_/$postId/deep' path: '/posts/$postId/deep' @@ -363,12 +349,26 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/transition/count/query': { - id: '/transition/count/query' - path: '/transition/count/query' - fullPath: '/transition/count/query' - preLoaderRoute: typeof TransitionCountQueryRouteImport - parentRoute: typeof rootRouteImport + '/api/users/$id': { + id: '/api/users/$id' + path: '/$id' + fullPath: '/api/users/$id' + preLoaderRoute: typeof ApiUsersIdRouteImport + parentRoute: typeof ApiUsersRoute + } + '/_layout/_layout-2/layout-b': { + id: '/_layout/_layout-2/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport + parentRoute: typeof LayoutLayout2Route + } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route } } } diff --git a/e2e/react-start/basic-react-query/src/routes/api.users.ts b/e2e/react-start/basic-react-query/src/routes/api.users.ts index 924c5b6860..bb37c6e68d 100644 --- a/e2e/react-start/basic-react-query/src/routes/api.users.ts +++ b/e2e/react-start/basic-react-query/src/routes/api.users.ts @@ -2,7 +2,11 @@ import { createFileRoute } from '@tanstack/react-router' import axios from 'redaxios' import type { User } from '../utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users')({ server: { diff --git a/e2e/react-start/basic-react-query/src/routes/api/users.$id.ts b/e2e/react-start/basic-react-query/src/routes/api/users.$id.ts index febea309ea..e11e039652 100644 --- a/e2e/react-start/basic-react-query/src/routes/api/users.$id.ts +++ b/e2e/react-start/basic-react-query/src/routes/api/users.$id.ts @@ -2,7 +2,11 @@ import { createFileRoute } from '@tanstack/react-router' import axios from 'redaxios' import type { User } from '../../utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users/$id')({ server: { diff --git a/e2e/react-start/basic-react-query/src/utils/posts.tsx b/e2e/react-start/basic-react-query/src/utils/posts.tsx index abb6e95b92..3fd16db69a 100644 --- a/e2e/react-start/basic-react-query/src/utils/posts.tsx +++ b/e2e/react-start/basic-react-query/src/utils/posts.tsx @@ -9,7 +9,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = createServerFn({ method: 'GET' }).handler( async () => { diff --git a/e2e/react-start/basic-react-query/src/utils/users.tsx b/e2e/react-start/basic-react-query/src/utils/users.tsx index 15216680e9..26b934fcb3 100644 --- a/e2e/react-start/basic-react-query/src/utils/users.tsx +++ b/e2e/react-start/basic-react-query/src/utils/users.tsx @@ -1,6 +1,4 @@ import { queryOptions } from '@tanstack/react-query' -import { createIsomorphicFn } from '@tanstack/react-start' -import { getRequestUrl } from '@tanstack/react-start/server' import axios from 'redaxios' export type User = { @@ -9,16 +7,17 @@ export type User = { email: string } -const getOrigin = createIsomorphicFn() - .server(() => getRequestUrl().origin) - .client(() => window.location.origin) +const PORT = + import.meta.env.VITE_SERVER_PORT || process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` export const usersQueryOptions = () => queryOptions({ queryKey: ['users'], queryFn: () => axios - .get>(getOrigin() + '/api/users') + .get>(DEPLOY_URL + '/api/users') .then((r) => r.data) .catch(() => { throw new Error('Failed to fetch users') @@ -30,7 +29,7 @@ export const userQueryOptions = (id: string) => queryKey: ['users', id], queryFn: () => axios - .get(getOrigin() + '/api/users/' + id) + .get(DEPLOY_URL + '/api/users/' + id) .then((r) => r.data) .catch(() => { throw new Error('Failed to fetch user') diff --git a/e2e/react-start/basic-react-query/tests/setup/global.setup.ts b/e2e/react-start/basic-react-query/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-start/basic-react-query/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-start/basic-react-query/tests/setup/global.teardown.ts b/e2e/react-start/basic-react-query/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-start/basic-react-query/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-start/basic-tsr-config/package.json b/e2e/react-start/basic-tsr-config/package.json index 99e681ac9d..e52f908a6e 100644 --- a/e2e/react-start/basic-tsr-config/package.json +++ b/e2e/react-start/basic-tsr-config/package.json @@ -8,7 +8,7 @@ "dev:e2e": "vite dev", "build": "rimraf ./count.txt && vite build && tsc --noEmit", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -21,10 +21,8 @@ "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14", - "rimraf": "catalog:" + "srvx": "^0.11.9", + "typescript": "^6.0.2", + "vite": "^8.0.14" } } diff --git a/e2e/react-start/basic-tsr-config/playwright.config.ts b/e2e/react-start/basic-tsr-config/playwright.config.ts index 82678ac00b..18b8905468 100644 --- a/e2e/react-start/basic-tsr-config/playwright.config.ts +++ b/e2e/react-start/basic-tsr-config/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/basic/package.json b/e2e/react-start/basic/package.json index 3a1a4ea9c8..37a3f4a0e2 100644 --- a/e2e/react-start/basic/package.json +++ b/e2e/react-start/basic/package.json @@ -14,6 +14,8 @@ "preview": "vite preview", "preview:rsbuild": "rsbuild preview", "start": "node server.js", + "test:e2e:startDummyServer": "node -e 'import(\"./tests/setup/global.setup.ts\").then(m => m.default())' & node -e 'import(\"./tests/setup/waitForDummyServer.ts\").then(m => m.default())'", + "test:e2e:stopDummyServer": "node -e 'import(\"./tests/setup/global.teardown.ts\").then(m => m.default())'", "test:e2e:local": "playwright test --project=chromium" }, "dependencies": { @@ -22,16 +24,15 @@ "@tanstack/react-start": "workspace:^", "express": "^5.2.1", "http-proxy-middleware": "^3.0.5", - "iron-session": "^9.0.1", "js-cookie": "^3.0.5", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tailwindcss/postcss": "^4.2.2", "@tailwindcss/vite": "^4.2.2", @@ -42,26 +43,13 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "zod": "^4.4.3" }, "nx": { - "targets": { - "test:e2e--vite-spa--dev": { - "dependsOn": [ - "^build" - ] - }, - "test:e2e--rsbuild-spa--dev": { - "dependsOn": [ - "^build" - ] - } - }, "metadata": { "playwrightModes": [ { @@ -74,18 +62,7 @@ }, { "toolchain": "vite", - "mode": "spa", - "name": "dev", - "env": { - "E2E_DEV_SERVER": "true" - } - }, - { - "toolchain": "vite", - "mode": "prerender", - "env": { - "NODE_OPTIONS": "--import=@tanstack/router-e2e-utils/mock-api" - } + "mode": "prerender" }, { "toolchain": "vite", @@ -109,18 +86,7 @@ }, { "toolchain": "rsbuild", - "mode": "spa", - "name": "dev", - "env": { - "E2E_DEV_SERVER": "true" - } - }, - { - "toolchain": "rsbuild", - "mode": "prerender", - "env": { - "NODE_OPTIONS": "--import=@tanstack/router-e2e-utils/mock-api" - } + "mode": "prerender" }, { "toolchain": "rsbuild", diff --git a/e2e/react-start/basic/playwright.config.ts b/e2e/react-start/basic/playwright.config.ts index bb4c2cb761..db07d18608 100644 --- a/e2e/react-start/basic/playwright.config.ts +++ b/e2e/react-start/basic/playwright.config.ts @@ -1,42 +1,48 @@ +import fs from 'node:fs' import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const mode = process.env.MODE ?? 'ssr' const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' - +const e2ePortKey = process.env.E2E_PORT_KEY ?? packageJson.name const distDir = process.env.E2E_DIST_DIR ?? 'dist' -// The dev runs start the dev server and run only the SPA shell spec -const devServer = process.env.E2E_DEV_SERVER === 'true' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +if (process.env.TEST_WORKER_INDEX === undefined) { + for (const portFile of [ + `port-${e2ePortKey}.txt`, + `port-${e2ePortKey}_start.txt`, + `port-${e2ePortKey}-external.txt`, + ]) { + fs.rmSync(portFile, { force: true }) + } +} + +const PORT = await getTestServerPort(e2ePortKey) +const START_PORT = await getTestServerPort(`${e2ePortKey}_start`) +const EXTERNAL_PORT = await getDummyServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` const previewCommand = toolchain === 'rsbuild' - ? `pnpm preview:rsbuild --host 0.0.0.0 --port ${PORT}` - : `pnpm preview --host 0.0.0.0 --outDir ${distDir} --port ${PORT}` -const devCommand = - toolchain === 'rsbuild' - ? `pnpm dev:rsbuild --port ${PORT}` - : `pnpm dev:vite --port ${PORT}` -const commandByMode = devServer - ? devCommand - : mode === 'preview' - ? previewCommand - : 'pnpm start' + ? `pnpm preview:rsbuild --port ${PORT}` + : `pnpm preview --outDir ${distDir} --port ${PORT}` +const commandByMode = + mode === 'preview' + ? `pnpm run test:e2e:startDummyServer && ${previewCommand}` + : `pnpm run test:e2e:startDummyServer && pnpm start` /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './tests', - ...(devServer - ? { - testMatch: 'spa-shell.spec.ts', - globalSetup: './tests/setup/dev-server.setup.ts', - } - : {}), workers: 1, reporter: [['line']], + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, @@ -44,16 +50,19 @@ export default defineConfig({ webServer: { command: commandByMode, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, MODE: mode, E2E_TOOLCHAIN: toolchain, - START_PORT: '0', + VITE_NODE_ENV: 'test', + VITE_EXTERNAL_PORT: String(EXTERNAL_PORT), + VITE_SERVER_PORT: String(PORT), + START_PORT: String(START_PORT), PORT: String(PORT), E2E_DIST_DIR: distDir, + E2E_PORT_KEY: e2ePortKey, ...(process.env.TSS_RSB_CLIENT_OUTPUT ? { TSS_RSB_CLIENT_OUTPUT: process.env.TSS_RSB_CLIENT_OUTPUT } : {}), diff --git a/e2e/react-start/basic/rsbuild.config.ts b/e2e/react-start/basic/rsbuild.config.ts index 23072b6c1b..d6a9c035eb 100644 --- a/e2e/react-start/basic/rsbuild.config.ts +++ b/e2e/react-start/basic/rsbuild.config.ts @@ -7,7 +7,10 @@ const outDir = process.env.E2E_DIST_DIR ?? 'dist' const startModeConfig = getStartModeConfig() export default defineConfig({ - plugins: [pluginReact(), tanstackStart(startModeConfig)], + plugins: [ + pluginReact({ splitChunks: false }), + tanstackStart(startModeConfig), + ], output: { distPath: { root: outDir, diff --git a/e2e/react-start/basic/server.js b/e2e/react-start/basic/server.js index 3e1ddab400..69c1e4ca91 100644 --- a/e2e/react-start/basic/server.js +++ b/e2e/react-start/basic/server.js @@ -1,12 +1,12 @@ +import { toNodeHandler } from 'srvx/node' import fs from 'node:fs' import path from 'node:path' -import { toNodeHandler } from 'srvx/node' import express from 'express' import { createProxyMiddleware } from 'http-proxy-middleware' -const port = Number(process.env.PORT ?? 3000) +const port = process.env.PORT || 3000 -const startPort = Number(process.env.START_PORT ?? 0) +const startPort = process.env.START_PORT || 3001 const isSpaMode = process.env.MODE === 'spa' const isPrerender = process.env.MODE === 'prerender' @@ -49,13 +49,13 @@ export async function createStartServer() { return { app } } -export async function createSpaServer(backendPort) { +export async function createSpaServer() { const app = express() app.use( '/api', createProxyMiddleware({ - target: `http://localhost:${backendPort}/api`, // Replace with your target server's URL + target: `http://localhost:${startPort}/api`, // Replace with your target server's URL changeOrigin: false, // Needed for virtual hosted sites, }), ) @@ -63,7 +63,7 @@ export async function createSpaServer(backendPort) { app.use( '/_serverFn', createProxyMiddleware({ - target: `http://localhost:${backendPort}/_serverFn`, // Replace with your target server's URL + target: `http://localhost:${startPort}/_serverFn`, // Replace with your target server's URL changeOrigin: false, // Needed for virtual hosted sites, }), ) @@ -71,28 +71,31 @@ export async function createSpaServer(backendPort) { app.use(express.static(distClientDir)) app.get('/{*splat}', (req, res) => { - res.sendFile('index.html', { root: distClientDir }) + res.sendFile(path.resolve(distClientDir, 'index.html')) }) return { app } } -// Bind the backend first so the SPA proxy receives the port actually held by it. -const { app: startApp } = await createStartServer() -const backend = startApp.listen(isSpaMode ? startPort : port, async (error) => { - if (error) { - throw error - } - const backendPort = backend.address().port - if (isSpaMode) { - const { app } = await createSpaServer(backendPort) - const frontend = app.listen(port, (frontendError) => { - if (frontendError) { - throw frontendError - } - console.info(`E2E app: http://localhost:${frontend.address().port}`) - }) - } else { - console.info(`E2E app: http://localhost:${backendPort}`) - } -}) +if (isSpaMode) { + createSpaServer().then(async ({ app }) => + app.listen(port, (error) => { + if (error) throw error + console.info(`Client Server: http://localhost:${port}`) + }), + ) + + createStartServer().then(async ({ app }) => + app.listen(startPort, (error) => { + if (error) throw error + console.info(`Start Server: http://localhost:${startPort}`) + }), + ) +} else { + createStartServer().then(async ({ app }) => + app.listen(port, (error) => { + if (error) throw error + console.info(`Start Server: http://localhost:${port}`) + }), + ) +} diff --git a/e2e/react-start/basic/src/routeTree.gen.ts b/e2e/react-start/basic/src/routeTree.gen.ts index b6603dd01d..103853f3b8 100644 --- a/e2e/react-start/basic/src/routeTree.gen.ts +++ b/e2e/react-start/basic/src/routeTree.gen.ts @@ -9,145 +9,100 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as AsyncScriptsRouteImport } from './routes/async-scripts' -import { Route as AuthDocsRouteImport } from './routes/auth-docs' -import { Route as ClientOnlyRouteImport } from './routes/client-only' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as ExecutionLocalRouteImport } from './routes/execution-local' -import { Route as ExecutionRpcRouteImport } from './routes/execution-rpc' -import { Route as InlineScriptsRouteImport } from './routes/inline-scripts' -import { Route as LinksRouteImport } from './routes/links' -import { Route as NotFoundRouteRouteImport } from './routes/not-found/route' -import { Route as PlainTsTypeAssertionRouteImport } from './routes/plain-ts-type-assertion' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as PrimitiveBeforeloadErrorRouteImport } from './routes/primitive-beforeload-error' -import { Route as RawStreamRouteImport } from './routes/raw-stream' -import { Route as ScriptsRouteImport } from './routes/scripts' -import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' -import { Route as SpecialCharsRouteRouteImport } from './routes/specialChars/route' -import { Route as StreamRouteImport } from './routes/stream' -import { Route as TypeOnlyReexportRouteImport } from './routes/type-only-reexport' import { Route as UsersRouteImport } from './routes/users' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' -import { Route as ApiUsersRouteImport } from './routes/api.users' -import { Route as AuthDocsPrivateRouteImport } from './routes/auth-docs.private' -import { Route as Issue6221DashboardRouteImport } from './routes/issue-6221.dashboard' -import { Route as MultiCookieRedirectIndexRouteImport } from './routes/multi-cookie-redirect/index' -import { Route as MultiCookieRedirectTargetRouteImport } from './routes/multi-cookie-redirect/target' -import { Route as NotFoundIndexRouteImport } from './routes/not-found/index' -import { Route as NotFoundDeepRouteRouteImport } from './routes/not-found/deep/route' -import { Route as NotFoundParentBoundaryRouteRouteImport } from './routes/not-found/parent-boundary/route' -import { Route as NotFoundViaBeforeLoadRouteImport } from './routes/not-found/via-beforeLoad' -import { Route as NotFoundViaBeforeLoadTargetRootRouteImport } from './routes/not-found/via-beforeLoad-target-root' -import { Route as NotFoundViaLoaderRouteImport } from './routes/not-found/via-loader' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as RawStreamIndexRouteImport } from './routes/raw-stream/index' -import { Route as RawStreamClientCallRouteImport } from './routes/raw-stream/client-call' -import { Route as RawStreamSsrBinaryHintRouteImport } from './routes/raw-stream/ssr-binary-hint' -import { Route as RawStreamSsrMixedRouteImport } from './routes/raw-stream/ssr-mixed' -import { Route as RawStreamSsrMultipleRouteImport } from './routes/raw-stream/ssr-multiple' -import { Route as RawStreamSsrSingleRouteImport } from './routes/raw-stream/ssr-single' -import { Route as RawStreamSsrTextHintRouteImport } from './routes/raw-stream/ssr-text-hint' -import { Route as RedirectIndexRouteImport } from './routes/redirect/index' -import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' -import { Route as SearchParamsIndexRouteImport } from './routes/search-params/index' -import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' -import { Route as SearchParamsLoaderThrowsRedirectRouteImport } from './routes/search-params/loader-throws-redirect' -import { Route as SpecialCharsParamRouteImport } from './routes/specialChars/$param' -import { Route as SpecialCharsHashRouteImport } from './routes/specialChars/hash' -import { Route as SpecialCharsMalformedRouteRouteImport } from './routes/specialChars/malformed/route' -import { Route as SpecialCharsSearchRouteImport } from './routes/specialChars/search' -import { Route as SpecialCharsChar45824Char54620Char48124Char44397RouteImport } from './routes/specialChars/대한민국' +import { Route as TypeOnlyReexportRouteImport } from './routes/type-only-reexport' +import { Route as StreamRouteImport } from './routes/stream' +import { Route as ScriptsRouteImport } from './routes/scripts' +import { Route as RawStreamRouteImport } from './routes/raw-stream' +import { Route as PrimitiveBeforeloadErrorRouteImport } from './routes/primitive-beforeload-error' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as PlainTsTypeAssertionRouteImport } from './routes/plain-ts-type-assertion' +import { Route as LinksRouteImport } from './routes/links' +import { Route as InlineScriptsRouteImport } from './routes/inline-scripts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as ClientOnlyRouteImport } from './routes/client-only' +import { Route as AsyncScriptsRouteImport } from './routes/async-scripts' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as SpecialCharsRouteRouteImport } from './routes/specialChars/route' +import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' +import { Route as NotFoundRouteRouteImport } from './routes/not-found/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as SearchParamsIndexRouteImport } from './routes/search-params/index' +import { Route as RedirectIndexRouteImport } from './routes/redirect/index' +import { Route as RawStreamIndexRouteImport } from './routes/raw-stream/index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' +import { Route as NotFoundIndexRouteImport } from './routes/not-found/index' +import { Route as MultiCookieRedirectIndexRouteImport } from './routes/multi-cookie-redirect/index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' -import { Route as Issue6221ArticleIdRouteImport } from './routes/issue-6221.article.$id' -import { Route as NotFoundDeepIndexRouteImport } from './routes/not-found/deep/index' -import { Route as NotFoundDeepBRouteRouteImport } from './routes/not-found/deep/b/route' -import { Route as NotFoundParentBoundaryIndexRouteImport } from './routes/not-found/parent-boundary/index' -import { Route as NotFoundParentBoundaryViaBeforeLoadRouteImport } from './routes/not-found/parent-boundary/via-beforeLoad' -import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as SpecialCharsChar45824Char54620Char48124Char44397RouteImport } from './routes/specialChars/대한민국' +import { Route as SpecialCharsSearchRouteImport } from './routes/specialChars/search' +import { Route as SpecialCharsHashRouteImport } from './routes/specialChars/hash' +import { Route as SpecialCharsParamRouteImport } from './routes/specialChars/$param' +import { Route as SearchParamsLoaderThrowsRedirectRouteImport } from './routes/search-params/loader-throws-redirect' +import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' +import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' +import { Route as RawStreamSsrTextHintRouteImport } from './routes/raw-stream/ssr-text-hint' +import { Route as RawStreamSsrSingleRouteImport } from './routes/raw-stream/ssr-single' +import { Route as RawStreamSsrMultipleRouteImport } from './routes/raw-stream/ssr-multiple' +import { Route as RawStreamSsrMixedRouteImport } from './routes/raw-stream/ssr-mixed' +import { Route as RawStreamSsrBinaryHintRouteImport } from './routes/raw-stream/ssr-binary-hint' +import { Route as RawStreamClientCallRouteImport } from './routes/raw-stream/client-call' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as NotFoundViaLoaderRouteImport } from './routes/not-found/via-loader' +import { Route as NotFoundViaBeforeLoadTargetRootRouteImport } from './routes/not-found/via-beforeLoad-target-root' +import { Route as NotFoundViaBeforeLoadRouteImport } from './routes/not-found/via-beforeLoad' +import { Route as MultiCookieRedirectTargetRouteImport } from './routes/multi-cookie-redirect/target' +import { Route as ApiUsersRouteImport } from './routes/api.users' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as SpecialCharsMalformedRouteRouteImport } from './routes/specialChars/malformed/route' +import { Route as NotFoundParentBoundaryRouteRouteImport } from './routes/not-found/parent-boundary/route' +import { Route as NotFoundDeepRouteRouteImport } from './routes/not-found/deep/route' import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index' -import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' -import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' -import { Route as SpecialCharsMalformedParamRouteImport } from './routes/specialChars/malformed/$param' +import { Route as NotFoundParentBoundaryIndexRouteImport } from './routes/not-found/parent-boundary/index' +import { Route as NotFoundDeepIndexRouteImport } from './routes/not-found/deep/index' import { Route as SpecialCharsMalformedSearchRouteImport } from './routes/specialChars/malformed/search' +import { Route as SpecialCharsMalformedParamRouteImport } from './routes/specialChars/malformed/$param' +import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' +import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' +import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as NotFoundParentBoundaryViaBeforeLoadRouteImport } from './routes/not-found/parent-boundary/via-beforeLoad' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as NotFoundDeepBRouteRouteImport } from './routes/not-found/deep/b/route' +import { Route as RedirectTargetServerFnIndexRouteImport } from './routes/redirect/$target/serverFn/index' +import { Route as RedirectTargetServerFnViaUseServerFnRouteImport } from './routes/redirect/$target/serverFn/via-useServerFn' +import { Route as RedirectTargetServerFnViaLoaderRouteImport } from './routes/redirect/$target/serverFn/via-loader' +import { Route as RedirectTargetServerFnViaBeforeLoadRouteImport } from './routes/redirect/$target/serverFn/via-beforeLoad' import { Route as FooBarQuxHereRouteImport } from './routes/foo/$bar/$qux/_here' import { Route as NotFoundDeepBCRouteRouteImport } from './routes/not-found/deep/b/c/route' -import { Route as RedirectTargetServerFnIndexRouteImport } from './routes/redirect/$target/serverFn/index' -import { Route as RedirectTargetServerFnViaBeforeLoadRouteImport } from './routes/redirect/$target/serverFn/via-beforeLoad' -import { Route as RedirectTargetServerFnViaLoaderRouteImport } from './routes/redirect/$target/serverFn/via-loader' -import { Route as RedirectTargetServerFnViaUseServerFnRouteImport } from './routes/redirect/$target/serverFn/via-useServerFn' import { Route as FooBarQuxHereIndexRouteImport } from './routes/foo/$bar/$qux/_here/index' import { Route as NotFoundDeepBCDRouteImport } from './routes/not-found/deep/b/c/d' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', +const TypeOnlyReexportRoute = TypeOnlyReexportRouteImport.update({ + id: '/type-only-reexport', + path: '/type-only-reexport', getParentRoute: () => rootRouteImport, } as any) -const AsyncScriptsRoute = AsyncScriptsRouteImport.update({ - id: '/async-scripts', - path: '/async-scripts', +const StreamRoute = StreamRouteImport.update({ + id: '/stream', + path: '/stream', getParentRoute: () => rootRouteImport, } as any) -const AuthDocsRoute = AuthDocsRouteImport.update({ - id: '/auth-docs', - path: '/auth-docs', +const ScriptsRoute = ScriptsRouteImport.update({ + id: '/scripts', + path: '/scripts', getParentRoute: () => rootRouteImport, } as any) -const ClientOnlyRoute = ClientOnlyRouteImport.update({ - id: '/client-only', - path: '/client-only', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const ExecutionLocalRoute = ExecutionLocalRouteImport.update({ - id: '/execution-local', - path: '/execution-local', - getParentRoute: () => rootRouteImport, -} as any) -const ExecutionRpcRoute = ExecutionRpcRouteImport.update({ - id: '/execution-rpc', - path: '/execution-rpc', - getParentRoute: () => rootRouteImport, -} as any) -const InlineScriptsRoute = InlineScriptsRouteImport.update({ - id: '/inline-scripts', - path: '/inline-scripts', - getParentRoute: () => rootRouteImport, -} as any) -const LinksRoute = LinksRouteImport.update({ - id: '/links', - path: '/links', - getParentRoute: () => rootRouteImport, -} as any) -const NotFoundRouteRoute = NotFoundRouteRouteImport.update({ - id: '/not-found', - path: '/not-found', - getParentRoute: () => rootRouteImport, -} as any) -const PlainTsTypeAssertionRoute = PlainTsTypeAssertionRouteImport.update({ - id: '/plain-ts-type-assertion', - path: '/plain-ts-type-assertion', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const RawStreamRoute = RawStreamRouteImport.update({ + id: '/raw-stream', + path: '/raw-stream', getParentRoute: () => rootRouteImport, } as any) const PrimitiveBeforeloadErrorRoute = @@ -156,19 +111,43 @@ const PrimitiveBeforeloadErrorRoute = path: '/primitive-beforeload-error', getParentRoute: () => rootRouteImport, } as any) -const RawStreamRoute = RawStreamRouteImport.update({ - id: '/raw-stream', - path: '/raw-stream', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const ScriptsRoute = ScriptsRouteImport.update({ - id: '/scripts', - path: '/scripts', +const PlainTsTypeAssertionRoute = PlainTsTypeAssertionRouteImport.update({ + id: '/plain-ts-type-assertion', + path: '/plain-ts-type-assertion', getParentRoute: () => rootRouteImport, } as any) -const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ - id: '/search-params', - path: '/search-params', +const LinksRoute = LinksRouteImport.update({ + id: '/links', + path: '/links', + getParentRoute: () => rootRouteImport, +} as any) +const InlineScriptsRoute = InlineScriptsRouteImport.update({ + id: '/inline-scripts', + path: '/inline-scripts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const ClientOnlyRoute = ClientOnlyRouteImport.update({ + id: '/client-only', + path: '/client-only', + getParentRoute: () => rootRouteImport, +} as any) +const AsyncScriptsRoute = AsyncScriptsRouteImport.update({ + id: '/async-scripts', + path: '/async-scripts', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', getParentRoute: () => rootRouteImport, } as any) const SpecialCharsRouteRoute = SpecialCharsRouteRouteImport.update({ @@ -176,39 +155,50 @@ const SpecialCharsRouteRoute = SpecialCharsRouteRouteImport.update({ path: '/specialChars', getParentRoute: () => rootRouteImport, } as any) -const StreamRoute = StreamRouteImport.update({ - id: '/stream', - path: '/stream', +const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ + id: '/search-params', + path: '/search-params', getParentRoute: () => rootRouteImport, } as any) -const TypeOnlyReexportRoute = TypeOnlyReexportRouteImport.update({ - id: '/type-only-reexport', - path: '/type-only-reexport', +const NotFoundRouteRoute = NotFoundRouteRouteImport.update({ + id: '/not-found', + path: '/not-found', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RedirectIndexRoute = RedirectIndexRouteImport.update({ + id: '/redirect/', + path: '/redirect/', getParentRoute: () => rootRouteImport, } as any) -const AuthDocsPrivateRoute = AuthDocsPrivateRouteImport.update({ - id: '/private', - path: '/private', - getParentRoute: () => AuthDocsRoute, +const RawStreamIndexRoute = RawStreamIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => RawStreamRoute, } as any) -const Issue6221DashboardRoute = Issue6221DashboardRouteImport.update({ - id: '/issue-6221/dashboard', - path: '/issue-6221/dashboard', - getParentRoute: () => rootRouteImport, +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const NotFoundIndexRoute = NotFoundIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NotFoundRouteRoute, } as any) const MultiCookieRedirectIndexRoute = MultiCookieRedirectIndexRouteImport.update({ @@ -216,31 +206,86 @@ const MultiCookieRedirectIndexRoute = path: '/multi-cookie-redirect/', getParentRoute: () => rootRouteImport, } as any) -const MultiCookieRedirectTargetRoute = - MultiCookieRedirectTargetRouteImport.update({ - id: '/multi-cookie-redirect/target', - path: '/multi-cookie-redirect/target', - getParentRoute: () => rootRouteImport, - } as any) -const NotFoundIndexRoute = NotFoundIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NotFoundRouteRoute, +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, } as any) -const NotFoundDeepRouteRoute = NotFoundDeepRouteRouteImport.update({ - id: '/deep', - path: '/deep', - getParentRoute: () => NotFoundRouteRoute, -} as any) -const NotFoundParentBoundaryRouteRoute = - NotFoundParentBoundaryRouteRouteImport.update({ - id: '/parent-boundary', - path: '/parent-boundary', - getParentRoute: () => NotFoundRouteRoute, +const SpecialCharsChar45824Char54620Char48124Char44397Route = + SpecialCharsChar45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => SpecialCharsRouteRoute, } as any) -const NotFoundViaBeforeLoadRoute = NotFoundViaBeforeLoadRouteImport.update({ - id: '/via-beforeLoad', - path: '/via-beforeLoad', +const SpecialCharsSearchRoute = SpecialCharsSearchRouteImport.update({ + id: '/search', + path: '/search', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SpecialCharsHashRoute = SpecialCharsHashRouteImport.update({ + id: '/hash', + path: '/hash', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SpecialCharsParamRoute = SpecialCharsParamRouteImport.update({ + id: '/$param', + path: '/$param', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SearchParamsLoaderThrowsRedirectRoute = + SearchParamsLoaderThrowsRedirectRouteImport.update({ + id: '/loader-throws-redirect', + path: '/loader-throws-redirect', + getParentRoute: () => SearchParamsRouteRoute, + } as any) +const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ + id: '/default', + path: '/default', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RedirectTargetRoute = RedirectTargetRouteImport.update({ + id: '/redirect/$target', + path: '/redirect/$target', + getParentRoute: () => rootRouteImport, +} as any) +const RawStreamSsrTextHintRoute = RawStreamSsrTextHintRouteImport.update({ + id: '/ssr-text-hint', + path: '/ssr-text-hint', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrSingleRoute = RawStreamSsrSingleRouteImport.update({ + id: '/ssr-single', + path: '/ssr-single', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrMultipleRoute = RawStreamSsrMultipleRouteImport.update({ + id: '/ssr-multiple', + path: '/ssr-multiple', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrMixedRoute = RawStreamSsrMixedRouteImport.update({ + id: '/ssr-mixed', + path: '/ssr-mixed', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrBinaryHintRoute = RawStreamSsrBinaryHintRouteImport.update({ + id: '/ssr-binary-hint', + path: '/ssr-binary-hint', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamClientCallRoute = RawStreamClientCallRouteImport.update({ + id: '/client-call', + path: '/client-call', + getParentRoute: () => RawStreamRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const NotFoundViaLoaderRoute = NotFoundViaLoaderRouteImport.update({ + id: '/via-loader', + path: '/via-loader', getParentRoute: () => NotFoundRouteRoute, } as any) const NotFoundViaBeforeLoadTargetRootRoute = @@ -249,91 +294,25 @@ const NotFoundViaBeforeLoadTargetRootRoute = path: '/via-beforeLoad-target-root', getParentRoute: () => NotFoundRouteRoute, } as any) -const NotFoundViaLoaderRoute = NotFoundViaLoaderRouteImport.update({ - id: '/via-loader', - path: '/via-loader', +const NotFoundViaBeforeLoadRoute = NotFoundViaBeforeLoadRouteImport.update({ + id: '/via-beforeLoad', + path: '/via-beforeLoad', getParentRoute: () => NotFoundRouteRoute, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const RawStreamIndexRoute = RawStreamIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamClientCallRoute = RawStreamClientCallRouteImport.update({ - id: '/client-call', - path: '/client-call', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrBinaryHintRoute = RawStreamSsrBinaryHintRouteImport.update({ - id: '/ssr-binary-hint', - path: '/ssr-binary-hint', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrMixedRoute = RawStreamSsrMixedRouteImport.update({ - id: '/ssr-mixed', - path: '/ssr-mixed', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrMultipleRoute = RawStreamSsrMultipleRouteImport.update({ - id: '/ssr-multiple', - path: '/ssr-multiple', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrSingleRoute = RawStreamSsrSingleRouteImport.update({ - id: '/ssr-single', - path: '/ssr-single', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrTextHintRoute = RawStreamSsrTextHintRouteImport.update({ - id: '/ssr-text-hint', - path: '/ssr-text-hint', - getParentRoute: () => RawStreamRoute, -} as any) -const RedirectIndexRoute = RedirectIndexRouteImport.update({ - id: '/redirect/', - path: '/redirect/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectTargetRoute = RedirectTargetRouteImport.update({ - id: '/redirect/$target', - path: '/redirect/$target', - getParentRoute: () => rootRouteImport, -} as any) -const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ - id: '/default', - path: '/default', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const SearchParamsLoaderThrowsRedirectRoute = - SearchParamsLoaderThrowsRedirectRouteImport.update({ - id: '/loader-throws-redirect', - path: '/loader-throws-redirect', - getParentRoute: () => SearchParamsRouteRoute, +const MultiCookieRedirectTargetRoute = + MultiCookieRedirectTargetRouteImport.update({ + id: '/multi-cookie-redirect/target', + path: '/multi-cookie-redirect/target', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsParamRoute = SpecialCharsParamRouteImport.update({ - id: '/$param', - path: '/$param', - getParentRoute: () => SpecialCharsRouteRoute, +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsHashRoute = SpecialCharsHashRouteImport.update({ - id: '/hash', - path: '/hash', - getParentRoute: () => SpecialCharsRouteRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) const SpecialCharsMalformedRouteRoute = SpecialCharsMalformedRouteRouteImport.update({ @@ -341,56 +320,21 @@ const SpecialCharsMalformedRouteRoute = path: '/malformed', getParentRoute: () => SpecialCharsRouteRoute, } as any) -const SpecialCharsSearchRoute = SpecialCharsSearchRouteImport.update({ - id: '/search', - path: '/search', - getParentRoute: () => SpecialCharsRouteRoute, -} as any) -const SpecialCharsChar45824Char54620Char48124Char44397Route = - SpecialCharsChar45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => SpecialCharsRouteRoute, +const NotFoundParentBoundaryRouteRoute = + NotFoundParentBoundaryRouteRouteImport.update({ + id: '/parent-boundary', + path: '/parent-boundary', + getParentRoute: () => NotFoundRouteRoute, } as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ +const NotFoundDeepRouteRoute = NotFoundDeepRouteRouteImport.update({ + id: '/deep', + path: '/deep', + getParentRoute: () => NotFoundRouteRoute, +} as any) +const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => UsersRoute, -} as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, -} as any) -const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => LayoutLayout2Route, -} as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, -} as any) -const Issue6221ArticleIdRoute = Issue6221ArticleIdRouteImport.update({ - id: '/issue-6221/article/$id', - path: '/issue-6221/article/$id', - getParentRoute: () => rootRouteImport, -} as any) -const NotFoundDeepIndexRoute = NotFoundDeepIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NotFoundDeepRouteRoute, -} as any) -const NotFoundDeepBRouteRoute = NotFoundDeepBRouteRouteImport.update({ - id: '/b', - path: '/b', - getParentRoute: () => NotFoundDeepRouteRoute, + getParentRoute: () => RedirectTargetRoute, } as any) const NotFoundParentBoundaryIndexRoute = NotFoundParentBoundaryIndexRouteImport.update({ @@ -398,20 +342,26 @@ const NotFoundParentBoundaryIndexRoute = path: '/', getParentRoute: () => NotFoundParentBoundaryRouteRoute, } as any) -const NotFoundParentBoundaryViaBeforeLoadRoute = - NotFoundParentBoundaryViaBeforeLoadRouteImport.update({ - id: '/via-beforeLoad', - path: '/via-beforeLoad', - getParentRoute: () => NotFoundParentBoundaryRouteRoute, - } as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({ +const NotFoundDeepIndexRoute = NotFoundDeepIndexRouteImport.update({ id: '/', path: '/', + getParentRoute: () => NotFoundDeepRouteRoute, +} as any) +const SpecialCharsMalformedSearchRoute = + SpecialCharsMalformedSearchRouteImport.update({ + id: '/search', + path: '/search', + getParentRoute: () => SpecialCharsMalformedRouteRoute, + } as any) +const SpecialCharsMalformedParamRoute = + SpecialCharsMalformedParamRouteImport.update({ + id: '/$param', + path: '/$param', + getParentRoute: () => SpecialCharsMalformedRouteRoute, + } as any) +const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ + id: '/via-loader', + path: '/via-loader', getParentRoute: () => RedirectTargetRoute, } as any) const RedirectTargetViaBeforeLoadRoute = @@ -420,22 +370,60 @@ const RedirectTargetViaBeforeLoadRoute = path: '/via-beforeLoad', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ - id: '/via-loader', - path: '/via-loader', - getParentRoute: () => RedirectTargetRoute, +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsMalformedParamRoute = - SpecialCharsMalformedParamRouteImport.update({ - id: '/$param', - path: '/$param', - getParentRoute: () => SpecialCharsMalformedRouteRoute, +const NotFoundParentBoundaryViaBeforeLoadRoute = + NotFoundParentBoundaryViaBeforeLoadRouteImport.update({ + id: '/via-beforeLoad', + path: '/via-beforeLoad', + getParentRoute: () => NotFoundParentBoundaryRouteRoute, } as any) -const SpecialCharsMalformedSearchRoute = - SpecialCharsMalformedSearchRouteImport.update({ - id: '/search', - path: '/search', - getParentRoute: () => SpecialCharsMalformedRouteRoute, +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) +const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => LayoutLayout2Route, +} as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) +const NotFoundDeepBRouteRoute = NotFoundDeepBRouteRouteImport.update({ + id: '/b', + path: '/b', + getParentRoute: () => NotFoundDeepRouteRoute, +} as any) +const RedirectTargetServerFnIndexRoute = + RedirectTargetServerFnIndexRouteImport.update({ + id: '/serverFn/', + path: '/serverFn/', + getParentRoute: () => RedirectTargetRoute, + } as any) +const RedirectTargetServerFnViaUseServerFnRoute = + RedirectTargetServerFnViaUseServerFnRouteImport.update({ + id: '/serverFn/via-useServerFn', + path: '/serverFn/via-useServerFn', + getParentRoute: () => RedirectTargetRoute, + } as any) +const RedirectTargetServerFnViaLoaderRoute = + RedirectTargetServerFnViaLoaderRouteImport.update({ + id: '/serverFn/via-loader', + path: '/serverFn/via-loader', + getParentRoute: () => RedirectTargetRoute, + } as any) +const RedirectTargetServerFnViaBeforeLoadRoute = + RedirectTargetServerFnViaBeforeLoadRouteImport.update({ + id: '/serverFn/via-beforeLoad', + path: '/serverFn/via-beforeLoad', + getParentRoute: () => RedirectTargetRoute, } as any) const FooBarQuxHereRoute = FooBarQuxHereRouteImport.update({ id: '/foo/$bar/$qux/_here', @@ -447,30 +435,6 @@ const NotFoundDeepBCRouteRoute = NotFoundDeepBCRouteRouteImport.update({ path: '/c', getParentRoute: () => NotFoundDeepBRouteRoute, } as any) -const RedirectTargetServerFnIndexRoute = - RedirectTargetServerFnIndexRouteImport.update({ - id: '/serverFn/', - path: '/serverFn/', - getParentRoute: () => RedirectTargetRoute, - } as any) -const RedirectTargetServerFnViaBeforeLoadRoute = - RedirectTargetServerFnViaBeforeLoadRouteImport.update({ - id: '/serverFn/via-beforeLoad', - path: '/serverFn/via-beforeLoad', - getParentRoute: () => RedirectTargetRoute, - } as any) -const RedirectTargetServerFnViaLoaderRoute = - RedirectTargetServerFnViaLoaderRouteImport.update({ - id: '/serverFn/via-loader', - path: '/serverFn/via-loader', - getParentRoute: () => RedirectTargetRoute, - } as any) -const RedirectTargetServerFnViaUseServerFnRoute = - RedirectTargetServerFnViaUseServerFnRouteImport.update({ - id: '/serverFn/via-useServerFn', - path: '/serverFn/via-useServerFn', - getParentRoute: () => RedirectTargetRoute, - } as any) const FooBarQuxHereIndexRoute = FooBarQuxHereIndexRouteImport.update({ id: '/', path: '/', @@ -488,11 +452,8 @@ export interface FileRoutesByFullPath { '/search-params': typeof SearchParamsRouteRouteWithChildren '/specialChars': typeof SpecialCharsRouteRouteWithChildren '/async-scripts': typeof AsyncScriptsRoute - '/auth-docs': typeof AuthDocsRouteWithChildren '/client-only': typeof ClientOnlyRoute '/deferred': typeof DeferredRoute - '/execution-local': typeof ExecutionLocalRoute - '/execution-rpc': typeof ExecutionRpcRoute '/inline-scripts': typeof InlineScriptsRoute '/links': typeof LinksRoute '/plain-ts-type-assertion': typeof PlainTsTypeAssertionRoute @@ -507,8 +468,6 @@ export interface FileRoutesByFullPath { '/not-found/parent-boundary': typeof NotFoundParentBoundaryRouteRouteWithChildren '/specialChars/malformed': typeof SpecialCharsMalformedRouteRouteWithChildren '/api/users': typeof ApiUsersRouteWithChildren - '/auth-docs/private': typeof AuthDocsPrivateRoute - '/issue-6221/dashboard': typeof Issue6221DashboardRoute '/multi-cookie-redirect/target': typeof MultiCookieRedirectTargetRoute '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute '/not-found/via-beforeLoad-target-root': typeof NotFoundViaBeforeLoadTargetRootRoute @@ -539,7 +498,6 @@ export interface FileRoutesByFullPath { '/layout-a': typeof LayoutLayout2LayoutARoute '/layout-b': typeof LayoutLayout2LayoutBRoute '/api/users/$id': typeof ApiUsersIdRoute - '/issue-6221/article/$id': typeof Issue6221ArticleIdRoute '/not-found/parent-boundary/via-beforeLoad': typeof NotFoundParentBoundaryViaBeforeLoadRoute '/posts/$postId/deep': typeof PostsPostIdDeepRoute '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute @@ -562,11 +520,8 @@ export interface FileRoutesByTo { '/': typeof IndexRoute '/specialChars': typeof SpecialCharsRouteRouteWithChildren '/async-scripts': typeof AsyncScriptsRoute - '/auth-docs': typeof AuthDocsRouteWithChildren '/client-only': typeof ClientOnlyRoute '/deferred': typeof DeferredRoute - '/execution-local': typeof ExecutionLocalRoute - '/execution-rpc': typeof ExecutionRpcRoute '/inline-scripts': typeof InlineScriptsRoute '/links': typeof LinksRoute '/plain-ts-type-assertion': typeof PlainTsTypeAssertionRoute @@ -576,8 +531,6 @@ export interface FileRoutesByTo { '/type-only-reexport': typeof TypeOnlyReexportRoute '/specialChars/malformed': typeof SpecialCharsMalformedRouteRouteWithChildren '/api/users': typeof ApiUsersRouteWithChildren - '/auth-docs/private': typeof AuthDocsPrivateRoute - '/issue-6221/dashboard': typeof Issue6221DashboardRoute '/multi-cookie-redirect/target': typeof MultiCookieRedirectTargetRoute '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute '/not-found/via-beforeLoad-target-root': typeof NotFoundViaBeforeLoadTargetRootRoute @@ -607,7 +560,6 @@ export interface FileRoutesByTo { '/layout-a': typeof LayoutLayout2LayoutARoute '/layout-b': typeof LayoutLayout2LayoutBRoute '/api/users/$id': typeof ApiUsersIdRoute - '/issue-6221/article/$id': typeof Issue6221ArticleIdRoute '/not-found/parent-boundary/via-beforeLoad': typeof NotFoundParentBoundaryViaBeforeLoadRoute '/posts/$postId/deep': typeof PostsPostIdDeepRoute '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute @@ -633,11 +585,8 @@ export interface FileRoutesById { '/specialChars': typeof SpecialCharsRouteRouteWithChildren '/_layout': typeof LayoutRouteWithChildren '/async-scripts': typeof AsyncScriptsRoute - '/auth-docs': typeof AuthDocsRouteWithChildren '/client-only': typeof ClientOnlyRoute '/deferred': typeof DeferredRoute - '/execution-local': typeof ExecutionLocalRoute - '/execution-rpc': typeof ExecutionRpcRoute '/inline-scripts': typeof InlineScriptsRoute '/links': typeof LinksRoute '/plain-ts-type-assertion': typeof PlainTsTypeAssertionRoute @@ -653,8 +602,6 @@ export interface FileRoutesById { '/specialChars/malformed': typeof SpecialCharsMalformedRouteRouteWithChildren '/_layout/_layout-2': typeof LayoutLayout2RouteWithChildren '/api/users': typeof ApiUsersRouteWithChildren - '/auth-docs/private': typeof AuthDocsPrivateRoute - '/issue-6221/dashboard': typeof Issue6221DashboardRoute '/multi-cookie-redirect/target': typeof MultiCookieRedirectTargetRoute '/not-found/via-beforeLoad': typeof NotFoundViaBeforeLoadRoute '/not-found/via-beforeLoad-target-root': typeof NotFoundViaBeforeLoadTargetRootRoute @@ -685,7 +632,6 @@ export interface FileRoutesById { '/_layout/_layout-2/layout-a': typeof LayoutLayout2LayoutARoute '/_layout/_layout-2/layout-b': typeof LayoutLayout2LayoutBRoute '/api/users/$id': typeof ApiUsersIdRoute - '/issue-6221/article/$id': typeof Issue6221ArticleIdRoute '/not-found/parent-boundary/via-beforeLoad': typeof NotFoundParentBoundaryViaBeforeLoadRoute '/posts_/$postId/deep': typeof PostsPostIdDeepRoute '/redirect/$target/via-beforeLoad': typeof RedirectTargetViaBeforeLoadRoute @@ -712,11 +658,8 @@ export interface FileRouteTypes { | '/search-params' | '/specialChars' | '/async-scripts' - | '/auth-docs' | '/client-only' | '/deferred' - | '/execution-local' - | '/execution-rpc' | '/inline-scripts' | '/links' | '/plain-ts-type-assertion' @@ -731,8 +674,6 @@ export interface FileRouteTypes { | '/not-found/parent-boundary' | '/specialChars/malformed' | '/api/users' - | '/auth-docs/private' - | '/issue-6221/dashboard' | '/multi-cookie-redirect/target' | '/not-found/via-beforeLoad' | '/not-found/via-beforeLoad-target-root' @@ -763,7 +704,6 @@ export interface FileRouteTypes { | '/layout-a' | '/layout-b' | '/api/users/$id' - | '/issue-6221/article/$id' | '/not-found/parent-boundary/via-beforeLoad' | '/posts/$postId/deep' | '/redirect/$target/via-beforeLoad' @@ -786,11 +726,8 @@ export interface FileRouteTypes { | '/' | '/specialChars' | '/async-scripts' - | '/auth-docs' | '/client-only' | '/deferred' - | '/execution-local' - | '/execution-rpc' | '/inline-scripts' | '/links' | '/plain-ts-type-assertion' @@ -800,8 +737,6 @@ export interface FileRouteTypes { | '/type-only-reexport' | '/specialChars/malformed' | '/api/users' - | '/auth-docs/private' - | '/issue-6221/dashboard' | '/multi-cookie-redirect/target' | '/not-found/via-beforeLoad' | '/not-found/via-beforeLoad-target-root' @@ -831,7 +766,6 @@ export interface FileRouteTypes { | '/layout-a' | '/layout-b' | '/api/users/$id' - | '/issue-6221/article/$id' | '/not-found/parent-boundary/via-beforeLoad' | '/posts/$postId/deep' | '/redirect/$target/via-beforeLoad' @@ -856,11 +790,8 @@ export interface FileRouteTypes { | '/specialChars' | '/_layout' | '/async-scripts' - | '/auth-docs' | '/client-only' | '/deferred' - | '/execution-local' - | '/execution-rpc' | '/inline-scripts' | '/links' | '/plain-ts-type-assertion' @@ -876,8 +807,6 @@ export interface FileRouteTypes { | '/specialChars/malformed' | '/_layout/_layout-2' | '/api/users' - | '/auth-docs/private' - | '/issue-6221/dashboard' | '/multi-cookie-redirect/target' | '/not-found/via-beforeLoad' | '/not-found/via-beforeLoad-target-root' @@ -908,7 +837,6 @@ export interface FileRouteTypes { | '/_layout/_layout-2/layout-a' | '/_layout/_layout-2/layout-b' | '/api/users/$id' - | '/issue-6221/article/$id' | '/not-found/parent-boundary/via-beforeLoad' | '/posts_/$postId/deep' | '/redirect/$target/via-beforeLoad' @@ -935,11 +863,8 @@ export interface RootRouteChildren { SpecialCharsRouteRoute: typeof SpecialCharsRouteRouteWithChildren LayoutRoute: typeof LayoutRouteWithChildren AsyncScriptsRoute: typeof AsyncScriptsRoute - AuthDocsRoute: typeof AuthDocsRouteWithChildren ClientOnlyRoute: typeof ClientOnlyRoute DeferredRoute: typeof DeferredRoute - ExecutionLocalRoute: typeof ExecutionLocalRoute - ExecutionRpcRoute: typeof ExecutionRpcRoute InlineScriptsRoute: typeof InlineScriptsRoute LinksRoute: typeof LinksRoute PlainTsTypeAssertionRoute: typeof PlainTsTypeAssertionRoute @@ -951,149 +876,21 @@ export interface RootRouteChildren { TypeOnlyReexportRoute: typeof TypeOnlyReexportRoute UsersRoute: typeof UsersRouteWithChildren ApiUsersRoute: typeof ApiUsersRouteWithChildren - Issue6221DashboardRoute: typeof Issue6221DashboardRoute MultiCookieRedirectTargetRoute: typeof MultiCookieRedirectTargetRoute RedirectTargetRoute: typeof RedirectTargetRouteWithChildren MultiCookieRedirectIndexRoute: typeof MultiCookieRedirectIndexRoute RedirectIndexRoute: typeof RedirectIndexRoute - Issue6221ArticleIdRoute: typeof Issue6221ArticleIdRoute PostsPostIdDeepRoute: typeof PostsPostIdDeepRoute FooBarQuxHereRoute: typeof FooBarQuxHereRouteWithChildren } declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/async-scripts': { - id: '/async-scripts' - path: '/async-scripts' - fullPath: '/async-scripts' - preLoaderRoute: typeof AsyncScriptsRouteImport - parentRoute: typeof rootRouteImport - } - '/auth-docs': { - id: '/auth-docs' - path: '/auth-docs' - fullPath: '/auth-docs' - preLoaderRoute: typeof AuthDocsRouteImport - parentRoute: typeof rootRouteImport - } - '/client-only': { - id: '/client-only' - path: '/client-only' - fullPath: '/client-only' - preLoaderRoute: typeof ClientOnlyRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/execution-local': { - id: '/execution-local' - path: '/execution-local' - fullPath: '/execution-local' - preLoaderRoute: typeof ExecutionLocalRouteImport - parentRoute: typeof rootRouteImport - } - '/execution-rpc': { - id: '/execution-rpc' - path: '/execution-rpc' - fullPath: '/execution-rpc' - preLoaderRoute: typeof ExecutionRpcRouteImport - parentRoute: typeof rootRouteImport - } - '/inline-scripts': { - id: '/inline-scripts' - path: '/inline-scripts' - fullPath: '/inline-scripts' - preLoaderRoute: typeof InlineScriptsRouteImport - parentRoute: typeof rootRouteImport - } - '/links': { - id: '/links' - path: '/links' - fullPath: '/links' - preLoaderRoute: typeof LinksRouteImport - parentRoute: typeof rootRouteImport - } - '/not-found': { - id: '/not-found' - path: '/not-found' - fullPath: '/not-found' - preLoaderRoute: typeof NotFoundRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/plain-ts-type-assertion': { - id: '/plain-ts-type-assertion' - path: '/plain-ts-type-assertion' - fullPath: '/plain-ts-type-assertion' - preLoaderRoute: typeof PlainTsTypeAssertionRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/primitive-beforeload-error': { - id: '/primitive-beforeload-error' - path: '/primitive-beforeload-error' - fullPath: '/primitive-beforeload-error' - preLoaderRoute: typeof PrimitiveBeforeloadErrorRouteImport - parentRoute: typeof rootRouteImport - } - '/raw-stream': { - id: '/raw-stream' - path: '/raw-stream' - fullPath: '/raw-stream' - preLoaderRoute: typeof RawStreamRouteImport - parentRoute: typeof rootRouteImport - } - '/scripts': { - id: '/scripts' - path: '/scripts' - fullPath: '/scripts' - preLoaderRoute: typeof ScriptsRouteImport - parentRoute: typeof rootRouteImport - } - '/search-params': { - id: '/search-params' - path: '/search-params' - fullPath: '/search-params' - preLoaderRoute: typeof SearchParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/specialChars': { - id: '/specialChars' - path: '/specialChars' - fullPath: '/specialChars' - preLoaderRoute: typeof SpecialCharsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/stream': { - id: '/stream' - path: '/stream' - fullPath: '/stream' - preLoaderRoute: typeof StreamRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/type-only-reexport': { @@ -1103,173 +900,124 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof TypeOnlyReexportRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/stream': { + id: '/stream' + path: '/stream' + fullPath: '/stream' + preLoaderRoute: typeof StreamRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' + '/scripts': { + id: '/scripts' + path: '/scripts' + fullPath: '/scripts' + preLoaderRoute: typeof ScriptsRouteImport + parentRoute: typeof rootRouteImport + } + '/raw-stream': { + id: '/raw-stream' + path: '/raw-stream' + fullPath: '/raw-stream' + preLoaderRoute: typeof RawStreamRouteImport + parentRoute: typeof rootRouteImport + } + '/primitive-beforeload-error': { + id: '/primitive-beforeload-error' + path: '/primitive-beforeload-error' + fullPath: '/primitive-beforeload-error' + preLoaderRoute: typeof PrimitiveBeforeloadErrorRouteImport + parentRoute: typeof rootRouteImport + } + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/plain-ts-type-assertion': { + id: '/plain-ts-type-assertion' + path: '/plain-ts-type-assertion' + fullPath: '/plain-ts-type-assertion' + preLoaderRoute: typeof PlainTsTypeAssertionRouteImport + parentRoute: typeof rootRouteImport + } + '/links': { + id: '/links' + path: '/links' + fullPath: '/links' + preLoaderRoute: typeof LinksRouteImport + parentRoute: typeof rootRouteImport + } + '/inline-scripts': { + id: '/inline-scripts' + path: '/inline-scripts' + fullPath: '/inline-scripts' + preLoaderRoute: typeof InlineScriptsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/client-only': { + id: '/client-only' + path: '/client-only' + fullPath: '/client-only' + preLoaderRoute: typeof ClientOnlyRouteImport + parentRoute: typeof rootRouteImport + } + '/async-scripts': { + id: '/async-scripts' + path: '/async-scripts' + fullPath: '/async-scripts' + preLoaderRoute: typeof AsyncScriptsRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/auth-docs/private': { - id: '/auth-docs/private' - path: '/private' - fullPath: '/auth-docs/private' - preLoaderRoute: typeof AuthDocsPrivateRouteImport - parentRoute: typeof AuthDocsRoute - } - '/issue-6221/dashboard': { - id: '/issue-6221/dashboard' - path: '/issue-6221/dashboard' - fullPath: '/issue-6221/dashboard' - preLoaderRoute: typeof Issue6221DashboardRouteImport + '/specialChars': { + id: '/specialChars' + path: '/specialChars' + fullPath: '/specialChars' + preLoaderRoute: typeof SpecialCharsRouteRouteImport parentRoute: typeof rootRouteImport } - '/multi-cookie-redirect/': { - id: '/multi-cookie-redirect/' - path: '/multi-cookie-redirect' - fullPath: '/multi-cookie-redirect/' - preLoaderRoute: typeof MultiCookieRedirectIndexRouteImport + '/search-params': { + id: '/search-params' + path: '/search-params' + fullPath: '/search-params' + preLoaderRoute: typeof SearchParamsRouteRouteImport parentRoute: typeof rootRouteImport } - '/multi-cookie-redirect/target': { - id: '/multi-cookie-redirect/target' - path: '/multi-cookie-redirect/target' - fullPath: '/multi-cookie-redirect/target' - preLoaderRoute: typeof MultiCookieRedirectTargetRouteImport + '/not-found': { + id: '/not-found' + path: '/not-found' + fullPath: '/not-found' + preLoaderRoute: typeof NotFoundRouteRouteImport parentRoute: typeof rootRouteImport } - '/not-found/': { - id: '/not-found/' + '/': { + id: '/' path: '/' - fullPath: '/not-found/' - preLoaderRoute: typeof NotFoundIndexRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/deep': { - id: '/not-found/deep' - path: '/deep' - fullPath: '/not-found/deep' - preLoaderRoute: typeof NotFoundDeepRouteRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/parent-boundary': { - id: '/not-found/parent-boundary' - path: '/parent-boundary' - fullPath: '/not-found/parent-boundary' - preLoaderRoute: typeof NotFoundParentBoundaryRouteRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-beforeLoad': { - id: '/not-found/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/not-found/via-beforeLoad' - preLoaderRoute: typeof NotFoundViaBeforeLoadRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-beforeLoad-target-root': { - id: '/not-found/via-beforeLoad-target-root' - path: '/via-beforeLoad-target-root' - fullPath: '/not-found/via-beforeLoad-target-root' - preLoaderRoute: typeof NotFoundViaBeforeLoadTargetRootRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-loader': { - id: '/not-found/via-loader' - path: '/via-loader' - fullPath: '/not-found/via-loader' - preLoaderRoute: typeof NotFoundViaLoaderRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/raw-stream/': { - id: '/raw-stream/' - path: '/' - fullPath: '/raw-stream/' - preLoaderRoute: typeof RawStreamIndexRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/client-call': { - id: '/raw-stream/client-call' - path: '/client-call' - fullPath: '/raw-stream/client-call' - preLoaderRoute: typeof RawStreamClientCallRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-binary-hint': { - id: '/raw-stream/ssr-binary-hint' - path: '/ssr-binary-hint' - fullPath: '/raw-stream/ssr-binary-hint' - preLoaderRoute: typeof RawStreamSsrBinaryHintRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-mixed': { - id: '/raw-stream/ssr-mixed' - path: '/ssr-mixed' - fullPath: '/raw-stream/ssr-mixed' - preLoaderRoute: typeof RawStreamSsrMixedRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-multiple': { - id: '/raw-stream/ssr-multiple' - path: '/ssr-multiple' - fullPath: '/raw-stream/ssr-multiple' - preLoaderRoute: typeof RawStreamSsrMultipleRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-single': { - id: '/raw-stream/ssr-single' - path: '/ssr-single' - fullPath: '/raw-stream/ssr-single' - preLoaderRoute: typeof RawStreamSsrSingleRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-text-hint': { - id: '/raw-stream/ssr-text-hint' - path: '/ssr-text-hint' - fullPath: '/raw-stream/ssr-text-hint' - preLoaderRoute: typeof RawStreamSsrTextHintRouteImport - parentRoute: typeof RawStreamRoute - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect/' - preLoaderRoute: typeof RedirectIndexRouteImport + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/redirect/$target': { - id: '/redirect/$target' - path: '/redirect/$target' - fullPath: '/redirect/$target' - preLoaderRoute: typeof RedirectTargetRouteImport - parentRoute: typeof rootRouteImport + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute } '/search-params/': { id: '/search-params/' @@ -1278,39 +1026,53 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchParamsIndexRouteImport parentRoute: typeof SearchParamsRouteRoute } - '/search-params/default': { - id: '/search-params/default' - path: '/default' - fullPath: '/search-params/default' - preLoaderRoute: typeof SearchParamsDefaultRouteImport - parentRoute: typeof SearchParamsRouteRoute + '/redirect/': { + id: '/redirect/' + path: '/redirect' + fullPath: '/redirect/' + preLoaderRoute: typeof RedirectIndexRouteImport + parentRoute: typeof rootRouteImport } - '/search-params/loader-throws-redirect': { - id: '/search-params/loader-throws-redirect' - path: '/loader-throws-redirect' - fullPath: '/search-params/loader-throws-redirect' - preLoaderRoute: typeof SearchParamsLoaderThrowsRedirectRouteImport - parentRoute: typeof SearchParamsRouteRoute + '/raw-stream/': { + id: '/raw-stream/' + path: '/' + fullPath: '/raw-stream/' + preLoaderRoute: typeof RawStreamIndexRouteImport + parentRoute: typeof RawStreamRoute } - '/specialChars/$param': { - id: '/specialChars/$param' - path: '/$param' - fullPath: '/specialChars/$param' - preLoaderRoute: typeof SpecialCharsParamRouteImport - parentRoute: typeof SpecialCharsRouteRoute + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute } - '/specialChars/hash': { - id: '/specialChars/hash' - path: '/hash' - fullPath: '/specialChars/hash' - preLoaderRoute: typeof SpecialCharsHashRouteImport - parentRoute: typeof SpecialCharsRouteRoute + '/not-found/': { + id: '/not-found/' + path: '/' + fullPath: '/not-found/' + preLoaderRoute: typeof NotFoundIndexRouteImport + parentRoute: typeof NotFoundRouteRoute } - '/specialChars/malformed': { - id: '/specialChars/malformed' - path: '/malformed' - fullPath: '/specialChars/malformed' - preLoaderRoute: typeof SpecialCharsMalformedRouteRouteImport + '/multi-cookie-redirect/': { + id: '/multi-cookie-redirect/' + path: '/multi-cookie-redirect' + fullPath: '/multi-cookie-redirect/' + preLoaderRoute: typeof MultiCookieRedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/specialChars/대한민국': { + id: '/specialChars/대한민국' + path: '/대한민국' + fullPath: '/specialChars/대한민국' + preLoaderRoute: typeof SpecialCharsChar45824Char54620Char48124Char44397RouteImport parentRoute: typeof SpecialCharsRouteRoute } '/specialChars/search': { @@ -1320,68 +1082,159 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SpecialCharsSearchRouteImport parentRoute: typeof SpecialCharsRouteRoute } - '/specialChars/대한민국': { - id: '/specialChars/대한민국' - path: '/대한민국' - fullPath: '/specialChars/대한민국' - preLoaderRoute: typeof SpecialCharsChar45824Char54620Char48124Char44397RouteImport + '/specialChars/hash': { + id: '/specialChars/hash' + path: '/hash' + fullPath: '/specialChars/hash' + preLoaderRoute: typeof SpecialCharsHashRouteImport parentRoute: typeof SpecialCharsRouteRoute } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute + '/specialChars/$param': { + id: '/specialChars/$param' + path: '/$param' + fullPath: '/specialChars/$param' + preLoaderRoute: typeof SpecialCharsParamRouteImport + parentRoute: typeof SpecialCharsRouteRoute } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute + '/search-params/loader-throws-redirect': { + id: '/search-params/loader-throws-redirect' + path: '/loader-throws-redirect' + fullPath: '/search-params/loader-throws-redirect' + preLoaderRoute: typeof SearchParamsLoaderThrowsRedirectRouteImport + parentRoute: typeof SearchParamsRouteRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/search-params/default': { + id: '/search-params/default' + path: '/default' + fullPath: '/search-params/default' + preLoaderRoute: typeof SearchParamsDefaultRouteImport + parentRoute: typeof SearchParamsRouteRoute } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport - parentRoute: typeof LayoutLayout2Route - } - '/api/users/$id': { - id: '/api/users/$id' - path: '/$id' - fullPath: '/api/users/$id' - preLoaderRoute: typeof ApiUsersIdRouteImport - parentRoute: typeof ApiUsersRoute - } - '/issue-6221/article/$id': { - id: '/issue-6221/article/$id' - path: '/issue-6221/article/$id' - fullPath: '/issue-6221/article/$id' - preLoaderRoute: typeof Issue6221ArticleIdRouteImport + '/redirect/$target': { + id: '/redirect/$target' + path: '/redirect/$target' + fullPath: '/redirect/$target' + preLoaderRoute: typeof RedirectTargetRouteImport parentRoute: typeof rootRouteImport } - '/not-found/deep/': { - id: '/not-found/deep/' - path: '/' - fullPath: '/not-found/deep/' - preLoaderRoute: typeof NotFoundDeepIndexRouteImport - parentRoute: typeof NotFoundDeepRouteRoute + '/raw-stream/ssr-text-hint': { + id: '/raw-stream/ssr-text-hint' + path: '/ssr-text-hint' + fullPath: '/raw-stream/ssr-text-hint' + preLoaderRoute: typeof RawStreamSsrTextHintRouteImport + parentRoute: typeof RawStreamRoute } - '/not-found/deep/b': { - id: '/not-found/deep/b' - path: '/b' - fullPath: '/not-found/deep/b' - preLoaderRoute: typeof NotFoundDeepBRouteRouteImport - parentRoute: typeof NotFoundDeepRouteRoute + '/raw-stream/ssr-single': { + id: '/raw-stream/ssr-single' + path: '/ssr-single' + fullPath: '/raw-stream/ssr-single' + preLoaderRoute: typeof RawStreamSsrSingleRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-multiple': { + id: '/raw-stream/ssr-multiple' + path: '/ssr-multiple' + fullPath: '/raw-stream/ssr-multiple' + preLoaderRoute: typeof RawStreamSsrMultipleRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-mixed': { + id: '/raw-stream/ssr-mixed' + path: '/ssr-mixed' + fullPath: '/raw-stream/ssr-mixed' + preLoaderRoute: typeof RawStreamSsrMixedRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-binary-hint': { + id: '/raw-stream/ssr-binary-hint' + path: '/ssr-binary-hint' + fullPath: '/raw-stream/ssr-binary-hint' + preLoaderRoute: typeof RawStreamSsrBinaryHintRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/client-call': { + id: '/raw-stream/client-call' + path: '/client-call' + fullPath: '/raw-stream/client-call' + preLoaderRoute: typeof RawStreamClientCallRouteImport + parentRoute: typeof RawStreamRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/not-found/via-loader': { + id: '/not-found/via-loader' + path: '/via-loader' + fullPath: '/not-found/via-loader' + preLoaderRoute: typeof NotFoundViaLoaderRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/not-found/via-beforeLoad-target-root': { + id: '/not-found/via-beforeLoad-target-root' + path: '/via-beforeLoad-target-root' + fullPath: '/not-found/via-beforeLoad-target-root' + preLoaderRoute: typeof NotFoundViaBeforeLoadTargetRootRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/not-found/via-beforeLoad': { + id: '/not-found/via-beforeLoad' + path: '/via-beforeLoad' + fullPath: '/not-found/via-beforeLoad' + preLoaderRoute: typeof NotFoundViaBeforeLoadRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/multi-cookie-redirect/target': { + id: '/multi-cookie-redirect/target' + path: '/multi-cookie-redirect/target' + fullPath: '/multi-cookie-redirect/target' + preLoaderRoute: typeof MultiCookieRedirectTargetRouteImport + parentRoute: typeof rootRouteImport + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute + } + '/specialChars/malformed': { + id: '/specialChars/malformed' + path: '/malformed' + fullPath: '/specialChars/malformed' + preLoaderRoute: typeof SpecialCharsMalformedRouteRouteImport + parentRoute: typeof SpecialCharsRouteRoute + } + '/not-found/parent-boundary': { + id: '/not-found/parent-boundary' + path: '/parent-boundary' + fullPath: '/not-found/parent-boundary' + preLoaderRoute: typeof NotFoundParentBoundaryRouteRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/not-found/deep': { + id: '/not-found/deep' + path: '/deep' + fullPath: '/not-found/deep' + preLoaderRoute: typeof NotFoundDeepRouteRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/redirect/$target/': { + id: '/redirect/$target/' + path: '/' + fullPath: '/redirect/$target/' + preLoaderRoute: typeof RedirectTargetIndexRouteImport + parentRoute: typeof RedirectTargetRoute } '/not-found/parent-boundary/': { id: '/not-found/parent-boundary/' @@ -1390,25 +1243,32 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof NotFoundParentBoundaryIndexRouteImport parentRoute: typeof NotFoundParentBoundaryRouteRoute } - '/not-found/parent-boundary/via-beforeLoad': { - id: '/not-found/parent-boundary/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/not-found/parent-boundary/via-beforeLoad' - preLoaderRoute: typeof NotFoundParentBoundaryViaBeforeLoadRouteImport - parentRoute: typeof NotFoundParentBoundaryRouteRoute - } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect/$target/': { - id: '/redirect/$target/' + '/not-found/deep/': { + id: '/not-found/deep/' path: '/' - fullPath: '/redirect/$target/' - preLoaderRoute: typeof RedirectTargetIndexRouteImport + fullPath: '/not-found/deep/' + preLoaderRoute: typeof NotFoundDeepIndexRouteImport + parentRoute: typeof NotFoundDeepRouteRoute + } + '/specialChars/malformed/search': { + id: '/specialChars/malformed/search' + path: '/search' + fullPath: '/specialChars/malformed/search' + preLoaderRoute: typeof SpecialCharsMalformedSearchRouteImport + parentRoute: typeof SpecialCharsMalformedRouteRoute + } + '/specialChars/malformed/$param': { + id: '/specialChars/malformed/$param' + path: '/$param' + fullPath: '/specialChars/malformed/$param' + preLoaderRoute: typeof SpecialCharsMalformedParamRouteImport + parentRoute: typeof SpecialCharsMalformedRouteRoute + } + '/redirect/$target/via-loader': { + id: '/redirect/$target/via-loader' + path: '/via-loader' + fullPath: '/redirect/$target/via-loader' + preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport parentRoute: typeof RedirectTargetRoute } '/redirect/$target/via-beforeLoad': { @@ -1418,26 +1278,75 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectTargetViaBeforeLoadRouteImport parentRoute: typeof RedirectTargetRoute } - '/redirect/$target/via-loader': { - id: '/redirect/$target/via-loader' - path: '/via-loader' - fullPath: '/redirect/$target/via-loader' - preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport + } + '/not-found/parent-boundary/via-beforeLoad': { + id: '/not-found/parent-boundary/via-beforeLoad' + path: '/via-beforeLoad' + fullPath: '/not-found/parent-boundary/via-beforeLoad' + preLoaderRoute: typeof NotFoundParentBoundaryViaBeforeLoadRouteImport + parentRoute: typeof NotFoundParentBoundaryRouteRoute + } + '/api/users/$id': { + id: '/api/users/$id' + path: '/$id' + fullPath: '/api/users/$id' + preLoaderRoute: typeof ApiUsersIdRouteImport + parentRoute: typeof ApiUsersRoute + } + '/_layout/_layout-2/layout-b': { + id: '/_layout/_layout-2/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport + parentRoute: typeof LayoutLayout2Route + } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/not-found/deep/b': { + id: '/not-found/deep/b' + path: '/b' + fullPath: '/not-found/deep/b' + preLoaderRoute: typeof NotFoundDeepBRouteRouteImport + parentRoute: typeof NotFoundDeepRouteRoute + } + '/redirect/$target/serverFn/': { + id: '/redirect/$target/serverFn/' + path: '/serverFn' + fullPath: '/redirect/$target/serverFn/' + preLoaderRoute: typeof RedirectTargetServerFnIndexRouteImport parentRoute: typeof RedirectTargetRoute } - '/specialChars/malformed/$param': { - id: '/specialChars/malformed/$param' - path: '/$param' - fullPath: '/specialChars/malformed/$param' - preLoaderRoute: typeof SpecialCharsMalformedParamRouteImport - parentRoute: typeof SpecialCharsMalformedRouteRoute + '/redirect/$target/serverFn/via-useServerFn': { + id: '/redirect/$target/serverFn/via-useServerFn' + path: '/serverFn/via-useServerFn' + fullPath: '/redirect/$target/serverFn/via-useServerFn' + preLoaderRoute: typeof RedirectTargetServerFnViaUseServerFnRouteImport + parentRoute: typeof RedirectTargetRoute } - '/specialChars/malformed/search': { - id: '/specialChars/malformed/search' - path: '/search' - fullPath: '/specialChars/malformed/search' - preLoaderRoute: typeof SpecialCharsMalformedSearchRouteImport - parentRoute: typeof SpecialCharsMalformedRouteRoute + '/redirect/$target/serverFn/via-loader': { + id: '/redirect/$target/serverFn/via-loader' + path: '/serverFn/via-loader' + fullPath: '/redirect/$target/serverFn/via-loader' + preLoaderRoute: typeof RedirectTargetServerFnViaLoaderRouteImport + parentRoute: typeof RedirectTargetRoute + } + '/redirect/$target/serverFn/via-beforeLoad': { + id: '/redirect/$target/serverFn/via-beforeLoad' + path: '/serverFn/via-beforeLoad' + fullPath: '/redirect/$target/serverFn/via-beforeLoad' + preLoaderRoute: typeof RedirectTargetServerFnViaBeforeLoadRouteImport + parentRoute: typeof RedirectTargetRoute } '/foo/$bar/$qux/_here': { id: '/foo/$bar/$qux/_here' @@ -1453,34 +1362,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof NotFoundDeepBCRouteRouteImport parentRoute: typeof NotFoundDeepBRouteRoute } - '/redirect/$target/serverFn/': { - id: '/redirect/$target/serverFn/' - path: '/serverFn' - fullPath: '/redirect/$target/serverFn/' - preLoaderRoute: typeof RedirectTargetServerFnIndexRouteImport - parentRoute: typeof RedirectTargetRoute - } - '/redirect/$target/serverFn/via-beforeLoad': { - id: '/redirect/$target/serverFn/via-beforeLoad' - path: '/serverFn/via-beforeLoad' - fullPath: '/redirect/$target/serverFn/via-beforeLoad' - preLoaderRoute: typeof RedirectTargetServerFnViaBeforeLoadRouteImport - parentRoute: typeof RedirectTargetRoute - } - '/redirect/$target/serverFn/via-loader': { - id: '/redirect/$target/serverFn/via-loader' - path: '/serverFn/via-loader' - fullPath: '/redirect/$target/serverFn/via-loader' - preLoaderRoute: typeof RedirectTargetServerFnViaLoaderRouteImport - parentRoute: typeof RedirectTargetRoute - } - '/redirect/$target/serverFn/via-useServerFn': { - id: '/redirect/$target/serverFn/via-useServerFn' - path: '/serverFn/via-useServerFn' - fullPath: '/redirect/$target/serverFn/via-useServerFn' - preLoaderRoute: typeof RedirectTargetServerFnViaUseServerFnRouteImport - parentRoute: typeof RedirectTargetRoute - } '/foo/$bar/$qux/_here/': { id: '/foo/$bar/$qux/_here/' path: '/' @@ -1649,18 +1530,6 @@ const LayoutRouteChildren: LayoutRouteChildren = { const LayoutRouteWithChildren = LayoutRoute._addFileChildren(LayoutRouteChildren) -interface AuthDocsRouteChildren { - AuthDocsPrivateRoute: typeof AuthDocsPrivateRoute -} - -const AuthDocsRouteChildren: AuthDocsRouteChildren = { - AuthDocsPrivateRoute: AuthDocsPrivateRoute, -} - -const AuthDocsRouteWithChildren = AuthDocsRoute._addFileChildren( - AuthDocsRouteChildren, -) - interface PostsRouteChildren { PostsPostIdRoute: typeof PostsPostIdRoute PostsIndexRoute: typeof PostsIndexRoute @@ -1766,11 +1635,8 @@ const rootRouteChildren: RootRouteChildren = { SpecialCharsRouteRoute: SpecialCharsRouteRouteWithChildren, LayoutRoute: LayoutRouteWithChildren, AsyncScriptsRoute: AsyncScriptsRoute, - AuthDocsRoute: AuthDocsRouteWithChildren, ClientOnlyRoute: ClientOnlyRoute, DeferredRoute: DeferredRoute, - ExecutionLocalRoute: ExecutionLocalRoute, - ExecutionRpcRoute: ExecutionRpcRoute, InlineScriptsRoute: InlineScriptsRoute, LinksRoute: LinksRoute, PlainTsTypeAssertionRoute: PlainTsTypeAssertionRoute, @@ -1782,12 +1648,10 @@ const rootRouteChildren: RootRouteChildren = { TypeOnlyReexportRoute: TypeOnlyReexportRoute, UsersRoute: UsersRouteWithChildren, ApiUsersRoute: ApiUsersRouteWithChildren, - Issue6221DashboardRoute: Issue6221DashboardRoute, MultiCookieRedirectTargetRoute: MultiCookieRedirectTargetRoute, RedirectTargetRoute: RedirectTargetRouteWithChildren, MultiCookieRedirectIndexRoute: MultiCookieRedirectIndexRoute, RedirectIndexRoute: RedirectIndexRoute, - Issue6221ArticleIdRoute: Issue6221ArticleIdRoute, PostsPostIdDeepRoute: PostsPostIdDeepRoute, FooBarQuxHereRoute: FooBarQuxHereRouteWithChildren, } diff --git a/e2e/react-start/basic/src/routes/__root.tsx b/e2e/react-start/basic/src/routes/__root.tsx index ed521817d6..d8fc0d3b24 100644 --- a/e2e/react-start/basic/src/routes/__root.tsx +++ b/e2e/react-start/basic/src/routes/__root.tsx @@ -197,9 +197,6 @@ function RootDocument({ children }: { children: React.ReactNode }) { > Client Only {' '} - - Server function loader - {' '} { console.info('Fetching users... @', request.url) - const res = await axios.get>( - 'https://jsonplaceholder.typicode.com/users', - ) + const res = await axios.get>(`${getQueryURL()}/users`) const list = res.data.slice(0, 10) diff --git a/e2e/react-start/basic/src/routes/api/users.$id.ts b/e2e/react-start/basic/src/routes/api/users.$id.ts index 797dffb637..9b462bd14b 100644 --- a/e2e/react-start/basic/src/routes/api/users.$id.ts +++ b/e2e/react-start/basic/src/routes/api/users.$id.ts @@ -2,6 +2,16 @@ import { createFileRoute } from '@tanstack/react-router' import axios from 'redaxios' import type { User } from '~/utils/users' +// resolved at request time (server-side only) so the built app picks up the +// dummy server the e2e harness starts — Playwright at test time, the vite +// config at prerender build time +function getQueryURL() { + if (process.env.VITE_NODE_ENV === 'test') { + return `http://localhost:${process.env.VITE_EXTERNAL_PORT}` + } + return 'https://jsonplaceholder.typicode.com' +} + export const Route = createFileRoute('/api/users/$id')({ server: { handlers: { @@ -9,7 +19,7 @@ export const Route = createFileRoute('/api/users/$id')({ console.info(`Fetching users by id=${params.id}... @`, request.url) try { const res = await axios.get( - `https://jsonplaceholder.typicode.com/users/${params.id}`, + `${getQueryURL()}/users/` + params.id, ) return Response.json({ diff --git a/e2e/react-start/basic/src/routes/auth-docs.private.tsx b/e2e/react-start/basic/src/routes/auth-docs.private.tsx deleted file mode 100644 index 85fc8a0fc9..0000000000 --- a/e2e/react-start/basic/src/routes/auth-docs.private.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { createFileRoute, redirect } from '@tanstack/react-router' -import { getPrivateDataFn } from '../utils/auth-docs' - -export const Route = createFileRoute('/auth-docs/private')({ - beforeLoad: ({ context }) => { - if (!context.user) { - throw redirect({ to: '/auth-docs' }) - } - }, - loader: () => getPrivateDataFn(), - component: PrivatePage, -}) - -function PrivatePage() { - const message = Route.useLoaderData() - return

{message}

-} diff --git a/e2e/react-start/basic/src/routes/auth-docs.tsx b/e2e/react-start/basic/src/routes/auth-docs.tsx deleted file mode 100644 index 6ea1b813ef..0000000000 --- a/e2e/react-start/basic/src/routes/auth-docs.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import { - createFileRoute, - Outlet, - useHydrated, - useRouter, -} from '@tanstack/react-router' -import { useServerFn } from '@tanstack/react-start' -import { useState } from 'react' -import type { FormEvent } from 'react' -import { - getCurrentUserFn, - getPrivateDataFn, - loginFn, - logoutFn, -} from '../utils/auth-docs' - -export const Route = createFileRoute('/auth-docs')({ - beforeLoad: async () => ({ user: await getCurrentUserFn() }), - headers: () => ({ 'Cache-Control': 'private, no-store' }), - component: AuthDocs, -}) - -function AuthDocs() { - const hydrated = useHydrated() - const { user } = Route.useRouteContext() - const router = useRouter() - const login = useServerFn(loginFn) - const logout = useServerFn(logoutFn) - const getPrivateData = useServerFn(getPrivateDataFn) - const [isLoading, setIsLoading] = useState(false) - const [error, setError] = useState('') - const [privateResult, setPrivateResult] = useState('') - - const handleSubmit = async (event: FormEvent) => { - event.preventDefault() - const formData = new FormData(event.currentTarget) - const email = formData.get('email') - const password = formData.get('password') - if (typeof email !== 'string' || typeof password !== 'string') { - return - } - setIsLoading(true) - setError('') - try { - const result = await login({ data: { email, password } }) - if (result?.error) { - setError(result.error) - return - } - await router.invalidate() - } catch { - setError('Login failed. Please try again.') - } finally { - setIsLoading(false) - } - } - - return ( -
-

{user?.email ?? 'Signed out'}

-
-
- - - -
-

{error}

-
- - -

{privateResult}

- -
- ) -} diff --git a/e2e/react-start/basic/src/routes/execution-local.tsx b/e2e/react-start/basic/src/routes/execution-local.tsx deleted file mode 100644 index 477cd81740..0000000000 --- a/e2e/react-start/basic/src/routes/execution-local.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { readOnlyOnServer } from '~/utils/execution-functions' - -// This intentionally fails during browser navigation. It is the negative case -// for the environment-functions troubleshooting guide. -export const Route = createFileRoute('/execution-local')({ - loader: () => readOnlyOnServer(), - component: Result, - errorComponent: ({ error }) => ( -

{error instanceof Error ? error.message : String(error)}

- ), -}) - -function Result() { - return

{Route.useLoaderData()}

-} diff --git a/e2e/react-start/basic/src/routes/execution-rpc.tsx b/e2e/react-start/basic/src/routes/execution-rpc.tsx deleted file mode 100644 index f934015522..0000000000 --- a/e2e/react-start/basic/src/routes/execution-rpc.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { createFileRoute, Link } from '@tanstack/react-router' -import { readThroughRpc } from '~/utils/execution-functions' - -export const Route = createFileRoute('/execution-rpc')({ - loader: () => readThroughRpc(), - component: Result, -}) - -function Result() { - return ( - <> -

{Route.useLoaderData()}

- - Call the server-only helper directly - - - ) -} diff --git a/e2e/react-start/basic/src/routes/issue-6221.article.$id.tsx b/e2e/react-start/basic/src/routes/issue-6221.article.$id.tsx deleted file mode 100644 index c923a5f1cb..0000000000 --- a/e2e/react-start/basic/src/routes/issue-6221.article.$id.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { Link, createFileRoute } from '@tanstack/react-router' -import { createClientOnlyFn } from '@tanstack/react-start' - -const isAuthed = createClientOnlyFn( - () => localStorage.getItem('issue-6221-auth') === 'good', -) - -const fetchArticle = async (id: string) => { - await new Promise((resolve) => setTimeout(resolve, 1000)) - return isAuthed() - ? { - title: `Article Title for ${id}`, - content: `Article content for ${id}`, - } - : null -} - -export const Route = createFileRoute('/issue-6221/article/$id')({ - ssr: false, - loader: ({ params }) => fetchArticle(params.id), - head: ({ loaderData }) => ({ - meta: [{ title: loaderData?.title ?? 'title n/a' }], - }), - component: Article, -}) - -function Article() { - const article = Route.useLoaderData() - - return ( -
- - Dashboard - - {article ? ( -
{article.content}
- ) : ( -
Article Not Accessible.
- )} -
- ) -} diff --git a/e2e/react-start/basic/src/routes/issue-6221.dashboard.tsx b/e2e/react-start/basic/src/routes/issue-6221.dashboard.tsx deleted file mode 100644 index 8c93da669c..0000000000 --- a/e2e/react-start/basic/src/routes/issue-6221.dashboard.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/issue-6221/dashboard')({ - head: () => ({ meta: [{ title: 'Dashboard' }] }), - component: () =>
Dashboard
, -}) diff --git a/e2e/react-start/basic/src/routes/posts.tsx b/e2e/react-start/basic/src/routes/posts.tsx index 22fb7e60a8..0f69c18341 100644 --- a/e2e/react-start/basic/src/routes/posts.tsx +++ b/e2e/react-start/basic/src/routes/posts.tsx @@ -1,4 +1,3 @@ -import { useState } from 'react' import { Link, Outlet, createFileRoute } from '@tanstack/react-router' import { fetchPosts } from '~/utils/posts' @@ -17,16 +16,9 @@ export const Route = createFileRoute('/posts')({ function PostsComponent() { const posts = Route.useLoaderData() - const [hydrationCount, setHydrationCount] = useState(0) return (
-
    {[...posts, { id: 'i-do-not-exist', title: 'Non-existent Post' }].map( (post) => { diff --git a/e2e/react-start/basic/src/routes/specialChars/search.tsx b/e2e/react-start/basic/src/routes/specialChars/search.tsx index 5840d425ab..9e4b42e888 100644 --- a/e2e/react-start/basic/src/routes/specialChars/search.tsx +++ b/e2e/react-start/basic/src/routes/specialChars/search.tsx @@ -7,9 +7,6 @@ export const Route = createFileRoute('/specialChars/search')({ validateSearch: z.object({ searchParam: z.string(), }), - beforeLoad: () => ({ - beforeLoadOn: isBrowser ? 'client' : 'server', - }), loader: async () => { console.log(`[loader] Running on ${isBrowser ? 'client' : 'server'}`) return { @@ -21,15 +18,11 @@ export const Route = createFileRoute('/specialChars/search')({ function RouteComponent() { const search = Route.useSearch() - const { beforeLoadOn } = Route.useRouteContext() const { loadedOn } = Route.useLoaderData() return (
    Hello "/specialChars/search"! -
    - Before load on: {beforeLoadOn} -
    Loaded on: {loadedOn}
    {search.searchParam}
    diff --git a/e2e/react-start/basic/src/utils/auth-docs.ts b/e2e/react-start/basic/src/utils/auth-docs.ts deleted file mode 100644 index 22b36ee808..0000000000 --- a/e2e/react-start/basic/src/utils/auth-docs.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { createServerFn } from '@tanstack/react-start' -import { redirect } from '@tanstack/react-router' -import { getCookie, setCookie } from '@tanstack/react-start/server' -import { getIronSession } from 'iron-session' - -function getSession() { - return getIronSession<{ email: string }>( - { read: getCookie, write: setCookie }, - { - cookieName: 'auth-docs-test', - password: 'authentication-docs-browser-test-secret-only-2026', - ttl: 60 * 60, - cookieOptions: { - httpOnly: true, - secure: false, - sameSite: 'lax', - path: '/', - }, - }, - ) -} - -export const getCurrentUserFn = createServerFn({ method: 'GET' }).handler( - async () => { - const session = await getSession() - return session.email ? { email: session.email } : null - }, -) - -export const loginFn = createServerFn({ method: 'POST' }) - .validator((data: { email: string; password: string }) => data) - .handler(async ({ data }) => { - // Fixed credentials belong only to this browser-test fixture. - if ( - data.email !== 'reader@example.com' || - data.password !== 'test-password' - ) { - return { error: 'Invalid credentials' } - } - const session = await getSession() - session.email = data.email - await session.save() - throw redirect({ to: '/auth-docs/private' }) - }) - -export const logoutFn = createServerFn({ method: 'POST' }).handler(async () => { - const session = await getSession() - session.destroy() - throw redirect({ to: '/auth-docs' }) -}) - -export const getPrivateDataFn = createServerFn({ method: 'GET' }).handler( - async () => { - const session = await getSession() - if (!session.email) { - throw new Error('Unauthorized') - } - return 'Private account data' - }, -) diff --git a/e2e/react-start/basic/src/utils/execution-functions.ts b/e2e/react-start/basic/src/utils/execution-functions.ts deleted file mode 100644 index 97e66573d8..0000000000 --- a/e2e/react-start/basic/src/utils/execution-functions.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createServerFn, createServerOnlyFn } from '@tanstack/react-start' - -export const readOnlyOnServer = createServerOnlyFn(() => 'Read on the server') - -export const readThroughRpc = createServerFn().handler(() => readOnlyOnServer()) diff --git a/e2e/react-start/basic/src/utils/posts.tsx b/e2e/react-start/basic/src/utils/posts.tsx index 9fdff27673..cbfd51550b 100644 --- a/e2e/react-start/basic/src/utils/posts.tsx +++ b/e2e/react-start/basic/src/utils/posts.tsx @@ -8,12 +8,22 @@ export type PostType = { body: string } +// resolved at request time (server-side only) so the built app picks up the +// dummy server the e2e harness starts — Playwright at test time, the vite +// config at prerender build time +function getQueryURL() { + if (process.env.VITE_NODE_ENV === 'test') { + return `http://localhost:${process.env.VITE_EXTERNAL_PORT}` + } + return 'https://jsonplaceholder.typicode.com' +} + export const fetchPost = createServerFn({ method: 'GET' }) .validator((postId: string) => postId) .handler(async ({ data: postId }) => { - console.info(`Fetching post with id ${postId}...`) + console.info(`Fetching post with id ${postId} from ${getQueryURL()}...`) const post = await axios - .get(`https://jsonplaceholder.typicode.com/posts/${postId}`) + .get(`${getQueryURL()}/posts/${postId}`) .then((r) => r.data) .catch((err) => { console.error(err) @@ -28,9 +38,9 @@ export const fetchPost = createServerFn({ method: 'GET' }) export const fetchPosts = createServerFn({ method: 'GET' }).handler( async () => { - console.info('Fetching posts...') + console.info(`Fetching posts from ${getQueryURL()}...`) return axios - .get>('https://jsonplaceholder.typicode.com/posts') + .get>(`${getQueryURL()}/posts`) .then((r) => r.data.slice(0, 10)) }, ) diff --git a/e2e/react-start/basic/src/utils/users.tsx b/e2e/react-start/basic/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/react-start/basic/src/utils/users.tsx +++ b/e2e/react-start/basic/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` diff --git a/e2e/react-start/basic/start-mode-config.ts b/e2e/react-start/basic/start-mode-config.ts index 39ad676625..17b410784e 100644 --- a/e2e/react-start/basic/start-mode-config.ts +++ b/e2e/react-start/basic/start-mode-config.ts @@ -39,6 +39,8 @@ export function getStartModeConfig() { '/users', ].some((p) => page.path.includes(p)), maxRedirects: 100, + retryCount: 2, + retryDelay: 1000, } : undefined, rsbuild: rsbuildClientOutput diff --git a/e2e/react-start/basic/tests/auth-docs.spec.ts b/e2e/react-start/basic/tests/auth-docs.spec.ts deleted file mode 100644 index 47a57c9da2..0000000000 --- a/e2e/react-start/basic/tests/auth-docs.spec.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { expect, test } from '@playwright/test' -import { isSpaMode } from './utils/isSpaMode' - -test('authentication docs pattern handles login, logout, route context, and server authorization', async ({ - page, -}) => { - await page.goto('/auth-docs/private') - await expect(page).toHaveURL(/\/auth-docs$/) - await expect(page.getByTestId('auth-docs-user')).toHaveText('Signed out') - - await page - .getByRole('button', { name: 'Request private data directly' }) - .click() - await expect(page.getByTestId('auth-docs-private-result')).toHaveText( - 'Access denied', - ) - - await page.getByLabel('Email', { exact: true }).fill('reader@example.com') - await page.getByLabel('Password', { exact: true }).fill('wrong-password') - await page.getByRole('button', { name: 'Login', exact: true }).click() - await expect(page.getByRole('alert')).toHaveText('Invalid credentials') - await expect(page.getByTestId('auth-docs-user')).toHaveText('Signed out') - - await page.getByLabel('Password', { exact: true }).fill('test-password') - await page.getByRole('button', { name: 'Login', exact: true }).click() - await expect(page).toHaveURL(/\/auth-docs\/private$/) - await expect(page.getByTestId('auth-docs-user')).toHaveText( - 'reader@example.com', - ) - await expect(page.getByTestId('auth-docs-private-page')).toHaveText( - 'Private account data', - ) - - const response = await page.reload() - expect(response?.status()).toBe(200) - if (isSpaMode) { - // The shared SPA shell must not contain authenticated account data. - expect(await response?.text()).not.toContain('reader@example.com') - expect(await response?.text()).not.toContain('Private account data') - } else { - expect(response?.headers()['cache-control']).toBe('private, no-store') - } - await expect(page.getByTestId('auth-docs-user')).toHaveText( - 'reader@example.com', - ) - await page.getByRole('button', { name: 'Logout', exact: true }).click() - await expect(page).toHaveURL(/\/auth-docs$/) - await expect(page.getByTestId('auth-docs-user')).toHaveText('Signed out') - await page - .getByRole('button', { name: 'Request private data directly' }) - .click() - await expect(page.getByTestId('auth-docs-private-result')).toHaveText( - 'Access denied', - ) - await page.goto('/auth-docs/private') - await expect(page).toHaveURL(/\/auth-docs$/) -}) - -test('the authentication form cannot submit credentials before hydration', async ({ - browser, - baseURL, -}) => { - const context = await browser.newContext({ - javaScriptEnabled: false, - baseURL, - }) - const page = await context.newPage() - try { - await page.goto('/auth-docs') - if (isSpaMode) { - // Without JavaScript, the SPA shell cannot render credential controls. - await expect(page.locator('form')).toHaveCount(0) - await expect(page.getByLabel('Email', { exact: true })).toHaveCount(0) - await expect(page.getByLabel('Password', { exact: true })).toHaveCount(0) - await expect( - page.getByRole('button', { name: 'Login', exact: true }), - ).toHaveCount(0) - } else { - await expect(page.locator('form')).toHaveAttribute('method', 'post') - await expect(page.getByLabel('Email', { exact: true })).toBeDisabled() - await expect(page.getByLabel('Password', { exact: true })).toBeDisabled() - await expect( - page.getByRole('button', { name: 'Login', exact: true }), - ).toBeDisabled() - } - } finally { - await context.close() - } -}) diff --git a/e2e/react-start/basic/tests/client-only.spec.ts b/e2e/react-start/basic/tests/client-only.spec.ts index 299744f636..a3b6f99442 100644 --- a/e2e/react-start/basic/tests/client-only.spec.ts +++ b/e2e/react-start/basic/tests/client-only.spec.ts @@ -1,6 +1,5 @@ import { expect } from '@playwright/test' import { test } from '@tanstack/router-e2e-utils' -import { isSpaMode } from './utils/isSpaMode' /** * These tests verify the compiler optimization. @@ -16,15 +15,7 @@ import { isSpaMode } from './utils/isSpaMode' test('ClientOnly renders fallback on server, then client content after hydration', async ({ page, - request, }) => { - const response = await request.get('/client-only') - expect(response.status()).toBe(200) - const html = await response.text() - expect(html).not.toContain('data-testid="window-size"') - if (!isSpaMode) { - expect(html).toContain('Loading window size...') - } // Navigate directly to the client-only route // If the compiler optimization isn't working, this would crash the server // because WindowSize.tsx accesses `window` at module scope diff --git a/e2e/react-start/basic/tests/environment-functions.spec.ts b/e2e/react-start/basic/tests/environment-functions.spec.ts deleted file mode 100644 index 410b1d999e..0000000000 --- a/e2e/react-start/basic/tests/environment-functions.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { expect, test } from '@playwright/test' -import { isSpaMode } from './utils/isSpaMode' - -const guardError = - 'createServerOnlyFn() functions can only be called on the server!' - -test('a server-only loader works on the server but rejects client navigation', async ({ - page, - request, -}) => { - const direct = await request.get('/execution-local') - expect(direct.status()).toBe(200) - if (!isSpaMode) { - expect(await direct.text()).toContain('Read on the server') - } - await page.goto('/execution-rpc') - await expect(page.getByTestId('execution-result')).toHaveText( - 'Read on the server', - ) - await page - .getByRole('link', { name: 'Call the server-only helper directly' }) - .click() - await expect(page.getByRole('alert')).toHaveText(guardError) -}) - -test('a server function preserves the loader result on direct requests and navigation', async ({ - page, - request, -}) => { - const direct = await request.get('/execution-rpc') - expect(direct.status()).toBe(200) - if (!isSpaMode) { - expect(await direct.text()).toContain('Read on the server') - } - await page.goto('/') - await page - .getByRole('link', { name: 'Server function loader', exact: true }) - .click() - await expect(page.getByTestId('execution-result')).toHaveText( - 'Read on the server', - ) - await page.reload() - await expect(page.getByTestId('execution-result')).toHaveText( - 'Read on the server', - ) -}) diff --git a/e2e/react-start/basic/tests/fixture-api.spec.ts b/e2e/react-start/basic/tests/fixture-api.spec.ts deleted file mode 100644 index 6c9b26dc4c..0000000000 --- a/e2e/react-start/basic/tests/fixture-api.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('server API receives canned users without a fixture listener', async ({ - request, -}) => { - const response = await request.get('/api/users') - expect(response.ok()).toBe(true) - const users = await response.json() - expect(users).toHaveLength(10) - expect(users[0]).toMatchObject({ id: 1, name: 'Leanne Graham' }) -}) diff --git a/e2e/react-start/basic/tests/issue-6221-head.spec.ts b/e2e/react-start/basic/tests/issue-6221-head.spec.ts deleted file mode 100644 index 96274ce0f9..0000000000 --- a/e2e/react-start/basic/tests/issue-6221-head.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' -import { isPreview } from './utils/isPreview' -import { isSpaMode } from './utils/isSpaMode' - -// Ported to React from the regression app in -// https://github.com/TanStack/router/pull/6222 -test.skip( - isSpaMode || isPreview, - 'head() coverage for an ssr:false route requires the SSR test mode', -) - -test('browser back uses fresh loaderData for both the body and head (#6221)', async ({ - page, -}) => { - await page.goto('/') - await page.evaluate(() => localStorage.setItem('issue-6221-auth', 'good')) - - await page.goto('/issue-6221/article/1') - - await expect(page.getByTestId('issue-6221-article')).toHaveText( - 'Article content for 1', - ) - await expect(page).toHaveTitle('Article Title for 1') - - await page.evaluate(() => localStorage.removeItem('issue-6221-auth')) - await page.reload() - await expect(page.getByText('Article Not Accessible.')).toBeVisible() - await expect(page).toHaveTitle('title n/a') - - await page.evaluate(() => localStorage.setItem('issue-6221-auth', 'good')) - await page.getByTestId('issue-6221-dashboard-link').click() - await expect(page.getByTestId('issue-6221-dashboard')).toBeVisible() - await expect(page).toHaveTitle('Dashboard') - - await page.goBack() - await expect(page.getByTestId('issue-6221-article')).toHaveText( - 'Article content for 1', - ) - await expect(page).toHaveTitle('Article Title for 1') -}) diff --git a/e2e/react-start/basic/tests/not-found.spec.ts b/e2e/react-start/basic/tests/not-found.spec.ts index 339f841b21..d6e91696e3 100644 --- a/e2e/react-start/basic/tests/not-found.spec.ts +++ b/e2e/react-start/basic/tests/not-found.spec.ts @@ -12,24 +12,6 @@ test.use({ ], }) test.describe('not-found', () => { - test('direct nested not-found hydrates its already-rendered parent route', async ({ - page, - }) => { - test.skip(isSpaMode, 'issue #5106 requires a server-rendered direct visit') - - const response = await page.goto('/posts/i-do-not-exist') - await page.waitForLoadState('networkidle') - - const serverHtml = await response?.text() - expect(serverHtml).toContain('posts-parent-hydration-counter') - expect(serverHtml).toContain('Post not found') - await expect(page.getByText('Post not found')).toBeInViewport() - const counter = page.getByTestId('posts-parent-hydration-counter') - await expect(counter).toHaveText('Parent hydration count: 0') - await counter.click() - await expect(counter).toHaveText('Parent hydration count: 1') - }) - test(`global not found`, async ({ page }) => { const response = await page.goto(`/this-page-does-not-exist/foo/bar`) diff --git a/e2e/react-start/basic/tests/redirect.spec.ts b/e2e/react-start/basic/tests/redirect.spec.ts index 010ecec155..34ba7b6ea9 100644 --- a/e2e/react-start/basic/tests/redirect.spec.ts +++ b/e2e/react-start/basic/tests/redirect.spec.ts @@ -1,15 +1,20 @@ import queryString from 'node:querystring' -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' +import { expect, type Page } from '@playwright/test' import combinateImport from 'combinate' -import type { Page } from '@playwright/test' +import { + getDummyServerPort, + getTestServerPort, + test, +} from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from './utils/getE2EPortKey.ts' // somehow playwright does not correctly import default exports const combinate = (combinateImport as any).default as typeof combinateImport +const e2ePortKey = getE2EPortKey() -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(e2ePortKey) -const EXTERNAL_ORIGIN = `http://127.0.0.1:${PORT}` +const EXTERNAL_HOST_PORT = await getDummyServerPort(e2ePortKey) const POSTS_URL = `http://localhost:${PORT}/posts` async function waitForRouterIdle(page: Page) { @@ -106,7 +111,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, }) if (scenario === 'navigate') { @@ -119,7 +124,7 @@ test.describe('redirects', () => { await page.goto(`/redirect/external/via-${thrower}?${q}`) } - const url = `${EXTERNAL_ORIGIN}/` + const url = `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) @@ -142,7 +147,7 @@ test.describe('redirects', () => { }) => { let fullPageLoad = false const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, reloadDocument, }) @@ -165,7 +170,10 @@ test.describe('redirects', () => { await page.goto(`/redirect/${target}/serverFn/via-${thrower}?${q}`) } - const url = target === 'internal' ? POSTS_URL : `${EXTERNAL_ORIGIN}/` + const url = + target === 'internal' + ? POSTS_URL + : `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) @@ -194,7 +202,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, reloadDocument, }) @@ -211,7 +219,10 @@ test.describe('redirects', () => { await button.click() - const url = target === 'internal' ? POSTS_URL : `${EXTERNAL_ORIGIN}/` + const url = + target === 'internal' + ? POSTS_URL + : `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) if (target === 'internal') { diff --git a/e2e/react-start/basic/tests/setup/dev-server.setup.ts b/e2e/react-start/basic/tests/setup/dev-server.setup.ts deleted file mode 100644 index d16ff0bb54..0000000000 --- a/e2e/react-start/basic/tests/setup/dev-server.setup.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' - -export default async function setup() { - const port = Number(process.env.E2E_APP_PORT ?? 0) - const baseURL = `http://localhost:${port}` - - await waitForServer(baseURL) - await preOptimizeDevServer({ - baseURL, - warmup: async (page) => { - await page.getByRole('heading').getByText('Welcome Home').waitFor() - await page.goto(`${baseURL}/specialChars/search?searchParam=warmup`) - await page.getByTestId('special-search-loaded-info').waitFor() - await page.goto(`${baseURL}/posts`) - await page.getByRole('link', { name: 'sunt aut facere repe' }).waitFor() - await page.waitForLoadState('networkidle') - }, - }) -} diff --git a/e2e/react-start/basic/tests/setup/global.setup.ts b/e2e/react-start/basic/tests/setup/global.setup.ts new file mode 100644 index 0000000000..cd38c35885 --- /dev/null +++ b/e2e/react-start/basic/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +export default async function setup() { + await e2eStartDummyServer(getE2EPortKey()) +} diff --git a/e2e/react-start/basic/tests/setup/global.teardown.ts b/e2e/react-start/basic/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..36e5c92858 --- /dev/null +++ b/e2e/react-start/basic/tests/setup/global.teardown.ts @@ -0,0 +1,8 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +export default async function teardown() { + try { + await e2eStopDummyServer(getE2EPortKey()) + } catch {} +} diff --git a/e2e/react-start/basic/tests/setup/waitForDummyServer.ts b/e2e/react-start/basic/tests/setup/waitForDummyServer.ts new file mode 100644 index 0000000000..88c18fd79e --- /dev/null +++ b/e2e/react-start/basic/tests/setup/waitForDummyServer.ts @@ -0,0 +1,24 @@ +import { getDummyServerPort } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +const timeoutMs = 10_000 +const retryIntervalMs = 100 + +export default async function waitForDummyServer() { + const port = await getDummyServerPort(getE2EPortKey()) + const deadline = Date.now() + timeoutMs + + while (Date.now() < deadline) { + try { + const response = await fetch(`http://localhost:${port}/`) + + if (response.ok) { + return + } + } catch {} + + await new Promise((resolve) => setTimeout(resolve, retryIntervalMs)) + } + + throw new Error(`Timed out waiting for dummy server on port ${port}`) +} diff --git a/e2e/react-start/basic/tests/spa-shell.spec.ts b/e2e/react-start/basic/tests/spa-shell.spec.ts deleted file mode 100644 index f42195e762..0000000000 --- a/e2e/react-start/basic/tests/spa-shell.spec.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' -import { isSpaMode } from './utils/isSpaMode' - -// The prod SPA run and the dev SPA runs (`E2E_DEV_SERVER`) all run this file. -// The dev runs run nothing else. -test.skip(!isSpaMode, 'only SPA mode answers documents with the shell') - -// Its loader and beforeLoad report where they ran. -const searchRoute = '/specialChars/search?searchParam=shell' - -test('a document request gets the shell, not the rendered route', async ({ - request, -}) => { - const response = await request.get(searchRoute) - - expect(response.status()).toBe(200) - const html = await response.text() - // The root route's document renders... - expect(html).toContain('This Route Does Not Exist') - // ...but not the matched route, nor its loader's output. - expect(html).not.toContain('special-search-loaded-info') - expect(html).not.toContain('Loaded on: server') -}) - -test('the route loads in the browser', async ({ page }) => { - await page.goto(searchRoute) - - await expect(page.getByTestId('special-search-loaded-info')).toHaveText( - 'Loaded on: client', - ) - await expect(page.getByTestId('special-search-before-load-info')).toHaveText( - 'Before load on: client', - ) - await expect(page.getByTestId('special-search-param')).toHaveText('shell') -}) - -test('client navigation works from the shell', async ({ page }) => { - await page.goto('/') - await expect(page.getByRole('heading')).toContainText('Welcome Home') - await expect(page.getByTestId('router-status')).toHaveText('idle') - - // A full page load would drop this. - await page.evaluate(() => { - ;(window as any).__spaShellPage = true - }) - await page.getByRole('link', { name: 'Posts' }).click() - await page.waitForURL('/posts') - await expect( - page.getByRole('link', { name: 'sunt aut facere repe' }), - ).toBeVisible() - expect(await page.evaluate(() => (window as any).__spaShellPage)).toBe(true) -}) diff --git a/e2e/react-start/basic/tests/special-characters.spec.ts b/e2e/react-start/basic/tests/special-characters.spec.ts index 188d1f10a6..7cf50c39c8 100644 --- a/e2e/react-start/basic/tests/special-characters.spec.ts +++ b/e2e/react-start/basic/tests/special-characters.spec.ts @@ -104,16 +104,11 @@ test.describe('Unicode route rendering', () => { const loadedOn = await page .getByTestId('special-search-loaded-info') .textContent() - const beforeLoadOn = await page - .getByTestId('special-search-before-load-info') - .textContent() if (isSpaMode) { expect(loadedOn).toBe('Loaded on: client') - expect(beforeLoadOn).toBe('Before load on: client') } else { expect(loadedOn).toBe('Loaded on: server') - expect(beforeLoadOn).toBe('Before load on: server') } }) diff --git a/e2e/react-start/basic/tests/utils/getE2EPortKey.ts b/e2e/react-start/basic/tests/utils/getE2EPortKey.ts new file mode 100644 index 0000000000..48be6a9027 --- /dev/null +++ b/e2e/react-start/basic/tests/utils/getE2EPortKey.ts @@ -0,0 +1,5 @@ +import { getPackageName } from './getPackageName.ts' + +export function getE2EPortKey() { + return process.env.E2E_PORT_KEY ?? getPackageName() +} diff --git a/e2e/react-start/basic/vite.config.ts b/e2e/react-start/basic/vite.config.ts index 2a9478eea6..5270817e96 100644 --- a/e2e/react-start/basic/vite.config.ts +++ b/e2e/react-start/basic/vite.config.ts @@ -2,7 +2,13 @@ import { defineConfig } from 'vite' import { tanstackStart } from '@tanstack/react-start/plugin/vite' import viteReact from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' +import { e2eStartDummyServerForBuild } from '@tanstack/router-e2e-utils' import { getStartModeConfig } from './start-mode-config' +import { isPrerender } from './tests/utils/isPrerender' + +if (isPrerender) { + await e2eStartDummyServerForBuild() +} const outDir = process.env.E2E_DIST_DIR ?? 'dist' const startModeConfig = getStartModeConfig() diff --git a/e2e/react-start/clerk-basic/package.json b/e2e/react-start/clerk-basic/package.json index 7838b4cee1..2ff6a85a3a 100644 --- a/e2e/react-start/clerk-basic/package.json +++ b/e2e/react-start/clerk-basic/package.json @@ -8,7 +8,7 @@ "dev:e2e": "vite dev", "build": "exit 0; vite build", "start": "node .output/server/index.mjs", - "test:e2e": "exit 0; playwright test --project=chromium" + "test:e2e": "exit 0; rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@clerk/tanstack-react-start": "^0.19.0", @@ -17,11 +17,11 @@ "@tanstack/react-start": "workspace:^", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -29,8 +29,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/clerk-basic/playwright.config.ts b/e2e/react-start/clerk-basic/playwright.config.ts index 82678ac00b..18b8905468 100644 --- a/e2e/react-start/clerk-basic/playwright.config.ts +++ b/e2e/react-start/clerk-basic/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/clerk-basic/src/routeTree.gen.ts b/e2e/react-start/clerk-basic/src/routeTree.gen.ts index d8111b637a..5b9f75e27a 100644 --- a/e2e/react-start/clerk-basic/src/routeTree.gen.ts +++ b/e2e/react-start/clerk-basic/src/routeTree.gen.ts @@ -9,22 +9,22 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' -import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' import { Route as AuthedProfileSplatRouteImport } from './routes/_authed/profile.$' +import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ id: '/posts', path: '/posts', @@ -35,16 +35,16 @@ const AuthedPostsIndexRoute = AuthedPostsIndexRouteImport.update({ path: '/', getParentRoute: () => AuthedPostsRoute, } as any) -const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => AuthedPostsRoute, -} as any) const AuthedProfileSplatRoute = AuthedProfileSplatRouteImport.update({ id: '/profile/$', path: '/profile/$', getParentRoute: () => AuthedRoute, } as any) +const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => AuthedPostsRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -90,13 +90,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_authed': { id: '/_authed' path: '' @@ -104,6 +97,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/_authed/posts': { id: '/_authed/posts' path: '/posts' @@ -118,13 +118,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedPostsIndexRouteImport parentRoute: typeof AuthedPostsRoute } - '/_authed/posts/$postId': { - id: '/_authed/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof AuthedPostsPostIdRouteImport - parentRoute: typeof AuthedPostsRoute - } '/_authed/profile/$': { id: '/_authed/profile/$' path: '/profile/$' @@ -132,6 +125,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedProfileSplatRouteImport parentRoute: typeof AuthedRoute } + '/_authed/posts/$postId': { + id: '/_authed/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof AuthedPostsPostIdRouteImport + parentRoute: typeof AuthedPostsRoute + } } } diff --git a/e2e/react-start/clerk-basic/src/routes/_authed.tsx b/e2e/react-start/clerk-basic/src/routes/_authed.tsx index 440d0e3f3c..226ae0829f 100644 --- a/e2e/react-start/clerk-basic/src/routes/_authed.tsx +++ b/e2e/react-start/clerk-basic/src/routes/_authed.tsx @@ -8,7 +8,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return (
    diff --git a/e2e/react-start/csp/package.json b/e2e/react-start/csp/package.json index fd8987bcef..4d3c4fd264 100644 --- a/e2e/react-start/csp/package.json +++ b/e2e/react-start/csp/package.json @@ -8,7 +8,7 @@ "dev:e2e": "vite dev", "build": "vite build && tsc --noEmit", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -17,14 +17,13 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/csp/playwright.config.ts b/e2e/react-start/csp/playwright.config.ts index 87b32e1f50..5f9de5709e 100644 --- a/e2e/react-start/csp/playwright.config.ts +++ b/e2e/react-start/csp/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/css-inline/package.json b/e2e/react-start/css-inline/package.json index 6c5dd031c6..a7bc5d023f 100644 --- a/e2e/react-start/css-inline/package.json +++ b/e2e/react-start/css-inline/package.json @@ -20,65 +20,24 @@ "express": "^5.2.1", "react": "^19.0.0", "react-dom": "^19.0.0", - "srvx": "^1.0.0" + "srvx": "^0.11.9" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { "targets": { "test:e2e": { - "parallelism": false, - "outputs": [ - "...", - "{projectRoot}/dist-vite-ssr", - "{projectRoot}/dist-vite-ssr-transform-assets", - "{projectRoot}/dist-vite-transform-assets-ssr", - "{projectRoot}/dist-rsbuild-ssr", - "{projectRoot}/dist-rsbuild-ssr-transform-assets", - "{projectRoot}/dist-rsbuild-transform-assets-ssr" - ] - }, - "build": { - "outputs": [ - "...", - "{projectRoot}/dist-vite-ssr", - "{projectRoot}/dist-rsbuild-ssr" - ] - }, - "test:e2e--vite-ssr": { - "outputs": [ - "...", - "{projectRoot}/dist-vite-ssr" - ] - }, - "test:e2e--vite-ssr--transform-assets": { - "outputs": [ - "...", - "{projectRoot}/dist-vite-ssr-transform-assets" - ] - }, - "test:e2e--rsbuild-ssr": { - "outputs": [ - "...", - "{projectRoot}/dist-rsbuild-ssr" - ] - }, - "test:e2e--rsbuild-ssr--transform-assets": { - "outputs": [ - "...", - "{projectRoot}/dist-rsbuild-ssr-transform-assets" - ] + "parallelism": false } }, "metadata": { diff --git a/e2e/react-start/css-inline/playwright.config.ts b/e2e/react-start/css-inline/playwright.config.ts index 78e7b75252..b5d78f3608 100644 --- a/e2e/react-start/css-inline/playwright.config.ts +++ b/e2e/react-start/css-inline/playwright.config.ts @@ -1,5 +1,7 @@ +import fs from 'node:fs' import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' const inlineCssTransformAssets = @@ -16,8 +18,15 @@ const transformAssetsSuffix = isInlineCssTransformAssets : '' const distDir = process.env.E2E_DIST_DIR ?? `dist-${toolchain}${transformAssetsSuffix}-ssr` +const e2ePortKey = + process.env.E2E_PORT_KEY ?? + `${packageJson.name}-${toolchain}${transformAssetsSuffix}` -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +if (process.env.TEST_WORKER_INDEX === undefined) { + fs.rmSync(`port-${e2ePortKey}.txt`, { force: true }) +} + +const PORT = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -31,8 +40,8 @@ export default defineConfig({ webServer: { command: `pnpm build:${toolchain} && pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { E2E_DIST_DIR: distDir, diff --git a/e2e/react-start/css-inline/rsbuild.config.ts b/e2e/react-start/css-inline/rsbuild.config.ts index 8957fc9a06..2fd1208250 100644 --- a/e2e/react-start/css-inline/rsbuild.config.ts +++ b/e2e/react-start/css-inline/rsbuild.config.ts @@ -8,7 +8,7 @@ const transformInlineCssAssets = export default defineConfig({ plugins: [ - pluginReact(), + pluginReact({ splitChunks: false }), tanstackStart({ server: { build: { diff --git a/e2e/react-start/css-inline/server.js b/e2e/react-start/css-inline/server.js index 27b2357284..fcdec3b888 100644 --- a/e2e/react-start/css-inline/server.js +++ b/e2e/react-start/css-inline/server.js @@ -3,7 +3,7 @@ import path from 'node:path' import express from 'express' import { toNodeHandler } from 'srvx/node' -const port = Number(process.env.PORT ?? 3000) +const port = process.env.PORT || 3000 const distDir = process.env.E2E_DIST_DIR || 'dist-vite-ssr' const distClientDir = path.resolve(distDir, 'client') @@ -37,10 +37,8 @@ async function createStartServer() { } createStartServer().then((app) => { - const httpServer = app.listen(port, (error) => { - if (error) { - throw error - } - console.info(`E2E app: http://localhost:${httpServer.address().port}`) + app.listen(port, (error) => { + if (error) throw error + console.info(`Start Server: http://localhost:${port}`) }) }) diff --git a/e2e/react-start/css-inline/src/routeTree.gen.ts b/e2e/react-start/css-inline/src/routeTree.gen.ts index 1b5e5886b1..f663ab1b4e 100644 --- a/e2e/react-start/css-inline/src/routeTree.gen.ts +++ b/e2e/react-start/css-inline/src/routeTree.gen.ts @@ -9,22 +9,22 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AppRouteRouteImport } from './routes/app/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as AppDashboardRouteRouteImport } from './routes/app/dashboard/route' import { Route as AppDashboardIndexRouteImport } from './routes/app/dashboard/index' import { Route as AppDashboardDetailsRouteImport } from './routes/app/dashboard/details' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AppRouteRoute = AppRouteRouteImport.update({ id: '/app', path: '/app', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const AppDashboardRouteRoute = AppDashboardRouteRouteImport.update({ id: '/dashboard', path: '/dashboard', @@ -88,13 +88,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/app': { id: '/app' path: '/app' @@ -102,6 +95,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AppRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/app/dashboard': { id: '/app/dashboard' path: '/dashboard' diff --git a/e2e/react-start/css-inline/src/routes/app/dashboard/index.tsx b/e2e/react-start/css-inline/src/routes/app/dashboard/index.tsx index 35205cc9cf..a796656b3d 100644 --- a/e2e/react-start/css-inline/src/routes/app/dashboard/index.tsx +++ b/e2e/react-start/css-inline/src/routes/app/dashboard/index.tsx @@ -3,9 +3,6 @@ import { NestedPanel } from '~/components/NestedPanel' import styles from '~/styles/dashboard-index.module.css' export const Route = createFileRoute('/app/dashboard/')({ - head: () => ({ - meta: [{ title: 'Inline CSS dashboard' }], - }), component: DashboardIndex, }) diff --git a/e2e/react-start/css-inline/tests/css-inline.spec.ts b/e2e/react-start/css-inline/tests/css-inline.spec.ts index 89d7d3992f..339fedd4ca 100644 --- a/e2e/react-start/css-inline/tests/css-inline.spec.ts +++ b/e2e/react-start/css-inline/tests/css-inline.spec.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test' -import { collectBrowserErrors, test } from '@tanstack/router-e2e-utils' +import { test } from '@tanstack/router-e2e-utils' const buildUrl = (baseURL: string, pathname: string) => baseURL.replace(/\/$/, '') + pathname @@ -151,23 +151,6 @@ test('client navigation preserves the SSR inline shell stylesheet', async ({ await page.goto(buildUrl(baseURL!, '/')) await waitForHydration(page) - const inlineStyle = page.locator('style[data-tsr-inline-css]') - await expect(inlineStyle).toHaveCount(1) - const original = await inlineStyle.evaluateHandle( - (style: HTMLStyleElement) => { - const mutations: Array = [] - const observer = new MutationObserver((records) => { - mutations.push(...records) - }) - observer.observe(style, { - childList: true, - characterData: true, - subtree: true, - }) - return { style, sheet: style.sheet, observer, mutations } - }, - ) - await expect.poll(() => getInlineCssTexts(page)).toHaveLength(1) await expect .poll(() => getInlineCssTexts(page)) @@ -178,28 +161,6 @@ test('client navigation preserves the SSR inline shell stylesheet', async ({ await page.getByTestId('nav-dashboard').click() await page.waitForURL('**/app/dashboard') - await expect(page).toHaveTitle('Inline CSS dashboard') - await expect(page.getByTestId('dashboard-card')).toBeVisible() - - await page.getByTestId('nav-home').click() - await expect(page).toHaveTitle('Inline CSS E2E') - await expect(page.getByTestId('home')).toBeVisible() - - // #8250: unchanged CSS text can hide a redundant innerHTML write that - // replaces the stylesheet or fails under Trusted Types. Observe native DOM - // mutations and CSSOM identity without patching the innerHTML setter. - expect( - await original.evaluate(({ style, sheet, observer, mutations }) => { - const mutationCount = mutations.length + observer.takeRecords().length - observer.disconnect() - return { - connected: style.isConnected, - sameSheet: style.sheet === sheet, - mutationCount, - } - }), - ).toEqual({ connected: true, sameSheet: true, mutationCount: 0 }) - await original.dispose() await expect.poll(() => getInlineCssTexts(page)).toHaveLength(1) await expect @@ -209,45 +170,3 @@ test('client navigation preserves the SSR inline shell stylesheet', async ({ .poll(() => getStyle(page, 'shell', 'background-color')) .toBe('rgb(240, 249, 255)') }) - -test('client navigation preserves inline CSS with Trusted Types enforced', async ({ - page, -}) => { - const browserErrors = collectBrowserErrors(page) - const csp = "require-trusted-types-for 'script'; trusted-types 'none'" - await page.route('/', async (route) => { - const response = await route.fetch() - await route.fulfill({ - response, - headers: { ...response.headers(), 'content-security-policy': csp }, - }) - }) - - const response = await page.goto('/') - expect(response?.headers()['content-security-policy']).toBe(csp) - expect(await page.evaluate(() => 'trustedTypes' in window)).toBe(true) - await waitForHydration(page) - - const violations = await page.evaluateHandle(() => { - const directives: Array = [] - document.addEventListener('securitypolicyviolation', (event) => { - directives.push(event.effectiveDirective) - }) - return directives - }) - - await page.getByTestId('nav-dashboard').click() - await expect(page).toHaveTitle('Inline CSS dashboard') - await expect(page.getByTestId('dashboard-card')).toBeVisible() - await expect - .poll(() => getStyle(page, 'shell', 'background-color')) - .toBe('rgb(240, 249, 255)') - - await page.getByTestId('nav-home').click() - await expect(page).toHaveTitle('Inline CSS E2E') - await expect(page.getByTestId('home')).toBeVisible() - - expect(await violations.jsonValue()).toEqual([]) - expect(browserErrors).toEqual([]) - await violations.dispose() -}) diff --git a/e2e/react-start/css-modules/.gitignore b/e2e/react-start/css-modules/.gitignore index a1fbca128d..229709a89d 100644 --- a/e2e/react-start/css-modules/.gitignore +++ b/e2e/react-start/css-modules/.gitignore @@ -3,4 +3,3 @@ dist test-results playwright-report port*.txt -.cloudflare diff --git a/e2e/react-start/css-modules/cloudflare.config.ts b/e2e/react-start/css-modules/cloudflare.config.ts deleted file mode 100644 index e2bd5e13f1..0000000000 --- a/e2e/react-start/css-modules/cloudflare.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defineConfig } from 'cf/config' - -// Used by rsbuild-plugin-cloudflare (E2E_RSBUILD_CLOUDFLARE=true). -// The Vite Cloudflare variant still reads wrangler.jsonc. -export default defineConfig({ - worker: { - name: 'tanstack-start-css-modules', - entrypoint: '@tanstack/react-start/server-entry', - compatibilityDate: '2026-11-01', - }, -}) diff --git a/e2e/react-start/css-modules/package.json b/e2e/react-start/css-modules/package.json index 25c11d7321..1610f62a61 100644 --- a/e2e/react-start/css-modules/package.json +++ b/e2e/react-start/css-modules/package.json @@ -12,8 +12,6 @@ "dev:e2e:basepath": "VITE_BASE_PATH=/my-app vite dev --port $PORT", "dev:cloudflare": "echo 'Cloudflare dev mode has React duplication issues - use build+preview instead' && exit 1", "dev:e2e:cloudflare": "echo 'Cloudflare dev mode has React duplication issues - use build+preview instead' && exit 1", - "dev:e2e:rsbuild": "rsbuild dev --port $PORT", - "dev:e2e:rsbuild-cloudflare": "E2E_RSBUILD_CLOUDFLARE=true rsbuild dev --port $PORT", "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", @@ -21,16 +19,13 @@ "test:e2e:dev:nitro": "MODE=dev VITE_CONFIG=nitro playwright test --project=chromium", "test:e2e:dev:basepath": "MODE=dev VITE_CONFIG=basepath playwright test --project=chromium", "_test:e2e:dev:cloudflare": "MODE=dev VITE_CONFIG=cloudflare playwright test --project=chromium", - "test:e2e:dev:rsbuild": "MODE=dev VITE_CONFIG=rsbuild playwright test --project=chromium", - "test:e2e:dev:rsbuild-cloudflare": "MODE=dev VITE_CONFIG=rsbuild-cloudflare playwright test --project=chromium", "test:e2e:prod:default": "MODE=prod playwright test --project=chromium", "test:e2e:prod": "pnpm run test:e2e:prod:default && pnpm run test:e2e:prod:css-code-split-false", "test:e2e:prod:css-code-split-false": "MODE=prod VITE_CSS_CODE_SPLIT=false playwright test tests/css.prod.spec.ts --project=chromium", - "test:e2e": "pnpm run test:e2e:dev && pnpm run test:e2e:prod", - "test:e2e:nitro": "pnpm run test:e2e:dev:nitro", - "test:e2e:basepath": "pnpm run test:e2e:dev:basepath", - "_test:e2e:cloudflare": "echo 'Cloudflare dev mode disabled - React duplication issues' && exit 0", - "build:rsbuild": "rsbuild build && tsc --noEmit" + "test:e2e": "rm -rf port*.txt; pnpm run test:e2e:dev && pnpm run test:e2e:prod", + "test:e2e:nitro": "rm -rf port*.txt; pnpm run test:e2e:dev:nitro", + "test:e2e:basepath": "rm -rf port*.txt; pnpm run test:e2e:dev:basepath", + "_test:e2e:cloudflare": "echo 'Cloudflare dev mode disabled - React duplication issues' && exit 0" }, "dependencies": { "@tanstack/react-router": "workspace:*", @@ -40,37 +35,17 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.29.0", - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", - "@rsbuild/plugin-react": "^2.0.0", - "@rsbuild/plugin-sass": "^2.0.1", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:*", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "@typescript/native": "npm:typescript@^7.0.2", "@vitejs/plugin-react": "^6.0.1", - "cf": "1.0.0-beta.28", - "nitro": "^3.0.260903-beta", - "rsbuild-plugin-cloudflare": "^0.0.4", + "nitro": "^3.0.260311-beta", "sass": "^1.97.2", - "srvx": "^1.0.0", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14", "wrangler": "^4.74.0" - }, - "nx": { - "metadata": { - "playwrightModes": [ - { - "toolchain": "vite", - "mode": "ssr" - }, - { - "toolchain": "rsbuild", - "mode": "ssr" - } - ] - } } } diff --git a/e2e/react-start/css-modules/playwright.config.ts b/e2e/react-start/css-modules/playwright.config.ts index 7e7ad3d9b3..644798ca99 100644 --- a/e2e/react-start/css-modules/playwright.config.ts +++ b/e2e/react-start/css-modules/playwright.config.ts @@ -1,41 +1,37 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const mode = process.env.MODE ?? 'prod' const isDev = mode === 'dev' -const distDir = process.env.E2E_DIST_DIR const viteConfig = process.env.VITE_CONFIG // 'nitro' | 'basepath' | 'cloudflare' | undefined -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort( + viteConfig ? `${packageJson.name}-${viteConfig}` : packageJson.name, +) // When using basepath config, the app is served at /my-app const basePath = viteConfig === 'basepath' ? '/my-app' : '' const baseURL = `http://localhost:${PORT}${basePath}` // Select the appropriate dev command based on VITE_CONFIG -const devCommand = viteConfig - ? `pnpm dev:e2e:${viteConfig}` - : 'pnpm dev:e2e --port 0' +const devCommand = viteConfig ? `pnpm dev:e2e:${viteConfig}` : 'pnpm dev:e2e' export default defineConfig({ testDir: './tests', - testMatch: isDev ? '**/*.dev.spec.ts' : '**/*.prod.spec.ts', workers: 1, reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { baseURL, }, webServer: { - command: isDev - ? devCommand - : distDir - ? `pnpm exec srvx --prod --dir=. -s ${distDir}/client --entry ${distDir}/server/server.js` - : `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: isDev ? devCommand : `pnpm build && PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { VITE_NODE_ENV: 'test', diff --git a/e2e/react-start/css-modules/rsbuild.config.ts b/e2e/react-start/css-modules/rsbuild.config.ts deleted file mode 100644 index 499ed67ebc..0000000000 --- a/e2e/react-start/css-modules/rsbuild.config.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { defineConfig } from '@rsbuild/core' -import { pluginReact } from '@rsbuild/plugin-react' -import { pluginSass } from '@rsbuild/plugin-sass' -import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' -import { cloudflare } from 'rsbuild-plugin-cloudflare' - -// E2E_RSBUILD_CLOUDFLARE: Set to 'true' to run the SSR environment in workerd -const useCloudflare = process.env.E2E_RSBUILD_CLOUDFLARE === 'true' - -export default defineConfig({ - plugins: [ - pluginReact(), - pluginSass(), - ...(useCloudflare - ? [ - cloudflare({ - rsbuildEnvironment: { name: 'ssr' }, - inspectorPort: false, - }), - ] - : []), - tanstackStart(), - ], - output: { - distPath: { - root: process.env.E2E_DIST_DIR ?? 'dist-rsbuild-ssr', - }, - }, - tools: { - rspack(config, { environment }) { - if (environment.name === 'ssr') { - config.output ??= {} - config.output.filename = 'server.js' - } - if (environment.name !== 'client') { - return - } - config.optimization ??= {} - // Extract the shared component and its helper into their own chunks so - // a route depends on a shared chunk that depends on another shared chunk. - config.optimization.splitChunks = { - cacheGroups: { - sharedHeader: { - test: /[\\/]src[\\/]components[\\/]/, - chunks: 'async', - minChunks: 2, - minSize: 0, - enforce: true, - name: 'shared-header', - }, - sharedFormat: { - test: /[\\/]src[\\/]utils[\\/]/, - chunks: 'async', - minChunks: 2, - minSize: 0, - enforce: true, - name: 'shared-format', - }, - }, - } - }, - }, -}) diff --git a/e2e/react-start/css-modules/src/components/Header.module.css b/e2e/react-start/css-modules/src/components/Header.module.css deleted file mode 100644 index e6878a5410..0000000000 --- a/e2e/react-start/css-modules/src/components/Header.module.css +++ /dev/null @@ -1,14 +0,0 @@ -.header { - --repro-shared-header: 1; - display: grid; - grid-template-columns: minmax(0, 1fr) auto; - align-items: center; - height: 64px; - padding-inline: 16px; - background: #e4f2e9; -} - -.header h1 { - margin: 0; - font-size: 24px; -} diff --git a/e2e/react-start/css-modules/src/components/Header.tsx b/e2e/react-start/css-modules/src/components/Header.tsx deleted file mode 100644 index f16b12e8ff..0000000000 --- a/e2e/react-start/css-modules/src/components/Header.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { formatTitle } from '../utils/formatTitle' -import styles from './Header.module.css' - -export function Header({ title }: { title: string }) { - return ( -
    -

    {formatTitle(title)}

    - -
    - ) -} diff --git a/e2e/react-start/css-modules/src/routeTree.gen.ts b/e2e/react-start/css-modules/src/routeTree.gen.ts index 2789a3490a..d19ae80e5a 100644 --- a/e2e/react-start/css-modules/src/routeTree.gen.ts +++ b/e2e/react-start/css-modules/src/routeTree.gen.ts @@ -9,37 +9,14 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AlphaRouteImport } from './routes/alpha' -import { Route as BetaRouteImport } from './routes/beta' -import { Route as GammaRouteImport } from './routes/gamma' -import { Route as ModulesRouteImport } from './routes/modules' -import { Route as QuotesRouteImport } from './routes/quotes' import { Route as SassMixinRouteImport } from './routes/sass-mixin' +import { Route as QuotesRouteImport } from './routes/quotes' +import { Route as ModulesRouteImport } from './routes/modules' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AlphaRoute = AlphaRouteImport.update({ - id: '/alpha', - path: '/alpha', - getParentRoute: () => rootRouteImport, -} as any) -const BetaRoute = BetaRouteImport.update({ - id: '/beta', - path: '/beta', - getParentRoute: () => rootRouteImport, -} as any) -const GammaRoute = GammaRouteImport.update({ - id: '/gamma', - path: '/gamma', - getParentRoute: () => rootRouteImport, -} as any) -const ModulesRoute = ModulesRouteImport.update({ - id: '/modules', - path: '/modules', +const SassMixinRoute = SassMixinRouteImport.update({ + id: '/sass-mixin', + path: '/sass-mixin', getParentRoute: () => rootRouteImport, } as any) const QuotesRoute = QuotesRouteImport.update({ @@ -47,26 +24,25 @@ const QuotesRoute = QuotesRouteImport.update({ path: '/quotes', getParentRoute: () => rootRouteImport, } as any) -const SassMixinRoute = SassMixinRouteImport.update({ - id: '/sass-mixin', - path: '/sass-mixin', +const ModulesRoute = ModulesRouteImport.update({ + id: '/modules', + path: '/modules', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute - '/alpha': typeof AlphaRoute - '/beta': typeof BetaRoute - '/gamma': typeof GammaRoute '/modules': typeof ModulesRoute '/quotes': typeof QuotesRoute '/sass-mixin': typeof SassMixinRoute } export interface FileRoutesByTo { '/': typeof IndexRoute - '/alpha': typeof AlphaRoute - '/beta': typeof BetaRoute - '/gamma': typeof GammaRoute '/modules': typeof ModulesRoute '/quotes': typeof QuotesRoute '/sass-mixin': typeof SassMixinRoute @@ -74,36 +50,20 @@ export interface FileRoutesByTo { export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute - '/alpha': typeof AlphaRoute - '/beta': typeof BetaRoute - '/gamma': typeof GammaRoute '/modules': typeof ModulesRoute '/quotes': typeof QuotesRoute '/sass-mixin': typeof SassMixinRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - '/' | '/alpha' | '/beta' | '/gamma' | '/modules' | '/quotes' | '/sass-mixin' + fullPaths: '/' | '/modules' | '/quotes' | '/sass-mixin' fileRoutesByTo: FileRoutesByTo - to: - '/' | '/alpha' | '/beta' | '/gamma' | '/modules' | '/quotes' | '/sass-mixin' - id: - | '__root__' - | '/' - | '/alpha' - | '/beta' - | '/gamma' - | '/modules' - | '/quotes' - | '/sass-mixin' + to: '/' | '/modules' | '/quotes' | '/sass-mixin' + id: '__root__' | '/' | '/modules' | '/quotes' | '/sass-mixin' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute - AlphaRoute: typeof AlphaRoute - BetaRoute: typeof BetaRoute - GammaRoute: typeof GammaRoute ModulesRoute: typeof ModulesRoute QuotesRoute: typeof QuotesRoute SassMixinRoute: typeof SassMixinRoute @@ -111,39 +71,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/alpha': { - id: '/alpha' - path: '/alpha' - fullPath: '/alpha' - preLoaderRoute: typeof AlphaRouteImport - parentRoute: typeof rootRouteImport - } - '/beta': { - id: '/beta' - path: '/beta' - fullPath: '/beta' - preLoaderRoute: typeof BetaRouteImport - parentRoute: typeof rootRouteImport - } - '/gamma': { - id: '/gamma' - path: '/gamma' - fullPath: '/gamma' - preLoaderRoute: typeof GammaRouteImport - parentRoute: typeof rootRouteImport - } - '/modules': { - id: '/modules' - path: '/modules' - fullPath: '/modules' - preLoaderRoute: typeof ModulesRouteImport + '/sass-mixin': { + id: '/sass-mixin' + path: '/sass-mixin' + fullPath: '/sass-mixin' + preLoaderRoute: typeof SassMixinRouteImport parentRoute: typeof rootRouteImport } '/quotes': { @@ -153,11 +85,18 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof QuotesRouteImport parentRoute: typeof rootRouteImport } - '/sass-mixin': { - id: '/sass-mixin' - path: '/sass-mixin' - fullPath: '/sass-mixin' - preLoaderRoute: typeof SassMixinRouteImport + '/modules': { + id: '/modules' + path: '/modules' + fullPath: '/modules' + preLoaderRoute: typeof ModulesRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } @@ -165,9 +104,6 @@ declare module '@tanstack/react-router' { const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, - AlphaRoute: AlphaRoute, - BetaRoute: BetaRoute, - GammaRoute: GammaRoute, ModulesRoute: ModulesRoute, QuotesRoute: QuotesRoute, SassMixinRoute: SassMixinRoute, diff --git a/e2e/react-start/css-modules/src/routes/alpha.tsx b/e2e/react-start/css-modules/src/routes/alpha.tsx deleted file mode 100644 index e894cd758f..0000000000 --- a/e2e/react-start/css-modules/src/routes/alpha.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { Header } from '../components/Header' -import styles from '../styles/alpha.module.css' - -export const Route = createFileRoute('/alpha')({ component: Alpha }) - -function Alpha() { - return ( -
    -
    -
    - ) -} diff --git a/e2e/react-start/css-modules/src/routes/beta.tsx b/e2e/react-start/css-modules/src/routes/beta.tsx deleted file mode 100644 index 4f139ac41a..0000000000 --- a/e2e/react-start/css-modules/src/routes/beta.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { Header } from '../components/Header' -import styles from '../styles/beta.module.css' - -export const Route = createFileRoute('/beta')({ component: Beta }) - -function Beta() { - return ( -
    -
    -
    - ) -} diff --git a/e2e/react-start/css-modules/src/routes/gamma.tsx b/e2e/react-start/css-modules/src/routes/gamma.tsx deleted file mode 100644 index a8e036b85f..0000000000 --- a/e2e/react-start/css-modules/src/routes/gamma.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { formatTitle } from '../utils/formatTitle' - -export const Route = createFileRoute('/gamma')({ component: Gamma }) - -function Gamma() { - return
    {formatTitle('Gamma')}
    -} diff --git a/e2e/react-start/css-modules/src/styles/alpha.module.css b/e2e/react-start/css-modules/src/styles/alpha.module.css deleted file mode 100644 index 12a606a8d3..0000000000 --- a/e2e/react-start/css-modules/src/styles/alpha.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.page { - --repro-alpha: 1; - border: 4px solid #226844; -} diff --git a/e2e/react-start/css-modules/src/styles/beta.module.css b/e2e/react-start/css-modules/src/styles/beta.module.css deleted file mode 100644 index 719686a76b..0000000000 --- a/e2e/react-start/css-modules/src/styles/beta.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.page { - --repro-beta: 1; - border: 4px solid #ac344c; -} diff --git a/e2e/react-start/css-modules/src/utils/formatTitle.ts b/e2e/react-start/css-modules/src/utils/formatTitle.ts deleted file mode 100644 index d0325ac63e..0000000000 --- a/e2e/react-start/css-modules/src/utils/formatTitle.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function formatTitle(title: string) { - return `${title} (repro-format-title)` -} diff --git a/e2e/react-start/css-modules/tests/setup/global.setup.ts b/e2e/react-start/css-modules/tests/setup/global.setup.ts index 7c0fce762a..e8879c0165 100644 --- a/e2e/react-start/css-modules/tests/setup/global.setup.ts +++ b/e2e/react-start/css-modules/tests/setup/global.setup.ts @@ -1,10 +1,20 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' +import { + e2eStartDummyServer, + getTestServerPort, + preOptimizeDevServer, + waitForServer, +} from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } export default async function setup() { + await e2eStartDummyServer(packageJson.name) + if (process.env.MODE !== 'dev') return const viteConfig = process.env.VITE_CONFIG // 'nitro' | 'basepath' | 'cloudflare' | undefined - const port = Number(process.env.E2E_APP_PORT ?? 0) + const port = await getTestServerPort( + viteConfig ? `${packageJson.name}-${viteConfig}` : packageJson.name, + ) const basePath = viteConfig === 'basepath' ? '/my-app' : '' const baseURL = `http://localhost:${port}${basePath}` diff --git a/e2e/react-start/css-modules/tests/setup/global.teardown.ts b/e2e/react-start/css-modules/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-start/css-modules/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-start/css-modules/tests/shared-css.prod.spec.ts b/e2e/react-start/css-modules/tests/shared-css.prod.spec.ts deleted file mode 100644 index 9a9595f819..0000000000 --- a/e2e/react-start/css-modules/tests/shared-css.prod.spec.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' -import type { Page } from '@playwright/test' - -test.skip( - process.env.VITE_CSS_CODE_SPLIT === 'false', - 'Route stylesheet isolation requires CSS code splitting', -) -test.use({ javaScriptEnabled: false }) - -async function getStylesheetContent(page: Page) { - const hrefs = await page - .locator('link[rel="stylesheet"]') - .evaluateAll((links: Array) => - links.map((link) => link.href), - ) - expect(hrefs.length).toBeGreaterThan(0) - const stylesheets = await Promise.all( - hrefs.map(async (href) => { - const response = await page.request.get(href) - expect(response.ok()).toBe(true) - return response.text() - }), - ) - return stylesheets.join('\n') -} - -for (const route of ['alpha', 'beta']) { - test(`${route} has complete and isolated CSS without JavaScript`, async ({ - page, - }) => { - await page.goto(`/${route}`) - - const header = page.getByTestId('shared-header') - await expect(header).toHaveCSS('display', 'grid') - await expect(header).toHaveCSS('height', '64px') - await expect(page.getByTestId('route-page')).toHaveCSS( - `--repro-${route}`, - '1', - ) - - const css = await getStylesheetContent(page) - expect(css).toContain('--repro-shared-header') - expect(css).toContain(`--repro-${route}`) - expect(css).not.toContain(`--repro-${route === 'alpha' ? 'beta' : 'alpha'}`) - }) -} - -function getScriptPreloadHrefs(html: string) { - return Array.from(html.matchAll(/]*>/g), (match) => match[0]) - .filter( - (tag) => - /\brel="modulepreload"/.test(tag) || - (/\brel="preload"/.test(tag) && /\bas="script"/.test(tag)), - ) - .map((tag) => tag.match(/\bhref="([^"]+)"/)?.[1]) - .filter((href): href is string => !!href) -} - -test('alpha preloads the shared header chunk and the chunk it depends on', async ({ - page, -}) => { - const response = await page.request.get('/alpha') - expect(response.ok()).toBe(true) - - const hrefs = getScriptPreloadHrefs(await response.text()) - expect(hrefs.length).toBeGreaterThan(0) - - const scripts = await Promise.all( - hrefs.map(async (href) => { - const script = await page.request.get(href) - expect(script.ok()).toBe(true) - return script.text() - }), - ) - - expect(scripts.some((code) => code.includes('shared-header'))).toBe(true) - expect(scripts.some((code) => code.includes('repro-format-title'))).toBe(true) -}) - -test('home does not load the shared header or route styles', async ({ - page, -}) => { - await page.goto('/') - await expect(page.getByTestId('global-styled')).toHaveCSS( - 'background-color', - 'rgb(59, 130, 246)', - ) - - const css = await getStylesheetContent(page) - expect(css).not.toContain('--repro-shared-header') - expect(css).not.toContain('--repro-alpha') - expect(css).not.toContain('--repro-beta') -}) diff --git a/e2e/react-start/css-modules/vite.config.ts b/e2e/react-start/css-modules/vite.config.ts index c9c27f7f9a..9923ab3384 100644 --- a/e2e/react-start/css-modules/vite.config.ts +++ b/e2e/react-start/css-modules/vite.config.ts @@ -21,7 +21,6 @@ export default defineConfig(async () => { port: 3000, }, build: { - outDir: process.env.E2E_DIST_DIR ?? 'dist', cssCodeSplit, }, plugins: [ diff --git a/e2e/react-start/custom-basepath/express-server.ts b/e2e/react-start/custom-basepath/express-server.ts index b9bf393466..1884c5eb5a 100644 --- a/e2e/react-start/custom-basepath/express-server.ts +++ b/e2e/react-start/custom-basepath/express-server.ts @@ -1,6 +1,5 @@ import express from 'express' import { toNodeHandler } from 'srvx/node' -import type { AddressInfo } from 'node:net' import type { NodeHttp1Handler } from 'srvx' const DEVELOPMENT = process.env.NODE_ENV === 'development' @@ -41,11 +40,7 @@ if (DEVELOPMENT) { }) } -const httpServer = app.listen(PORT, (error) => { - if (error) { - throw error - } - console.log( - `E2E app: http://localhost:${(httpServer.address() as AddressInfo).port}`, - ) +app.listen(PORT, (error) => { + if (error) throw error + console.log(`Server is running on http://localhost:${PORT}`) }) diff --git a/e2e/react-start/custom-basepath/package.json b/e2e/react-start/custom-basepath/package.json index e93949eea2..f32c9772b9 100644 --- a/e2e/react-start/custom-basepath/package.json +++ b/e2e/react-start/custom-basepath/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "tsx express-server.ts", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -17,10 +17,10 @@ "express": "^5.2.1", "react": "^19.0.0", "react-dom": "^19.0.0", - "redaxios": "catalog:" + "redaxios": "^0.5.1" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/express": "^5.0.6", @@ -29,11 +29,10 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "cross-env": "^10.0.0", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", "tsx": "^4.20.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/custom-basepath/playwright.config.ts b/e2e/react-start/custom-basepath/playwright.config.ts index e113ce64ad..5095425f47 100644 --- a/e2e/react-start/custom-basepath/playwright.config.ts +++ b/e2e/react-start/custom-basepath/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}/custom/basepath` /** @@ -13,19 +18,19 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/react-start/custom-basepath/src/routeTree.gen.ts b/e2e/react-start/custom-basepath/src/routeTree.gen.ts index 18cc9b5163..9aacbfbdf0 100644 --- a/e2e/react-start/custom-basepath/src/routeTree.gen.ts +++ b/e2e/react-start/custom-basepath/src/routeTree.gen.ts @@ -9,40 +9,25 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as LogoutRouteImport } from './routes/logout' -import { Route as NavigateTestRouteImport } from './routes/navigate-test' -import { Route as PostsRouteImport } from './routes/posts' import { Route as UsersRouteImport } from './routes/users' -import { Route as ApiUsersRouteImport } from './routes/api.users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as RedirectIndexRouteImport } from './routes/redirect/index' -import { Route as RedirectThrowItRouteImport } from './routes/redirect/throw-it' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NavigateTestRouteImport } from './routes/navigate-test' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as RedirectIndexRouteImport } from './routes/redirect/index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as RedirectThrowItRouteImport } from './routes/redirect/throw-it' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api.users' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const LogoutRoute = LogoutRouteImport.update({ - id: '/logout', - path: '/logout', - getParentRoute: () => rootRouteImport, -} as any) -const NavigateTestRoute = NavigateTestRouteImport.update({ - id: '/navigate-test', - path: '/navigate-test', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const PostsRoute = PostsRouteImport.update({ @@ -50,34 +35,24 @@ const PostsRoute = PostsRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const NavigateTestRoute = NavigateTestRouteImport.update({ + id: '/navigate-test', + path: '/navigate-test', getParentRoute: () => rootRouteImport, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const LogoutRoute = LogoutRouteImport.update({ + id: '/logout', + path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const RedirectIndexRoute = RedirectIndexRouteImport.update({ - id: '/redirect/', - path: '/redirect/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectThrowItRoute = RedirectThrowItRouteImport.update({ - id: '/redirect/throw-it', - path: '/redirect/throw-it', getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ @@ -85,21 +60,46 @@ const UsersIndexRoute = UsersIndexRouteImport.update({ path: '/', getParentRoute: () => UsersRoute, } as any) +const RedirectIndexRoute = RedirectIndexRouteImport.update({ + id: '/redirect/', + path: '/redirect/', + getParentRoute: () => rootRouteImport, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, +const RedirectThrowItRoute = RedirectThrowItRouteImport.update({ + id: '/redirect/throw-it', + path: '/redirect/throw-it', + getParentRoute: () => rootRouteImport, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -218,32 +218,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/logout': { - id: '/logout' - path: '/logout' - fullPath: '/logout' - preLoaderRoute: typeof LogoutRouteImport - parentRoute: typeof rootRouteImport - } - '/navigate-test': { - id: '/navigate-test' - path: '/navigate-test' - fullPath: '/navigate-test' - preLoaderRoute: typeof NavigateTestRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/posts': { @@ -253,46 +232,32 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/navigate-test': { + id: '/navigate-test' + path: '/navigate-test' + fullPath: '/navigate-test' + preLoaderRoute: typeof NavigateTestRouteImport parentRoute: typeof rootRouteImport } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/logout': { + id: '/logout' + path: '/logout' + fullPath: '/logout' + preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect/' - preLoaderRoute: typeof RedirectIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect/throw-it': { - id: '/redirect/throw-it' - path: '/redirect/throw-it' - fullPath: '/redirect/throw-it' - preLoaderRoute: typeof RedirectThrowItRouteImport + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/users/': { @@ -302,6 +267,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRoute } + '/redirect/': { + id: '/redirect/' + path: '/redirect' + fullPath: '/redirect/' + preLoaderRoute: typeof RedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -309,12 +288,26 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRoute } - '/api/users/$id': { - id: '/api/users/$id' - path: '/$id' - fullPath: '/api/users/$id' - preLoaderRoute: typeof ApiUsersIdRouteImport - parentRoute: typeof ApiUsersRoute + '/redirect/throw-it': { + id: '/redirect/throw-it' + path: '/redirect/throw-it' + fullPath: '/redirect/throw-it' + preLoaderRoute: typeof RedirectThrowItRouteImport + parentRoute: typeof rootRouteImport + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport } '/posts_/$postId/deep': { id: '/posts_/$postId/deep' @@ -323,6 +316,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } + '/api/users/$id': { + id: '/api/users/$id' + path: '/$id' + fullPath: '/api/users/$id' + preLoaderRoute: typeof ApiUsersIdRouteImport + parentRoute: typeof ApiUsersRoute + } } } diff --git a/e2e/react-start/custom-basepath/src/routes/api.users.ts b/e2e/react-start/custom-basepath/src/routes/api.users.ts index 6fc8cde830..9e055549ef 100644 --- a/e2e/react-start/custom-basepath/src/routes/api.users.ts +++ b/e2e/react-start/custom-basepath/src/routes/api.users.ts @@ -3,7 +3,11 @@ import axios from 'redaxios' import type { User } from '~/utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users')({ server: { diff --git a/e2e/react-start/custom-basepath/src/routes/api/users.$id.ts b/e2e/react-start/custom-basepath/src/routes/api/users.$id.ts index 81c071afb5..57682660fd 100644 --- a/e2e/react-start/custom-basepath/src/routes/api/users.$id.ts +++ b/e2e/react-start/custom-basepath/src/routes/api/users.$id.ts @@ -2,7 +2,11 @@ import axios from 'redaxios' import type { User } from '~/utils/users' import { createFileRoute } from '@tanstack/react-router' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users/$id')({ server: { diff --git a/e2e/react-start/custom-basepath/src/utils/posts.tsx b/e2e/react-start/custom-basepath/src/utils/posts.tsx index d9b98a8c9c..4cc5dcc4c6 100644 --- a/e2e/react-start/custom-basepath/src/utils/posts.tsx +++ b/e2e/react-start/custom-basepath/src/utils/posts.tsx @@ -8,7 +8,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = createServerFn({ method: 'GET' }) .validator((postId: string) => postId) diff --git a/e2e/react-start/custom-basepath/src/utils/users.tsx b/e2e/react-start/custom-basepath/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/react-start/custom-basepath/src/utils/users.tsx +++ b/e2e/react-start/custom-basepath/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` diff --git a/e2e/react-start/custom-basepath/tests/setup/global.setup.ts b/e2e/react-start/custom-basepath/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/react-start/custom-basepath/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/react-start/custom-basepath/tests/setup/global.teardown.ts b/e2e/react-start/custom-basepath/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/react-start/custom-basepath/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/react-start/custom-server-rsbuild/express-server.ts b/e2e/react-start/custom-server-rsbuild/express-server.ts index 68537956b4..23784f2efc 100644 --- a/e2e/react-start/custom-server-rsbuild/express-server.ts +++ b/e2e/react-start/custom-server-rsbuild/express-server.ts @@ -1,6 +1,5 @@ import express from 'express' import { toNodeHandler } from 'srvx/node' -import type { AddressInfo } from 'node:net' import type { NodeHttp1Handler } from 'srvx' const DEVELOPMENT = process.env.NODE_ENV === 'development' @@ -59,13 +58,9 @@ if (DEVELOPMENT) { }) const httpServer = app.listen(PORT, async (error) => { - if (error) { - throw error - } + if (error) throw error await devServer.afterListen() - console.log( - `E2E app: http://localhost:${(httpServer.address() as AddressInfo).port}`, - ) + console.log(`Server is running on http://localhost:${PORT}`) }) devServer.connectWebSocket({ server: httpServer }) } else { @@ -80,12 +75,8 @@ if (DEVELOPMENT) { next(error) } }) - const httpServer = app.listen(PORT, (error) => { - if (error) { - throw error - } - console.log( - `E2E app: http://localhost:${(httpServer.address() as AddressInfo).port}`, - ) + app.listen(PORT, (error) => { + if (error) throw error + console.log(`Server is running on http://localhost:${PORT}`) }) } diff --git a/e2e/react-start/custom-server-rsbuild/package.json b/e2e/react-start/custom-server-rsbuild/package.json index 1c5b3af393..75634f79f5 100644 --- a/e2e/react-start/custom-server-rsbuild/package.json +++ b/e2e/react-start/custom-server-rsbuild/package.json @@ -10,7 +10,7 @@ "start": "tsx express-server.ts", "test:e2e:dev": "cross-env MODE=dev playwright test --project=chromium", "test:e2e:prod": "cross-env MODE=prod playwright test --project=chromium", - "test:e2e": "pnpm run test:e2e:dev && pnpm run test:e2e:prod" + "test:e2e": "rm -rf port*.txt && pnpm run test:e2e:dev && pnpm run test:e2e:prod" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -20,8 +20,8 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tailwindcss/postcss": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", @@ -30,10 +30,9 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "cross-env": "^10.0.0", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", "tsx": "^4.20.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" + "typescript": "^6.0.2" } } diff --git a/e2e/react-start/custom-server-rsbuild/playwright.config.ts b/e2e/react-start/custom-server-rsbuild/playwright.config.ts index f0542500fd..eb8b43f648 100644 --- a/e2e/react-start/custom-server-rsbuild/playwright.config.ts +++ b/e2e/react-start/custom-server-rsbuild/playwright.config.ts @@ -1,9 +1,11 @@ import { defineConfig, devices } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const mode = process.env.MODE ?? 'prod' const isDev = mode === 'dev' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(`${packageJson.name}-${mode}`) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -13,8 +15,8 @@ export default defineConfig({ use: { baseURL }, webServer: { command: isDev ? 'pnpm dev:e2e' : 'pnpm build && pnpm start', - wait: { stdout: /E2E app: http:\/\/localhost:(?\d+)/ }, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { PORT: String(PORT), diff --git a/e2e/react-start/custom-server-rsbuild/rsbuild.config.ts b/e2e/react-start/custom-server-rsbuild/rsbuild.config.ts index 5f9aa96e16..dec3a6d0fc 100644 --- a/e2e/react-start/custom-server-rsbuild/rsbuild.config.ts +++ b/e2e/react-start/custom-server-rsbuild/rsbuild.config.ts @@ -28,7 +28,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' // explicit prefix. export default defineConfig({ plugins: [ - pluginReact(), + pluginReact({ splitChunks: false }), tanstackStart({ rsbuild: { installDevServerMiddleware: false, diff --git a/e2e/react-start/deferred-hydration/package.json b/e2e/react-start/deferred-hydration/package.json index 5a33407435..b225528b49 100644 --- a/e2e/react-start/deferred-hydration/package.json +++ b/e2e/react-start/deferred-hydration/package.json @@ -26,28 +26,21 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@rsbuild/core": "^2.3.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { "targets": { "test:e2e": { "parallelism": false - }, - "build": { - "outputs": [ - "...", - "{projectRoot}/dist-vite-ssr" - ] } }, "metadata": { diff --git a/e2e/react-start/deferred-hydration/playwright.config.ts b/e2e/react-start/deferred-hydration/playwright.config.ts index d88c59fc9d..0125792d4b 100644 --- a/e2e/react-start/deferred-hydration/playwright.config.ts +++ b/e2e/react-start/deferred-hydration/playwright.config.ts @@ -1,9 +1,12 @@ +import fs from 'node:fs' import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' const distDir = process.env.E2E_DIST_DIR ?? `dist-${toolchain}-ssr` - +const e2ePortKey = + process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` const mode = process.env.MODE ?? 'prod' const isDev = mode === 'dev' const serverEntryFile = toolchain === 'rsbuild' ? 'index.js' : 'server.js' @@ -11,7 +14,11 @@ const startCommand = `pnpm exec srvx --prod --dir=. -s ${distDir}/client --entry const devCommand = toolchain === 'rsbuild' ? 'pnpm dev:rsbuild' : 'pnpm dev:vite' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +if (process.env.TEST_WORKER_INDEX === undefined) { + fs.rmSync(`port-${e2ePortKey}.txt`, { force: true }) +} + +const PORT = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -19,11 +26,12 @@ export default defineConfig({ workers: 1, reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { baseURL }, webServer: { command: isDev ? `${devCommand} --port ${PORT}` : startCommand, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { E2E_DIST_DIR: distDir, @@ -32,6 +40,7 @@ export default defineConfig({ PORT: String(PORT), VITE_SERVER_PORT: String(PORT), E2E_TOOLCHAIN: toolchain, + E2E_PORT_KEY: e2ePortKey, }, }, projects: [ diff --git a/e2e/react-start/deferred-hydration/rsbuild.config.ts b/e2e/react-start/deferred-hydration/rsbuild.config.ts index a9d1942a6f..6279705adb 100644 --- a/e2e/react-start/deferred-hydration/rsbuild.config.ts +++ b/e2e/react-start/deferred-hydration/rsbuild.config.ts @@ -5,7 +5,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' const outDir = process.env.E2E_DIST_DIR ?? 'dist-rsbuild-ssr' export default defineConfig({ - plugins: [pluginReact(), tanstackStart()], + plugins: [pluginReact({ splitChunks: false }), tanstackStart()], output: { distPath: { root: outDir, diff --git a/e2e/react-start/deferred-hydration/src/routeTree.gen.ts b/e2e/react-start/deferred-hydration/src/routeTree.gen.ts index 451af49ddf..a5b35a698f 100644 --- a/e2e/react-start/deferred-hydration/src/routeTree.gen.ts +++ b/e2e/react-start/deferred-hydration/src/routeTree.gen.ts @@ -9,31 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ComponentsRouteImport } from './routes/components' -import { Route as CssRouteImport } from './routes/css' -import { Route as EnhancedRouteImport } from './routes/enhanced' -import { Route as ImportedRouteImport } from './routes/imported' import { Route as ScrollRestorationRouteImport } from './routes/scroll-restoration' +import { Route as ImportedRouteImport } from './routes/imported' +import { Route as EnhancedRouteImport } from './routes/enhanced' +import { Route as CssRouteImport } from './routes/css' +import { Route as ComponentsRouteImport } from './routes/components' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const ComponentsRoute = ComponentsRouteImport.update({ - id: '/components', - path: '/components', - getParentRoute: () => rootRouteImport, -} as any) -const CssRoute = CssRouteImport.update({ - id: '/css', - path: '/css', - getParentRoute: () => rootRouteImport, -} as any) -const EnhancedRoute = EnhancedRouteImport.update({ - id: '/enhanced', - path: '/enhanced', +const ScrollRestorationRoute = ScrollRestorationRouteImport.update({ + id: '/scroll-restoration', + path: '/scroll-restoration', getParentRoute: () => rootRouteImport, } as any) const ImportedRoute = ImportedRouteImport.update({ @@ -41,9 +26,24 @@ const ImportedRoute = ImportedRouteImport.update({ path: '/imported', getParentRoute: () => rootRouteImport, } as any) -const ScrollRestorationRoute = ScrollRestorationRouteImport.update({ - id: '/scroll-restoration', - path: '/scroll-restoration', +const EnhancedRoute = EnhancedRouteImport.update({ + id: '/enhanced', + path: '/enhanced', + getParentRoute: () => rootRouteImport, +} as any) +const CssRoute = CssRouteImport.update({ + id: '/css', + path: '/css', + getParentRoute: () => rootRouteImport, +} as any) +const ComponentsRoute = ComponentsRouteImport.update({ + id: '/components', + path: '/components', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -110,32 +110,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/components': { - id: '/components' - path: '/components' - fullPath: '/components' - preLoaderRoute: typeof ComponentsRouteImport - parentRoute: typeof rootRouteImport - } - '/css': { - id: '/css' - path: '/css' - fullPath: '/css' - preLoaderRoute: typeof CssRouteImport - parentRoute: typeof rootRouteImport - } - '/enhanced': { - id: '/enhanced' - path: '/enhanced' - fullPath: '/enhanced' - preLoaderRoute: typeof EnhancedRouteImport + '/scroll-restoration': { + id: '/scroll-restoration' + path: '/scroll-restoration' + fullPath: '/scroll-restoration' + preLoaderRoute: typeof ScrollRestorationRouteImport parentRoute: typeof rootRouteImport } '/imported': { @@ -145,11 +124,32 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ImportedRouteImport parentRoute: typeof rootRouteImport } - '/scroll-restoration': { - id: '/scroll-restoration' - path: '/scroll-restoration' - fullPath: '/scroll-restoration' - preLoaderRoute: typeof ScrollRestorationRouteImport + '/enhanced': { + id: '/enhanced' + path: '/enhanced' + fullPath: '/enhanced' + preLoaderRoute: typeof EnhancedRouteImport + parentRoute: typeof rootRouteImport + } + '/css': { + id: '/css' + path: '/css' + fullPath: '/css' + preLoaderRoute: typeof CssRouteImport + parentRoute: typeof rootRouteImport + } + '/components': { + id: '/components' + path: '/components' + fullPath: '/components' + preLoaderRoute: typeof ComponentsRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/react-start/deferred-hydration/tests/setup/global.setup.ts b/e2e/react-start/deferred-hydration/tests/setup/global.setup.ts index 704bbef3e2..1117664a14 100644 --- a/e2e/react-start/deferred-hydration/tests/setup/global.setup.ts +++ b/e2e/react-start/deferred-hydration/tests/setup/global.setup.ts @@ -1,11 +1,24 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' +import { + e2eStartDummyServer, + getTestServerPort, + preOptimizeDevServer, + waitForServer, +} from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +function getE2EPortKey() { + const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' + return process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` +} export default async function setup() { - if (process.env.MODE !== 'dev') { - return - } + if (process.env.MODE !== 'dev') return - const port = Number(process.env.E2E_APP_PORT ?? 0) + const e2ePortKey = getE2EPortKey() + + await e2eStartDummyServer(e2ePortKey) + + const port = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${port}` await waitForServer(baseURL) diff --git a/e2e/react-start/deferred-hydration/tests/setup/global.teardown.ts b/e2e/react-start/deferred-hydration/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..df79f50e82 --- /dev/null +++ b/e2e/react-start/deferred-hydration/tests/setup/global.teardown.ts @@ -0,0 +1,13 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +function getE2EPortKey() { + const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' + return process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` +} + +export default async function teardown() { + if (process.env.MODE !== 'dev') return + + await e2eStopDummyServer(getE2EPortKey()) +} diff --git a/e2e/react-start/dev-ssr-styles/package.json b/e2e/react-start/dev-ssr-styles/package.json index a5300e836e..91c5cc1281 100644 --- a/e2e/react-start/dev-ssr-styles/package.json +++ b/e2e/react-start/dev-ssr-styles/package.json @@ -22,9 +22,13 @@ "test:e2e:dev:nitro": "MODE=dev VITE_USE_NITRO=true playwright test --project=chromium", "test:e2e:dev:disabled:nitro": "MODE=dev SSR_STYLES=disabled VITE_USE_NITRO=true playwright test --project=chromium", "test:e2e:dev:custom-basepath:nitro": "MODE=dev SSR_STYLES=custom-basepath VITE_USE_NITRO=true playwright test --project=chromium", + "test:e2e:dev:bundled-dev:nitro": "MODE=dev VITE_USE_NITRO=true E2E_VITE_BUNDLED_DEV=true playwright test --project=chromium", + "test:e2e:dev:disabled:bundled-dev:nitro": "MODE=dev SSR_STYLES=disabled VITE_USE_NITRO=true E2E_VITE_BUNDLED_DEV=true playwright test --project=chromium", + "test:e2e:dev:custom-basepath:bundled-dev:nitro": "MODE=dev SSR_STYLES=custom-basepath VITE_USE_NITRO=true E2E_VITE_BUNDLED_DEV=true playwright test --project=chromium", "test:e2e:bundled-dev": "pnpm run test:e2e:dev:bundled-dev && pnpm run test:e2e:dev:disabled:bundled-dev && pnpm run test:e2e:dev:custom-basepath:bundled-dev", - "test:e2e": "pnpm run test:e2e:dev && pnpm run test:e2e:dev:disabled && pnpm run test:e2e:dev:custom-basepath && pnpm run test:e2e:bundled-dev", - "test:e2e:nitro": "pnpm run test:e2e:dev:nitro && pnpm run test:e2e:dev:disabled:nitro && pnpm run test:e2e:dev:custom-basepath:nitro" + "test:e2e:nitro:bundled-dev": "pnpm run test:e2e:dev:bundled-dev:nitro && pnpm run test:e2e:dev:disabled:bundled-dev:nitro && pnpm run test:e2e:dev:custom-basepath:bundled-dev:nitro", + "test:e2e": "rm -rf port*.txt; pnpm run test:e2e:dev && pnpm run test:e2e:dev:disabled && pnpm run test:e2e:dev:custom-basepath && pnpm run test:e2e:bundled-dev", + "test:e2e:nitro": "rm -rf port*.txt; pnpm run test:e2e:dev:nitro && pnpm run test:e2e:dev:disabled:nitro && pnpm run test:e2e:dev:custom-basepath:nitro && pnpm run test:e2e:nitro:bundled-dev" }, "dependencies": { "@tanstack/react-router": "workspace:*", @@ -33,17 +37,16 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-core": "workspace:*", "@tanstack/router-e2e-utils": "workspace:*", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "nitro": "^3.0.260903-beta", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "nitro": "^3.0.260311-beta", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14", "zod": "^4.4.3" } diff --git a/e2e/react-start/dev-ssr-styles/playwright.config.ts b/e2e/react-start/dev-ssr-styles/playwright.config.ts index 71cc8ed2da..a1fdd7c3ef 100644 --- a/e2e/react-start/dev-ssr-styles/playwright.config.ts +++ b/e2e/react-start/dev-ssr-styles/playwright.config.ts @@ -1,5 +1,6 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } import { ssrStylesMode, useNitro, viteBundledDev } from './env' const mode = process.env.MODE ?? 'prod' @@ -8,13 +9,24 @@ const isDev = mode === 'dev' // Build a unique port key per dimension combination (ssrStyles mode + nitro) // e.g. "...dev-ssr-styles", "...dev-ssr-styles-disabled", "...dev-ssr-styles-nitro", // "...dev-ssr-styles-disabled-nitro" +function getPortKey() { + let key = packageJson.name + if (ssrStylesMode !== 'default') { + key += `-${ssrStylesMode}` + } + if (useNitro) { + key += '-nitro' + } + if (viteBundledDev) { + key += '-bundled-dev' + } + return key +} -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(getPortKey()) const baseURL = `http://localhost:${PORT}` // Select the appropriate dev command based on SSR_STYLES + VITE_USE_NITRO -// package.json omits bundled Nitro runs because its asset plugin produces -// invalid Vite client code. Re-enable those tests once the upstream fix lands. function getDevCommand() { const scriptParts = ['dev:e2e'] if (ssrStylesMode !== 'default') { @@ -32,6 +44,7 @@ export default defineConfig({ reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { baseURL, @@ -39,8 +52,8 @@ export default defineConfig({ webServer: { command: isDev ? getDevCommand() : `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { VITE_NODE_ENV: 'test', diff --git a/e2e/react-start/dev-ssr-styles/src/components/CodeSplitStyledBox.tsx b/e2e/react-start/dev-ssr-styles/src/components/CodeSplitStyledBox.tsx deleted file mode 100644 index 49d2f96c39..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/components/CodeSplitStyledBox.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import styles from '../styles/code-split-route.module.css' - -export function CodeSplitStyledBox() { - return ( -
    - This box should have a blue background when dev styles are enabled. -
    - ) -} diff --git a/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts b/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts index 96c0a37142..dceedffdc1 100644 --- a/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts +++ b/e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts @@ -10,63 +10,33 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as CssImportOrderRouteImport } from './routes/css-import-order' -import { Route as InlineCssRouteImport } from './routes/inline-css' -import { Route as ModuleStateRouteImport } from './routes/module-state' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const CssImportOrderRoute = CssImportOrderRouteImport.update({ - id: '/css-import-order', - path: '/css-import-order', - getParentRoute: () => rootRouteImport, -} as any) -const InlineCssRoute = InlineCssRouteImport.update({ - id: '/inline-css', - path: '/inline-css', - getParentRoute: () => rootRouteImport, -} as any) -const ModuleStateRoute = ModuleStateRouteImport.update({ - id: '/module-state', - path: '/module-state', - getParentRoute: () => rootRouteImport, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute - '/css-import-order': typeof CssImportOrderRoute - '/inline-css': typeof InlineCssRoute - '/module-state': typeof ModuleStateRoute } export interface FileRoutesByTo { '/': typeof IndexRoute - '/css-import-order': typeof CssImportOrderRoute - '/inline-css': typeof InlineCssRoute - '/module-state': typeof ModuleStateRoute } export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute - '/css-import-order': typeof CssImportOrderRoute - '/inline-css': typeof InlineCssRoute - '/module-state': typeof ModuleStateRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/css-import-order' | '/inline-css' | '/module-state' + fullPaths: '/' fileRoutesByTo: FileRoutesByTo - to: '/' | '/css-import-order' | '/inline-css' | '/module-state' - id: '__root__' | '/' | '/css-import-order' | '/inline-css' | '/module-state' + to: '/' + id: '__root__' | '/' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute - CssImportOrderRoute: typeof CssImportOrderRoute - InlineCssRoute: typeof InlineCssRoute - ModuleStateRoute: typeof ModuleStateRoute } declare module '@tanstack/react-router' { @@ -78,35 +48,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/css-import-order': { - id: '/css-import-order' - path: '/css-import-order' - fullPath: '/css-import-order' - preLoaderRoute: typeof CssImportOrderRouteImport - parentRoute: typeof rootRouteImport - } - '/inline-css': { - id: '/inline-css' - path: '/inline-css' - fullPath: '/inline-css' - preLoaderRoute: typeof InlineCssRouteImport - parentRoute: typeof rootRouteImport - } - '/module-state': { - id: '/module-state' - path: '/module-state' - fullPath: '/module-state' - preLoaderRoute: typeof ModuleStateRouteImport - parentRoute: typeof rootRouteImport - } } } const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, - CssImportOrderRoute: CssImportOrderRoute, - InlineCssRoute: InlineCssRoute, - ModuleStateRoute: ModuleStateRoute, } export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) diff --git a/e2e/react-start/dev-ssr-styles/src/routes/css-import-order.tsx b/e2e/react-start/dev-ssr-styles/src/routes/css-import-order.tsx deleted file mode 100644 index 345254bb8c..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/routes/css-import-order.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import '../styles/css-import-order.css' - -export const Route = createFileRoute('/css-import-order')({ - component: CssImportOrder, -}) - -function CssImportOrder() { - return ( -
    -

    CSS import order

    -
    - The route stylesheet should override its imported base stylesheet. -
    -
    - ) -} diff --git a/e2e/react-start/dev-ssr-styles/src/routes/index.tsx b/e2e/react-start/dev-ssr-styles/src/routes/index.tsx index 62fb237750..f5fadf464d 100644 --- a/e2e/react-start/dev-ssr-styles/src/routes/index.tsx +++ b/e2e/react-start/dev-ssr-styles/src/routes/index.tsx @@ -1,5 +1,4 @@ import { createFileRoute } from '@tanstack/react-router' -import { CodeSplitStyledBox } from '../components/CodeSplitStyledBox' export const Route = createFileRoute('/')({ component: Home, @@ -9,7 +8,9 @@ function Home() { return (

    Dev SSR Styles Test

    - +
    + This box should have a blue background when dev styles are enabled. +
    ) } diff --git a/e2e/react-start/dev-ssr-styles/src/routes/inline-css.tsx b/e2e/react-start/dev-ssr-styles/src/routes/inline-css.tsx deleted file mode 100644 index ffc59128e0..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/routes/inline-css.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import embeddedCss from '../styles/embedded.css?inline' - -export const Route = createFileRoute('/inline-css')({ - loader: () => embeddedCss, - component: InlineCss, -}) - -function InlineCss() { - const css = Route.useLoaderData() - return ( -
    -
    - Inline styles must not change the page layout. -
    -
    {css}
    -
    - ) -} diff --git a/e2e/react-start/dev-ssr-styles/src/routes/module-state.ts b/e2e/react-start/dev-ssr-styles/src/routes/module-state.ts deleted file mode 100644 index 546217efc3..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/routes/module-state.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -const instanceId = crypto.randomUUID() - -export const Route = createFileRoute('/module-state')({ - server: { - handlers: { - GET: () => new Response(instanceId), - }, - }, -}) diff --git a/e2e/react-start/dev-ssr-styles/src/styles/app.css b/e2e/react-start/dev-ssr-styles/src/styles/app.css index 4285da0c86..06b48f8a7c 100644 --- a/e2e/react-start/dev-ssr-styles/src/styles/app.css +++ b/e2e/react-start/dev-ssr-styles/src/styles/app.css @@ -5,10 +5,9 @@ body { background-color: #f0f4f8; } -@layer utilities { - .inline-css-layout { - margin: 12px; - padding: 24px; - border: 3px solid black; - } +.styled-box { + background-color: #3b82f6; + color: white; + padding: 24px; + border-radius: 12px; } diff --git a/e2e/react-start/dev-ssr-styles/src/styles/code-split-route.module.css b/e2e/react-start/dev-ssr-styles/src/styles/code-split-route.module.css deleted file mode 100644 index d6a50211ee..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/code-split-route.module.css +++ /dev/null @@ -1,7 +0,0 @@ -.styledBox { - background-color: #3b82f6; - background-image: url('./ssr-background.svg?no-inline'); - color: white; - padding: 24px; - border-radius: 12px; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css b/e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css deleted file mode 100644 index 4f73ddab9c..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css +++ /dev/null @@ -1,5 +0,0 @@ -.css-import-order { - --css-import-base-marker: issue-7794; - background-color: #ffffff; - color: #000000; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/css-import-order.css b/e2e/react-start/dev-ssr-styles/src/styles/css-import-order.css deleted file mode 100644 index afcb4797d9..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/css-import-order.css +++ /dev/null @@ -1,7 +0,0 @@ -@import './css-import-base.css'; - -.css-import-order { - background-color: #111827; - color: #ffffff; - padding: 24px; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/embedded-preflight.css b/e2e/react-start/dev-ssr-styles/src/styles/embedded-preflight.css deleted file mode 100644 index 13810d6c98..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/embedded-preflight.css +++ /dev/null @@ -1,6 +0,0 @@ -* { - --embedded-preflight-marker: 1; - margin: 0; - padding: 0; - border: 0 solid; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/embedded-theme.css b/e2e/react-start/dev-ssr-styles/src/styles/embedded-theme.css deleted file mode 100644 index 171ed5e174..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/embedded-theme.css +++ /dev/null @@ -1,3 +0,0 @@ -:root { - --embedded-theme-marker: 1; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/embedded-utilities.css b/e2e/react-start/dev-ssr-styles/src/styles/embedded-utilities.css deleted file mode 100644 index 01f81c3b86..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/embedded-utilities.css +++ /dev/null @@ -1,3 +0,0 @@ -.embedded-utility { - --embedded-utilities-marker: 1; -} diff --git a/e2e/react-start/dev-ssr-styles/src/styles/embedded.css b/e2e/react-start/dev-ssr-styles/src/styles/embedded.css deleted file mode 100644 index 7b6b68c48d..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/embedded.css +++ /dev/null @@ -1,3 +0,0 @@ -@import './embedded-theme.css' layer(theme); -@import './embedded-preflight.css' layer(base); -@import './embedded-utilities.css' layer(utilities); diff --git a/e2e/react-start/dev-ssr-styles/src/styles/ssr-background.svg b/e2e/react-start/dev-ssr-styles/src/styles/ssr-background.svg deleted file mode 100644 index 7916b3ef16..0000000000 --- a/e2e/react-start/dev-ssr-styles/src/styles/ssr-background.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/e2e/react-start/dev-ssr-styles/tests/app.spec.ts b/e2e/react-start/dev-ssr-styles/tests/app.spec.ts index f5b72a1bca..cb1ba0b29b 100644 --- a/e2e/react-start/dev-ssr-styles/tests/app.spec.ts +++ b/e2e/react-start/dev-ssr-styles/tests/app.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test' import { DEV_STYLES_ATTR } from '@tanstack/router-core' -import { createHmrFileEditor, test } from '@tanstack/router-e2e-utils' +import { test } from '@tanstack/router-e2e-utils' import { ssrStylesMode } from '../env' // Whitelist errors that can occur in CI: @@ -14,60 +14,14 @@ const whitelistErrors = [ test.describe(`dev.ssrStyles (mode=${ssrStylesMode})`, () => { test.use({ whitelistErrors }) - test('unchanged SSR requests reuse evaluated modules', async ({ - request, - }) => { - const first = await request.get('/module-state') - const second = await request.get('/module-state') - expect(first.ok()).toBeTruthy() - expect(second.ok()).toBeTruthy() - expect(await second.text()).toBe(await first.text()) - }) - test('page renders correctly', async ({ page }) => { - const runtimeErrors: Array = [] - page.on('pageerror', (error) => { - runtimeErrors.push(error.message) - }) await page.goto('/') await expect(page.getByTestId('home-heading')).toHaveText( 'Dev SSR Styles Test', ) - expect(runtimeErrors).toEqual([]) }) if (ssrStylesMode === 'default') { - test('dev CSS order is stable after client modules load', async ({ - page, - }) => { - const cssBodies: Array> = [] - page.on('response', (response) => { - if ( - new URL(response.url()).pathname.endsWith( - '/@tanstack-start/styles.css', - ) - ) { - cssBodies.push(response.text()) - } - }) - - await page.goto('/css-import-order') - await expect(page.getByTestId('css-import-order')).toBeVisible() - await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(1) - - await page.reload() - await expect(page.getByTestId('css-import-order')).toBeVisible() - await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(2) - - const [initialCss, reloadedCss] = await Promise.all(cssBodies.slice(0, 2)) - expect(reloadedCss).toBe(initialCss) - expect(initialCss).toContain('/* /src/styles/app.css */') - expect(initialCss).toContain('/* /src/styles/css-import-order.css */') - expect(initialCss.indexOf('/* /src/styles/app.css */')).toBeLessThan( - initialCss.indexOf('/* /src/styles/css-import-order.css */'), - ) - }) - test.describe('default (enabled, basepath = vite base)', () => { test.use({ javaScriptEnabled: false, whitelistErrors }) @@ -98,9 +52,7 @@ test.describe(`dev.ssrStyles (mode=${ssrStylesMode})`, () => { expect(href).toMatch(/^\/@tanstack-start\/styles\.css/) }) - test('CSS from a code-split route component is applied during SSR', async ({ - page, - }) => { + test('CSS is applied on initial page load (SSR)', async ({ page }) => { await page.goto('/') const element = page.getByTestId('styled-box') @@ -112,81 +64,6 @@ test.describe(`dev.ssrStyles (mode=${ssrStylesMode})`, () => { ) expect(backgroundColor).toBe('rgb(59, 130, 246)') }) - - test('SSR CSS updates after a stylesheet edit', async ({ page }) => { - const editor = createHmrFileEditor({ - rootDir: import.meta.dirname, - files: { css: '../src/styles/code-split-route.module.css' }, - }) - await editor.capturePromise - const expectSsrColor = async (color: string) => { - await expect(async () => { - await page.reload() - await expect(page.getByTestId('styled-box')).toHaveCSS( - 'background-color', - color, - ) - }).toPass({ timeout: 20_000 }) - } - try { - await page.goto('/') - await expect(page.getByTestId('styled-box')).toHaveCSS( - 'background-color', - 'rgb(59, 130, 246)', - ) - await editor.replaceText('css', '#3b82f6', '#ef4444') - await expectSsrColor('rgb(239, 68, 68)') - } finally { - await editor.restoreFiles() - // Finish the restore before another test reads the SSR stylesheet. - await expectSsrColor('rgb(59, 130, 246)') - } - }) - - test('assets referenced by SSR CSS are available before hydration', async ({ - page, - }) => { - await page.goto('/') - const backgroundImage = await page - .getByTestId('styled-box') - .evaluate((element) => getComputedStyle(element).backgroundImage) - const assetUrl = backgroundImage.match(/^url\("(.+)"\)$/)?.[1] - expect(assetUrl).toBeDefined() - const response = await page.request.get(assetUrl!) - expect(response.ok()).toBeTruthy() - expect(response.headers()['content-type']).toContain('image/svg+xml') - expect(await response.text()).toContain(' { - await page.goto('/css-import-order') - - const element = page.getByTestId('css-import-order') - await expect(element).toBeVisible() - - // css-import-order.css imports a white base rule, then overrides it - // with this dark background. Collecting the imported file separately - // appends the white rule and reverses the intended cascade. - const backgroundColor = await element.evaluate( - (el) => getComputedStyle(el).backgroundColor, - ) - expect(backgroundColor).toBe('rgb(17, 24, 39)') - - const devStylesHref = await page - .locator(`link[${DEV_STYLES_ATTR}]`) - .getAttribute('href') - expect(devStylesHref).toBeTruthy() - - const cssResponse = await page.request.get( - new URL(devStylesHref!, page.url()).href, - ) - expect(cssResponse.ok()).toBeTruthy() - - const css = await cssResponse.text() - expect(css.match(/--css-import-base-marker/g)).toHaveLength(1) - }) }) } diff --git a/e2e/react-start/dev-ssr-styles/tests/inline-css.spec.ts b/e2e/react-start/dev-ssr-styles/tests/inline-css.spec.ts deleted file mode 100644 index c564a9977a..0000000000 --- a/e2e/react-start/dev-ssr-styles/tests/inline-css.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { expect } from '@playwright/test' -import { DEV_STYLES_ATTR } from '@tanstack/router-core' -import { test } from '@tanstack/router-e2e-utils' -import { ssrStylesMode } from '../env' - -test.describe('server inline CSS with layered imports', () => { - test.skip(ssrStylesMode !== 'default', 'Requires the default dev stylesheet') - test.use({ javaScriptEnabled: false }) - - test('keeps layered inline imports out of the global dev stylesheet', async ({ - page, - }) => { - await page.goto('/inline-css') - const embeddedCss = await page.getByTestId('embedded-css').textContent() - for (const layer of ['theme', 'base', 'utilities']) { - expect(embeddedCss).toContain(`@layer ${layer}`) - } - for (const marker of ['theme', 'preflight', 'utilities']) { - expect(embeddedCss).toContain(`--embedded-${marker}-marker`) - } - - const href = await page - .locator(`link[${DEV_STYLES_ATTR}]`) - .getAttribute('href') - expect(href).toBeTruthy() - const response = await page.request.get(new URL(href!, page.url()).href) - expect(response.ok()).toBeTruthy() - expect(await response.text()).not.toContain('--embedded-') - - const layout = page.getByTestId('inline-css-layout') - await expect(layout).toHaveCSS('padding-top', '24px') - await expect(layout).toHaveCSS('margin-top', '12px') - await expect(layout).toHaveCSS('border-top-width', '3px') - }) -}) diff --git a/e2e/react-start/dev-ssr-styles/tests/setup/global.setup.ts b/e2e/react-start/dev-ssr-styles/tests/setup/global.setup.ts index 43fad46254..2bfd33163d 100644 --- a/e2e/react-start/dev-ssr-styles/tests/setup/global.setup.ts +++ b/e2e/react-start/dev-ssr-styles/tests/setup/global.setup.ts @@ -1,45 +1,39 @@ -import { chromium, expect } from '@playwright/test' -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' -import { ssrStylesMode } from '../../env' +import { + e2eStartDummyServer, + getTestServerPort, + preOptimizeDevServer, + waitForServer, +} from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } +import { ssrStylesMode, useNitro, viteBundledDev } from '../../env' + +function getPortKey() { + let key = packageJson.name + if (ssrStylesMode !== 'default') { + key += `-${ssrStylesMode}` + } + if (useNitro) { + key += '-nitro' + } + if (viteBundledDev) { + key += '-bundled-dev' + } + return key +} export default async function setup() { - if (process.env.MODE !== 'dev') { - return - } + const portKey = getPortKey() - const port = Number(process.env.E2E_APP_PORT ?? 0) + await e2eStartDummyServer(portKey) + + if (process.env.MODE !== 'dev') return + + const port = await getTestServerPort(portKey) const baseURL = `http://localhost:${port}` await waitForServer(baseURL) - - // Check cold SSR before the browser warmup can populate the client graph. - const browser = await chromium.launch() - try { - const page = await browser.newPage({ javaScriptEnabled: false }) - const backgroundAsset = - ssrStylesMode !== 'disabled' - ? page.waitForResponse( - (response) => - new URL(response.url()).pathname.includes('ssr-background'), - { timeout: 60_000 }, - ) - : undefined - await page.goto(baseURL, { timeout: 60_000 }) - await expect(page.getByTestId('home-heading')).toHaveText( - 'Dev SSR Styles Test', - { timeout: 30_000 }, - ) - if (ssrStylesMode !== 'disabled') { - expect((await backgroundAsset!).ok()).toBeTruthy() - await expect(page.getByTestId('styled-box')).toHaveCSS( - 'background-color', - 'rgb(59, 130, 246)', - { timeout: 30_000 }, - ) - } - } finally { - await browser.close() - } - - await preOptimizeDevServer({ baseURL, readyTestId: 'home-heading' }) + await preOptimizeDevServer({ + baseURL, + readyTestId: 'home-heading', + }) } diff --git a/e2e/react-start/dev-ssr-styles/tests/setup/global.teardown.ts b/e2e/react-start/dev-ssr-styles/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..0e44fca325 --- /dev/null +++ b/e2e/react-start/dev-ssr-styles/tests/setup/global.teardown.ts @@ -0,0 +1,21 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } +import { ssrStylesMode, useNitro, viteBundledDev } from '../../env' + +function getPortKey() { + let key = packageJson.name + if (ssrStylesMode !== 'default') { + key += `-${ssrStylesMode}` + } + if (useNitro) { + key += '-nitro' + } + if (viteBundledDev) { + key += '-bundled-dev' + } + return key +} + +export default async function teardown() { + await e2eStopDummyServer(getPortKey()) +} diff --git a/e2e/react-start/dev-ssr-styles/vite.config.ts b/e2e/react-start/dev-ssr-styles/vite.config.ts index df5ea34504..555137b543 100644 --- a/e2e/react-start/dev-ssr-styles/vite.config.ts +++ b/e2e/react-start/dev-ssr-styles/vite.config.ts @@ -20,7 +20,7 @@ export default defineConfig(async () => { return { resolve: { tsconfigPaths: true }, - experimental: { bundledDev: viteBundledDev }, + experimental: viteBundledDev ? { bundledDev: true } : undefined, server: { port: 3000, }, diff --git a/e2e/react-start/early-hints/package.json b/e2e/react-start/early-hints/package.json index 1615b99430..932ab20cdc 100644 --- a/e2e/react-start/early-hints/package.json +++ b/e2e/react-start/early-hints/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "gen-certs": "node --import tsx tests/gen-certs.ts", "start": "pnpm gen-certs && srvx --prod --tls --cert=tests/.tmp/tls/server.crt --key=tests/.tmp/tls/server.key -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -19,7 +19,7 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/node-forge": "^1.3.14", @@ -27,20 +27,9 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "node-forge": "^1.3.1", - "srvx": "^1.0.0", + "srvx": "0.11.15", "tsx": "4.20.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/tests/.tmp/tls" - ] - } - } } } diff --git a/e2e/react-start/early-hints/playwright.config.ts b/e2e/react-start/early-hints/playwright.config.ts index b3606d5586..a2435bcf7b 100644 --- a/e2e/react-start/early-hints/playwright.config.ts +++ b/e2e/react-start/early-hints/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `https://localhost:${PORT}` export default defineConfig({ @@ -16,8 +17,8 @@ export default defineConfig({ webServer: { command: `pnpm build && pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', ignoreHTTPSErrors: true, env: { diff --git a/e2e/react-start/early-hints/src/routeTree.gen.ts b/e2e/react-start/early-hints/src/routeTree.gen.ts index 5196090061..14e2fd341e 100644 --- a/e2e/react-start/early-hints/src/routeTree.gen.ts +++ b/e2e/react-start/early-hints/src/routeTree.gen.ts @@ -9,22 +9,17 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as OtherRouteImport } from './routes/other' -import { Route as ParentRouteImport } from './routes/parent' import { Route as RedirectRouteImport } from './routes/redirect' -import { Route as OtherNestedRouteImport } from './routes/other/nested' +import { Route as ParentRouteImport } from './routes/parent' +import { Route as OtherRouteImport } from './routes/other' +import { Route as IndexRouteImport } from './routes/index' import { Route as ParentChildRouteImport } from './routes/parent/child' +import { Route as OtherNestedRouteImport } from './routes/other/nested' import { Route as ParentChildGrandchildRouteImport } from './routes/parent/child/grandchild' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const OtherRoute = OtherRouteImport.update({ - id: '/other', - path: '/other', +const RedirectRoute = RedirectRouteImport.update({ + id: '/redirect', + path: '/redirect', getParentRoute: () => rootRouteImport, } as any) const ParentRoute = ParentRouteImport.update({ @@ -32,21 +27,26 @@ const ParentRoute = ParentRouteImport.update({ path: '/parent', getParentRoute: () => rootRouteImport, } as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', +const OtherRoute = OtherRouteImport.update({ + id: '/other', + path: '/other', getParentRoute: () => rootRouteImport, } as any) -const OtherNestedRoute = OtherNestedRouteImport.update({ - id: '/nested', - path: '/nested', - getParentRoute: () => OtherRoute, +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const ParentChildRoute = ParentChildRouteImport.update({ id: '/child', path: '/child', getParentRoute: () => ParentRoute, } as any) +const OtherNestedRoute = OtherNestedRouteImport.update({ + id: '/nested', + path: '/nested', + getParentRoute: () => OtherRoute, +} as any) const ParentChildGrandchildRoute = ParentChildGrandchildRouteImport.update({ id: '/grandchild', path: '/grandchild', @@ -120,18 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/other': { - id: '/other' - path: '/other' - fullPath: '/other' - preLoaderRoute: typeof OtherRouteImport + '/redirect': { + id: '/redirect' + path: '/redirect' + fullPath: '/redirect' + preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } '/parent': { @@ -141,19 +134,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ParentRouteImport parentRoute: typeof rootRouteImport } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport + '/other': { + id: '/other' + path: '/other' + fullPath: '/other' + preLoaderRoute: typeof OtherRouteImport parentRoute: typeof rootRouteImport } - '/other/nested': { - id: '/other/nested' - path: '/nested' - fullPath: '/other/nested' - preLoaderRoute: typeof OtherNestedRouteImport - parentRoute: typeof OtherRoute + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/parent/child': { id: '/parent/child' @@ -162,6 +155,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ParentChildRouteImport parentRoute: typeof ParentRoute } + '/other/nested': { + id: '/other/nested' + path: '/nested' + fullPath: '/other/nested' + preLoaderRoute: typeof OtherNestedRouteImport + parentRoute: typeof OtherRoute + } '/parent/child/grandchild': { id: '/parent/child/grandchild' path: '/grandchild' diff --git a/e2e/react-start/early-hints/tests/early-hints-protocol.spec.ts b/e2e/react-start/early-hints/tests/early-hints-protocol.spec.ts index 6d2d31d836..df0984079e 100644 --- a/e2e/react-start/early-hints/tests/early-hints-protocol.spec.ts +++ b/e2e/react-start/early-hints/tests/early-hints-protocol.spec.ts @@ -1,5 +1,7 @@ -import { connect } from 'node:http2' import { expect, test } from '@playwright/test' +import { connect } from 'node:http2' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } import type { IncomingHttpHeaders } from 'node:http2' type Http2Response = { @@ -46,14 +48,14 @@ function linkHeader(headers: IncomingHttpHeaders): string { function earlyHintsLinkHeader(response: Http2Response): string { expect(response.earlyHints.length).toBe(1) - return linkHeader(response.earlyHints[0]) + return linkHeader(response.earlyHints[0]!) } test.describe('Early Hints - HTTP/2 Protocol', () => { let baseURL: string test.beforeAll(async () => { - const PORT = Number(process.env.E2E_APP_PORT ?? 0) + const PORT = await getTestServerPort(packageJson.name) baseURL = `https://localhost:${PORT}` }) @@ -103,9 +105,7 @@ test.describe('Early Hints - HTTP/2 Protocol', () => { const response = await makeRequest(baseURL, '/') const link = earlyHintsLinkHeader(response) - expect(link).toMatch( - /<[^>]+>;\s*rel=modulepreload;\s*as=script;\s*fetchpriority=low/, - ) + expect(link).toMatch(/<[^>]+>;\s*rel=modulepreload;\s*as=script/) }) test('CSS module assets are included in early hints', async () => { @@ -137,7 +137,7 @@ test.describe('Early Hints - HTTP/2 Protocol', () => { expect(response.earlyHints.length).toBe(1) - const link = linkHeader(response.earlyHints[0]) + const link = linkHeader(response.earlyHints[0]!) expect(link).toContain('rel=modulepreload; as=script') expect(link).toContain('; rel=preconnect') @@ -147,7 +147,7 @@ test.describe('Early Hints - HTTP/2 Protocol', () => { const response = await makeRequest(baseURL, '/') const link = linkHeader(response.finalHeaders) - expect(link).toContain('rel=modulepreload; as=script; fetchpriority=low') + expect(link).toContain('rel=modulepreload; as=script') expect(link).toContain('; rel=preconnect') }) diff --git a/e2e/react-start/flamegraph-bench/package.json b/e2e/react-start/flamegraph-bench/package.json index 72410b13e1..87c19a6d4b 100644 --- a/e2e/react-start/flamegraph-bench/package.json +++ b/e2e/react-start/flamegraph-bench/package.json @@ -14,16 +14,15 @@ "@tanstack/react-start": "workspace:*", "react": "^19.0.0", "react-dom": "^19.0.0", - "srvx": "^1.0.0" + "srvx": "^0.11.9" }, "devDependencies": { - "@platformatic/flame": "latest", + "@platformatic/flame": "1.6.0", "@vitejs/plugin-react": "^6.0.1", - "nitro": "^3.0.260903-beta", + "nitro": "^3.0.260311-beta", "autocannon": "^8.0.0", "concurrently": "9.2.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts b/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts index cac5558477..198d538cd1 100644 --- a/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts +++ b/e2e/react-start/flamegraph-bench/src/routeTree.gen.ts @@ -9,10 +9,10 @@ // 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 IndexRouteImport } from './routes/index' import { Route as SearchRouteImport } from './routes/search' -import { Route as NestedARouteImport } from './routes/nested/$a' +import { Route as IndexRouteImport } from './routes/index' import { Route as PageIdRouteImport } from './routes/page.$id' +import { Route as NestedARouteImport } from './routes/nested/$a' import { Route as NestedABRouteImport } from './routes/nested/$a.$b' import { Route as NestedABCRouteImport } from './routes/nested/$a.$b.$c' import { Route as NestedABCDRouteImport } from './routes/nested/$a.$b.$c.$d' @@ -39,19 +39,14 @@ import { Route as NestedABCDEFGHIJKLMNOPQRSTUVWXRouteImport } from './routes/nes import { Route as NestedABCDEFGHIJKLMNOPQRSTUVWXYRouteImport } from './routes/nested/$a.$b.$c.$d.$e.$f.$g.$h.$i.$j.$k.$l.$m.$n.$o.$p.$q.$r.$s.$t.$u.$v.$w.$x.$y' import { Route as NestedABCDEFGHIJKLMNOPQRSTUVWXYZRouteImport } from './routes/nested/$a.$b.$c.$d.$e.$f.$g.$h.$i.$j.$k.$l.$m.$n.$o.$p.$q.$r.$s.$t.$u.$v.$w.$x.$y.$z' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const SearchRoute = SearchRouteImport.update({ id: '/search', path: '/search', getParentRoute: () => rootRouteImport, } as any) -const NestedARoute = NestedARouteImport.update({ - id: '/nested/$a', - path: '/nested/$a', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const PageIdRoute = PageIdRouteImport.update({ @@ -59,6 +54,11 @@ const PageIdRoute = PageIdRouteImport.update({ path: '/page/$id', getParentRoute: () => rootRouteImport, } as any) +const NestedARoute = NestedARouteImport.update({ + id: '/nested/$a', + path: '/nested/$a', + getParentRoute: () => rootRouteImport, +} as any) const NestedABRoute = NestedABRouteImport.update({ id: '/$b', path: '/$b', @@ -393,13 +393,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/search': { id: '/search' path: '/search' @@ -407,11 +400,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchRouteImport parentRoute: typeof rootRouteImport } - '/nested/$a': { - id: '/nested/$a' - path: '/nested/$a' - fullPath: '/nested/$a' - preLoaderRoute: typeof NestedARouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/page/$id': { @@ -421,6 +414,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PageIdRouteImport parentRoute: typeof rootRouteImport } + '/nested/$a': { + id: '/nested/$a' + path: '/nested/$a' + fullPath: '/nested/$a' + preLoaderRoute: typeof NestedARouteImport + parentRoute: typeof rootRouteImport + } '/nested/$a/$b': { id: '/nested/$a/$b' path: '/$b' diff --git a/e2e/react-start/hmr/package.json b/e2e/react-start/hmr/package.json index 76a5d86b1f..b3a58125b9 100644 --- a/e2e/react-start/hmr/package.json +++ b/e2e/react-start/hmr/package.json @@ -20,8 +20,8 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tailwindcss/postcss": "^4.2.2", "@tailwindcss/vite": "^4.2.2", @@ -31,8 +31,7 @@ "@types/react-dom": "^19.0.3", "tailwindcss": "^4.2.2", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { diff --git a/e2e/react-start/hmr/playwright.config.ts b/e2e/react-start/hmr/playwright.config.ts index 5840ec157a..c159aad328 100644 --- a/e2e/react-start/hmr/playwright.config.ts +++ b/e2e/react-start/hmr/playwright.config.ts @@ -1,11 +1,13 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' - +const e2ePortKey = + process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` const distDir = process.env.E2E_DIST_DIR ?? 'dist' const viteBundledDev = process.env.E2E_VITE_BUNDLED_DEV === 'true' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` const devCommand = toolchain === 'rsbuild' ? 'pnpm dev:rsbuild' : 'pnpm dev:vite' @@ -16,6 +18,7 @@ export default defineConfig({ reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { baseURL, @@ -23,14 +26,15 @@ export default defineConfig({ webServer: { command: `${devCommand} --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { VITE_NODE_ENV: 'test', PORT: String(PORT), E2E_TOOLCHAIN: toolchain, E2E_DIST_DIR: distDir, + E2E_PORT_KEY: e2ePortKey, E2E_VITE_BUNDLED_DEV: String(viteBundledDev), }, }, diff --git a/e2e/react-start/hmr/rsbuild.config.ts b/e2e/react-start/hmr/rsbuild.config.ts index 2f3829f661..126e7d9888 100644 --- a/e2e/react-start/hmr/rsbuild.config.ts +++ b/e2e/react-start/hmr/rsbuild.config.ts @@ -5,7 +5,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' const outDir = process.env.E2E_DIST_DIR ?? 'dist' export default defineConfig({ - plugins: [pluginReact(), tanstackStart()], + plugins: [pluginReact({ splitChunks: false }), tanstackStart()], output: { distPath: { root: outDir, diff --git a/e2e/react-start/hmr/src/routeTree.gen.ts b/e2e/react-start/hmr/src/routeTree.gen.ts index 73d8bd14f5..53c89f8eb5 100644 --- a/e2e/react-start/hmr/src/routeTree.gen.ts +++ b/e2e/react-start/hmr/src/routeTree.gen.ts @@ -9,57 +9,39 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ChildRouteImport } from './routes/child' -import { Route as ComponentHmrRouteImport } from './routes/component-hmr' -import { Route as ComponentHmrInlineErrorSplitRouteImport } from './routes/component-hmr-inline-error-split' -import { Route as ComponentHmrInlineNosplitRouteImport } from './routes/component-hmr-inline-nosplit' -import { Route as ComponentHmrInlineSplitRouteImport } from './routes/component-hmr-inline-split' -import { Route as ComponentHmrLowercaseNamedSplitRouteImport } from './routes/component-hmr-lowercase-named-split' -import { Route as ComponentHmrNamedErrorSplitRouteImport } from './routes/component-hmr-named-error-split' -import { Route as ComponentHmrNamedNosplitRouteImport } from './routes/component-hmr-named-nosplit' -import { Route as ComponentHmrNamedSplitRouteImport } from './routes/component-hmr-named-split' -import { Route as InputsRouteImport } from './routes/inputs' import { Route as ServerFnHmrRouteImport } from './routes/server-fn-hmr' +import { Route as InputsRouteImport } from './routes/inputs' +import { Route as ComponentHmrNamedSplitRouteImport } from './routes/component-hmr-named-split' +import { Route as ComponentHmrNamedNosplitRouteImport } from './routes/component-hmr-named-nosplit' +import { Route as ComponentHmrNamedErrorSplitRouteImport } from './routes/component-hmr-named-error-split' +import { Route as ComponentHmrInlineSplitRouteImport } from './routes/component-hmr-inline-split' +import { Route as ComponentHmrInlineNosplitRouteImport } from './routes/component-hmr-inline-nosplit' +import { Route as ComponentHmrInlineErrorSplitRouteImport } from './routes/component-hmr-inline-error-split' +import { Route as ComponentHmrRouteImport } from './routes/component-hmr' +import { Route as ChildRouteImport } from './routes/child' +import { Route as IndexRouteImport } from './routes/index' import { Route as AliasedRouteImportsIdRouteImport } from './routes/aliased-route-imports.$id' import { Route as AliasedRouteImportsIdChildRouteImport } from './routes/aliased-route-imports.$id.child' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ServerFnHmrRoute = ServerFnHmrRouteImport.update({ + id: '/server-fn-hmr', + path: '/server-fn-hmr', getParentRoute: () => rootRouteImport, } as any) -const ChildRoute = ChildRouteImport.update({ - id: '/child', - path: '/child', +const InputsRoute = InputsRouteImport.update({ + id: '/inputs', + path: '/inputs', getParentRoute: () => rootRouteImport, } as any) -const ComponentHmrRoute = ComponentHmrRouteImport.update({ - id: '/component-hmr', - path: '/component-hmr', +const ComponentHmrNamedSplitRoute = ComponentHmrNamedSplitRouteImport.update({ + id: '/component-hmr-named-split', + path: '/component-hmr-named-split', getParentRoute: () => rootRouteImport, } as any) -const ComponentHmrInlineErrorSplitRoute = - ComponentHmrInlineErrorSplitRouteImport.update({ - id: '/component-hmr-inline-error-split', - path: '/component-hmr-inline-error-split', - getParentRoute: () => rootRouteImport, - } as any) -const ComponentHmrInlineNosplitRoute = - ComponentHmrInlineNosplitRouteImport.update({ - id: '/component-hmr-inline-nosplit', - path: '/component-hmr-inline-nosplit', - getParentRoute: () => rootRouteImport, - } as any) -const ComponentHmrInlineSplitRoute = ComponentHmrInlineSplitRouteImport.update({ - id: '/component-hmr-inline-split', - path: '/component-hmr-inline-split', - getParentRoute: () => rootRouteImport, -} as any) -const ComponentHmrLowercaseNamedSplitRoute = - ComponentHmrLowercaseNamedSplitRouteImport.update({ - id: '/component-hmr-lowercase-named-split', - path: '/component-hmr-lowercase-named-split', +const ComponentHmrNamedNosplitRoute = + ComponentHmrNamedNosplitRouteImport.update({ + id: '/component-hmr-named-nosplit', + path: '/component-hmr-named-nosplit', getParentRoute: () => rootRouteImport, } as any) const ComponentHmrNamedErrorSplitRoute = @@ -68,25 +50,36 @@ const ComponentHmrNamedErrorSplitRoute = path: '/component-hmr-named-error-split', getParentRoute: () => rootRouteImport, } as any) -const ComponentHmrNamedNosplitRoute = - ComponentHmrNamedNosplitRouteImport.update({ - id: '/component-hmr-named-nosplit', - path: '/component-hmr-named-nosplit', +const ComponentHmrInlineSplitRoute = ComponentHmrInlineSplitRouteImport.update({ + id: '/component-hmr-inline-split', + path: '/component-hmr-inline-split', + getParentRoute: () => rootRouteImport, +} as any) +const ComponentHmrInlineNosplitRoute = + ComponentHmrInlineNosplitRouteImport.update({ + id: '/component-hmr-inline-nosplit', + path: '/component-hmr-inline-nosplit', getParentRoute: () => rootRouteImport, } as any) -const ComponentHmrNamedSplitRoute = ComponentHmrNamedSplitRouteImport.update({ - id: '/component-hmr-named-split', - path: '/component-hmr-named-split', +const ComponentHmrInlineErrorSplitRoute = + ComponentHmrInlineErrorSplitRouteImport.update({ + id: '/component-hmr-inline-error-split', + path: '/component-hmr-inline-error-split', + getParentRoute: () => rootRouteImport, + } as any) +const ComponentHmrRoute = ComponentHmrRouteImport.update({ + id: '/component-hmr', + path: '/component-hmr', getParentRoute: () => rootRouteImport, } as any) -const InputsRoute = InputsRouteImport.update({ - id: '/inputs', - path: '/inputs', +const ChildRoute = ChildRouteImport.update({ + id: '/child', + path: '/child', getParentRoute: () => rootRouteImport, } as any) -const ServerFnHmrRoute = ServerFnHmrRouteImport.update({ - id: '/server-fn-hmr', - path: '/server-fn-hmr', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AliasedRouteImportsIdRoute = AliasedRouteImportsIdRouteImport.update({ @@ -108,7 +101,6 @@ export interface FileRoutesByFullPath { '/component-hmr-inline-error-split': typeof ComponentHmrInlineErrorSplitRoute '/component-hmr-inline-nosplit': typeof ComponentHmrInlineNosplitRoute '/component-hmr-inline-split': typeof ComponentHmrInlineSplitRoute - '/component-hmr-lowercase-named-split': typeof ComponentHmrLowercaseNamedSplitRoute '/component-hmr-named-error-split': typeof ComponentHmrNamedErrorSplitRoute '/component-hmr-named-nosplit': typeof ComponentHmrNamedNosplitRoute '/component-hmr-named-split': typeof ComponentHmrNamedSplitRoute @@ -124,7 +116,6 @@ export interface FileRoutesByTo { '/component-hmr-inline-error-split': typeof ComponentHmrInlineErrorSplitRoute '/component-hmr-inline-nosplit': typeof ComponentHmrInlineNosplitRoute '/component-hmr-inline-split': typeof ComponentHmrInlineSplitRoute - '/component-hmr-lowercase-named-split': typeof ComponentHmrLowercaseNamedSplitRoute '/component-hmr-named-error-split': typeof ComponentHmrNamedErrorSplitRoute '/component-hmr-named-nosplit': typeof ComponentHmrNamedNosplitRoute '/component-hmr-named-split': typeof ComponentHmrNamedSplitRoute @@ -141,7 +132,6 @@ export interface FileRoutesById { '/component-hmr-inline-error-split': typeof ComponentHmrInlineErrorSplitRoute '/component-hmr-inline-nosplit': typeof ComponentHmrInlineNosplitRoute '/component-hmr-inline-split': typeof ComponentHmrInlineSplitRoute - '/component-hmr-lowercase-named-split': typeof ComponentHmrLowercaseNamedSplitRoute '/component-hmr-named-error-split': typeof ComponentHmrNamedErrorSplitRoute '/component-hmr-named-nosplit': typeof ComponentHmrNamedNosplitRoute '/component-hmr-named-split': typeof ComponentHmrNamedSplitRoute @@ -159,7 +149,6 @@ export interface FileRouteTypes { | '/component-hmr-inline-error-split' | '/component-hmr-inline-nosplit' | '/component-hmr-inline-split' - | '/component-hmr-lowercase-named-split' | '/component-hmr-named-error-split' | '/component-hmr-named-nosplit' | '/component-hmr-named-split' @@ -175,7 +164,6 @@ export interface FileRouteTypes { | '/component-hmr-inline-error-split' | '/component-hmr-inline-nosplit' | '/component-hmr-inline-split' - | '/component-hmr-lowercase-named-split' | '/component-hmr-named-error-split' | '/component-hmr-named-nosplit' | '/component-hmr-named-split' @@ -191,7 +179,6 @@ export interface FileRouteTypes { | '/component-hmr-inline-error-split' | '/component-hmr-inline-nosplit' | '/component-hmr-inline-split' - | '/component-hmr-lowercase-named-split' | '/component-hmr-named-error-split' | '/component-hmr-named-nosplit' | '/component-hmr-named-split' @@ -208,7 +195,6 @@ export interface RootRouteChildren { ComponentHmrInlineErrorSplitRoute: typeof ComponentHmrInlineErrorSplitRoute ComponentHmrInlineNosplitRoute: typeof ComponentHmrInlineNosplitRoute ComponentHmrInlineSplitRoute: typeof ComponentHmrInlineSplitRoute - ComponentHmrLowercaseNamedSplitRoute: typeof ComponentHmrLowercaseNamedSplitRoute ComponentHmrNamedErrorSplitRoute: typeof ComponentHmrNamedErrorSplitRoute ComponentHmrNamedNosplitRoute: typeof ComponentHmrNamedNosplitRoute ComponentHmrNamedSplitRoute: typeof ComponentHmrNamedSplitRoute @@ -219,74 +205,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/child': { - id: '/child' - path: '/child' - fullPath: '/child' - preLoaderRoute: typeof ChildRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr': { - id: '/component-hmr' - path: '/component-hmr' - fullPath: '/component-hmr' - preLoaderRoute: typeof ComponentHmrRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-inline-error-split': { - id: '/component-hmr-inline-error-split' - path: '/component-hmr-inline-error-split' - fullPath: '/component-hmr-inline-error-split' - preLoaderRoute: typeof ComponentHmrInlineErrorSplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-inline-nosplit': { - id: '/component-hmr-inline-nosplit' - path: '/component-hmr-inline-nosplit' - fullPath: '/component-hmr-inline-nosplit' - preLoaderRoute: typeof ComponentHmrInlineNosplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-inline-split': { - id: '/component-hmr-inline-split' - path: '/component-hmr-inline-split' - fullPath: '/component-hmr-inline-split' - preLoaderRoute: typeof ComponentHmrInlineSplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-lowercase-named-split': { - id: '/component-hmr-lowercase-named-split' - path: '/component-hmr-lowercase-named-split' - fullPath: '/component-hmr-lowercase-named-split' - preLoaderRoute: typeof ComponentHmrLowercaseNamedSplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-named-error-split': { - id: '/component-hmr-named-error-split' - path: '/component-hmr-named-error-split' - fullPath: '/component-hmr-named-error-split' - preLoaderRoute: typeof ComponentHmrNamedErrorSplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-named-nosplit': { - id: '/component-hmr-named-nosplit' - path: '/component-hmr-named-nosplit' - fullPath: '/component-hmr-named-nosplit' - preLoaderRoute: typeof ComponentHmrNamedNosplitRouteImport - parentRoute: typeof rootRouteImport - } - '/component-hmr-named-split': { - id: '/component-hmr-named-split' - path: '/component-hmr-named-split' - fullPath: '/component-hmr-named-split' - preLoaderRoute: typeof ComponentHmrNamedSplitRouteImport + '/server-fn-hmr': { + id: '/server-fn-hmr' + path: '/server-fn-hmr' + fullPath: '/server-fn-hmr' + preLoaderRoute: typeof ServerFnHmrRouteImport parentRoute: typeof rootRouteImport } '/inputs': { @@ -296,11 +219,67 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof InputsRouteImport parentRoute: typeof rootRouteImport } - '/server-fn-hmr': { - id: '/server-fn-hmr' - path: '/server-fn-hmr' - fullPath: '/server-fn-hmr' - preLoaderRoute: typeof ServerFnHmrRouteImport + '/component-hmr-named-split': { + id: '/component-hmr-named-split' + path: '/component-hmr-named-split' + fullPath: '/component-hmr-named-split' + preLoaderRoute: typeof ComponentHmrNamedSplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr-named-nosplit': { + id: '/component-hmr-named-nosplit' + path: '/component-hmr-named-nosplit' + fullPath: '/component-hmr-named-nosplit' + preLoaderRoute: typeof ComponentHmrNamedNosplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr-named-error-split': { + id: '/component-hmr-named-error-split' + path: '/component-hmr-named-error-split' + fullPath: '/component-hmr-named-error-split' + preLoaderRoute: typeof ComponentHmrNamedErrorSplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr-inline-split': { + id: '/component-hmr-inline-split' + path: '/component-hmr-inline-split' + fullPath: '/component-hmr-inline-split' + preLoaderRoute: typeof ComponentHmrInlineSplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr-inline-nosplit': { + id: '/component-hmr-inline-nosplit' + path: '/component-hmr-inline-nosplit' + fullPath: '/component-hmr-inline-nosplit' + preLoaderRoute: typeof ComponentHmrInlineNosplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr-inline-error-split': { + id: '/component-hmr-inline-error-split' + path: '/component-hmr-inline-error-split' + fullPath: '/component-hmr-inline-error-split' + preLoaderRoute: typeof ComponentHmrInlineErrorSplitRouteImport + parentRoute: typeof rootRouteImport + } + '/component-hmr': { + id: '/component-hmr' + path: '/component-hmr' + fullPath: '/component-hmr' + preLoaderRoute: typeof ComponentHmrRouteImport + parentRoute: typeof rootRouteImport + } + '/child': { + id: '/child' + path: '/child' + fullPath: '/child' + preLoaderRoute: typeof ChildRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/aliased-route-imports/$id': { @@ -340,7 +319,6 @@ const rootRouteChildren: RootRouteChildren = { ComponentHmrInlineErrorSplitRoute: ComponentHmrInlineErrorSplitRoute, ComponentHmrInlineNosplitRoute: ComponentHmrInlineNosplitRoute, ComponentHmrInlineSplitRoute: ComponentHmrInlineSplitRoute, - ComponentHmrLowercaseNamedSplitRoute: ComponentHmrLowercaseNamedSplitRoute, ComponentHmrNamedErrorSplitRoute: ComponentHmrNamedErrorSplitRoute, ComponentHmrNamedNosplitRoute: ComponentHmrNamedNosplitRoute, ComponentHmrNamedSplitRoute: ComponentHmrNamedSplitRoute, diff --git a/e2e/react-start/hmr/src/routes/__root.tsx b/e2e/react-start/hmr/src/routes/__root.tsx index 22dddf1b3c..b2ec48fb70 100644 --- a/e2e/react-start/hmr/src/routes/__root.tsx +++ b/e2e/react-start/hmr/src/routes/__root.tsx @@ -164,12 +164,6 @@ function RootContent() { label: 'Named Split', detail: 'Named component with default splitting', }, - { - testId: 'component-hmr-lowercase-named-split-link', - to: '/component-hmr-lowercase-named-split', - label: 'Lowercase Named Split', - detail: 'Lowercase named component with default splitting', - }, { testId: 'component-hmr-named-nosplit-link', to: '/component-hmr-named-nosplit', diff --git a/e2e/react-start/hmr/src/routes/component-hmr-lowercase-named-split.tsx b/e2e/react-start/hmr/src/routes/component-hmr-lowercase-named-split.tsx deleted file mode 100644 index 957e14d7a4..0000000000 --- a/e2e/react-start/hmr/src/routes/component-hmr-lowercase-named-split.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { useState } from 'react' - -export const Route = createFileRoute('/component-hmr-lowercase-named-split')({ - component, -}) - -function component() { - const [count, setCount] = useState(0) - - return ( -
    -

    - component-hmr-lowercase-named-split-baseline -

    -

    Count: {count}

    - - -
    - ) -} diff --git a/e2e/react-start/hmr/tests/app.spec.ts b/e2e/react-start/hmr/tests/app.spec.ts index 645c9b06f3..10499e4b88 100644 --- a/e2e/react-start/hmr/tests/app.spec.ts +++ b/e2e/react-start/hmr/tests/app.spec.ts @@ -11,7 +11,6 @@ import type { Page } from '@playwright/test' const whitelistErrors = [ 'Failed to load resource: net::ERR_NAME_NOT_RESOLVED', 'Failed to load resource: the server responded with a status of 504', - 'root loader error', ] const hmrExpect = expect.configure({ timeout: 20_000 }) @@ -25,8 +24,6 @@ const routeFilePaths = { componentHmrInlineSplit: 'routes/component-hmr-inline-split.tsx', componentHmrInlineNosplit: 'routes/component-hmr-inline-nosplit.tsx', componentHmrNamedSplit: 'routes/component-hmr-named-split.tsx', - componentHmrLowercaseNamedSplit: - 'routes/component-hmr-lowercase-named-split.tsx', componentHmrNamedNosplit: 'routes/component-hmr-named-nosplit.tsx', componentHmrInlineErrorSplit: 'routes/component-hmr-inline-error-split.tsx', componentHmrNamedErrorSplit: 'routes/component-hmr-named-error-split.tsx', @@ -38,21 +35,6 @@ const routeFilePaths = { type RouteFileKey = keyof typeof routeFilePaths -const rootLoaderBlock = " loader: () => ({\n crumb: 'Home',\n }),\n" -const redirectRootLoaderBlock = - " staleTime: Infinity,\n loader: () => ({\n crumb:\n typeof window === 'undefined'\n ? 'Home Armed'\n : (window.sessionStorage.getItem('hmr-root-crumb') ?? 'Home Armed'),\n }),\n" -const childBeforeLoadBlock = - " beforeLoad: () => ({\n greeting: 'Hello',\n }),\n" -const childLoaderBlock = " loader: () => ({\n crumb: 'Child',\n }),\n" -const failingChildOnStayBlock = - " onStay: () => {\n ;(window as any).__TSR_HMR_FAILURE_RAN__ = true\n throw new Error('intentional HMR lifecycle failure')\n },\n" -const pendingNavigationChildLoaderBlock = - " loader: async () => {\n if (typeof window !== 'undefined') {\n const gate = (window as any).__TSR_HMR_PENDING_NAV_GATE__\n if (gate) {\n ;(window as any).__TSR_HMR_PENDING_NAV_GATE__ = undefined\n ;(window as any).__TSR_HMR_PENDING_NAV_EVENTS__.push('loader-start')\n await gate\n ;(window as any).__TSR_HMR_PENDING_NAV_EVENTS__.push('loader-end')\n }\n }\n return { crumb: 'Child' }\n },\n" -const pendingNavigationChildOnStayBlock = - " onStay: () => {\n ;(window as any).__TSR_HMR_PENDING_NAV_EVENTS__.push('onStay')\n throw new Error('intentional HMR failure after pending navigation')\n },\n" -const redirectChildBeforeLoadBlock = - " beforeLoad: () => {\n throw redirect({ to: '/' })\n },\n" - const routeFiles = Object.fromEntries( Object.entries(routeFilePaths).map(([key, relativePath]) => [ key, @@ -117,11 +99,6 @@ const routeFileRestoreChecks: Partial< testId: 'component-hmr-marker', text: 'component-hmr-named-split-baseline', }, - componentHmrLowercaseNamedSplit: { - url: '/component-hmr-lowercase-named-split', - testId: 'component-hmr-marker', - text: 'component-hmr-lowercase-named-split-baseline', - }, componentHmrNamedNosplit: { url: '/component-hmr-named-nosplit', testId: 'component-hmr-marker', @@ -156,8 +133,6 @@ function normalizeRouteSource(routeFileKey: RouteFileKey, source: string) { } if (routeFileKey === 'root') { - next = next.replace(redirectRootLoaderBlock, rootLoaderBlock) - for (const marker of [ 'root-component-inline-baseline', 'root-component-inline-updated', @@ -183,16 +158,6 @@ function normalizeRouteSource(routeFileKey: RouteFileKey, source: string) { ' component: RootComponent,', ) - next = next.replace( - ' shellComponent: shellComponent,\n component: RootContent,', - ' component: RootComponent,', - ) - - next = next.replace( - " loader: () => {\n throw new Error('root loader error')\n },\n errorComponent: errorComponent,\n component: RootComponent,", - " loader: () => ({\n crumb: 'Home',\n }),\n component: RootComponent,", - ) - for (const marker of ['root-shell-baseline', 'root-shell-updated']) { next = next.replace( `function RootShell({ children }: { children: ReactNode }) {\n return {children}\n}\n\nfunction Breadcrumbs() {`, @@ -200,62 +165,36 @@ function normalizeRouteSource(routeFileKey: RouteFileKey, source: string) { ) } - for (const marker of [ - 'root-shell-lowercase-baseline', - 'root-shell-lowercase-updated', - ]) { - next = next.replace( - `function shellComponent({ children }: { children: ReactNode }) {\n return {children}\n}\n\nfunction Breadcrumbs() {`, - 'function Breadcrumbs() {', - ) - } - - for (const marker of [ - 'root-error-lowercase-baseline', - 'root-error-lowercase-updated', - ]) { - next = next.replace( - `function errorComponent() {\n return (\n \n

    ${marker}

    \n
    \n )\n}\n\nfunction Breadcrumbs() {`, - 'function Breadcrumbs() {', - ) - } - next = replaceAll(next, "crumb: 'Home Updated'", "crumb: 'Home'") next = replaceAll(next, 'root-component-updated', 'root-component-baseline') next = replaceAll(next, 'root-shell-updated', 'root-shell-baseline') } if (routeFileKey === 'child') { + const beforeLoadBlock = + " beforeLoad: () => ({\n greeting: 'Hello',\n }),\n" + const loaderBlock = " loader: () => ({\n crumb: 'Child',\n }),\n" + next = replaceAll(next, "greeting: 'Hi'", "greeting: 'Hello'") - next = next.replace(failingChildOnStayBlock, '') - next = next.replace(pendingNavigationChildOnStayBlock, '') - next = next.replace(pendingNavigationChildLoaderBlock, childLoaderBlock) - next = next.replace(redirectChildBeforeLoadBlock, childBeforeLoadBlock) - next = next.replace( - "import { createFileRoute, redirect } from '@tanstack/react-router'", - "import { createFileRoute } from '@tanstack/react-router'", - ) - next = replaceAll(next, "crumb: 'Child Recovered'", "crumb: 'Child'") - next = replaceAll(next, "crumb: 'Child Failed'", "crumb: 'Child'") next = replaceAll(next, "crumb: 'Child Updated Again'", "crumb: 'Child'") next = replaceAll(next, "crumb: 'Child Updated'", "crumb: 'Child'") - if (!next.includes(childBeforeLoadBlock)) { + if (!next.includes(beforeLoadBlock)) { next = next.replace( ' component: Child,\n', - `${childBeforeLoadBlock} component: Child,\n`, + `${beforeLoadBlock} component: Child,\n`, ) } - if (!next.includes(childLoaderBlock)) { + if (!next.includes(loaderBlock)) { const withLoaderAfterBeforeLoad = next.replace( - `${childBeforeLoadBlock} component: Child,\n`, - `${childBeforeLoadBlock}${childLoaderBlock} component: Child,\n`, + `${beforeLoadBlock} component: Child,\n`, + `${beforeLoadBlock}${loaderBlock} component: Child,\n`, ) next = withLoaderAfterBeforeLoad === next ? next.replace( ' component: Child,\n', - `${childLoaderBlock} component: Child,\n`, + `${loaderBlock} component: Child,\n`, ) : withLoaderAfterBeforeLoad } @@ -275,10 +214,6 @@ function normalizeRouteSource(routeFileKey: RouteFileKey, source: string) { 'component-hmr-named-split-updated', 'component-hmr-named-split-baseline', ], - componentHmrLowercaseNamedSplit: [ - 'component-hmr-lowercase-named-split-updated', - 'component-hmr-lowercase-named-split-baseline', - ], componentHmrNamedNosplit: [ 'component-hmr-named-nosplit-updated', 'component-hmr-named-nosplit-baseline', @@ -607,18 +542,8 @@ test.describe('react-start hmr', () => { test('preserves local state for code-split route component HMR', async ({ page, }) => { - // Hydration can finish before Vite connects its HMR socket. - const hmrReady = - (process.env.E2E_TOOLCHAIN ?? 'vite') === 'vite' - ? page.waitForEvent('websocket').then((socket) => { - return socket.waitForEvent('framereceived', ({ payload }) => { - return JSON.parse(String(payload)).type === 'connected' - }) - }) - : Promise.resolve() await page.goto('/') await page.getByTestId('hydrated').waitFor({ state: 'visible' }) - await hmrReady await page.getByTestId('increment').click() await page.getByTestId('message').fill('hmr state') @@ -694,178 +619,6 @@ test.describe('react-start hmr', () => { await expect(page.getByTestId('child')).toHaveText('child') }) - test('publishes a failed route refresh and accepts the next HMR update', async ({ - page, - }) => { - await page.goto('/child') - await page.getByTestId('hydrated').waitFor({ state: 'visible' }) - await page.getByTestId('root-message').fill('preserved through failure') - await expect(page.getByTestId('crumb-/child')).toHaveText('Child') - - await page.evaluate(() => { - ;(window as any).__TSR_HMR_FAILURE_RAN__ = false - }) - - await rewriteRouteFile( - page, - 'child', - (source) => - source.replace( - childLoaderBlock, - `${failingChildOnStayBlock} loader: () => ({\n crumb: 'Child Failed',\n }),\n`, - ), - async () => { - await waitForRouteModuleUpdate(page, '/child', 'Child Failed') - await page.waitForFunction( - () => (window as any).__TSR_HMR_FAILURE_RAN__ === true, - ) - }, - ) - - await expect(page.getByTestId('crumb-/child')).toHaveText('Child Failed') - await expect(page.getByTestId('root-message')).toHaveValue( - 'preserved through failure', - ) - - await rewriteRouteFile( - page, - 'child', - (source) => - source - .replace(failingChildOnStayBlock, '') - .replace("crumb: 'Child Failed'", "crumb: 'Child Recovered'"), - async () => { - await waitForRouteModuleUpdate(page, '/child', 'Child Recovered') - await hmrExpect(page.getByTestId('crumb-/child')).toHaveText( - 'Child Recovered', - ) - }, - ) - - await expect(page.getByTestId('root-message')).toHaveValue( - 'preserved through failure', - ) - }) - - test('rematerializes retained routes when an HMR update redirects', async ({ - page, - }) => { - await page.goto('/child') - await page.getByTestId('hydrated').waitFor({ state: 'visible' }) - await page.getByTestId('root-message').fill('preserved through redirect') - - await rewriteRouteFile( - page, - 'root', - (source) => source.replace(rootLoaderBlock, redirectRootLoaderBlock), - async () => { - await waitForRouteModuleUpdate(page, '__root__', 'Home Armed') - await hmrExpect(page.getByTestId('crumb-__root__')).toHaveText( - 'Home Armed', - ) - }, - ) - - await page.evaluate(() => { - window.sessionStorage.setItem('hmr-root-crumb', 'Home Redirected') - }) - - await rewriteRouteFile( - page, - 'child', - (source) => - source - .replace( - "import { createFileRoute } from '@tanstack/react-router'", - "import { createFileRoute, redirect } from '@tanstack/react-router'", - ) - .replace(childBeforeLoadBlock, redirectChildBeforeLoadBlock), - async () => { - await hmrExpect(page).toHaveURL((url) => url.pathname === '/') - await hmrExpect(page.getByTestId('crumb-__root__')).toHaveText( - 'Home Redirected', - ) - }, - ) - - await expect(page.getByTestId('root-message')).toHaveValue( - 'preserved through redirect', - ) - }) - - test('waits for a pending navigation before applying an HMR refresh', async ({ - page, - }) => { - await page.goto('/') - await page.getByTestId('hydrated').waitFor({ state: 'visible' }) - await page.getByTestId('root-message').fill('preserved while pending') - - await page.evaluate(() => { - let release!: () => void - const gate = new Promise((resolve) => { - release = resolve - }) - ;(window as any).__TSR_HMR_PENDING_NAV_EVENTS__ = [] - ;(window as any).__TSR_HMR_PENDING_NAV_GATE__ = gate - ;(window as any).__TSR_HMR_RELEASE_PENDING_NAV__ = release - }) - - await rewriteRouteFile( - page, - 'child', - (source) => - source.replace(childLoaderBlock, pendingNavigationChildLoaderBlock), - async () => { - await page.waitForFunction(() => { - const loader = (window as any).__TSR_ROUTER__?.routesById?.['/child'] - ?.options?.loader - return String(loader).includes('__TSR_HMR_PENDING_NAV_GATE__') - }) - }, - ) - - await page.getByTestId('child-link').click() - await page.waitForFunction( - () => - (window as any).__TSR_HMR_PENDING_NAV_EVENTS__?.[0] === 'loader-start', - ) - - await rewriteRouteFile( - page, - 'child', - (source) => - source.replace( - pendingNavigationChildLoaderBlock, - `${pendingNavigationChildOnStayBlock}${pendingNavigationChildLoaderBlock}`, - ), - async () => { - await page.waitForFunction(() => { - const onStay = (window as any).__TSR_ROUTER__?.routesById?.['/child'] - ?.options?.onStay - return String(onStay).includes( - 'intentional HMR failure after pending navigation', - ) - }) - }, - ) - - await page.evaluate(() => { - ;(window as any).__TSR_HMR_RELEASE_PENDING_NAV__() - }) - - await page.waitForFunction(() => - (window as any).__TSR_HMR_PENDING_NAV_EVENTS__?.includes('onStay'), - ) - await hmrExpect(page.getByTestId('child')).toHaveText('child') - await hmrExpect(page.getByTestId('crumb-/child')).toHaveText('Child') - expect( - await page.evaluate(() => (window as any).__TSR_HMR_PENDING_NAV_EVENTS__), - ).toEqual(['loader-start', 'loader-end', 'onStay']) - await expect(page.getByTestId('root-message')).toHaveValue( - 'preserved while pending', - ) - }) - test('adds a createFileRoute property during HMR', async ({ page }) => { await page.goto('/') await page.getByTestId('hydrated').waitFor({ state: 'visible' }) @@ -932,7 +685,6 @@ test.describe('react-start hmr', () => { await waitForRouteModuleUpdate(page, '/child', 'Child Updated') }, ) - await waitForHydrationSafeReload(page, '/child', 'Child Updated') // Second edit: change child loader again while still on / await replaceRouteTextAndWait( @@ -1280,89 +1032,6 @@ test.describe('react-start hmr', () => { ) }) - test('updates root route shellComponent during HMR when its function name is lowercase', async ({ - page, - }) => { - await rewriteRouteFile( - page, - 'root', - (source) => - source - .replace( - ' component: RootComponent,', - ' shellComponent: shellComponent,\n component: RootContent,', - ) - .replace( - 'function Breadcrumbs() {', - 'function shellComponent({ children }: { children: ReactNode }) {\n return {children}\n}\n\nfunction Breadcrumbs() {', - ), - async () => {}, - ) - await page.waitForTimeout(300) - - await reloadPageAndWaitForText( - page, - '/', - 'root-shell-marker', - 'root-shell-lowercase-baseline', - ) - await page.getByTestId('increment').click() - await page.getByTestId('message').fill('index preserved') - await page.getByTestId('root-message').fill('root preserved') - - await replaceRouteTextAndWait( - page, - 'root', - 'root-shell-lowercase-baseline', - 'root-shell-lowercase-updated', - async () => { - await hmrExpect(page.getByTestId('root-shell-marker')).toHaveText( - 'root-shell-lowercase-updated', - ) - }, - ) - - await expectHomeStatePreserved(page) - }) - - test('updates root route errorComponent during HMR when its function name is lowercase', async ({ - page, - }) => { - await seedHomeState(page) - - await rewriteRouteFile( - page, - 'root', - (source) => - source - .replace( - " loader: () => ({\n crumb: 'Home',\n }),\n component: RootComponent,", - " loader: () => {\n throw new Error('root loader error')\n },\n errorComponent: errorComponent,\n component: RootComponent,", - ) - .replace( - 'function Breadcrumbs() {', - 'function errorComponent() {\n return (\n \n

    root-error-lowercase-baseline

    \n
    \n )\n}\n\nfunction Breadcrumbs() {', - ), - async () => { - await hmrExpect(page.getByTestId('root-error-marker')).toHaveText( - 'root-error-lowercase-baseline', - ) - }, - ) - - await replaceRouteTextAndWait( - page, - 'root', - 'root-error-lowercase-baseline', - 'root-error-lowercase-updated', - async () => { - await hmrExpect(page.getByTestId('root-error-marker')).toHaveText( - 'root-error-lowercase-updated', - ) - }, - ) - }) - test('updates non-root route component during HMR when component is defined inline and codeSplitGroupings is undefined', async ({ page, }) => { @@ -1423,26 +1092,6 @@ test.describe('react-start hmr', () => { await expectComponentHmrStatePreserved(page) }) - test('updates a code-split route component whose function name is lowercase', async ({ - page, - }) => { - await seedComponentHmrState(page, '/component-hmr-lowercase-named-split') - - await replaceRouteTextAndWait( - page, - 'componentHmrLowercaseNamedSplit', - 'component-hmr-lowercase-named-split-baseline', - 'component-hmr-lowercase-named-split-updated', - async () => { - await hmrExpect(page.getByTestId('component-hmr-marker')).toHaveText( - 'component-hmr-lowercase-named-split-updated', - ) - }, - ) - - await expectComponentHmrStatePreserved(page) - }) - test('updates non-root route component during HMR when component is not defined inline and codeSplitGroupings disables code splitting', async ({ page, }) => { diff --git a/e2e/react-start/hmr/tests/setup/global.setup.ts b/e2e/react-start/hmr/tests/setup/global.setup.ts index 32207ab79f..fb9aad22ae 100644 --- a/e2e/react-start/hmr/tests/setup/global.setup.ts +++ b/e2e/react-start/hmr/tests/setup/global.setup.ts @@ -1,7 +1,22 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' +import { + e2eStartDummyServer, + getTestServerPort, + preOptimizeDevServer, + waitForServer, +} from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +function getE2EPortKey() { + const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' + return process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` +} export default async function setup() { - const port = Number(process.env.E2E_APP_PORT ?? 0) + const e2ePortKey = getE2EPortKey() + + await e2eStartDummyServer(e2ePortKey) + + const port = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${port}` await waitForServer(baseURL) diff --git a/e2e/react-start/hmr/tests/setup/global.teardown.ts b/e2e/react-start/hmr/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..e17856dd82 --- /dev/null +++ b/e2e/react-start/hmr/tests/setup/global.teardown.ts @@ -0,0 +1,11 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +function getE2EPortKey() { + const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' + return process.env.E2E_PORT_KEY ?? `${packageJson.name}-${toolchain}` +} + +export default async function teardown() { + await e2eStopDummyServer(getE2EPortKey()) +} diff --git a/e2e/react-start/i18n-paraglide/package.json b/e2e/react-start/i18n-paraglide/package.json index ca65ead76d..bfb7b5eb26 100644 --- a/e2e/react-start/i18n-paraglide/package.json +++ b/e2e/react-start/i18n-paraglide/package.json @@ -8,7 +8,7 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js", "build": "vite build && tsc --noEmit", "preview": "vite preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -19,7 +19,7 @@ }, "devDependencies": { "@inlang/paraglide-js": "^2.4.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -27,26 +27,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - }, - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } } } diff --git a/e2e/react-start/i18n-paraglide/playwright.config.ts b/e2e/react-start/i18n-paraglide/playwright.config.ts index 972522350e..38690f09d8 100644 --- a/e2e/react-start/i18n-paraglide/playwright.config.ts +++ b/e2e/react-start/i18n-paraglide/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts b/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts index d89758e684..421daf2790 100644 --- a/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts +++ b/e2e/react-start/i18n-paraglide/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/e2e/react-start/import-protection-custom-config/package.json b/e2e/react-start/import-protection-custom-config/package.json index c088eff106..1175bd4ac0 100644 --- a/e2e/react-start/import-protection-custom-config/package.json +++ b/e2e/react-start/import-protection-custom-config/package.json @@ -8,8 +8,8 @@ "dev:e2e": "vite dev", "build": "vite build && tsc --noEmit", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e:mockMode": "playwright test --project=chromium", - "test:e2e:errorMode": "BEHAVIOR=error playwright test --project=chromium", + "test:e2e:mockMode": "rm -rf port*.txt; playwright test --project=chromium", + "test:e2e:errorMode": "rm -rf port*.txt; BEHAVIOR=error playwright test --project=chromium", "test:e2e": "pnpm run test:e2e:mockMode && pnpm run test:e2e:errorMode" }, "dependencies": { @@ -19,29 +19,14 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "{projectRoot}/dist", - "{projectRoot}/test-results", - "{projectRoot}/webserver-build.log", - "{projectRoot}/violations.*.json", - "{projectRoot}/error-build.log", - "{projectRoot}/error-*-result.json" - ] - } - } } } diff --git a/e2e/react-start/import-protection-custom-config/playwright.config.ts b/e2e/react-start/import-protection-custom-config/playwright.config.ts index ab90f2911f..31a55ba3bc 100644 --- a/e2e/react-start/import-protection-custom-config/playwright.config.ts +++ b/e2e/react-start/import-protection-custom-config/playwright.config.ts @@ -1,8 +1,9 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' import { isErrorMode } from './tests/utils/isErrorMode' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` console.log('running in error mode:', isErrorMode.toString()) @@ -26,8 +27,8 @@ export default defineConfig({ : { webServer: { command: `rm -f webserver-build.log violations.build.json violations.dev.json && VITE_SERVER_PORT=${PORT} pnpm build > webserver-build.log 2>&1 && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', cwd: import.meta.dirname, }, diff --git a/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts b/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts index 6a2acc53ef..44861559e3 100644 --- a/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts +++ b/e2e/react-start/import-protection-custom-config/src/routeTree.gen.ts @@ -9,13 +9,13 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as BackendLeakRouteImport } from './routes/backend-leak' import { Route as FrontendLeakRouteImport } from './routes/frontend-leak' +import { Route as BackendLeakRouteImport } from './routes/backend-leak' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const FrontendLeakRoute = FrontendLeakRouteImport.update({ + id: '/frontend-leak', + path: '/frontend-leak', getParentRoute: () => rootRouteImport, } as any) const BackendLeakRoute = BackendLeakRouteImport.update({ @@ -23,9 +23,9 @@ const BackendLeakRoute = BackendLeakRouteImport.update({ path: '/backend-leak', getParentRoute: () => rootRouteImport, } as any) -const FrontendLeakRoute = FrontendLeakRouteImport.update({ - id: '/frontend-leak', - path: '/frontend-leak', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -61,11 +61,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/frontend-leak': { + id: '/frontend-leak' + path: '/frontend-leak' + fullPath: '/frontend-leak' + preLoaderRoute: typeof FrontendLeakRouteImport parentRoute: typeof rootRouteImport } '/backend-leak': { @@ -75,11 +75,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof BackendLeakRouteImport parentRoute: typeof rootRouteImport } - '/frontend-leak': { - id: '/frontend-leak' - path: '/frontend-leak' - fullPath: '/frontend-leak' - preLoaderRoute: typeof FrontendLeakRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/react-start/import-protection-custom-config/tests/error-mode.setup.ts b/e2e/react-start/import-protection-custom-config/tests/error-mode.setup.ts index 5032988d0c..3e666ca1df 100644 --- a/e2e/react-start/import-protection-custom-config/tests/error-mode.setup.ts +++ b/e2e/react-start/import-protection-custom-config/tests/error-mode.setup.ts @@ -1,14 +1,14 @@ -import { execSync, spawn } from 'node:child_process' import fs from 'node:fs' import path from 'node:path' -import { stripVTControlCharacters } from 'node:util' -import { appServerReadyPattern } from '@tanstack/router-e2e-utils' -import { chromium, expect } from '@playwright/test' +import { execSync, spawn } from 'node:child_process' +import { chromium } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } import type { FullConfig } from '@playwright/test' async function waitForHttpOk(url: string, timeoutMs: number): Promise { const start = Date.now() - + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition while (true) { if (Date.now() - start > timeoutMs) { throw new Error(`Timed out waiting for ${url}`) @@ -84,7 +84,8 @@ function captureBuild(cwd: string): void { } async function captureDevErrors(cwd: string): Promise { - const port = 0 + const port = await getTestServerPort(`${packageJson.name}_error_dev`) + const baseURL = `http://localhost:${port}` const logChunks: Array = [] const child = spawn('pnpm', ['exec', 'vite', 'dev', '--port', String(port)], { @@ -98,23 +99,10 @@ async function captureDevErrors(cwd: string): Promise { stdio: ['ignore', 'pipe', 'pipe'], }) - child.stdout.on('data', (d: Buffer) => logChunks.push(d.toString())) - child.stderr.on('data', (d: Buffer) => logChunks.push(d.toString())) + child.stdout?.on('data', (d: Buffer) => logChunks.push(d.toString())) + child.stderr?.on('data', (d: Buffer) => logChunks.push(d.toString())) try { - await expect - .poll( - () => - appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )?.groups?.E2E_APP_PORT, - { timeout: 30_000 }, - ) - .toBeTruthy() - const port = appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )!.groups!.E2E_APP_PORT - const baseURL = `http://localhost:${port}` await waitForHttpOk(baseURL, 30_000) const browser = await chromium.launch() diff --git a/e2e/react-start/import-protection-custom-config/tests/violations.setup.ts b/e2e/react-start/import-protection-custom-config/tests/violations.setup.ts index 89c8bb2b9a..c5187fe074 100644 --- a/e2e/react-start/import-protection-custom-config/tests/violations.setup.ts +++ b/e2e/react-start/import-protection-custom-config/tests/violations.setup.ts @@ -1,9 +1,9 @@ -import { spawn } from 'node:child_process' import fs from 'node:fs' import path from 'node:path' -import { stripVTControlCharacters } from 'node:util' -import { chromium, expect } from '@playwright/test' -import { appServerReadyPattern } from '@tanstack/router-e2e-utils' +import { spawn } from 'node:child_process' +import { chromium } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } import { extractViolationsFromLog } from './violations.utils' import type { FullConfig } from '@playwright/test' @@ -12,6 +12,7 @@ import type { Violation } from './violations.utils' async function waitForHttpOk(url: string, timeoutMs: number): Promise { const start = Date.now() + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition while (true) { if (Date.now() - start > timeoutMs) { throw new Error(`Timed out waiting for ${url}`) @@ -118,6 +119,7 @@ async function runDevPass( cwd: string, port: number, ): Promise> { + const baseURL = `http://localhost:${port}` const logChunks: Array = [] const child = startDevServer(cwd, port) @@ -125,19 +127,6 @@ async function runDevPass( child.stderr?.on('data', (d: Buffer) => logChunks.push(d.toString())) try { - await expect - .poll( - () => - appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )?.groups?.E2E_APP_PORT, - { timeout: 30_000 }, - ) - .toBeTruthy() - const port = appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )!.groups!.E2E_APP_PORT - const baseURL = `http://localhost:${port}` await waitForHttpOk(baseURL, 30_000) const browser = await chromium.launch() @@ -157,7 +146,7 @@ async function runDevPass( } async function captureDevViolations(cwd: string): Promise { - const port = 0 + const port = await getTestServerPort(`${packageJson.name}_dev`) const coldViolations = await runDevPass(cwd, port) diff --git a/e2e/react-start/import-protection/package.json b/e2e/react-start/import-protection/package.json index ad06ba41ea..65ad70126b 100644 --- a/e2e/react-start/import-protection/package.json +++ b/e2e/react-start/import-protection/package.json @@ -11,7 +11,10 @@ "build": "pnpm build:vite", "build:vite": "vite build && tsc --noEmit", "build:rsbuild": "rsbuild build && tsc --noEmit", - "start": "node server.js" + "start": "node server.js", + "test:e2e:mockMode": "rm -rf node_modules/.vite; rm -rf port*.txt; playwright test --project=chromium", + "test:e2e:errorMode": "rm -rf node_modules/.vite; rm -rf port*.txt; BEHAVIOR=error playwright test --project=chromium", + "test:e2e": "pnpm run test:e2e:mockMode && pnpm run test:e2e:errorMode" }, "dependencies": { "@tanstack/react-router": "workspace:^", @@ -21,17 +24,16 @@ "react-tweet": "^3.3.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { @@ -55,7 +57,6 @@ "toolchain": "vite", "mode": "ssr", "env": { - "E2E_BUILD_LOG": "webserver-build.vite-ssr.log", "E2E_VITE_BUNDLED_DEV": "false" } }, @@ -64,16 +65,12 @@ "mode": "ssr", "name": "bundled-dev", "env": { - "E2E_BUILD_LOG": "webserver-build.vite-ssr-bundled-dev.log", "E2E_VITE_BUNDLED_DEV": "true" } }, { "toolchain": "rsbuild", - "mode": "ssr", - "env": { - "E2E_BUILD_LOG": "webserver-build.rsbuild-ssr.log" - } + "mode": "ssr" } ] } diff --git a/e2e/react-start/import-protection/playwright.config.ts b/e2e/react-start/import-protection/playwright.config.ts index 6a3df630c3..ac239f36fe 100644 --- a/e2e/react-start/import-protection/playwright.config.ts +++ b/e2e/react-start/import-protection/playwright.config.ts @@ -1,19 +1,18 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' import { isErrorMode } from './tests/utils/isErrorMode' -import { getViolationArtifactName } from './tests/violations.utils' +import packageJson from './package.json' with { type: 'json' } +const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' const viteBundledDev = process.env.E2E_VITE_BUNDLED_DEV === 'true' - +const e2ePortKey = + process.env.E2E_PORT_KEY ?? + `${packageJson.name}-${toolchain}${viteBundledDev ? '-bundled-dev' : ''}` const distDir = process.env.E2E_DIST_DIR ?? 'dist' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` -const violationArtifacts = [ - getViolationArtifactName('build'), - getViolationArtifactName('dev'), - getViolationArtifactName('dev.cold'), - getViolationArtifactName('dev.warm'), -].join(' ') +const buildCommand = + toolchain === 'rsbuild' ? 'pnpm build:rsbuild' : 'pnpm build:vite' console.log('running in error mode:', isErrorMode.toString()) @@ -37,15 +36,16 @@ export default defineConfig({ ? {} : { webServer: { - command: `rm -f webserver-dev.log ${violationArtifacts} && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `rm -f webserver-build.log webserver-dev.log violations.build.json violations.dev.json && VITE_SERVER_PORT=${PORT} PORT=${PORT} ${buildCommand} > webserver-build.log 2>&1 && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', cwd: import.meta.dirname, env: { PORT: String(PORT), VITE_SERVER_PORT: String(PORT), E2E_DIST_DIR: distDir, + E2E_PORT_KEY: e2ePortKey, E2E_VITE_BUNDLED_DEV: String(viteBundledDev), }, }, diff --git a/e2e/react-start/import-protection/src/routes/index.tsx b/e2e/react-start/import-protection/src/routes/index.tsx index ef8544dc3c..c05ed1a7e3 100644 --- a/e2e/react-start/import-protection/src/routes/index.tsx +++ b/e2e/react-start/import-protection/src/routes/index.tsx @@ -1,4 +1,4 @@ -import { createFileRoute, useHydrated } from '@tanstack/react-router' +import { createFileRoute } from '@tanstack/react-router' // This import chain triggers a file-based violation in the CLIENT env: // index.tsx -> violations/edge-a.ts -> violations/secret.server.ts import { getWrappedSecret } from '../violations/edge-a' @@ -25,12 +25,10 @@ export const Route = createFileRoute('/')({ }) function Home() { - const hydrated = useHydrated() return (

    Import Protection E2E

    App loaded successfully with mock mode

    -

    {hydrated ? 'hydrated' : 'ssr'}

    {getWrappedSecret()}

    {getWrappedSecret1()}

    {getServerOnlyDataViaEdge()}

    diff --git a/e2e/react-start/import-protection/src/routes/issue-7725.tsx b/e2e/react-start/import-protection/src/routes/issue-7725.tsx deleted file mode 100644 index ef0152dd13..0000000000 --- a/e2e/react-start/import-protection/src/routes/issue-7725.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { issue7725ServerFnFactory } from '../violations/issue-7725-server-fn-factory' - -const getIssue7725Data = issue7725ServerFnFactory.handler(async () => { - return 'issue 7725 server function' -}) - -export const Route = createFileRoute('/issue-7725')({ - loader: () => getIssue7725Data(), - component: Issue7725, -}) - -function Issue7725() { - return

    Issue 7725

    -} diff --git a/e2e/react-start/import-protection/src/violations/cross-boundary-safe/session-util.ts b/e2e/react-start/import-protection/src/violations/cross-boundary-safe/session-util.ts index d74bc6430b..ab44237539 100644 --- a/e2e/react-start/import-protection/src/violations/cross-boundary-safe/session-util.ts +++ b/e2e/react-start/import-protection/src/violations/cross-boundary-safe/session-util.ts @@ -6,7 +6,7 @@ import { getRequest } from '@tanstack/react-start/server' // so the compiler should prune this import from the client bundle. // // This mirrors the real-world pattern of a session utility that wraps -// `getCookie` from `@tanstack/react-start/server`. +// `useSession` from `@tanstack/react-start/server`. export function getSessionData() { const req = getRequest() return { method: req.method } diff --git a/e2e/react-start/import-protection/src/violations/issue-7725-server-fn-factory.ts b/e2e/react-start/import-protection/src/violations/issue-7725-server-fn-factory.ts deleted file mode 100644 index 45be765b1b..0000000000 --- a/e2e/react-start/import-protection/src/violations/issue-7725-server-fn-factory.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { createServerFn } from '@tanstack/react-start' - -export const issue7725ServerFnFactory = createServerFn() diff --git a/e2e/react-start/import-protection/tests/error-mode.setup.ts b/e2e/react-start/import-protection/tests/error-mode.setup.ts index e562128eea..c844d59e73 100644 --- a/e2e/react-start/import-protection/tests/error-mode.setup.ts +++ b/e2e/react-start/import-protection/tests/error-mode.setup.ts @@ -1,9 +1,9 @@ -import { execSync, spawn } from 'node:child_process' import fs from 'node:fs' import path from 'node:path' -import { stripVTControlCharacters } from 'node:util' -import { appServerReadyPattern } from '@tanstack/router-e2e-utils' -import { chromium, expect } from '@playwright/test' +import { execSync, spawn } from 'node:child_process' +import { chromium } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } import type { FullConfig } from '@playwright/test' /** @@ -20,10 +20,14 @@ import type { FullConfig } from '@playwright/test' */ const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' +const viteBundledDev = process.env.E2E_VITE_BUNDLED_DEV === 'true' +const e2ePortKey = + process.env.E2E_PORT_KEY ?? + `${packageJson.name}-${toolchain}${viteBundledDev ? '-bundled-dev' : ''}` async function waitForHttpOk(url: string, timeoutMs: number): Promise { const start = Date.now() - + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition while (true) { if (Date.now() - start > timeoutMs) { throw new Error(`Timed out waiting for ${url}`) @@ -118,7 +122,8 @@ async function captureDev(cwd: string): Promise { if (fs.existsSync(p)) fs.unlinkSync(p) } - const port = 0 + const port = await getTestServerPort(`${e2ePortKey}-error-dev`) + const baseURL = `http://localhost:${port}` const logFile = path.resolve(cwd, 'error-dev.log') const out = fs.createWriteStream(logFile) @@ -140,28 +145,10 @@ async function captureDev(cwd: string): Promise { stdio: ['ignore', 'pipe', 'pipe'], }) - const logChunks: Array = [] - const record = (data: Buffer) => { - logChunks.push(data.toString()) - out.write(data) - } - child.stdout.on('data', record) - child.stderr.on('data', record) + child.stdout?.on('data', (d: Buffer) => out.write(d)) + child.stderr?.on('data', (d: Buffer) => out.write(d)) try { - await expect - .poll( - () => - appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )?.groups?.E2E_APP_PORT, - { timeout: 30_000 }, - ) - .toBeTruthy() - const port = appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )!.groups!.E2E_APP_PORT - const baseURL = `http://localhost:${port}` await waitForHttpOk(baseURL, 30_000) const browser = await chromium.launch() diff --git a/e2e/react-start/import-protection/tests/import-protection.spec.ts b/e2e/react-start/import-protection/tests/import-protection.spec.ts index 16b5b073eb..cdc9aea32c 100644 --- a/e2e/react-start/import-protection/tests/import-protection.spec.ts +++ b/e2e/react-start/import-protection/tests/import-protection.spec.ts @@ -2,7 +2,6 @@ import path from 'node:path' import fs from 'node:fs' import { expect } from '@playwright/test' import { test } from '@tanstack/router-e2e-utils' -import { getViolationArtifactName } from './violations.utils' import type { Violation } from './violations.utils' import type { Page } from '@playwright/test' @@ -38,7 +37,7 @@ function normalizeKeyPath(value: string): string { async function readViolations( type: 'build' | 'dev' | 'dev.cold' | 'dev.warm', ): Promise> { - const filename = getViolationArtifactName(type) + const filename = `violations.${type}.json` const violationsPath = path.resolve(import.meta.dirname, '..', filename) const mod = await import(violationsPath, { with: { type: 'json' }, @@ -162,8 +161,7 @@ test('client-only violations route loads in mock mode', async ({ page }) => { }) for (const mode of ['build', 'dev'] as const) { - const artifactName = getViolationArtifactName(mode) - test(`${artifactName} is written during ${mode}`, async () => { + test(`violations.${mode}.json is written during ${mode}`, async () => { const violations = await readViolations(mode) expect(violations.length).toBeGreaterThan(0) }) @@ -206,7 +204,7 @@ test('build log does not contain mock-edge missing export warnings', () => { const buildLogPath = path.resolve( import.meta.dirname, '..', - process.env.E2E_BUILD_LOG ?? 'webserver-build.log', + 'webserver-build.log', ) if (!fs.existsSync(buildLogPath)) { diff --git a/e2e/react-start/import-protection/tests/violations.setup.ts b/e2e/react-start/import-protection/tests/violations.setup.ts index d0f4f70d03..02796227a7 100644 --- a/e2e/react-start/import-protection/tests/violations.setup.ts +++ b/e2e/react-start/import-protection/tests/violations.setup.ts @@ -1,22 +1,24 @@ -import { spawn } from 'node:child_process' import fs from 'node:fs' import path from 'node:path' -import { stripVTControlCharacters } from 'node:util' -import { chromium, expect } from '@playwright/test' -import { appServerReadyPattern } from '@tanstack/router-e2e-utils' +import { spawn } from 'node:child_process' +import { chromium } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } -import { - extractViolationsFromLog, - getViolationArtifactName, -} from './violations.utils' +import { extractViolationsFromLog } from './violations.utils' import type { FullConfig } from '@playwright/test' import type { Violation } from './violations.utils' +const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' const viteBundledDev = process.env.E2E_VITE_BUNDLED_DEV === 'true' +const e2ePortKey = + process.env.E2E_PORT_KEY ?? + `${packageJson.name}-${toolchain}${viteBundledDev ? '-bundled-dev' : ''}` async function waitForHttpOk(url: string, timeoutMs: number): Promise { const start = Date.now() + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition while (true) { if (Date.now() - start > timeoutMs) { throw new Error(`Timed out waiting for ${url}`) @@ -172,20 +174,6 @@ async function navigateAllRoutes( const context = await browser.newContext() const page = await context.newPage() - // Safe factory imports must actually compile and hydrate. A crashed lazy - // compiler must not pass simply because it emitted no violation diagnostics. - await page.goto(baseURL) - await expect(page.getByTestId('hydration-status')).toHaveText('hydrated', { - timeout: 30_000, - }) - for (const testId of [ - 'factory-safe', - 'cross-boundary-safe-sf', - 'cross-boundary-safe-mw', - ]) { - await expect(page.getByTestId(testId)).toHaveText('function') - } - for (const [route, testId, expectedViolation] of routeDefinitions) { try { // Prefer 'networkidle' (ensures route chunks are actually fetched), but @@ -223,6 +211,7 @@ async function runDevPass( cwd: string, port: number, ): Promise> { + const baseURL = `http://localhost:${port}` const logChunks: Array = [] const child = startDevServer(cwd, port) @@ -230,19 +219,6 @@ async function runDevPass( child.stderr?.on('data', (d: Buffer) => logChunks.push(d.toString())) try { - await expect - .poll( - () => - appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )?.groups?.E2E_APP_PORT, - { timeout: 30_000 }, - ) - .toBeTruthy() - const port = appServerReadyPattern.exec( - stripVTControlCharacters(logChunks.join('')), - )!.groups!.E2E_APP_PORT - const baseURL = `http://localhost:${port}` await waitForHttpOk(baseURL, 30_000) const browser = await chromium.launch() @@ -268,22 +244,28 @@ async function runDevPass( * modules are pre-transformed so resolveId/transform paths differ. */ async function captureDevViolations(cwd: string): Promise { - const coldViolations = await runDevPass(cwd, 0) + const coldViolations = await runDevPass( + cwd, + await getTestServerPort(`${e2ePortKey}-violations-cold`), + ) fs.writeFileSync( - path.resolve(cwd, getViolationArtifactName('dev')), + path.resolve(cwd, 'violations.dev.json'), JSON.stringify(coldViolations, null, 2), ) fs.writeFileSync( - path.resolve(cwd, getViolationArtifactName('dev.cold')), + path.resolve(cwd, 'violations.dev.cold.json'), JSON.stringify(coldViolations, null, 2), ) // Warm pass: the .vite cache from the cold run is still on disk. - const warmViolations = await runDevPass(cwd, 0) + const warmViolations = await runDevPass( + cwd, + await getTestServerPort(`${e2ePortKey}-violations-warm`), + ) fs.writeFileSync( - path.resolve(cwd, getViolationArtifactName('dev.warm')), + path.resolve(cwd, 'violations.dev.warm.json'), JSON.stringify(warmViolations, null, 2), ) } @@ -293,22 +275,19 @@ export default async function globalSetup(config: FullConfig) { // This file lives in ./tests; fixture root is one directory up. const cwd = path.resolve(import.meta.dirname, '..') - // The Nx build dependency writes build output to this file. - const logFile = path.resolve( - cwd, - process.env.E2E_BUILD_LOG ?? 'webserver-build.log', - ) + // webServer.command writes build output to this file. + const logFile = path.resolve(cwd, 'webserver-build.log') if (!fs.existsSync(logFile)) { // If the log doesn't exist, leave an empty violations file. - fs.writeFileSync(path.resolve(cwd, getViolationArtifactName('build')), '[]') + fs.writeFileSync(path.resolve(cwd, 'violations.build.json'), '[]') return } const text = fs.readFileSync(logFile, 'utf-8') const violations = extractViolationsFromLog(text) fs.writeFileSync( - path.resolve(cwd, getViolationArtifactName('build')), + path.resolve(cwd, 'violations.build.json'), JSON.stringify(violations, null, 2), ) diff --git a/e2e/react-start/import-protection/tests/violations.utils.ts b/e2e/react-start/import-protection/tests/violations.utils.ts index 006c51543b..c08a9b7a82 100644 --- a/e2e/react-start/import-protection/tests/violations.utils.ts +++ b/e2e/react-start/import-protection/tests/violations.utils.ts @@ -21,15 +21,6 @@ export type Violation = { message?: string } -export type ViolationArtifact = 'build' | 'dev' | 'dev.cold' | 'dev.warm' - -export function getViolationArtifactName(artifact: ViolationArtifact): string { - const modeKey = process.env.E2E_MODE_KEY - return modeKey - ? `violations.${modeKey}.${artifact}.json` - : `violations.${artifact}.json` -} - export function stripAnsi(input: string): string { // eslint-disable-next-line no-control-regex return input.replace(/\u001b\[[0-9;]*m/g, '') diff --git a/e2e/react-start/import-protection/vite.config.ts b/e2e/react-start/import-protection/vite.config.ts index 6a17f3a7cd..3163ded433 100644 --- a/e2e/react-start/import-protection/vite.config.ts +++ b/e2e/react-start/import-protection/vite.config.ts @@ -8,43 +8,20 @@ const outDir = process.env.E2E_DIST_DIR ?? 'dist' const startModeConfig = getStartModeConfig() const bundledDev = process.env.E2E_VITE_BUNDLED_DEV === 'true' -const ISSUE_7725_DENIED_SPECIFIER = '../violations/issue-7725-server-fn-factory' - -export default defineConfig(({ command }) => { - const importProtection = - command === 'build' - ? { - ...startModeConfig.importProtection, - client: { - // Reproduce build-only issue #7725: resolving this imported - // server-fn builder must load import protection's mock virtual - // module, including its leading null-byte ID. - specifiers: [ISSUE_7725_DENIED_SPECIFIER], - }, - } - : startModeConfig.importProtection - - return { - resolve: { tsconfigPaths: true }, - experimental: bundledDev ? { bundledDev: true } : undefined, - build: { - outDir, - }, - server: { - port: 3000, - }, - plugins: [ - tanstackStart({ - ...startModeConfig, - importProtection, - }), - viteReact(), - ], - // react-tweet's package.json exports resolve to `index.client.js` which - // matches the default **/*.client.* deny pattern. Bundling it via - // noExternal must NOT trigger a false-positive import-protection violation. - ssr: { - noExternal: ['react-tweet'], - }, - } +export default defineConfig({ + resolve: { tsconfigPaths: true }, + experimental: bundledDev ? { bundledDev: true } : undefined, + build: { + outDir, + }, + server: { + port: 3000, + }, + plugins: [tanstackStart(startModeConfig), viteReact()], + // react-tweet's package.json exports resolve to `index.client.js` which + // matches the default **/*.client.* deny pattern. Bundling it via + // noExternal must NOT trigger a false-positive import-protection violation. + ssr: { + noExternal: ['react-tweet'], + }, }) diff --git a/e2e/react-start/issue-8049/package.json b/e2e/react-start/issue-8049/package.json deleted file mode 100644 index be848d434c..0000000000 --- a/e2e/react-start/issue-8049/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "tanstack-react-start-e2e-issue-8049", - "private": true, - "type": "module", - "scripts": { - "build": "vite build && tsc --noEmit", - "dev": "vite dev --port 3000", - "dev:e2e": "vite dev", - "test:e2e": "playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-router": "workspace:^", - "@tanstack/react-start": "workspace:^", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "vite": "^8.0.14" - } -} diff --git a/e2e/react-start/issue-8049/playwright.config.ts b/e2e/react-start/issue-8049/playwright.config.ts deleted file mode 100644 index 46bfbe552e..0000000000 --- a/e2e/react-start/issue-8049/playwright.config.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = - Number(process.env.VITE_SERVER_PORT) || Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { baseURL }, - webServer: { - command: `VITE_SERVER_PORT=${PORT} pnpm dev:e2e --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-start/issue-8049/src/routeTree.gen.ts b/e2e/react-start/issue-8049/src/routeTree.gen.ts deleted file mode 100644 index 9f42873a9b..0000000000 --- a/e2e/react-start/issue-8049/src/routeTree.gen.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as TestRouteImport } from './routes/test' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const TestRoute = TestRouteImport.update({ - id: '/test', - path: '/test', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/test': typeof TestRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/test': typeof TestRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/test': typeof TestRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/test' - fileRoutesByTo: FileRoutesByTo - to: '/' | '/test' - id: '__root__' | '/' | '/test' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - TestRoute: typeof TestRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/test': { - id: '/test' - path: '/test' - fullPath: '/test' - preLoaderRoute: typeof TestRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - TestRoute: TestRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - } -} diff --git a/e2e/react-start/issue-8049/src/router.tsx b/e2e/react-start/issue-8049/src/router.tsx deleted file mode 100644 index db215b280b..0000000000 --- a/e2e/react-start/issue-8049/src/router.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' - -export function getRouter() { - return createRouter({ - routeTree, - defaultPreload: 'intent', - defaultPreloadStaleTime: 0, - defaultPendingMs: 0, - defaultPendingMinMs: 0, - defaultPendingComponent: () =>
    Pending
    , - }) -} - -declare module '@tanstack/react-router' { - interface Register { - router: ReturnType - } -} diff --git a/e2e/react-start/issue-8049/src/routes/__root.tsx b/e2e/react-start/issue-8049/src/routes/__root.tsx deleted file mode 100644 index d04f508640..0000000000 --- a/e2e/react-start/issue-8049/src/routes/__root.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { - HeadContent, - Link, - Scripts, - createRootRoute, -} from '@tanstack/react-router' -import type { ReactNode } from 'react' - -export const Route = createRootRoute({ - head: () => ({ - meta: [ - { charSet: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - ], - }), - shellComponent: RootDocument, -}) - -function RootDocument({ children }: { children: ReactNode }) { - return ( - - - - - -
    - - {children} -
    - - - - ) -} diff --git a/e2e/react-start/issue-8049/src/routes/index.tsx b/e2e/react-start/issue-8049/src/routes/index.tsx deleted file mode 100644 index be54bce8de..0000000000 --- a/e2e/react-start/issue-8049/src/routes/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - component: () =>
    Home Page
    , -}) diff --git a/e2e/react-start/issue-8049/src/routes/test.tsx b/e2e/react-start/issue-8049/src/routes/test.tsx deleted file mode 100644 index cca03da69f..0000000000 --- a/e2e/react-start/issue-8049/src/routes/test.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/test')({ - component: () =>
    Test Page
    , -}) diff --git a/e2e/react-start/issue-8049/tests/issue-8049.spec.ts b/e2e/react-start/issue-8049/tests/issue-8049.spec.ts deleted file mode 100644 index 2560267109..0000000000 --- a/e2e/react-start/issue-8049/tests/issue-8049.spec.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('#8049: revisiting loaded split routes transitions without pending or blank paint', async ({ - page, -}) => { - await page.addInitScript(() => { - const scope = globalThis as typeof globalThis & { - __paintStates: Array - __recordPaintStates: boolean - } - scope.__paintStates = [] - scope.__recordPaintStates = false - - function recordPaintState() { - if (scope.__recordPaintStates) { - const state = document.querySelector('[data-state="home"]') - ? 'home' - : document.querySelector('[data-state="test"]') - ? 'test' - : document.querySelector('[data-state="pending"]') - ? 'pending' - : document.querySelector('[data-state="shell"]') - ? 'shell' - : 'empty' - scope.__paintStates.push(state) - } - requestAnimationFrame(recordPaintState) - } - - requestAnimationFrame(recordPaintState) - }) - await page.goto('/') - await expect(page.getByText('Home Page')).toBeVisible() - await page.waitForTimeout(1_000) - - await page.getByRole('link', { name: 'Test' }).click() - await expect(page.getByText('Test Page')).toBeVisible() - await page.getByRole('link', { name: 'Home' }).click() - await expect(page.getByText('Home Page')).toBeVisible() - - await page.evaluate( - () => - new Promise((resolve) => { - const scope = globalThis as typeof globalThis & { - __paintStates: Array - __recordPaintStates: boolean - } - scope.__paintStates = [] - scope.__recordPaintStates = true - requestAnimationFrame(() => resolve()) - }), - ) - - await page.getByRole('link', { name: 'Test' }).click() - await expect(page.getByText('Test Page')).toBeVisible() - const paintStates = await page.evaluate( - () => - new Promise>((resolve) => { - requestAnimationFrame(() => { - const scope = globalThis as typeof globalThis & { - __paintStates: Array - __recordPaintStates: boolean - } - scope.__recordPaintStates = false - resolve(scope.__paintStates) - }) - }), - ) - - expect(paintStates[0]).toBe('home') - expect(paintStates).toContain('test') - expect(paintStates).not.toContain('pending') - expect(paintStates).not.toContain('shell') - expect(paintStates).not.toContain('empty') -}) diff --git a/e2e/react-start/issue-8049/tsconfig.json b/e2e/react-start/issue-8049/tsconfig.json deleted file mode 100644 index 0a82952b9a..0000000000 --- a/e2e/react-start/issue-8049/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include": ["**/*.ts", "**/*.tsx"], - "compilerOptions": { - "strict": true, - "jsx": "react-jsx", - "target": "ESNext", - "moduleResolution": "Bundler", - "module": "ESNext", - "resolveJsonModule": true, - "skipLibCheck": true, - "noEmit": true - } -} diff --git a/e2e/react-start/issue-8049/vite.config.ts b/e2e/react-start/issue-8049/vite.config.ts deleted file mode 100644 index f13cf79861..0000000000 --- a/e2e/react-start/issue-8049/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import { tanstackStart } from '@tanstack/react-start/plugin/vite' -import viteReact from '@vitejs/plugin-react' - -export default defineConfig({ - plugins: [tanstackStart(), viteReact()], -}) diff --git a/e2e/react-start/query-integration/package.json b/e2e/react-start/query-integration/package.json index 694289ccc2..6a22be7871 100644 --- a/e2e/react-start/query-integration/package.json +++ b/e2e/react-start/query-integration/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/react-query": "^5.90.0", @@ -24,7 +24,7 @@ "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -32,8 +32,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/query-integration/playwright.config.ts b/e2e/react-start/query-integration/playwright.config.ts index 82678ac00b..4d86a1dbe7 100644 --- a/e2e/react-start/query-integration/playwright.config.ts +++ b/e2e/react-start/query-integration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { derivePort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await derivePort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/react-start/query-integration/src/routeTree.gen.ts b/e2e/react-start/query-integration/src/routeTree.gen.ts index ee7ef43f26..22c6f3293d 100644 --- a/e2e/react-start/query-integration/src/routeTree.gen.ts +++ b/e2e/react-start/query-integration/src/routeTree.gen.ts @@ -9,14 +9,14 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as UseQueryRouteImport } from './routes/useQuery' import { Route as UseSuspenseQueryRouteImport } from './routes/useSuspenseQuery' +import { Route as UseQueryRouteImport } from './routes/useQuery' +import { Route as IndexRouteImport } from './routes/index' import { Route as LoaderFetchQueryTypeRouteImport } from './routes/loader-fetchQuery/$type' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const UseSuspenseQueryRoute = UseSuspenseQueryRouteImport.update({ + id: '/useSuspenseQuery', + path: '/useSuspenseQuery', getParentRoute: () => rootRouteImport, } as any) const UseQueryRoute = UseQueryRouteImport.update({ @@ -24,9 +24,9 @@ const UseQueryRoute = UseQueryRouteImport.update({ path: '/useQuery', getParentRoute: () => rootRouteImport, } as any) -const UseSuspenseQueryRoute = UseSuspenseQueryRouteImport.update({ - id: '/useSuspenseQuery', - path: '/useSuspenseQuery', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const LoaderFetchQueryTypeRoute = LoaderFetchQueryTypeRouteImport.update({ @@ -80,11 +80,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/useSuspenseQuery': { + id: '/useSuspenseQuery' + path: '/useSuspenseQuery' + fullPath: '/useSuspenseQuery' + preLoaderRoute: typeof UseSuspenseQueryRouteImport parentRoute: typeof rootRouteImport } '/useQuery': { @@ -94,11 +94,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UseQueryRouteImport parentRoute: typeof rootRouteImport } - '/useSuspenseQuery': { - id: '/useSuspenseQuery' - path: '/useSuspenseQuery' - fullPath: '/useSuspenseQuery' - preLoaderRoute: typeof UseSuspenseQueryRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/loader-fetchQuery/$type': { diff --git a/e2e/react-start/response-reconciliation/.gitignore b/e2e/react-start/response-reconciliation/.gitignore deleted file mode 100644 index 16187ac1de..0000000000 --- a/e2e/react-start/response-reconciliation/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -node_modules -package-lock.json -yarn.lock - -.DS_Store -.cache -.tanstack -.env -.vercel -.output -/build/ -/api/ -/server/build -/public/build - -# Sentry Config File -.env.sentry-build-plugin -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ -/dist/ -/dist-*/ -/port-*.txt diff --git a/e2e/react-start/response-reconciliation/.prettierignore b/e2e/react-start/response-reconciliation/.prettierignore deleted file mode 100644 index 40a96e8819..0000000000 --- a/e2e/react-start/response-reconciliation/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -**/build -**/public -pnpm-lock.yaml -routeTree.gen.ts diff --git a/e2e/react-start/response-reconciliation/package.json b/e2e/react-start/response-reconciliation/package.json deleted file mode 100644 index 7ba0224962..0000000000 --- a/e2e/react-start/response-reconciliation/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "tanstack-react-start-e2e-response-reconciliation", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "dev": "pnpm dev:vite --port 3000", - "dev:e2e": "pnpm dev:vite", - "dev:vite": "vite dev", - "dev:rsbuild": "rsbuild dev", - "build": "pnpm build:vite", - "build:vite": "vite build && tsc --noEmit", - "build:rsbuild": "rsbuild build && tsc --noEmit", - "preview": "vite preview", - "start": "node server.js", - "test:e2e:local": "pnpm build && playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/react-router": "workspace:*", - "@tanstack/react-start": "workspace:*", - "react": "^19.2.3", - "react-dom": "^19.2.3" - }, - "devDependencies": { - "@playwright/test": "^1.57.0", - "@rsbuild/core": "^2.3.1", - "@rsbuild/plugin-react": "^2.0.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/node": "25.0.9", - "@types/react": "^19.2.8", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "typescript": "^6.0.2", - "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "parallelism": false - }, - "test:e2e--vite-ssr": { - "parallelism": false - }, - "test:e2e--vite-ssr--custom-entry": { - "parallelism": false - }, - "test:e2e--rsbuild-ssr": { - "parallelism": false - }, - "test:e2e--rsbuild-ssr--custom-entry": { - "parallelism": false - } - }, - "metadata": { - "playwrightModes": [ - { - "toolchain": "vite", - "mode": "ssr" - }, - { - "toolchain": "vite", - "mode": "ssr", - "name": "custom-entry", - "env": { - "TSS_E2E_SERVER_ENTRY": "server-entry" - } - }, - { - "toolchain": "rsbuild", - "mode": "ssr" - }, - { - "toolchain": "rsbuild", - "mode": "ssr", - "name": "custom-entry", - "env": { - "TSS_E2E_SERVER_ENTRY": "server-entry" - } - } - ] - } - } -} diff --git a/e2e/react-start/response-reconciliation/playwright.config.ts b/e2e/react-start/response-reconciliation/playwright.config.ts deleted file mode 100644 index d4c9c58f43..0000000000 --- a/e2e/react-start/response-reconciliation/playwright.config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite' -const distDir = process.env.E2E_DIST_DIR ?? 'dist' -const serverEntry = process.env.TSS_E2E_SERVER_ENTRY ?? '' - -export const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - use: { - baseURL, - }, - webServer: { - command: `pnpm start`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - env: { - PORT: String(PORT), - VITE_SERVER_PORT: String(PORT), - E2E_DIST_DIR: distDir, - E2E_TOOLCHAIN: toolchain, - TSS_E2E_SERVER_ENTRY: serverEntry, - }, - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/react-start/response-reconciliation/rsbuild.config.ts b/e2e/react-start/response-reconciliation/rsbuild.config.ts deleted file mode 100644 index 38f44ef9fb..0000000000 --- a/e2e/react-start/response-reconciliation/rsbuild.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defineConfig } from '@rsbuild/core' -import { pluginReact } from '@rsbuild/plugin-react' -import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' - -const serverEntry = process.env.TSS_E2E_SERVER_ENTRY -const outDir = process.env.E2E_DIST_DIR ?? 'dist' - -export default defineConfig({ - plugins: [ - pluginReact(), - tanstackStart({ - server: serverEntry ? { entry: serverEntry } : undefined, - }), - ], - output: { - distPath: { - root: outDir, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/server.js b/e2e/react-start/response-reconciliation/server.js deleted file mode 100644 index 324a462bec..0000000000 --- a/e2e/react-start/response-reconciliation/server.js +++ /dev/null @@ -1,62 +0,0 @@ -import fs from 'node:fs' -import path from 'node:path' -import { spawn } from 'node:child_process' -import { pathToFileURL } from 'node:url' - -const distDir = process.env.E2E_DIST_DIR || 'dist' - -function resolveDistClientDir() { - return path.resolve(distDir, 'client') -} - -function resolveDistServerEntryPath() { - if (process.env.TSS_E2E_SERVER_ENTRY) { - const customEntryPath = path.resolve( - distDir, - 'server', - `${process.env.TSS_E2E_SERVER_ENTRY}.js`, - ) - if (fs.existsSync(customEntryPath)) { - return customEntryPath - } - } - - const serverJsPath = path.resolve(distDir, 'server', 'server.js') - if (fs.existsSync(serverJsPath)) { - return serverJsPath - } - - const indexJsPath = path.resolve(distDir, 'server', 'index.js') - if (fs.existsSync(indexJsPath)) { - return indexJsPath - } - - return serverJsPath -} - -export function start() { - const child = spawn( - 'srvx', - ['--prod', '-s', resolveDistClientDir(), resolveDistServerEntryPath()], - { - stdio: 'inherit', - shell: process.platform === 'win32', - }, - ) - - child.on('exit', (code, signal) => { - if (signal) { - process.kill(process.pid, signal) - return - } - - process.exit(code ?? 0) - }) -} - -if ( - process.argv[1] && - import.meta.url === pathToFileURL(process.argv[1]).href -) { - start() -} diff --git a/e2e/react-start/response-reconciliation/src/components/DefaultCatchBoundary.tsx b/e2e/react-start/response-reconciliation/src/components/DefaultCatchBoundary.tsx deleted file mode 100644 index f3d691814f..0000000000 --- a/e2e/react-start/response-reconciliation/src/components/DefaultCatchBoundary.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { ErrorComponent, Link, useRouter } from '@tanstack/react-router' -import type { ErrorComponentProps } from '@tanstack/react-router' - -export function DefaultCatchBoundary({ error }: ErrorComponentProps) { - const router = useRouter() - - return ( -
    - - - Home -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/components/NotFound.tsx b/e2e/react-start/response-reconciliation/src/components/NotFound.tsx deleted file mode 100644 index 0b720f0e37..0000000000 --- a/e2e/react-start/response-reconciliation/src/components/NotFound.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { Link } from '@tanstack/react-router' - -export function NotFound({ children }: { children?: React.ReactNode }) { - return ( -
    - {children ||

    The page you are looking for does not exist.

    } - Start Over -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/response-wrapper.ts b/e2e/react-start/response-reconciliation/src/response-wrapper.ts deleted file mode 100644 index db9733d5e6..0000000000 --- a/e2e/react-start/response-reconciliation/src/response-wrapper.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { getRequestHeader } from '@tanstack/react-start/server' - -let installed = false - -/** - * Stand-in for libraries that wrap the global Response and pipe stream bodies, - * such as varlock's leak prevention: afterwards `new Response(stream).body` is - * a new stream that reads `stream`. Only requests that send - * `x-wrap-response: true` are affected. - */ -export function installResponseWrapper() { - if (installed) { - return - } - installed = true - globalThis.Response = new Proxy(globalThis.Response, { - construct(target, [body, init], newTarget) { - if (body instanceof ReadableStream && wrapsResponses()) { - body = body.pipeThrough(new TransformStream()) - } - return Reflect.construct(target, [body, init], newTarget) - }, - }) -} - -function wrapsResponses() { - try { - return getRequestHeader('x-wrap-response') === 'true' - } catch { - // Responses created outside a request are never wrapped. - return false - } -} diff --git a/e2e/react-start/response-reconciliation/src/routeTree.gen.ts b/e2e/react-start/response-reconciliation/src/routeTree.gen.ts deleted file mode 100644 index 3dbb6301c3..0000000000 --- a/e2e/react-start/response-reconciliation/src/routeTree.gen.ts +++ /dev/null @@ -1,625 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as ServerFunctionsRouteImport } from './routes/server-functions' -import { Route as SsrRouteImport } from './routes/ssr' -import { Route as StreamedRouteImport } from './routes/streamed' -import { Route as ApiBaseRouteImport } from './routes/api/base' -import { Route as ApiBulkHeadersRouteImport } from './routes/api/bulk-headers' -import { Route as ApiClearReturnedHeadersRouteImport } from './routes/api/clear-returned-headers' -import { Route as ApiDirectMutationVisibleRouteImport } from './routes/api/direct-mutation-visible' -import { Route as ApiExplicitSetCookieHeaderRouteImport } from './routes/api/explicit-set-cookie-header' -import { Route as ApiFramingErrorRouteImport } from './routes/api/framing-error' -import { Route as ApiGetResponseHeaderHelperRouteImport } from './routes/api/get-response-header-helper' -import { Route as ApiGetResponseHeadersHelperRouteImport } from './routes/api/get-response-headers-helper' -import { Route as ApiMultipleCookiesRouteImport } from './routes/api/multiple-cookies' -import { Route as ApiNullBodyStatusRouteImport } from './routes/api/null-body-status' -import { Route as ApiReadonlyAfterNextRouteImport } from './routes/api/readonly-after-next' -import { Route as ApiRedirectWithCookiesRouteImport } from './routes/api/redirect-with-cookies' -import { Route as ApiRemoveReturnedHeaderRouteImport } from './routes/api/remove-returned-header' -import { Route as ApiReplaceAfterDirectMutationRouteImport } from './routes/api/replace-after-direct-mutation' -import { Route as ApiReplaceExplicitSetCookieRouteImport } from './routes/api/replace-explicit-set-cookie' -import { Route as ApiRouteAfterNextRouteImport } from './routes/api/route-after-next' -import { Route as ApiRouteBeforeNextRouteImport } from './routes/api/route-before-next' -import { Route as ApiSameBoundaryConflictRouteImport } from './routes/api/same-boundary-conflict' -import { Route as ApiStatusContractsRouteImport } from './routes/api/status-contracts' -import { Route as ApiThrowAfterStatusRouteImport } from './routes/api/throw-after-status' -import { Route as ApiTrackedStreamRouteImport } from './routes/api/tracked-stream' -import { Route as ApiTrackedStreamStatusRouteImport } from './routes/api/tracked-stream-status' -import { Route as ApiTwoReturnedResponsesRouteImport } from './routes/api/two-returned-responses' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const ServerFunctionsRoute = ServerFunctionsRouteImport.update({ - id: '/server-functions', - path: '/server-functions', - getParentRoute: () => rootRouteImport, -} as any) -const SsrRoute = SsrRouteImport.update({ - id: '/ssr', - path: '/ssr', - getParentRoute: () => rootRouteImport, -} as any) -const StreamedRoute = StreamedRouteImport.update({ - id: '/streamed', - path: '/streamed', - getParentRoute: () => rootRouteImport, -} as any) -const ApiBaseRoute = ApiBaseRouteImport.update({ - id: '/api/base', - path: '/api/base', - getParentRoute: () => rootRouteImport, -} as any) -const ApiBulkHeadersRoute = ApiBulkHeadersRouteImport.update({ - id: '/api/bulk-headers', - path: '/api/bulk-headers', - getParentRoute: () => rootRouteImport, -} as any) -const ApiClearReturnedHeadersRoute = ApiClearReturnedHeadersRouteImport.update({ - id: '/api/clear-returned-headers', - path: '/api/clear-returned-headers', - getParentRoute: () => rootRouteImport, -} as any) -const ApiDirectMutationVisibleRoute = - ApiDirectMutationVisibleRouteImport.update({ - id: '/api/direct-mutation-visible', - path: '/api/direct-mutation-visible', - getParentRoute: () => rootRouteImport, - } as any) -const ApiExplicitSetCookieHeaderRoute = - ApiExplicitSetCookieHeaderRouteImport.update({ - id: '/api/explicit-set-cookie-header', - path: '/api/explicit-set-cookie-header', - getParentRoute: () => rootRouteImport, - } as any) -const ApiFramingErrorRoute = ApiFramingErrorRouteImport.update({ - id: '/api/framing-error', - path: '/api/framing-error', - getParentRoute: () => rootRouteImport, -} as any) -const ApiGetResponseHeaderHelperRoute = - ApiGetResponseHeaderHelperRouteImport.update({ - id: '/api/get-response-header-helper', - path: '/api/get-response-header-helper', - getParentRoute: () => rootRouteImport, - } as any) -const ApiGetResponseHeadersHelperRoute = - ApiGetResponseHeadersHelperRouteImport.update({ - id: '/api/get-response-headers-helper', - path: '/api/get-response-headers-helper', - getParentRoute: () => rootRouteImport, - } as any) -const ApiMultipleCookiesRoute = ApiMultipleCookiesRouteImport.update({ - id: '/api/multiple-cookies', - path: '/api/multiple-cookies', - getParentRoute: () => rootRouteImport, -} as any) -const ApiNullBodyStatusRoute = ApiNullBodyStatusRouteImport.update({ - id: '/api/null-body-status', - path: '/api/null-body-status', - getParentRoute: () => rootRouteImport, -} as any) -const ApiReadonlyAfterNextRoute = ApiReadonlyAfterNextRouteImport.update({ - id: '/api/readonly-after-next', - path: '/api/readonly-after-next', - getParentRoute: () => rootRouteImport, -} as any) -const ApiRedirectWithCookiesRoute = ApiRedirectWithCookiesRouteImport.update({ - id: '/api/redirect-with-cookies', - path: '/api/redirect-with-cookies', - getParentRoute: () => rootRouteImport, -} as any) -const ApiRemoveReturnedHeaderRoute = ApiRemoveReturnedHeaderRouteImport.update({ - id: '/api/remove-returned-header', - path: '/api/remove-returned-header', - getParentRoute: () => rootRouteImport, -} as any) -const ApiReplaceAfterDirectMutationRoute = - ApiReplaceAfterDirectMutationRouteImport.update({ - id: '/api/replace-after-direct-mutation', - path: '/api/replace-after-direct-mutation', - getParentRoute: () => rootRouteImport, - } as any) -const ApiReplaceExplicitSetCookieRoute = - ApiReplaceExplicitSetCookieRouteImport.update({ - id: '/api/replace-explicit-set-cookie', - path: '/api/replace-explicit-set-cookie', - getParentRoute: () => rootRouteImport, - } as any) -const ApiRouteAfterNextRoute = ApiRouteAfterNextRouteImport.update({ - id: '/api/route-after-next', - path: '/api/route-after-next', - getParentRoute: () => rootRouteImport, -} as any) -const ApiRouteBeforeNextRoute = ApiRouteBeforeNextRouteImport.update({ - id: '/api/route-before-next', - path: '/api/route-before-next', - getParentRoute: () => rootRouteImport, -} as any) -const ApiSameBoundaryConflictRoute = ApiSameBoundaryConflictRouteImport.update({ - id: '/api/same-boundary-conflict', - path: '/api/same-boundary-conflict', - getParentRoute: () => rootRouteImport, -} as any) -const ApiStatusContractsRoute = ApiStatusContractsRouteImport.update({ - id: '/api/status-contracts', - path: '/api/status-contracts', - getParentRoute: () => rootRouteImport, -} as any) -const ApiThrowAfterStatusRoute = ApiThrowAfterStatusRouteImport.update({ - id: '/api/throw-after-status', - path: '/api/throw-after-status', - getParentRoute: () => rootRouteImport, -} as any) -const ApiTrackedStreamRoute = ApiTrackedStreamRouteImport.update({ - id: '/api/tracked-stream', - path: '/api/tracked-stream', - getParentRoute: () => rootRouteImport, -} as any) -const ApiTrackedStreamStatusRoute = ApiTrackedStreamStatusRouteImport.update({ - id: '/api/tracked-stream-status', - path: '/api/tracked-stream-status', - getParentRoute: () => rootRouteImport, -} as any) -const ApiTwoReturnedResponsesRoute = ApiTwoReturnedResponsesRouteImport.update({ - id: '/api/two-returned-responses', - path: '/api/two-returned-responses', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/server-functions': typeof ServerFunctionsRoute - '/ssr': typeof SsrRoute - '/streamed': typeof StreamedRoute - '/api/base': typeof ApiBaseRoute - '/api/bulk-headers': typeof ApiBulkHeadersRoute - '/api/clear-returned-headers': typeof ApiClearReturnedHeadersRoute - '/api/direct-mutation-visible': typeof ApiDirectMutationVisibleRoute - '/api/explicit-set-cookie-header': typeof ApiExplicitSetCookieHeaderRoute - '/api/framing-error': typeof ApiFramingErrorRoute - '/api/get-response-header-helper': typeof ApiGetResponseHeaderHelperRoute - '/api/get-response-headers-helper': typeof ApiGetResponseHeadersHelperRoute - '/api/multiple-cookies': typeof ApiMultipleCookiesRoute - '/api/null-body-status': typeof ApiNullBodyStatusRoute - '/api/readonly-after-next': typeof ApiReadonlyAfterNextRoute - '/api/redirect-with-cookies': typeof ApiRedirectWithCookiesRoute - '/api/remove-returned-header': typeof ApiRemoveReturnedHeaderRoute - '/api/replace-after-direct-mutation': typeof ApiReplaceAfterDirectMutationRoute - '/api/replace-explicit-set-cookie': typeof ApiReplaceExplicitSetCookieRoute - '/api/route-after-next': typeof ApiRouteAfterNextRoute - '/api/route-before-next': typeof ApiRouteBeforeNextRoute - '/api/same-boundary-conflict': typeof ApiSameBoundaryConflictRoute - '/api/status-contracts': typeof ApiStatusContractsRoute - '/api/throw-after-status': typeof ApiThrowAfterStatusRoute - '/api/tracked-stream': typeof ApiTrackedStreamRoute - '/api/tracked-stream-status': typeof ApiTrackedStreamStatusRoute - '/api/two-returned-responses': typeof ApiTwoReturnedResponsesRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/server-functions': typeof ServerFunctionsRoute - '/ssr': typeof SsrRoute - '/streamed': typeof StreamedRoute - '/api/base': typeof ApiBaseRoute - '/api/bulk-headers': typeof ApiBulkHeadersRoute - '/api/clear-returned-headers': typeof ApiClearReturnedHeadersRoute - '/api/direct-mutation-visible': typeof ApiDirectMutationVisibleRoute - '/api/explicit-set-cookie-header': typeof ApiExplicitSetCookieHeaderRoute - '/api/framing-error': typeof ApiFramingErrorRoute - '/api/get-response-header-helper': typeof ApiGetResponseHeaderHelperRoute - '/api/get-response-headers-helper': typeof ApiGetResponseHeadersHelperRoute - '/api/multiple-cookies': typeof ApiMultipleCookiesRoute - '/api/null-body-status': typeof ApiNullBodyStatusRoute - '/api/readonly-after-next': typeof ApiReadonlyAfterNextRoute - '/api/redirect-with-cookies': typeof ApiRedirectWithCookiesRoute - '/api/remove-returned-header': typeof ApiRemoveReturnedHeaderRoute - '/api/replace-after-direct-mutation': typeof ApiReplaceAfterDirectMutationRoute - '/api/replace-explicit-set-cookie': typeof ApiReplaceExplicitSetCookieRoute - '/api/route-after-next': typeof ApiRouteAfterNextRoute - '/api/route-before-next': typeof ApiRouteBeforeNextRoute - '/api/same-boundary-conflict': typeof ApiSameBoundaryConflictRoute - '/api/status-contracts': typeof ApiStatusContractsRoute - '/api/throw-after-status': typeof ApiThrowAfterStatusRoute - '/api/tracked-stream': typeof ApiTrackedStreamRoute - '/api/tracked-stream-status': typeof ApiTrackedStreamStatusRoute - '/api/two-returned-responses': typeof ApiTwoReturnedResponsesRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/server-functions': typeof ServerFunctionsRoute - '/ssr': typeof SsrRoute - '/streamed': typeof StreamedRoute - '/api/base': typeof ApiBaseRoute - '/api/bulk-headers': typeof ApiBulkHeadersRoute - '/api/clear-returned-headers': typeof ApiClearReturnedHeadersRoute - '/api/direct-mutation-visible': typeof ApiDirectMutationVisibleRoute - '/api/explicit-set-cookie-header': typeof ApiExplicitSetCookieHeaderRoute - '/api/framing-error': typeof ApiFramingErrorRoute - '/api/get-response-header-helper': typeof ApiGetResponseHeaderHelperRoute - '/api/get-response-headers-helper': typeof ApiGetResponseHeadersHelperRoute - '/api/multiple-cookies': typeof ApiMultipleCookiesRoute - '/api/null-body-status': typeof ApiNullBodyStatusRoute - '/api/readonly-after-next': typeof ApiReadonlyAfterNextRoute - '/api/redirect-with-cookies': typeof ApiRedirectWithCookiesRoute - '/api/remove-returned-header': typeof ApiRemoveReturnedHeaderRoute - '/api/replace-after-direct-mutation': typeof ApiReplaceAfterDirectMutationRoute - '/api/replace-explicit-set-cookie': typeof ApiReplaceExplicitSetCookieRoute - '/api/route-after-next': typeof ApiRouteAfterNextRoute - '/api/route-before-next': typeof ApiRouteBeforeNextRoute - '/api/same-boundary-conflict': typeof ApiSameBoundaryConflictRoute - '/api/status-contracts': typeof ApiStatusContractsRoute - '/api/throw-after-status': typeof ApiThrowAfterStatusRoute - '/api/tracked-stream': typeof ApiTrackedStreamRoute - '/api/tracked-stream-status': typeof ApiTrackedStreamStatusRoute - '/api/two-returned-responses': typeof ApiTwoReturnedResponsesRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - | '/' - | '/server-functions' - | '/ssr' - | '/streamed' - | '/api/base' - | '/api/bulk-headers' - | '/api/clear-returned-headers' - | '/api/direct-mutation-visible' - | '/api/explicit-set-cookie-header' - | '/api/framing-error' - | '/api/get-response-header-helper' - | '/api/get-response-headers-helper' - | '/api/multiple-cookies' - | '/api/null-body-status' - | '/api/readonly-after-next' - | '/api/redirect-with-cookies' - | '/api/remove-returned-header' - | '/api/replace-after-direct-mutation' - | '/api/replace-explicit-set-cookie' - | '/api/route-after-next' - | '/api/route-before-next' - | '/api/same-boundary-conflict' - | '/api/status-contracts' - | '/api/throw-after-status' - | '/api/tracked-stream' - | '/api/tracked-stream-status' - | '/api/two-returned-responses' - fileRoutesByTo: FileRoutesByTo - to: - | '/' - | '/server-functions' - | '/ssr' - | '/streamed' - | '/api/base' - | '/api/bulk-headers' - | '/api/clear-returned-headers' - | '/api/direct-mutation-visible' - | '/api/explicit-set-cookie-header' - | '/api/framing-error' - | '/api/get-response-header-helper' - | '/api/get-response-headers-helper' - | '/api/multiple-cookies' - | '/api/null-body-status' - | '/api/readonly-after-next' - | '/api/redirect-with-cookies' - | '/api/remove-returned-header' - | '/api/replace-after-direct-mutation' - | '/api/replace-explicit-set-cookie' - | '/api/route-after-next' - | '/api/route-before-next' - | '/api/same-boundary-conflict' - | '/api/status-contracts' - | '/api/throw-after-status' - | '/api/tracked-stream' - | '/api/tracked-stream-status' - | '/api/two-returned-responses' - id: - | '__root__' - | '/' - | '/server-functions' - | '/ssr' - | '/streamed' - | '/api/base' - | '/api/bulk-headers' - | '/api/clear-returned-headers' - | '/api/direct-mutation-visible' - | '/api/explicit-set-cookie-header' - | '/api/framing-error' - | '/api/get-response-header-helper' - | '/api/get-response-headers-helper' - | '/api/multiple-cookies' - | '/api/null-body-status' - | '/api/readonly-after-next' - | '/api/redirect-with-cookies' - | '/api/remove-returned-header' - | '/api/replace-after-direct-mutation' - | '/api/replace-explicit-set-cookie' - | '/api/route-after-next' - | '/api/route-before-next' - | '/api/same-boundary-conflict' - | '/api/status-contracts' - | '/api/throw-after-status' - | '/api/tracked-stream' - | '/api/tracked-stream-status' - | '/api/two-returned-responses' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - ServerFunctionsRoute: typeof ServerFunctionsRoute - SsrRoute: typeof SsrRoute - StreamedRoute: typeof StreamedRoute - ApiBaseRoute: typeof ApiBaseRoute - ApiBulkHeadersRoute: typeof ApiBulkHeadersRoute - ApiClearReturnedHeadersRoute: typeof ApiClearReturnedHeadersRoute - ApiDirectMutationVisibleRoute: typeof ApiDirectMutationVisibleRoute - ApiExplicitSetCookieHeaderRoute: typeof ApiExplicitSetCookieHeaderRoute - ApiFramingErrorRoute: typeof ApiFramingErrorRoute - ApiGetResponseHeaderHelperRoute: typeof ApiGetResponseHeaderHelperRoute - ApiGetResponseHeadersHelperRoute: typeof ApiGetResponseHeadersHelperRoute - ApiMultipleCookiesRoute: typeof ApiMultipleCookiesRoute - ApiNullBodyStatusRoute: typeof ApiNullBodyStatusRoute - ApiReadonlyAfterNextRoute: typeof ApiReadonlyAfterNextRoute - ApiRedirectWithCookiesRoute: typeof ApiRedirectWithCookiesRoute - ApiRemoveReturnedHeaderRoute: typeof ApiRemoveReturnedHeaderRoute - ApiReplaceAfterDirectMutationRoute: typeof ApiReplaceAfterDirectMutationRoute - ApiReplaceExplicitSetCookieRoute: typeof ApiReplaceExplicitSetCookieRoute - ApiRouteAfterNextRoute: typeof ApiRouteAfterNextRoute - ApiRouteBeforeNextRoute: typeof ApiRouteBeforeNextRoute - ApiSameBoundaryConflictRoute: typeof ApiSameBoundaryConflictRoute - ApiStatusContractsRoute: typeof ApiStatusContractsRoute - ApiThrowAfterStatusRoute: typeof ApiThrowAfterStatusRoute - ApiTrackedStreamRoute: typeof ApiTrackedStreamRoute - ApiTrackedStreamStatusRoute: typeof ApiTrackedStreamStatusRoute - ApiTwoReturnedResponsesRoute: typeof ApiTwoReturnedResponsesRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/server-functions': { - id: '/server-functions' - path: '/server-functions' - fullPath: '/server-functions' - preLoaderRoute: typeof ServerFunctionsRouteImport - parentRoute: typeof rootRouteImport - } - '/ssr': { - id: '/ssr' - path: '/ssr' - fullPath: '/ssr' - preLoaderRoute: typeof SsrRouteImport - parentRoute: typeof rootRouteImport - } - '/streamed': { - id: '/streamed' - path: '/streamed' - fullPath: '/streamed' - preLoaderRoute: typeof StreamedRouteImport - parentRoute: typeof rootRouteImport - } - '/api/base': { - id: '/api/base' - path: '/api/base' - fullPath: '/api/base' - preLoaderRoute: typeof ApiBaseRouteImport - parentRoute: typeof rootRouteImport - } - '/api/bulk-headers': { - id: '/api/bulk-headers' - path: '/api/bulk-headers' - fullPath: '/api/bulk-headers' - preLoaderRoute: typeof ApiBulkHeadersRouteImport - parentRoute: typeof rootRouteImport - } - '/api/clear-returned-headers': { - id: '/api/clear-returned-headers' - path: '/api/clear-returned-headers' - fullPath: '/api/clear-returned-headers' - preLoaderRoute: typeof ApiClearReturnedHeadersRouteImport - parentRoute: typeof rootRouteImport - } - '/api/direct-mutation-visible': { - id: '/api/direct-mutation-visible' - path: '/api/direct-mutation-visible' - fullPath: '/api/direct-mutation-visible' - preLoaderRoute: typeof ApiDirectMutationVisibleRouteImport - parentRoute: typeof rootRouteImport - } - '/api/explicit-set-cookie-header': { - id: '/api/explicit-set-cookie-header' - path: '/api/explicit-set-cookie-header' - fullPath: '/api/explicit-set-cookie-header' - preLoaderRoute: typeof ApiExplicitSetCookieHeaderRouteImport - parentRoute: typeof rootRouteImport - } - '/api/framing-error': { - id: '/api/framing-error' - path: '/api/framing-error' - fullPath: '/api/framing-error' - preLoaderRoute: typeof ApiFramingErrorRouteImport - parentRoute: typeof rootRouteImport - } - '/api/get-response-header-helper': { - id: '/api/get-response-header-helper' - path: '/api/get-response-header-helper' - fullPath: '/api/get-response-header-helper' - preLoaderRoute: typeof ApiGetResponseHeaderHelperRouteImport - parentRoute: typeof rootRouteImport - } - '/api/get-response-headers-helper': { - id: '/api/get-response-headers-helper' - path: '/api/get-response-headers-helper' - fullPath: '/api/get-response-headers-helper' - preLoaderRoute: typeof ApiGetResponseHeadersHelperRouteImport - parentRoute: typeof rootRouteImport - } - '/api/multiple-cookies': { - id: '/api/multiple-cookies' - path: '/api/multiple-cookies' - fullPath: '/api/multiple-cookies' - preLoaderRoute: typeof ApiMultipleCookiesRouteImport - parentRoute: typeof rootRouteImport - } - '/api/null-body-status': { - id: '/api/null-body-status' - path: '/api/null-body-status' - fullPath: '/api/null-body-status' - preLoaderRoute: typeof ApiNullBodyStatusRouteImport - parentRoute: typeof rootRouteImport - } - '/api/readonly-after-next': { - id: '/api/readonly-after-next' - path: '/api/readonly-after-next' - fullPath: '/api/readonly-after-next' - preLoaderRoute: typeof ApiReadonlyAfterNextRouteImport - parentRoute: typeof rootRouteImport - } - '/api/redirect-with-cookies': { - id: '/api/redirect-with-cookies' - path: '/api/redirect-with-cookies' - fullPath: '/api/redirect-with-cookies' - preLoaderRoute: typeof ApiRedirectWithCookiesRouteImport - parentRoute: typeof rootRouteImport - } - '/api/remove-returned-header': { - id: '/api/remove-returned-header' - path: '/api/remove-returned-header' - fullPath: '/api/remove-returned-header' - preLoaderRoute: typeof ApiRemoveReturnedHeaderRouteImport - parentRoute: typeof rootRouteImport - } - '/api/replace-after-direct-mutation': { - id: '/api/replace-after-direct-mutation' - path: '/api/replace-after-direct-mutation' - fullPath: '/api/replace-after-direct-mutation' - preLoaderRoute: typeof ApiReplaceAfterDirectMutationRouteImport - parentRoute: typeof rootRouteImport - } - '/api/replace-explicit-set-cookie': { - id: '/api/replace-explicit-set-cookie' - path: '/api/replace-explicit-set-cookie' - fullPath: '/api/replace-explicit-set-cookie' - preLoaderRoute: typeof ApiReplaceExplicitSetCookieRouteImport - parentRoute: typeof rootRouteImport - } - '/api/route-after-next': { - id: '/api/route-after-next' - path: '/api/route-after-next' - fullPath: '/api/route-after-next' - preLoaderRoute: typeof ApiRouteAfterNextRouteImport - parentRoute: typeof rootRouteImport - } - '/api/route-before-next': { - id: '/api/route-before-next' - path: '/api/route-before-next' - fullPath: '/api/route-before-next' - preLoaderRoute: typeof ApiRouteBeforeNextRouteImport - parentRoute: typeof rootRouteImport - } - '/api/same-boundary-conflict': { - id: '/api/same-boundary-conflict' - path: '/api/same-boundary-conflict' - fullPath: '/api/same-boundary-conflict' - preLoaderRoute: typeof ApiSameBoundaryConflictRouteImport - parentRoute: typeof rootRouteImport - } - '/api/status-contracts': { - id: '/api/status-contracts' - path: '/api/status-contracts' - fullPath: '/api/status-contracts' - preLoaderRoute: typeof ApiStatusContractsRouteImport - parentRoute: typeof rootRouteImport - } - '/api/throw-after-status': { - id: '/api/throw-after-status' - path: '/api/throw-after-status' - fullPath: '/api/throw-after-status' - preLoaderRoute: typeof ApiThrowAfterStatusRouteImport - parentRoute: typeof rootRouteImport - } - '/api/tracked-stream': { - id: '/api/tracked-stream' - path: '/api/tracked-stream' - fullPath: '/api/tracked-stream' - preLoaderRoute: typeof ApiTrackedStreamRouteImport - parentRoute: typeof rootRouteImport - } - '/api/tracked-stream-status': { - id: '/api/tracked-stream-status' - path: '/api/tracked-stream-status' - fullPath: '/api/tracked-stream-status' - preLoaderRoute: typeof ApiTrackedStreamStatusRouteImport - parentRoute: typeof rootRouteImport - } - '/api/two-returned-responses': { - id: '/api/two-returned-responses' - path: '/api/two-returned-responses' - fullPath: '/api/two-returned-responses' - preLoaderRoute: typeof ApiTwoReturnedResponsesRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - ServerFunctionsRoute: ServerFunctionsRoute, - SsrRoute: SsrRoute, - StreamedRoute: StreamedRoute, - ApiBaseRoute: ApiBaseRoute, - ApiBulkHeadersRoute: ApiBulkHeadersRoute, - ApiClearReturnedHeadersRoute: ApiClearReturnedHeadersRoute, - ApiDirectMutationVisibleRoute: ApiDirectMutationVisibleRoute, - ApiExplicitSetCookieHeaderRoute: ApiExplicitSetCookieHeaderRoute, - ApiFramingErrorRoute: ApiFramingErrorRoute, - ApiGetResponseHeaderHelperRoute: ApiGetResponseHeaderHelperRoute, - ApiGetResponseHeadersHelperRoute: ApiGetResponseHeadersHelperRoute, - ApiMultipleCookiesRoute: ApiMultipleCookiesRoute, - ApiNullBodyStatusRoute: ApiNullBodyStatusRoute, - ApiReadonlyAfterNextRoute: ApiReadonlyAfterNextRoute, - ApiRedirectWithCookiesRoute: ApiRedirectWithCookiesRoute, - ApiRemoveReturnedHeaderRoute: ApiRemoveReturnedHeaderRoute, - ApiReplaceAfterDirectMutationRoute: ApiReplaceAfterDirectMutationRoute, - ApiReplaceExplicitSetCookieRoute: ApiReplaceExplicitSetCookieRoute, - ApiRouteAfterNextRoute: ApiRouteAfterNextRoute, - ApiRouteBeforeNextRoute: ApiRouteBeforeNextRoute, - ApiSameBoundaryConflictRoute: ApiSameBoundaryConflictRoute, - ApiStatusContractsRoute: ApiStatusContractsRoute, - ApiThrowAfterStatusRoute: ApiThrowAfterStatusRoute, - ApiTrackedStreamRoute: ApiTrackedStreamRoute, - ApiTrackedStreamStatusRoute: ApiTrackedStreamStatusRoute, - ApiTwoReturnedResponsesRoute: ApiTwoReturnedResponsesRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - config: Awaited> - } -} diff --git a/e2e/react-start/response-reconciliation/src/router.tsx b/e2e/react-start/response-reconciliation/src/router.tsx deleted file mode 100644 index c5c2209e5a..0000000000 --- a/e2e/react-start/response-reconciliation/src/router.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' -import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' -import { NotFound } from './components/NotFound' - -export function getRouter() { - return createRouter({ - routeTree, - defaultErrorComponent: DefaultCatchBoundary, - defaultNotFoundComponent: () => , - scrollRestoration: true, - }) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/__root.tsx b/e2e/react-start/response-reconciliation/src/routes/__root.tsx deleted file mode 100644 index a562991887..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/__root.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/// -import * as React from 'react' -import { - HeadContent, - Link, - Outlet, - Scripts, - createRootRoute, -} from '@tanstack/react-router' -import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' -import { NotFound } from '~/components/NotFound' -import '~/styles/app.css' - -export const Route = createRootRoute({ - head: () => ({ - meta: [ - { charSet: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - ], - }), - errorComponent: (props) => { - return ( - - - - ) - }, - notFoundComponent: () => , - component: RootComponent, -}) - -function RootComponent() { - return ( - - - - ) -} - -function RootDocument({ children }: { children: React.ReactNode }) { - return ( - - - - - - - {children} - - - - ) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/api/-response.ts b/e2e/react-start/response-reconciliation/src/routes/api/-response.ts deleted file mode 100644 index 54082c10f6..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/-response.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { createMiddleware } from '@tanstack/react-start' -import { - getResponseHeader, - setResponseHeader, - setResponseStatus, -} from '@tanstack/react-start/server' - -function getScenario(request: Request) { - const url = new URL(request.url) - return url.pathname.split('/').pop() || '' -} - -export function baseResponse(scenario: string) { - return new Response(scenario, { - headers: { 'x-handler': scenario, 'x-base': 'yes' }, - }) -} - -export const routeBoundaryMiddleware = createMiddleware().server( - async ({ next, request }) => { - const scenario = getScenario(request) - - if (scenario === 'route-before-next') { - setResponseHeader('x-route-before', 'yes') - setResponseStatus(234, 'route-before') - return next() - } - - if (scenario === 'route-after-next') { - const result = await next() - setResponseHeader('x-route-after', 'yes') - setResponseStatus(233, 'route-after') - return result - } - - if (scenario === 'direct-mutation-visible') { - const result = await next() - result.response.headers.set('x-direct-visible', 'yes') - setResponseHeader( - 'x-direct-read', - getResponseHeader('x-direct-visible') || 'missing', - ) - return result - } - - if (scenario === 'replace-after-direct-mutation') { - const result = await next() - result.response.headers.set('x-direct-a', 'yes') - setResponseHeader('x-helper-delta', 'yes') - return new Response('replacement', { - status: 202, - headers: { 'x-response-b': 'yes' }, - }) - } - - if (scenario === 'two-returned-responses') { - await next() - setResponseHeader('x-helper-after-a', 'yes') - return new Response('response-b', { - headers: { 'x-response-b': 'yes' }, - }) - } - - if (scenario === 'readonly-after-next') { - const result = await next() - setResponseHeader('x-readonly-after', 'yes') - return result - } - - return next() - }, -) - -export const returnedResponseMiddleware = createMiddleware().server( - async ({ next, request }) => { - if (getScenario(request) === 'two-returned-responses') { - await next() - return new Response('response-a', { - headers: { 'x-response-a': 'yes' }, - }) - } - - return next() - }, -) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/-tracked-streams.ts b/e2e/react-start/response-reconciliation/src/routes/api/-tracked-streams.ts deleted file mode 100644 index 1ccde76367..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/-tracked-streams.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Ids of tracked response streams that were cancelled, kept by the server. -export const cancelledStreams = new Set() diff --git a/e2e/react-start/response-reconciliation/src/routes/api/-upstream.ts b/e2e/react-start/response-reconciliation/src/routes/api/-upstream.ts deleted file mode 100644 index 0018376035..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/-upstream.ts +++ /dev/null @@ -1,14 +0,0 @@ -// An upstream reply whose headers describe its own body and client. Start must -// not copy them onto the error body it generates for this failure. -export function createUpstreamFailure() { - return new Response('

    upstream

    ', { - status: 502, - headers: { - 'content-encoding': 'gzip', - 'content-length': '999', - 'content-type': 'text/html', - 'set-cookie': 'upstream-session=leaked; Path=/', - 'x-upstream': 'yes', - }, - }) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/api/base.ts b/e2e/react-start/response-reconciliation/src/routes/api/base.ts deleted file mode 100644 index 62f706a9f1..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/base.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { baseResponse } from './-response' - -export const Route = createFileRoute('/api/base')({ - server: { - handlers: { - GET: () => baseResponse('base'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/bulk-headers.ts b/e2e/react-start/response-reconciliation/src/routes/api/bulk-headers.ts deleted file mode 100644 index db7ded6c54..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/bulk-headers.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseHeaders } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/bulk-headers')({ - server: { - handlers: { - GET: () => { - const headers = new Headers({ - 'x-bulk-one': '1', - 'x-bulk-two': '2', - }) - headers.append('set-cookie', 'bulk-one=1; Path=/') - headers.append('set-cookie', 'bulk-two=2; Path=/') - setResponseHeaders(headers) - return new Response('bulk', { headers: { 'x-keep': 'yes' } }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/clear-returned-headers.ts b/e2e/react-start/response-reconciliation/src/routes/api/clear-returned-headers.ts deleted file mode 100644 index fd3b88c172..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/clear-returned-headers.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { clearResponseHeaders } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/clear-returned-headers')({ - server: { - handlers: { - GET: () => { - clearResponseHeaders() - return new Response('clear', { - headers: { 'x-clear-one': '1', 'x-clear-two': '2' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/direct-mutation-visible.ts b/e2e/react-start/response-reconciliation/src/routes/api/direct-mutation-visible.ts deleted file mode 100644 index 96823887e5..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/direct-mutation-visible.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { baseResponse, routeBoundaryMiddleware } from './-response' - -export const Route = createFileRoute('/api/direct-mutation-visible')({ - server: { - middleware: [routeBoundaryMiddleware], - handlers: { - GET: () => baseResponse('direct-mutation-visible'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/explicit-set-cookie-header.ts b/e2e/react-start/response-reconciliation/src/routes/api/explicit-set-cookie-header.ts deleted file mode 100644 index 3ea2bc6d75..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/explicit-set-cookie-header.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseHeader } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/explicit-set-cookie-header')({ - server: { - handlers: { - GET: () => { - setResponseHeader('set-cookie', [ - 'explicit-one=1; Path=/', - 'explicit-two=2; Path=/', - ]) - return new Response('explicit') - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/framing-error.ts b/e2e/react-start/response-reconciliation/src/routes/api/framing-error.ts deleted file mode 100644 index baeab15780..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/framing-error.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseHeader } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/framing-error')({ - server: { - handlers: { - GET: async () => { - // Headers for a compressed file whose read then fails. - setResponseHeader('content-encoding', 'gzip') - setResponseHeader('content-length', '2') - await Promise.resolve() - throw new Error('File read failed') - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/get-response-header-helper.ts b/e2e/react-start/response-reconciliation/src/routes/api/get-response-header-helper.ts deleted file mode 100644 index b597882ff6..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/get-response-header-helper.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { - getResponseHeader, - setResponseHeader, -} from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/get-response-header-helper')({ - server: { - handlers: { - GET: () => { - setResponseHeader('x-helper-visible', 'yes') - const value = getResponseHeader('x-helper-visible') || 'missing' - return new Response(value, { headers: { 'x-read-after-set': value } }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/get-response-headers-helper.ts b/e2e/react-start/response-reconciliation/src/routes/api/get-response-headers-helper.ts deleted file mode 100644 index 168d38bad4..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/get-response-headers-helper.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { - getResponseHeaders, - setResponseHeader, -} from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/get-response-headers-helper')({ - server: { - handlers: { - GET: () => { - setResponseHeader('x-headers-helper-visible', 'yes') - // Exercise an untyped caller mutating its detached snapshot. - const headers = getResponseHeaders() as Headers - const value = headers.get('x-headers-helper-visible') || 'missing' - headers.set('x-headers-snapshot-write', 'ignored') - return new Response(value, { headers: { 'x-headers-read': value } }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/multiple-cookies.ts b/e2e/react-start/response-reconciliation/src/routes/api/multiple-cookies.ts deleted file mode 100644 index eebf7a167e..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/multiple-cookies.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setCookie } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/multiple-cookies')({ - server: { - handlers: { - GET: () => { - setCookie('route-one', '1', { path: '/' }) - setCookie('route-two', '2', { path: '/' }) - return new Response('cookies') - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/null-body-status.ts b/e2e/react-start/response-reconciliation/src/routes/api/null-body-status.ts deleted file mode 100644 index d11056e7a8..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/null-body-status.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseStatus } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/null-body-status')({ - server: { - handlers: { - GET: ({ request }) => { - const statusParam = new URL(request.url).searchParams.get('status') - const status = - statusParam === '205' ? 205 : statusParam === '304' ? 304 : 204 - setResponseStatus(status) - return new Response('should-drop', { - headers: { 'x-null-body': 'yes' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/readonly-after-next.ts b/e2e/react-start/response-reconciliation/src/routes/api/readonly-after-next.ts deleted file mode 100644 index 7b42955052..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/readonly-after-next.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { routeBoundaryMiddleware } from './-response' - -export const Route = createFileRoute('/api/readonly-after-next')({ - server: { - middleware: [routeBoundaryMiddleware], - handlers: { - GET: () => fetch('data:text/plain,readonly'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/redirect-with-cookies.ts b/e2e/react-start/response-reconciliation/src/routes/api/redirect-with-cookies.ts deleted file mode 100644 index 5b0072f35a..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/redirect-with-cookies.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setCookie } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/redirect-with-cookies')({ - server: { - handlers: { - GET: () => { - setCookie('redirect-one', '1', { path: '/' }) - setCookie('redirect-two', '2', { path: '/' }) - setCookie('redirect-three', '3', { path: '/' }) - return new Response(null, { - status: 307, - headers: { Location: '/api/base' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/remove-returned-header.ts b/e2e/react-start/response-reconciliation/src/routes/api/remove-returned-header.ts deleted file mode 100644 index 96f82bf98d..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/remove-returned-header.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { removeResponseHeader } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/remove-returned-header')({ - server: { - handlers: { - GET: () => { - removeResponseHeader('x-remove-me') - return new Response('remove', { - headers: { 'x-remove-me': 'response', 'x-keep': 'yes' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/replace-after-direct-mutation.ts b/e2e/react-start/response-reconciliation/src/routes/api/replace-after-direct-mutation.ts deleted file mode 100644 index 890280483d..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/replace-after-direct-mutation.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { baseResponse, routeBoundaryMiddleware } from './-response' - -export const Route = createFileRoute('/api/replace-after-direct-mutation')({ - server: { - middleware: [routeBoundaryMiddleware], - handlers: { - GET: () => baseResponse('replace-after-direct-mutation'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/replace-explicit-set-cookie.ts b/e2e/react-start/response-reconciliation/src/routes/api/replace-explicit-set-cookie.ts deleted file mode 100644 index 97df27d915..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/replace-explicit-set-cookie.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseHeader } from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/replace-explicit-set-cookie')({ - server: { - handlers: { - GET: () => { - setResponseHeader('set-cookie', 'explicit-new=1; Path=/') - return new Response('explicit', { - headers: { 'set-cookie': 'explicit-old=1; Path=/' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/route-after-next.ts b/e2e/react-start/response-reconciliation/src/routes/api/route-after-next.ts deleted file mode 100644 index 7d3650147f..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/route-after-next.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { baseResponse, routeBoundaryMiddleware } from './-response' - -export const Route = createFileRoute('/api/route-after-next')({ - server: { - middleware: [routeBoundaryMiddleware], - handlers: { - GET: () => baseResponse('route-after-next'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/route-before-next.ts b/e2e/react-start/response-reconciliation/src/routes/api/route-before-next.ts deleted file mode 100644 index b52c7642af..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/route-before-next.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { baseResponse, routeBoundaryMiddleware } from './-response' - -export const Route = createFileRoute('/api/route-before-next')({ - server: { - middleware: [routeBoundaryMiddleware], - handlers: { - GET: () => baseResponse('route-before-next'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/same-boundary-conflict.ts b/e2e/react-start/response-reconciliation/src/routes/api/same-boundary-conflict.ts deleted file mode 100644 index 7ac086d652..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/same-boundary-conflict.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { - setResponseHeader, - setResponseStatus, -} from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/same-boundary-conflict')({ - server: { - handlers: { - GET: () => { - setResponseStatus(235, 'same-boundary') - setResponseHeader('x-conflict', 'helper') - return new Response('conflict', { - status: 201, - statusText: 'response-status', - headers: { 'x-conflict': 'response' }, - }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/status-contracts.ts b/e2e/react-start/response-reconciliation/src/routes/api/status-contracts.ts deleted file mode 100644 index 43fd72ec07..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/status-contracts.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { setResponseStatus } from '@tanstack/react-start/server' -import { createUpstreamFailure } from './-upstream' - -export const Route = createFileRoute('/api/status-contracts')({ - server: { - handlers: { - GET: async ({ request }) => { - const scenario = new URL(request.url).searchParams.get('scenario') - - if (scenario === 'invalid-status-return') { - setResponseStatus(999, 'Ignored') - return new Response('missing', { - status: 404, - statusText: 'Not Found', - }) - } - - if (scenario === 'invalid-status-throw') { - setResponseStatus(101) - throw new Error('Unexpected status contract failure') - } - - if (scenario === 'slow') { - await new Promise((resolve) => setTimeout(resolve, 150)) - return new Response('slow result') - } - - if (scenario === 'helper-success-crash') { - setResponseStatus(201, 'Created') - throw new Error('Crash after a success status') - } - - if (scenario === 'upstream-error-cause') { - throw new Error('Upstream failed', { cause: createUpstreamFailure() }) - } - - return new Response(`Unknown scenario: ${scenario}`, { status: 400 }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/throw-after-status.ts b/e2e/react-start/response-reconciliation/src/routes/api/throw-after-status.ts deleted file mode 100644 index 9d93d75b61..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/throw-after-status.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { - setCookie, - setResponseHeader, - setResponseStatus, -} from '@tanstack/react-start/server' - -export const Route = createFileRoute('/api/throw-after-status')({ - server: { - handlers: { - GET: ({ request }) => { - const url = new URL(request.url) - setResponseStatus(401, 'Unauthorized') - setResponseHeader('x-error-helper', 'yes') - setCookie('throw-after-status', '1', { path: '/' }) - if (url.searchParams.get('throw') === 'response') { - throw new Response('Unauthorized response', { - status: 200, - headers: { 'x-thrown-response': 'yes' }, - }) - } - throw new Error('Unauthorized route') - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream-status.ts b/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream-status.ts deleted file mode 100644 index 1aaffd8d36..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream-status.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { cancelledStreams } from './-tracked-streams' - -export const Route = createFileRoute('/api/tracked-stream-status')({ - server: { - handlers: { - GET: ({ request }) => { - const id = new URL(request.url).searchParams.get('id') ?? '' - return Response.json({ cancelled: cancelledStreams.has(id) }) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream.ts b/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream.ts deleted file mode 100644 index 640074a035..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/tracked-stream.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { cancelledStreams } from './-tracked-streams' - -export const Route = createFileRoute('/api/tracked-stream')({ - server: { - handlers: { - // A body that never ends, like a live feed. Only cancellation stops it. - GET: ({ request }) => { - const id = new URL(request.url).searchParams.get('id') ?? '' - return new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('tracked')) - }, - cancel() { - cancelledStreams.add(id) - }, - }), - ) - }, - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/api/two-returned-responses.ts b/e2e/react-start/response-reconciliation/src/routes/api/two-returned-responses.ts deleted file mode 100644 index f433778fd8..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/api/two-returned-responses.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { - baseResponse, - returnedResponseMiddleware, - routeBoundaryMiddleware, -} from './-response' - -export const Route = createFileRoute('/api/two-returned-responses')({ - server: { - middleware: [routeBoundaryMiddleware, returnedResponseMiddleware], - handlers: { - GET: () => baseResponse('two-returned-responses'), - }, - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/routes/index.tsx b/e2e/react-start/response-reconciliation/src/routes/index.tsx deleted file mode 100644 index ab938397e9..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - headers: () => ({ 'x-route-header': 'present' }), - component: Home, -}) - -function Home() { - return ( -
    -

    Response Reconciliation E2E

    -

    This app contains HTTP-level regression tests.

    -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/server-functions.tsx b/e2e/react-start/response-reconciliation/src/routes/server-functions.tsx deleted file mode 100644 index 580309b31e..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/server-functions.tsx +++ /dev/null @@ -1,285 +0,0 @@ -import { ClientOnly, createFileRoute, redirect } from '@tanstack/react-router' -import { - createMiddleware, - createServerFn, - useServerFn, -} from '@tanstack/react-start' -import * as React from 'react' -import { - getResponseHeader, - setCookie, - setResponseHeader, - setResponseHeaders, - setResponseStatus, -} from '@tanstack/react-start/server' - -const functionAfterNextMiddleware = createMiddleware({ - type: 'function', -}).server(async ({ next }) => { - const result = await next() - setResponseHeader('x-function-after', 'yes') - setResponseStatus(236, 'function-after') - return result -}) - -const rawResponseAfterNextMiddleware = createMiddleware({ - type: 'function', -}).server(async ({ next }) => { - const result = await next() - setResponseHeader('x-function-raw-after', 'yes') - setResponseStatus(237, 'function-raw-after') - return result -}) - -const throwStatusMiddleware = createMiddleware({ - type: 'function', -}).server(() => { - setResponseStatus(401, 'Unauthorized') - setResponseHeader('x-function-error-middleware', 'yes') - throw new Error('Unauthorized function middleware') -}) - -const replacementMiddleware = createMiddleware({ - type: 'function', -}).server(async ({ next }) => { - const result = await next() - const resultWithResponse = result as typeof result & { result?: unknown } - if (!(resultWithResponse.result instanceof Response)) { - throw new Error('Expected replacement test to observe a Response') - } - resultWithResponse.result.headers.set('x-function-a', 'yes') - setResponseHeader('x-function-helper-delta', 'yes') - // Function middleware types don't model raw Response replacement, but the - // middleware executor supports it; this fixture deliberately exercises that - // runtime path. - return new Response('function-b', { - headers: { 'x-function-b': 'yes' }, - }) as never -}) - -const globalSerializedFn = createServerFn().handler(() => { - return { ok: true } -}) - -const functionAfterNextFn = createServerFn() - .middleware([functionAfterNextMiddleware]) - .handler(() => { - return { ok: true } - }) - -const rawResponseAfterNextFn = createServerFn() - .middleware([rawResponseAfterNextMiddleware]) - .handler(() => { - return new Response('raw function body', { - headers: { 'x-function-raw': 'yes' }, - }) - }) - -const replacementFn = createServerFn() - .middleware([replacementMiddleware]) - .handler(() => { - return new Response('function-a') - }) - -const multipleCookiesFn = createServerFn().handler(() => { - setCookie('fn-one', '1', { path: '/' }) - setCookie('fn-two', '2', { path: '/' }) - return { ok: true } -}) - -const rawMultipleCookiesFn = createServerFn().handler(() => { - setCookie('fn-raw-helper-one', '1', { path: '/' }) - setCookie('fn-raw-helper-two', '2', { path: '/' }) - const headers = new Headers() - headers.append('set-cookie', 'fn-raw-returned-one=1; Path=/') - headers.append('set-cookie', 'fn-raw-returned-two=2; Path=/') - return new Response('raw cookie body', { headers }) -}) - -const explicitCookieHeaderFn = createServerFn().handler(() => { - setResponseHeader('set-cookie', [ - 'fn-explicit-one=1; Path=/', - 'fn-explicit-two=2; Path=/', - ]) - return { ok: true } -}) - -const throwAfterStatusFn = createServerFn().handler(() => { - setResponseStatus(401, 'Unauthorized') - setResponseHeader('x-function-error', 'yes') - throw new Error('Unauthorized function') -}) - -const throwAfterFramingFn = createServerFn().handler(async () => { - // Headers for a compressed file whose read then fails. - setResponseHeader('content-encoding', 'gzip') - setResponseHeader('content-length', '2') - await Promise.resolve() - throw new Error('File read failed') -}) - -const throwAfterMiddlewareStatusFn = createServerFn() - .middleware([throwStatusMiddleware]) - .handler(() => { - return { ok: true } - }) - -const transportProtectedFn = createServerFn().handler(() => { - setResponseHeaders( - new Headers({ - 'content-type': 'text/plain', - 'x-tss-serialized': 'false', - 'x-user-header': 'yes', - }), - ) - return { ok: true } -}) - -const readAfterSetFn = createServerFn().handler(() => { - setResponseHeader('x-read-after-set', 'yes') - setResponseHeader( - 'x-read-after-set-value', - getResponseHeader('x-read-after-set') || 'missing', - ) - return { ok: true } -}) - -const returnRedirectFn = createServerFn().handler(() => { - setResponseStatus(302, 'Continue') - setResponseHeaders( - new Headers({ - 'content-type': 'text/plain', - 'x-tss-raw': 'true', - 'x-tss-serialized': 'true', - location: '/middleware-target', - }), - ) - setCookie('rpc-redirect', 'committed', { path: '/' }) - return redirect({ to: '/' }) -}) - -const throwRedirectFn = createServerFn().handler(() => { - setResponseStatus(302, 'Continue') - setResponseHeaders( - new Headers({ - 'content-type': 'text/plain', - 'x-tss-raw': 'true', - 'x-tss-serialized': 'true', - location: '/middleware-target', - }), - ) - setCookie('rpc-redirect', 'committed', { path: '/' }) - throw redirect({ to: '/' }) -}) - -const bodylessStatusFn = createServerFn().handler(() => { - setResponseStatus(204, 'No Content') - setResponseHeader('x-bodyless-status', 'ignored') - return { ok: true } -}) - -const throwZeroFn = createServerFn().handler(() => { - throw 0 -}) - -const throwResponseFn = createServerFn().handler(() => { - throw new Response('teapot', { status: 418 }) -}) - -const helperLocationFn = createServerFn().handler(() => { - setResponseStatus(302) - setResponseHeader('location', '/api/base') - return { ok: true } -}) - -export const Route = createFileRoute('/server-functions')({ - component: ServerFunctions, -}) - -function ServerFunctions() { - return ( -
    -

    Server Functions

    - - - - - - - - - - - - - - - - - - - - -
    - ) -} - -function ServerFunctionButton({ - name, - fn, -}: { - name: string - fn: (...args: Array) => Promise -}) { - const serverFn = useServerFn(fn) - const [result, setResult] = React.useState('idle') - - return ( -
    - - {result} -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/ssr.tsx b/e2e/react-start/response-reconciliation/src/routes/ssr.tsx deleted file mode 100644 index c0cb69c8ec..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/ssr.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { createServerFn } from '@tanstack/react-start' -import { - setCookie, - setResponseHeader, - setResponseStatus, -} from '@tanstack/react-start/server' - -const setSsrResponseFn = createServerFn().handler(() => { - setResponseStatus(238, 'ssr-loader') - setResponseHeader('x-ssr-loader', 'yes') - setCookie('ssr-one', '1', { path: '/' }) - setCookie('ssr-two', '2', { path: '/' }) - return { message: 'ssr response' } -}) - -export const Route = createFileRoute('/ssr')({ - loader: () => setSsrResponseFn(), - component: SsrRoute, -}) - -function SsrRoute() { - const data = Route.useLoaderData() - return ( -
    -

    {data.message}

    -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/routes/streamed.tsx b/e2e/react-start/response-reconciliation/src/routes/streamed.tsx deleted file mode 100644 index 8d6a6227cd..0000000000 --- a/e2e/react-start/response-reconciliation/src/routes/streamed.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/react-router' -import { Suspense } from 'react' - -export const Route = createFileRoute('/streamed')({ - loader: () => ({ - deferred: new Promise((resolve) => - setTimeout(() => resolve('streamed after the shell'), 100), - ), - }), - component: StreamedRoute, -}) - -function StreamedRoute() { - const { deferred } = Route.useLoaderData() - return ( -
    -

    Streamed document

    - loading

    }> - - {(value) =>

    {value}

    } -
    -
    -
    - ) -} diff --git a/e2e/react-start/response-reconciliation/src/server-entry.ts b/e2e/react-start/response-reconciliation/src/server-entry.ts deleted file mode 100644 index cbee8ad31a..0000000000 --- a/e2e/react-start/response-reconciliation/src/server-entry.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - createStartHandler, - defaultStreamHandler, - getResponseStatus, - handleStartError, -} from '@tanstack/react-start/server' -import handler, { createServerEntry } from '@tanstack/react-start/server-entry' - -const uncaughtFetch = createStartHandler(defaultStreamHandler) - -// Reproduce #7647's custom stream handler that preserves middleware status. -const preserveStatusFetch = createStartHandler(async (ctx) => { - const result = await defaultStreamHandler(ctx) - const response = result instanceof Response ? result : result.response - const status = getResponseStatus() - if (status === response.status) { - return result - } - - const headers = new Headers(response.headers) - headers.set('x-stream-response-rebuilt', 'yes') - const replacement = new Response(response.body, { - status, - statusText: response.statusText, - headers, - }) - return result instanceof Response - ? replacement - : { ...result, response: replacement } -}) - -function markCustomServerEntry(response: Response): Response { - try { - response.headers.set('x-custom-server-entry', 'yes') - return response - } catch { - const headers = new Headers(response.headers) - headers.set('x-custom-server-entry', 'yes') - return new Response(response.body, { - status: response.status, - statusText: response.statusText, - headers, - }) - } -} - -export default createServerEntry({ - async fetch(request, opts) { - if (request.headers.get('x-reconciliation-scenario') === 'issue-7647') { - return markCustomServerEntry(await preserveStatusFetch(request, opts)) - } - - if (request.headers.get('x-custom-handle-errors') === 'false') { - try { - return markCustomServerEntry(await uncaughtFetch(request, opts)) - } catch (error) { - if (request.headers.get('x-custom-handle-start-error') === 'true') { - return markCustomServerEntry(handleStartError(error)) - } - return markCustomServerEntry( - new Response(error instanceof Error ? error.message : 'error', { - status: 555, - headers: { - 'x-custom-entry-catch': 'yes', - }, - }), - ) - } - } - - try { - return markCustomServerEntry(await handler.fetch(request, opts)) - } catch (error) { - return markCustomServerEntry( - new Response(error instanceof Error ? error.message : 'error', { - status: 556, - headers: { - 'x-custom-entry-catch': 'unexpected', - }, - }), - ) - } - }, -}) diff --git a/e2e/react-start/response-reconciliation/src/start.ts b/e2e/react-start/response-reconciliation/src/start.ts deleted file mode 100644 index 2ac158b799..0000000000 --- a/e2e/react-start/response-reconciliation/src/start.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { createMiddleware, createStart } from '@tanstack/react-start' -import { - clearResponseHeaders, - setCookie, - getCookie, - setResponseHeader, - setResponseHeaders, - setResponseStatus, -} from '@tanstack/react-start/server' -import { createUpstreamFailure } from './routes/api/-upstream' -import { installResponseWrapper } from './response-wrapper' - -const globalResponseMiddleware = createMiddleware().server( - async ({ next, request }) => { - if (request.headers.get('x-wrap-response') === 'true') { - installResponseWrapper() - } - - const scenario = - request.headers.get('x-reconciliation-scenario') || - getCookie('reconciliation-scenario') - - if (scenario === 'issue-7647') { - setResponseStatus(418) - setResponseHeader('x-middleware-header', 'present') - setResponseHeader('cache-control', 'no-store') - return next() - } - - if (scenario === 'global-before') { - setResponseHeaders( - new Headers({ - 'x-global-before': 'yes', - 'x-global-common': 'before', - }), - ) - setResponseStatus(231, 'global-before') - return next() - } - - if (scenario === 'global-after') { - const result = await next() - setResponseHeader('x-global-after', 'yes') - setResponseHeader('x-global-common', 'after') - setResponseStatus(232, 'global-after') - return result - } - - if (scenario === 'global-multiple-cookies') { - setCookie('global-one', '1', { path: '/' }) - setCookie('global-two', '2', { path: '/' }) - return next() - } - - if (scenario === 'global-upstream-cause') { - throw new Error('Upstream failed', { cause: createUpstreamFailure() }) - } - - if (scenario === 'global-location-error') { - throw Object.assign(new Error('Moved error'), { - status: 302, - headers: { location: '/api/base' }, - }) - } - - if (scenario === 'global-same-body-wrapper') { - const result = await next() - const wrapped = new Response(result.response.body, result.response) - clearResponseHeaders() - setResponseHeader('x-same-body-wrapper', 'yes') - return { ...result, response: wrapped } - } - - if (scenario === 'global-copy') { - // Session middleware copies the response to add a header (#8627). - const result = await next() - const headers = new Headers(result.response.headers) - headers.set('x-global-copy', 'yes') - return { - ...result, - response: new Response(result.response.body, { - status: result.response.status, - statusText: result.response.statusText, - headers, - }), - } - } - - if (scenario === 'global-piped-copy') { - const result = await next() - const response = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - response.headers.set('x-global-piped-copy', 'yes') - return { ...result, response } - } - - if (scenario === 'global-representation') { - // Representation metadata computed from the body, as by ETag middleware. - const result = await next() - const body = await result.response.text() - const response = new Response(body, result.response) - response.headers.set('x-body-length', String(body.length)) - return { ...result, response } - } - - if (scenario === 'global-assigned-transform-not-modified') { - // Transform the body in place, then answer an ETag match instead. - const result = await next() - result.response = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - return new Response(null, { status: 304 }) - } - - if (scenario === 'global-timeout') { - // Keep working after next() while the handler the inner timeout - // abandoned is still running. - const result = await next() - await sleep(400) - return result - } - - if (scenario === 'global-throw') { - setResponseStatus(401, 'Unauthorized') - setResponseHeader('x-global-error', 'yes') - throw new Error('Unauthorized global middleware') - } - - if (scenario === 'global-throw-string') { - throw 'global string' - } - - if (scenario === 'global-throw-response') { - throw Response.json({ denied: true }, { status: 403 }) - } - - return next() - }, -) - -const sleep = (ms: number) => - new Promise((resolve) => setTimeout(resolve, ms)) - -const globalTimeoutMiddleware = createMiddleware().server( - ({ next, request }) => { - const scenario = - request.headers.get('x-reconciliation-scenario') || - getCookie('reconciliation-scenario') - if (scenario !== 'global-timeout') { - return next() - } - return Promise.race([ - next(), - sleep(50).then( - () => - new Response('timeout', { - status: 504, - headers: { 'x-timeout-fallback': 'yes' }, - }), - ), - ]) - }, -) - -export const startInstance = createStart(() => ({ - requestMiddleware: [globalResponseMiddleware, globalTimeoutMiddleware], -})) diff --git a/e2e/react-start/response-reconciliation/src/styles/app.css b/e2e/react-start/response-reconciliation/src/styles/app.css deleted file mode 100644 index a38fb439a6..0000000000 --- a/e2e/react-start/response-reconciliation/src/styles/app.css +++ /dev/null @@ -1,12 +0,0 @@ -html { - color-scheme: light dark; - font-family: system-ui, sans-serif; -} - -body { - margin: 0; -} - -main { - padding: 16px; -} diff --git a/e2e/react-start/response-reconciliation/tests/response-reconciliation.spec.ts b/e2e/react-start/response-reconciliation/tests/response-reconciliation.spec.ts deleted file mode 100644 index 728b0782c5..0000000000 --- a/e2e/react-start/response-reconciliation/tests/response-reconciliation.spec.ts +++ /dev/null @@ -1,1038 +0,0 @@ -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' -import type { APIResponse, Page, Response } from '@playwright/test' - -type TestResponse = APIResponse | Response - -function header(response: TestResponse, name: string) { - return response.headers()[name.toLowerCase()] ?? null -} - -async function setCookieValues(response: TestResponse) { - return (await Promise.resolve(response.headersArray())) - .filter((item) => item.name.toLowerCase() === 'set-cookie') - .map((item) => item.value) -} - -function expectCookie(cookies: Array, name: string, value: string) { - expect( - cookies.filter((cookie) => cookie.startsWith(`${name}=${value};`)), - ).toHaveLength(1) -} - -async function invokeServerFunction( - page: Page, - name: string, - scenario?: string, -) { - await page.goto( - scenario - ? `/server-functions?scenario=${encodeURIComponent(scenario)}` - : '/server-functions', - ) - await expect(page.getByTestId('server-functions-hydrated')).toBeAttached() - await page.evaluate((value) => { - document.cookie = value - ? `reconciliation-scenario=${value}; Path=/` - : 'reconciliation-scenario=; Max-Age=0; Path=/' - }, scenario) - const responsePromise = page.waitForResponse((response) => - response.url().includes('/_serverFn/'), - ) - await page.getByTestId(`server-function-${name}`).click() - const response = await responsePromise - await expect( - page.getByTestId(`server-function-${name}-result`), - ).not.toHaveText('pending') - return response -} - -async function invokeJsonServerFunction( - page: Page, - name: string, - scenario?: string, -) { - const response = await invokeServerFunction(page, name, scenario) - const request = response.request() - expect(request.headers()['x-tsr-serverfn']).toBe('true') - const postData = request.postData() - if (postData) { - expect(postData).not.toContain('x-reconciliation-scenario') - } - return response -} - -async function expectServerFunctionResult( - page: Page, - name: string, - result: string | RegExp, -) { - await expect(page.getByTestId(`server-function-${name}-result`)).toHaveText( - result, - ) -} - -test.describe('server routes', () => { - test('uses expected server entry mode', async ({ request }) => { - const response = await request.get('/api/base') - - if (process.env.TSS_E2E_SERVER_ENTRY) { - expect(header(response, 'x-custom-server-entry')).toBe('yes') - } else { - expect(header(response, 'x-custom-server-entry')).toBe(null) - } - }) - - test('global request middleware cookies are preserved on server routes', async ({ - request, - }) => { - const response = await request.get('/api/base', { - headers: { 'x-reconciliation-scenario': 'global-multiple-cookies' }, - }) - const cookies = await setCookieValues(response) - - expectCookie(cookies, 'global-one', '1') - expectCookie(cookies, 'global-two', '2') - }) - - test('regression #5407: global middleware setResponseHeaders and status apply before next', async ({ - request, - }) => { - const response = await request.get('/api/base', { - headers: { 'x-reconciliation-scenario': 'global-before' }, - }) - - expect(response.status()).toBe(231) - expect(response.statusText()).toBe('global-before') - expect(header(response, 'x-global-before')).toBe('yes') - expect(header(response, 'x-global-common')).toBe('before') - expect(header(response, 'x-base')).toBe('yes') - }) - - test('global middleware helper changes apply after next', async ({ - request, - }) => { - const response = await request.get('/api/base', { - headers: { 'x-reconciliation-scenario': 'global-after' }, - }) - - expect(response.status()).toBe(232) - expect(response.statusText()).toBe('global-after') - expect(header(response, 'x-global-after')).toBe('yes') - expect(header(response, 'x-global-common')).toBe('after') - expect(header(response, 'x-base')).toBe('yes') - }) - - test('route middleware helper changes apply before and after next', async ({ - request, - }) => { - const before = await request.get('/api/route-before-next') - expect(before.status()).toBe(234) - expect(before.statusText()).toBe('route-before') - expect(header(before, 'x-route-before')).toBe('yes') - expect(header(before, 'x-handler')).toBe('route-before-next') - - const after = await request.get('/api/route-after-next') - expect(after.status()).toBe(233) - expect(after.statusText()).toBe('route-after') - expect(header(after, 'x-route-after')).toBe('yes') - expect(header(after, 'x-handler')).toBe('route-after-next') - }) - - test('helper changes overlay same-boundary returned response conflicts', async ({ - request, - }) => { - const response = await request.get('/api/same-boundary-conflict') - - expect(response.status()).toBe(235) - expect(response.statusText()).toBe('same-boundary') - expect(header(response, 'x-conflict')).toBe('helper') - await expect(response.text()).resolves.toBe('conflict') - }) - - test('setResponseHeaders accepts Headers and preserves multiple cookies', async ({ - request, - }) => { - const response = await request.get('/api/bulk-headers') - const cookies = await setCookieValues(response) - - expect(header(response, 'x-bulk-one')).toBe('1') - expect(header(response, 'x-bulk-two')).toBe('2') - expect(header(response, 'x-keep')).toBe('yes') - expectCookie(cookies, 'bulk-one', '1') - expectCookie(cookies, 'bulk-two', '2') - }) - - test('remove and clear helpers can remove returned response headers', async ({ - request, - }) => { - const removed = await request.get('/api/remove-returned-header') - expect(header(removed, 'x-remove-me')).toBe(null) - expect(header(removed, 'x-keep')).toBe('yes') - - const cleared = await request.get('/api/clear-returned-headers') - expect(header(cleared, 'x-clear-one')).toBe(null) - expect(header(cleared, 'x-clear-two')).toBe(null) - }) - - test('getResponseHeader and getResponseHeaders read helper writes immediately', async ({ - request, - }) => { - const headerResponse = await request.get('/api/get-response-header-helper') - expect(header(headerResponse, 'x-read-after-set')).toBe('yes') - await expect(headerResponse.text()).resolves.toBe('yes') - - const headersResponse = await request.get( - '/api/get-response-headers-helper', - ) - expect(header(headersResponse, 'x-headers-read')).toBe('yes') - expect(header(headersResponse, 'x-headers-snapshot-write')).toBe(null) - await expect(headersResponse.text()).resolves.toBe('yes') - }) - - test('getResponseHeader sees direct current response header mutation', async ({ - request, - }) => { - const response = await request.get('/api/direct-mutation-visible') - - expect(header(response, 'x-direct-visible')).toBe('yes') - expect(header(response, 'x-direct-read')).toBe('yes') - }) - - test('response replacement carries helper deltas but not old response mutations', async ({ - request, - }) => { - const response = await request.get('/api/replace-after-direct-mutation') - - expect(response.status()).toBe(202) - expect(header(response, 'x-direct-a')).toBe(null) - expect(header(response, 'x-helper-delta')).toBe('yes') - expect(header(response, 'x-response-b')).toBe('yes') - await expect(response.text()).resolves.toBe('replacement') - }) - - test('later returned response replaces earlier response metadata', async ({ - request, - }) => { - const response = await request.get('/api/two-returned-responses') - - expect(header(response, 'x-response-a')).toBe(null) - expect(header(response, 'x-response-b')).toBe('yes') - expect(header(response, 'x-helper-after-a')).toBe('yes') - await expect(response.text()).resolves.toBe('response-b') - }) - - test('readonly responses reconcile through clone fallback', async ({ - request, - }) => { - const response = await request.get('/api/readonly-after-next') - - expect(header(response, 'x-readonly-after')).toBe('yes') - await expect(response.text()).resolves.toBe('readonly') - }) - - for (const status of [204, 205, 304]) { - test(`null-body status ${status} drops the response body`, async ({ - request, - }) => { - const response = await request.get( - `/api/null-body-status?status=${status}`, - ) - - expect(response.status()).toBe(status) - expect(header(response, 'x-null-body')).toBe('yes') - await expect(response.text()).resolves.toBe('') - }) - } - - test('out-of-range setResponseStatus keeps the returned status', async ({ - request, - }) => { - const response = await request.get( - '/api/status-contracts?scenario=invalid-status-return', - ) - - expect(response.status()).toBe(404) - expect(response.statusText()).toBe('Not Found') - await expect(response.text()).resolves.toBe('missing') - }) - - test('out-of-range setResponseStatus keeps the uncaught error status', async ({ - request, - }) => { - const response = await request.get( - '/api/status-contracts?scenario=invalid-status-throw', - ) - - expect(response.status()).toBe(500) - await expect(response.json()).resolves.toMatchObject({ - status: 500, - unhandled: true, - }) - }) - - test('a timeout fallback survives the handler it abandoned while an outer middleware awaits', async ({ - request, - }) => { - const response = await request.get('/api/status-contracts?scenario=slow', { - headers: { 'x-reconciliation-scenario': 'global-timeout' }, - }) - - expect(response.status()).toBe(504) - expect(header(response, 'x-timeout-fallback')).toBe('yes') - await expect(response.text()).resolves.toBe('timeout') - }) - - test('a helper success status does not hide an uncaught error', async ({ - request, - }) => { - const response = await request.get( - '/api/status-contracts?scenario=helper-success-crash', - ) - - expect(response.status()).toBe(500) - await expect(response.json()).resolves.toMatchObject({ - status: 500, - unhandled: true, - }) - }) - - test('errors caused by an upstream response adopt only its status', async ({ - request, - }) => { - const response = await request.get( - '/api/status-contracts?scenario=upstream-error-cause', - ) - const body = await response.body() - - expect(response.status()).toBe(502) - expect(header(response, 'x-upstream')).toBeNull() - expect(header(response, 'content-type')).toContain('application/json') - expect(header(response, 'content-encoding')).toBeNull() - const contentLength = header(response, 'content-length') - if (contentLength !== null) { - expect(Number(contentLength)).toBe(body.byteLength) - } - expect(await setCookieValues(response)).toEqual([]) - expect(JSON.parse(body.toString())).toMatchObject({ status: 502 }) - }) - - test('regression #5107: thrown errors preserve explicit response status and headers', async ({ - request, - }) => { - const response = await request.get('/api/throw-after-status') - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-error-helper')).toBe('yes') - expect(header(response, 'content-type')).toContain('application/json') - if (process.env.TSS_E2E_SERVER_ENTRY) { - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe(null) - } - await expect(response.json()).resolves.toMatchObject({ status: 401 }) - }) - - test('thrown responses preserve explicit response status and headers', async ({ - request, - }) => { - const response = await request.get('/api/throw-after-status?throw=response') - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-error-helper')).toBe('yes') - expect(header(response, 'x-thrown-response')).toBe('yes') - if (process.env.TSS_E2E_SERVER_ENTRY) { - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe(null) - } - await expect(response.text()).resolves.toBe('Unauthorized response') - }) - - test('custom server entry can opt out of automatic error responses', async ({ - request, - }) => { - test.skip(!process.env.TSS_E2E_SERVER_ENTRY, 'custom server entry only') - - const response = await request.get('/api/throw-after-status', { - headers: { 'x-custom-handle-errors': 'false' }, - }) - - expect(response.status()).toBe(555) - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe('yes') - await expect(response.text()).resolves.toBe('Unauthorized route') - }) - - test('custom server entry can recover Start error response state', async ({ - request, - }) => { - test.skip(!process.env.TSS_E2E_SERVER_ENTRY, 'custom server entry only') - - const response = await request.get('/api/throw-after-status', { - headers: { - 'x-custom-handle-errors': 'false', - 'x-custom-handle-start-error': 'true', - }, - }) - const cookies = await setCookieValues(response) - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-error-helper')).toBe('yes') - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe(null) - expectCookie(cookies, 'throw-after-status', '1') - await expect(response.json()).resolves.toMatchObject({ status: 401 }) - }) - - test('custom server entry can recover thrown response state', async ({ - request, - }) => { - test.skip(!process.env.TSS_E2E_SERVER_ENTRY, 'custom server entry only') - - const response = await request.get( - '/api/throw-after-status?throw=response', - { - headers: { - 'x-custom-handle-errors': 'false', - 'x-custom-handle-start-error': 'true', - }, - }, - ) - const cookies = await setCookieValues(response) - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-error-helper')).toBe('yes') - expect(header(response, 'x-thrown-response')).toBe('yes') - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe(null) - expectCookie(cookies, 'throw-after-status', '1') - await expect(response.text()).resolves.toBe('Unauthorized response') - }) - - test('custom server entry can opt out of SSR request middleware error responses', async ({ - request, - }) => { - test.skip(!process.env.TSS_E2E_SERVER_ENTRY, 'custom server entry only') - - const response = await request.get('/ssr', { - headers: { - 'x-custom-handle-errors': 'false', - 'x-reconciliation-scenario': 'global-throw', - }, - }) - - expect(response.status()).toBe(555) - expect(header(response, 'x-custom-server-entry')).toBe('yes') - expect(header(response, 'x-custom-entry-catch')).toBe('yes') - await expect(response.text()).resolves.toBe( - 'Unauthorized global middleware', - ) - }) - - test('regression #5464: multiple Set-Cookie headers are preserved', async ({ - request, - }) => { - const response = await request.get('/api/multiple-cookies') - const cookies = await setCookieValues(response) - - expectCookie(cookies, 'route-one', '1') - expectCookie(cookies, 'route-two', '2') - }) - - test('explicit Set-Cookie header values are preserved and replace response values', async ({ - request, - }) => { - const explicit = await request.get('/api/explicit-set-cookie-header') - const explicitCookies = await setCookieValues(explicit) - expectCookie(explicitCookies, 'explicit-one', '1') - expectCookie(explicitCookies, 'explicit-two', '2') - - const replaced = await request.get('/api/replace-explicit-set-cookie') - const replacedCookies = await setCookieValues(replaced) - expectCookie(replacedCookies, 'explicit-new', '1') - expect( - replacedCookies.some((cookie) => cookie.startsWith('explicit-old=1;')), - ).toBe(false) - }) - - test('cookies survive redirect responses', async ({ request }) => { - const response = await request.get('/api/redirect-with-cookies', { - maxRedirects: 0, - }) - const cookies = await setCookieValues(response) - - expect(response.status()).toBe(307) - expect(header(response, 'location')).toBe('/api/base') - expectCookie(cookies, 'redirect-one', '1') - expectCookie(cookies, 'redirect-two', '2') - expectCookie(cookies, 'redirect-three', '3') - }) - - test('generated errors drop framing headers that helpers set for the failed body', async ({ - request, - }) => { - const response = await request.get('/api/framing-error') - - expect(response.status()).toBe(500) - expect(header(response, 'content-encoding')).toBeNull() - expect(header(response, 'content-length')).not.toBe('2') - expect(await response.json()).toMatchObject({ - status: 500, - unhandled: true, - }) - }) - - test('HEAD keeps the body for middleware until the response leaves the pipeline', async ({ - request, - }) => { - const headers = { 'x-reconciliation-scenario': 'global-representation' } - const get = await request.get('/api/base', { headers }) - const head = await request.head('/api/base', { headers }) - - expect(head.status()).toBe(get.status()) - expect(Number(header(get, 'x-body-length'))).toBeGreaterThan(0) - expect(header(head, 'x-body-length')).toBe(header(get, 'x-body-length')) - expect(await head.body()).toHaveLength(0) - }) - - test('a response that middleware assigned is disposed when it returns another', async ({ - request, - }) => { - const id = crypto.randomUUID() - const response = await request.get(`/api/tracked-stream?id=${id}`, { - headers: { - 'x-reconciliation-scenario': 'global-assigned-transform-not-modified', - }, - }) - - expect(response.status()).toBe(304) - await expect - .poll(async () => - (await request.get(`/api/tracked-stream-status?id=${id}`)).json(), - ) - .toEqual({ cancelled: true }) - }) -}) - -test.describe('SSR document responses', () => { - test('regression #7647: middleware status and headers survive alongside route headers', async ({ - request, - }) => { - const response = await request.get('/', { - headers: { - accept: 'text/html', - 'x-reconciliation-scenario': 'issue-7647', - }, - }) - - expect(response.status()).toBe(418) - expect(header(response, 'x-middleware-header')).toBe('present') - expect(header(response, 'cache-control')).toBe('no-store') - expect(header(response, 'x-route-header')).toBe('present') - expect(header(response, 'content-type')).toContain('text/html') - // Custom-entry modes must actually reconstruct the streamed response. - expect(header(response, 'x-stream-response-rebuilt')).toBe( - process.env.TSS_E2E_SERVER_ENTRY ? 'yes' : null, - ) - const html = await response.text() - expect(html).toContain('Response Reconciliation E2E') - }) - - test('loader helper headers, status, and cookies reconcile onto document response', async ({ - request, - }) => { - const response = await request.get('/ssr') - const cookies = await setCookieValues(response) - - expect(response.status()).toBe(238) - expect(response.statusText()).toBe('ssr-loader') - expect(header(response, 'x-ssr-loader')).toBe('yes') - expect(header(response, 'content-type')).toContain('text/html') - expectCookie(cookies, 'ssr-one', '1') - expectCookie(cookies, 'ssr-two', '2') - await expect(response.text()).resolves.toContain('ssr response') - }) - - test('regression #5464: SSR document responses preserve multiple Set-Cookie headers', async ({ - request, - }) => { - const response = await request.get('/ssr', { - headers: { 'x-reconciliation-scenario': 'global-multiple-cookies' }, - }) - const cookies = await setCookieValues(response) - - expectCookie(cookies, 'global-one', '1') - expectCookie(cookies, 'global-two', '2') - expectCookie(cookies, 'ssr-one', '1') - expectCookie(cookies, 'ssr-two', '2') - }) - - test('global middleware after next reconciles onto document response', async ({ - request, - }) => { - const response = await request.get('/ssr', { - headers: { 'x-reconciliation-scenario': 'global-after' }, - }) - - expect(response.status()).toBe(232) - expect(response.statusText()).toBe('global-after') - expect(header(response, 'x-global-after')).toBe('yes') - expect(header(response, 'x-ssr-loader')).toBe('yes') - }) - - test('middleware can stream the document through a body transform', async ({ - request, - }) => { - const response = await request.get('/streamed', { - headers: { 'x-reconciliation-scenario': 'global-piped-copy' }, - }) - - expect(response.status()).toBe(200) - expect(header(response, 'x-global-piped-copy')).toBe('yes') - const html = await response.text() - expect(html).toContain('streamed after the shell') - expect(html).toContain('') - }) - - test('HEAD documents keep their body for middleware until the response leaves the pipeline', async ({ - request, - }) => { - const headers = { 'x-reconciliation-scenario': 'global-representation' } - const get = await request.get('/', { headers }) - const head = await request.head('/', { headers }) - - expect(head.status()).toBe(get.status()) - expect(Number(header(get, 'x-body-length'))).toBeGreaterThan(0) - expect(header(head, 'x-body-length')).toBe(header(get, 'x-body-length')) - expect(await head.body()).toHaveLength(0) - }) - - test('regression #8627: middleware can copy the document when Response is wrapped', async ({ - request, - }) => { - const response = await request.get('/streamed', { - headers: { - 'x-reconciliation-scenario': 'global-copy', - 'x-wrap-response': 'true', - }, - }) - - expect(response.status()).toBe(200) - expect(header(response, 'x-global-copy')).toBe('yes') - const html = await response.text() - expect(html).toContain('streamed after the shell') - expect(html).toContain('') - }) - - test('regression #8627: loader helpers reconcile onto the document when Response is wrapped', async ({ - request, - }) => { - const response = await request.get('/ssr', { - headers: { 'x-wrap-response': 'true' }, - }) - const cookies = await setCookieValues(response) - - expect(response.status()).toBe(238) - expect(header(response, 'x-ssr-loader')).toBe('yes') - expectCookie(cookies, 'ssr-one', '1') - const html = await response.text() - expect(html).toContain('ssr response') - expect(html).toContain('') - }) -}) - -test.describe('server functions', () => { - test('global request middleware helper changes reconcile onto serialized responses', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-before', - ) - - expect(response.status()).toBe(231) - expect(response.statusText()).toBe('global-before') - expect(header(response, 'x-global-before')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'globalSerialized', '{"ok":true}') - }) - - test('global request middleware helper changes after next reconcile onto serialized responses', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-after', - ) - - expect(response.status()).toBe(232) - expect(response.statusText()).toBe('global-after') - expect(header(response, 'x-global-after')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'globalSerialized', '{"ok":true}') - }) - - test('function middleware helper changes after next reconcile onto serialized responses', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'functionAfterNext') - - expect(response.status()).toBe(236) - expect(response.statusText()).toBe('function-after') - expect(header(response, 'x-function-after')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'functionAfterNext', '{"ok":true}') - }) - - test('raw server function responses reconcile helper changes after next', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'rawResponseAfterNext', - ) - - expect(response.status()).toBe(237) - expect(response.statusText()).toBe('function-raw-after') - expect(header(response, 'x-function-raw')).toBe('yes') - expect(header(response, 'x-function-raw-after')).toBe('yes') - expect(header(response, 'x-tss-raw')).toBe('true') - await expect(response.text()).resolves.toBe('raw function body') - await expectServerFunctionResult( - page, - 'rawResponseAfterNext', - '237:raw function body', - ) - }) - - test('function response replacement carries helper deltas only', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'replacement') - - expect(header(response, 'x-function-a')).toBe(null) - expect(header(response, 'x-function-b')).toBe('yes') - expect(header(response, 'x-function-helper-delta')).toBe('yes') - await expect(response.text()).resolves.toBe('function-b') - await expectServerFunctionResult(page, 'replacement', '200:function-b') - }) - - test('server function preserves multiple Set-Cookie headers', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'multipleCookies') - const cookies = await setCookieValues(response) - - expectCookie(cookies, 'fn-one', '1') - expectCookie(cookies, 'fn-two', '2') - await expectServerFunctionResult(page, 'multipleCookies', '{"ok":true}') - }) - - test('raw server function responses preserve multiple Set-Cookie headers', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'rawMultipleCookies') - const cookies = await setCookieValues(response) - - expect(header(response, 'x-tss-raw')).toBe('true') - expectCookie(cookies, 'fn-raw-returned-one', '1') - expectCookie(cookies, 'fn-raw-returned-two', '2') - expectCookie(cookies, 'fn-raw-helper-one', '1') - expectCookie(cookies, 'fn-raw-helper-two', '2') - await expect(response.text()).resolves.toBe('raw cookie body') - await expectServerFunctionResult( - page, - 'rawMultipleCookies', - '200:raw cookie body', - ) - }) - - test('server function explicit Set-Cookie header arrays are preserved', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'explicitCookieHeader', - ) - const cookies = await setCookieValues(response) - - expectCookie(cookies, 'fn-explicit-one', '1') - expectCookie(cookies, 'fn-explicit-two', '2') - await expectServerFunctionResult( - page, - 'explicitCookieHeader', - '{"ok":true}', - ) - }) - - test.describe('expected error responses', () => { - test.use({ - // A second RegExp would make Playwright read the array as a fixture - // tuple, so all expected statuses share one pattern. - whitelistErrors: [ - /Failed to load resource: the server responded with a status of (401 \(Unauthorized\)|403 \([^)]*\)|418 \([^)]*\)|500 \([^)]*\)|502 \([^)]*\))/, - ], - }) - - test('a server function that throws a Response rejects with it on the client', async ({ - page, - }) => { - const response = await invokeServerFunction(page, 'throwResponse') - - expect(response.status()).toBe(418) - expect(header(response, 'x-tss-raw')).toBe('thrown') - await expectServerFunctionResult( - page, - 'throwResponse', - 'thrown 418:teapot', - ) - }) - - test('server function thrown errors preserve explicit response status', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'throwAfterStatus') - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-function-error')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'throwAfterStatus', /Unauthorized/) - }) - - test('server function errors drop framing headers that helpers set for the failed body', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'throwAfterFraming') - - expect(header(response, 'content-encoding')).toBeNull() - expect(header(response, 'content-length')).not.toBe('2') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult( - page, - 'throwAfterFraming', - 'File read failed', - ) - }) - - test('server function request middleware errors caused by an upstream response adopt only its status', async ({ - page, - context, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-upstream-cause', - ) - - expect(response.status()).toBe(502) - expect(header(response, 'x-upstream')).toBeNull() - expect(header(response, 'content-type')).toContain('application/json') - expect(header(response, 'content-encoding')).toBeNull() - expect(await setCookieValues(response)).toEqual([]) - expect(await context.cookies()).not.toEqual( - expect.arrayContaining([ - expect.objectContaining({ name: 'upstream-session' }), - ]), - ) - await expectServerFunctionResult( - page, - 'globalSerialized', - 'Upstream failed', - ) - }) - - test('serialized errors drop a Location from error metadata', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-location-error', - ) - - // Error metadata below 400 falls back to 500, and Location is dropped. - expect(response.status()).toBe(500) - expect(header(response, 'location')).toBeNull() - expect(response.request().redirectedTo()).toBeNull() - await expectServerFunctionResult(page, 'globalSerialized', 'Moved error') - }) - - test('server function request middleware errors are serialized', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-throw', - ) - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-global-error')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'globalSerialized', /Unauthorized/) - }) - - test('a string thrown by request middleware rejects the server function call with it', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-throw-string', - ) - - expect(response.status()).toBe(500) - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult( - page, - 'globalSerialized', - 'thrown:"global string"', - ) - }) - - test('a Response thrown by request middleware rejects the server function call with it', async ({ - page, - }) => { - const response = await invokeServerFunction( - page, - 'globalSerialized', - 'global-throw-response', - ) - - expect(response.status()).toBe(403) - expect(header(response, 'x-tss-raw')).toBe('thrown') - await expectServerFunctionResult( - page, - 'globalSerialized', - 'thrown 403:{"denied":true}', - ) - }) - - test('regression #5107: function middleware thrown errors preserve explicit response status', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'throwAfterMiddlewareStatus', - ) - - expect(response.status()).toBe(401) - expect(response.statusText()).toBe('Unauthorized') - expect(header(response, 'x-function-error-middleware')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult( - page, - 'throwAfterMiddlewareStatus', - /Unauthorized/, - ) - }) - }) - - test('a server function that throws 0 rejects on the client', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'throwZero') - - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'throwZero', 'thrown:0') - }) - - test('serialized server function replies keep their body when a helper selects 204', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'bodylessStatus') - - expect(response.status()).toBe(200) - expect(header(response, 'x-bodyless-status')).toBe('ignored') - expect(header(response, 'x-tss-serialized')).toBe('true') - await expectServerFunctionResult(page, 'bodylessStatus', '{"ok":true}') - }) - - test('serialized replies drop a helper Location so fetch does not follow it', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'helperLocation') - - expect(response.status()).toBe(302) - expect(header(response, 'location')).toBeNull() - expect(response.request().redirectedTo()).toBeNull() - await expectServerFunctionResult(page, 'helperLocation', '{"ok":true}') - }) - - test('same-body wrapper responses keep serialized transport headers', async ({ - page, - }) => { - const response = await invokeJsonServerFunction( - page, - 'globalSerialized', - 'global-same-body-wrapper', - ) - - expect(header(response, 'x-same-body-wrapper')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - expect(header(response, 'content-type')).toContain('application/json') - await expectServerFunctionResult(page, 'globalSerialized', '{"ok":true}') - }) - - test('transport headers win over user helpers while user headers persist', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'transportProtected') - - expect(header(response, 'x-user-header')).toBe('yes') - expect(header(response, 'x-tss-serialized')).toBe('true') - expect(header(response, 'content-type')).toContain('application/json') - await expectServerFunctionResult(page, 'transportProtected', '{"ok":true}') - }) - - for (const name of ['returnRedirect', 'throwRedirect']) { - test(`server function ${name} navigates through the client with helper status and headers`, async ({ - page, - context, - }) => { - await page.goto('/server-functions') - await expect(page.getByTestId('server-functions-hydrated')).toBeAttached() - const responsePromise = page.waitForResponse((response) => - response.url().includes('/_serverFn/'), - ) - await page.getByTestId(`server-function-${name}`).click() - const response = await responsePromise - - expect(response.status()).toBe(302) - expect(header(response, 'location')).toBeNull() - expect(header(response, 'content-type')).toContain('application/json') - expect(header(response, 'x-tss-raw')).toBeNull() - expect(header(response, 'x-tss-serialized')).toBeNull() - expect(response.request().redirectedTo()).toBeNull() - // Playwright cannot expose a 302 body, even without Location. Successful - // client navigation verifies that Start decoded the redirect envelope. - await expect(page).toHaveURL('/') - await expect( - page.getByRole('heading', { name: 'Response Reconciliation E2E' }), - ).toBeVisible() - expect(await context.cookies()).toEqual( - expect.arrayContaining([ - expect.objectContaining({ name: 'rpc-redirect', value: 'committed' }), - ]), - ) - }) - } - - test('server function getResponseHeader sees helper writes immediately', async ({ - page, - }) => { - const response = await invokeJsonServerFunction(page, 'readAfterSet') - - expect(header(response, 'x-read-after-set')).toBe('yes') - expect(header(response, 'x-read-after-set-value')).toBe('yes') - await expectServerFunctionResult(page, 'readAfterSet', '{"ok":true}') - }) -}) diff --git a/e2e/react-start/response-reconciliation/tsconfig.json b/e2e/react-start/response-reconciliation/tsconfig.json deleted file mode 100644 index 3824b148e1..0000000000 --- a/e2e/react-start/response-reconciliation/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "include": ["**/*.ts", "**/*.tsx", "public/script*.js"], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "module": "ESNext", - "moduleResolution": "Bundler", - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "isolatedModules": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "target": "ES2022", - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "~/*": ["./src/*"] - }, - "noEmit": true, - "types": ["vite/client"] - } -} diff --git a/e2e/react-start/response-reconciliation/vite.config.ts b/e2e/react-start/response-reconciliation/vite.config.ts deleted file mode 100644 index 355e12a2f7..0000000000 --- a/e2e/react-start/response-reconciliation/vite.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { defineConfig } from 'vite' -import { tanstackStart } from '@tanstack/react-start/plugin/vite' -import viteReact from '@vitejs/plugin-react' - -const serverEntry = process.env.TSS_E2E_SERVER_ENTRY -const outDir = process.env.E2E_DIST_DIR ?? 'dist' - -export default defineConfig({ - resolve: { tsconfigPaths: true }, - build: { - outDir, - }, - plugins: [ - tanstackStart({ - server: serverEntry ? { entry: serverEntry } : undefined, - }), - viteReact(), - ], -}) diff --git a/e2e/react-start/root-document-hydration/.gitignore b/e2e/react-start/root-document-hydration/.gitignore deleted file mode 100644 index 229709a89d..0000000000 --- a/e2e/react-start/root-document-hydration/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -dist -test-results -playwright-report -port*.txt diff --git a/e2e/react-start/root-document-hydration/.prettierignore b/e2e/react-start/root-document-hydration/.prettierignore deleted file mode 100644 index 083bdb7c4c..0000000000 --- a/e2e/react-start/root-document-hydration/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -src/routeTree.gen.ts diff --git a/e2e/react-start/root-document-hydration/package.json b/e2e/react-start/root-document-hydration/package.json deleted file mode 100644 index 9dcfcb6fbc..0000000000 --- a/e2e/react-start/root-document-hydration/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "tanstack-react-start-e2e-root-document-hydration", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "dev": "vite dev --port 3000", - "dev:e2e": "vite dev --port $PORT", - "build": "vite build && tsc --noEmit", - "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e:dev": "MODE=dev playwright test --project=chromium", - "test:e2e:prod": "MODE=prod playwright test --project=chromium", - "test:e2e": "pnpm run test:e2e:dev && pnpm run test:e2e:prod" - }, - "dependencies": { - "@tanstack/react-router": "workspace:*", - "@tanstack/react-start": "workspace:*", - "react": "^19.0.0", - "react-dom": "^19.0.0" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:*", - "@types/node": "^22.10.2", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "parallelism": false - } - } - } -} diff --git a/e2e/react-start/root-document-hydration/playwright.config.ts b/e2e/react-start/root-document-hydration/playwright.config.ts deleted file mode 100644 index 13dda4e328..0000000000 --- a/e2e/react-start/root-document-hydration/playwright.config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const isDev = process.env.MODE === 'dev' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - - use: { - baseURL, - }, - - webServer: { - command: isDev - ? 'pnpm dev:e2e --port 0' - : `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - env: { - PORT: String(PORT), - }, - }, - - projects: [ - { - name: 'chromium', - use: { - ...devices['Desktop Chrome'], - }, - }, - ], -}) diff --git a/e2e/react-start/root-document-hydration/src/routeTree.gen.ts b/e2e/react-start/root-document-hydration/src/routeTree.gen.ts deleted file mode 100644 index dceedffdc1..0000000000 --- a/e2e/react-start/root-document-hydration/src/routeTree.gen.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' - fileRoutesByTo: FileRoutesByTo - to: '/' - id: '__root__' | '/' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - } -} diff --git a/e2e/react-start/root-document-hydration/src/router.tsx b/e2e/react-start/root-document-hydration/src/router.tsx deleted file mode 100644 index 58f4d54e88..0000000000 --- a/e2e/react-start/root-document-hydration/src/router.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' - -export function getRouter() { - return createRouter({ routeTree }) -} diff --git a/e2e/react-start/root-document-hydration/src/routes/__root.tsx b/e2e/react-start/root-document-hydration/src/routes/__root.tsx deleted file mode 100644 index 2dc235e951..0000000000 --- a/e2e/react-start/root-document-hydration/src/routes/__root.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { - HeadContent, - Outlet, - Scripts, - createRootRoute, -} from '@tanstack/react-router' -import { useEffect } from 'react' - -export const Route = createRootRoute({ - pendingComponent: () => null, - component: RootComponent, -}) - -function RootComponent() { - useEffect(() => { - document.documentElement.dataset.hydrated = 'true' - }, []) - - return ( - - - - - -
    - ', endIndex) + + expect(endIndex).toBeGreaterThan(-1) + expect(lastScriptOpen).toBeGreaterThan(lastScriptClose) + expect(slowAsyncPayloadIndex).toBeGreaterThan(-1) + expect(slowAsyncPayloadIndex).toBeLessThan(endIndex) + expect(html.slice(lastScriptOpen, endIndex)).toContain('.return(void 0)') + expect(endIndex).toBeLessThan(html.indexOf('')) + }) }) diff --git a/e2e/react-start/streaming-ssr/tests/router-html-buffer.spec.ts b/e2e/react-start/streaming-ssr/tests/router-html-buffer.spec.ts deleted file mode 100644 index a9cf8a8142..0000000000 --- a/e2e/react-start/streaming-ssr/tests/router-html-buffer.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - STREAM_PART_SELECTOR, - expect, - test, - testWithHydration, -} from '../../../streaming-ssr-assertions' - -const runBufferReproduction = - process.env.RUN_SSR_ROUTER_HTML_BUFFER_REPRO === 'true' - -test.describe('SSR router HTML buffer', () => { - test.skip( - !runBufferReproduction, - 'The 17 MiB ASCII reproduction is intentionally opt-in: pnpm test:e2e:buffer-repro', - ) - - testWithHydration( - 'hydrates a large deferred loader payload from server state', - async ({ page }) => { - const response = await page.goto('/router-html-buffer') - - expect(response?.ok()).toBe(true) - await expect(page.getByTestId('router-html-payload-length')).toHaveText( - '17825792', - ) - await expect(page.locator(STREAM_PART_SELECTOR)).toHaveCount(0) - - await page.getByTestId('router-html-payload-check').click() - await expect(page.getByTestId('router-html-payload-result')).toHaveText( - 'server:17825792:x', - ) - }, - ) -}) diff --git a/e2e/react-start/streaming-ssr/tests/slow-render.spec.ts b/e2e/react-start/streaming-ssr/tests/slow-render.spec.ts index 0d5a87363f..c3631a7fc0 100644 --- a/e2e/react-start/streaming-ssr/tests/slow-render.spec.ts +++ b/e2e/react-start/streaming-ssr/tests/slow-render.spec.ts @@ -1 +1,73 @@ -import '../../../streaming-ssr-specs/slow-render' +import { expect, test, testWithHydration } from './fixtures' + +test.describe('Slow render (render takes longer than serialization)', () => { + test('all data eventually renders with server source', async ({ page }) => { + await page.goto('/slow-render') + await page.waitForLoadState('networkidle') + + // Quick data should be available with server source + await expect(page.getByTestId('quick-data')).toContainText('Quick:') + await expect(page.getByTestId('quick-source')).toContainText( + 'Quick data source: server', + ) + await expect(page.getByTestId('loader-source')).toContainText( + 'Loader source: server', + ) + + // Deferred data should resolve with server source + await expect(page.getByTestId('deferred-resolved')).toContainText( + 'Deferred resolved!', + { timeout: 5000 }, + ) + await expect(page.getByTestId('deferred-resolved')).toContainText( + 'source: server', + { timeout: 5000 }, + ) + + // Slow components should have rendered + await expect(page.getByTestId('slow-component-1')).toBeVisible() + await expect(page.getByTestId('slow-component-2')).toBeVisible() + await expect(page.getByTestId('slow-component-3')).toBeVisible() + }) + + testWithHydration('hydration works after slow render', async ({ page }) => { + await page.goto('/slow-render') + await page.waitForLoadState('networkidle') + + // Wait for content and verify server source + await expect(page.getByTestId('slow-component-1')).toBeVisible() + await expect(page.getByTestId('loader-source')).toContainText( + 'Loader source: server', + ) + }) + + test('client-side navigation works', async ({ page }) => { + await page.goto('/') + await page.waitForLoadState('networkidle') + + // Navigate via nav link + await page.getByRole('link', { name: 'Slow Render' }).first().click() + await expect(page).toHaveURL('/slow-render') + + await expect(page.getByTestId('quick-data')).toBeVisible({ timeout: 10000 }) + }) + + test('all data sources are server - proves SSR streaming works', async ({ + page, + }) => { + await page.goto('/slow-render') + await page.waitForLoadState('networkidle') + + // Wait for deferred content + await expect(page.getByTestId('deferred-resolved')).toBeVisible({ + timeout: 5000, + }) + + // Verify all sources are server + await expect(page.getByTestId('quick-source')).toContainText('server') + await expect(page.getByTestId('loader-source')).toContainText('server') + await expect(page.getByTestId('deferred-resolved')).toContainText( + 'source: server', + ) + }) +}) diff --git a/e2e/react-start/streaming-ssr/tests/stream.spec.ts b/e2e/react-start/streaming-ssr/tests/stream.spec.ts index a51614f09a..5e4c134f82 100644 --- a/e2e/react-start/streaming-ssr/tests/stream.spec.ts +++ b/e2e/react-start/streaming-ssr/tests/stream.spec.ts @@ -1 +1,46 @@ -import '../../../streaming-ssr-specs/stream' +import { expect, test, testWithHydration } from './fixtures' + +test.describe('ReadableStream streaming', () => { + testWithHydration('promise data resolves correctly', async ({ page }) => { + await page.goto('/stream') + + // Promise should resolve + await expect(page.getByTestId('promise-data')).toContainText( + 'promise-resolved', + { timeout: 5000 }, + ) + }) + + testWithHydration('stream chunks arrive incrementally', async ({ page }) => { + await page.goto('/stream') + + // Wait for stream to complete + await expect(page.getByTestId('stream-complete')).toBeVisible({ + timeout: 10000, + }) + + // All chunks should be present + await expect(page.getByTestId('stream-chunk-0')).toContainText('chunk-0') + await expect(page.getByTestId('stream-chunk-1')).toContainText('chunk-1') + await expect(page.getByTestId('stream-chunk-2')).toContainText('chunk-2') + await expect(page.getByTestId('stream-chunk-3')).toContainText('chunk-3') + await expect(page.getByTestId('stream-chunk-4')).toContainText('chunk-4') + }) + + testWithHydration( + 'client-side navigation to stream route works', + async ({ page }) => { + await page.goto('/') + await page.waitForLoadState('networkidle') + + // Navigate via nav link + await page.getByRole('link', { name: 'Stream' }).first().click() + await expect(page).toHaveURL('/stream') + + // Wait for stream to complete + await expect(page.getByTestId('stream-complete')).toBeVisible({ + timeout: 10000, + }) + }, + ) +}) diff --git a/e2e/react-start/streaming-ssr/tests/sync-only.spec.ts b/e2e/react-start/streaming-ssr/tests/sync-only.spec.ts index 0e9278d3f2..a0060a07ee 100644 --- a/e2e/react-start/streaming-ssr/tests/sync-only.spec.ts +++ b/e2e/react-start/streaming-ssr/tests/sync-only.spec.ts @@ -1 +1,84 @@ -import '../../../streaming-ssr-specs/sync-only' +import { expect } from '@playwright/test' +import { test, testWithHydration } from './fixtures' + +/** + * Tests for synchronous serialization - no deferred data, no streaming. + * This is the most common case where all loader data is immediately available. + * The hydration scripts should be included in the initial HTML response. + */ + +test('Sync-only route renders with loader data', async ({ page }) => { + await page.goto('/sync-only') + + // Verify the page content is rendered + await expect(page.getByTestId('sync-title')).toContainText( + 'Synchronous Serialization Test', + ) + await expect(page.getByTestId('sync-message')).toContainText( + 'Hello from sync loader!', + ) + + // Verify loader data items are rendered + await expect(page.getByTestId('sync-item-item-1')).toBeVisible() + await expect(page.getByTestId('sync-item-item-2')).toBeVisible() + await expect(page.getByTestId('sync-item-item-3')).toBeVisible() + + // Verify data came from server (proves SSR streaming worked) + await expect(page.getByTestId('sync-source')).toContainText('Source: server') +}) + +testWithHydration('Sync-only route hydrates correctly', async ({ page }) => { + await page.goto('/sync-only') + + // Verify client-side navigation works (proves hydration succeeded) + await page.getByRole('navigation').getByRole('link', { name: 'Home' }).click() + await expect(page.getByTestId('index-title')).toBeVisible() + + // Navigate back to sync-only via client-side navigation (use nav link to be specific) + await page + .getByRole('navigation') + .getByRole('link', { name: 'Sync Only' }) + .click() + await expect(page.getByTestId('sync-title')).toBeVisible() +}) + +test('Sync-only route has bootstrap scripts in initial HTML', async ({ + page, +}) => { + // Intercept the response to check the raw HTML + let responseHtml = '' + await page.route('/sync-only', async (route) => { + const response = await route.fetch() + responseHtml = await response.text() + await route.fulfill({ response }) + }) + + await page.goto('/sync-only') + + // Wait for page to load + await expect(page.getByTestId('sync-title')).toBeVisible() + + // The HTML should contain the bootstrap scripts + // $_TSR.router should be present (the dehydrated router state) + expect(responseHtml).toContain('$_TSR') + expect(responseHtml).toContain('$_TSR.router') + // The serialization end marker should be present + expect(responseHtml).toContain('$_TSR.e()') + + // SSR should include the barrier script tag in the HTML (rendered by ) + // This is the critical marker transformStreamWithRouter can scan for. + expect(responseHtml).toContain('$tsr-stream-barrier') +}) + +test('Navigating to sync-only from home page', async ({ page }) => { + await page.goto('/') + + await page.getByTestId('link-sync-only').click() + + await expect(page.getByTestId('sync-title')).toContainText( + 'Synchronous Serialization Test', + ) + await expect(page.getByTestId('sync-message')).toContainText( + 'Hello from sync loader!', + ) +}) diff --git a/e2e/react-start/streaming-ssr/vite.config.ts b/e2e/react-start/streaming-ssr/vite.config.ts index 0590c197a5..275bfacde2 100644 --- a/e2e/react-start/streaming-ssr/vite.config.ts +++ b/e2e/react-start/streaming-ssr/vite.config.ts @@ -1,10 +1,9 @@ import { defineConfig } from 'vite' import { tanstackStart } from '@tanstack/react-start/plugin/vite' -import viteReact from '@vitejs/plugin-react' export default defineConfig({ server: { port: 3000, }, - plugins: [tanstackStart(), viteReact()], + plugins: [tanstackStart()], }) diff --git a/e2e/react-start/transform-asset-urls/package.json b/e2e/react-start/transform-asset-urls/package.json index e0a5ffec59..40ffdd2569 100644 --- a/e2e/react-start/transform-asset-urls/package.json +++ b/e2e/react-start/transform-asset-urls/package.json @@ -16,19 +16,19 @@ "manual:both:options": "TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform pnpm manual:both", "manual:both:options:transform": "TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform pnpm manual:both", "manual:both:options:createTransform": "TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform pnpm manual:both", - "test:e2e:string": "rm -rf dist; TRANSFORM_ASSETS_MODE=string playwright test --project=chromium", - "test:e2e:function": "rm -rf dist; TRANSFORM_ASSETS_MODE=function playwright test --project=chromium", - "test:e2e:options": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform playwright test --project=chromium", - "test:e2e:options:transform": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform playwright test --project=chromium", - "test:e2e:options:createTransform": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform playwright test --project=chromium", - "test:e2e:options:transform:cache-true:warmup-true": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", - "test:e2e:options:transform:cache-true:warmup-false": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", - "test:e2e:options:transform:cache-false:warmup-true": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", - "test:e2e:options:transform:cache-false:warmup-false": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", - "test:e2e:options:createTransform:cache-true:warmup-true": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", - "test:e2e:options:createTransform:cache-true:warmup-false": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", - "test:e2e:options:createTransform:cache-false:warmup-true": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", - "test:e2e:options:createTransform:cache-false:warmup-false": "rm -rf dist; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", + "test:e2e:string": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=string playwright test --project=chromium", + "test:e2e:function": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=function playwright test --project=chromium", + "test:e2e:options": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform playwright test --project=chromium", + "test:e2e:options:transform": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform playwright test --project=chromium", + "test:e2e:options:createTransform": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform playwright test --project=chromium", + "test:e2e:options:transform:cache-true:warmup-true": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", + "test:e2e:options:transform:cache-true:warmup-false": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", + "test:e2e:options:transform:cache-false:warmup-true": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", + "test:e2e:options:transform:cache-false:warmup-false": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=transform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", + "test:e2e:options:createTransform:cache-true:warmup-true": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", + "test:e2e:options:createTransform:cache-true:warmup-false": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=true TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", + "test:e2e:options:createTransform:cache-false:warmup-true": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=true playwright test --project=chromium", + "test:e2e:options:createTransform:cache-false:warmup-false": "rm -rf dist; rm -rf port*.txt; TRANSFORM_ASSETS_MODE=options TRANSFORM_ASSETS_OPTIONS_KIND=createTransform TRANSFORM_ASSETS_OPTIONS_CACHE=false TRANSFORM_ASSETS_OPTIONS_WARMUP=false playwright test --project=chromium", "test:e2e:options:matrix": "pnpm test:e2e:options:transform:cache-true:warmup-true && pnpm test:e2e:options:transform:cache-true:warmup-false && pnpm test:e2e:options:transform:cache-false:warmup-true && pnpm test:e2e:options:transform:cache-false:warmup-false && pnpm test:e2e:options:createTransform:cache-true:warmup-true && pnpm test:e2e:options:createTransform:cache-true:warmup-false && pnpm test:e2e:options:createTransform:cache-false:warmup-true && pnpm test:e2e:options:createTransform:cache-false:warmup-false", "test:e2e": "pnpm test:e2e:string && pnpm test:e2e:function && pnpm test:e2e:options:matrix" }, @@ -40,15 +40,14 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/react-start/transform-asset-urls/playwright.config.ts b/e2e/react-start/transform-asset-urls/playwright.config.ts index 209a7e0596..bbef6838fe 100644 --- a/e2e/react-start/transform-asset-urls/playwright.config.ts +++ b/e2e/react-start/transform-asset-urls/playwright.config.ts @@ -1,10 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const APP_PORT = Number(process.env.E2E_APP_PORT ?? 0) -const CDN_PORT = Number(process.env.E2E_CDN_PORT ?? 0) +const APP_PORT = await getTestServerPort(packageJson.name) +const CDN_PORT = await getTestServerPort(`${packageJson.name}_cdn`) const baseURL = `http://localhost:${APP_PORT}` +const cdnOrigin = `http://localhost:${CDN_PORT}` const transformMode = process.env.TRANSFORM_ASSETS_MODE || 'string' const optionsKind = process.env.TRANSFORM_ASSETS_OPTIONS_KIND || 'createTransform' @@ -24,11 +26,8 @@ export default defineConfig({ { // CDN server — serves built client assets on a separate port with CORS command: `node tests/cdn-server.mjs`, - wait: { - stdout: - /CDN Server: (?http:\/\/localhost:(?\d+))/, - }, - reuseExistingServer: false, + url: `http://localhost:${CDN_PORT}/health`, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { CDN_PORT: String(CDN_PORT), @@ -38,11 +37,12 @@ export default defineConfig({ // App server — builds the project then starts the srvx server // with CDN_ORIGIN so that transformAssets rewrites manifest URLs command: `pnpm build && pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { PORT: String(APP_PORT), + CDN_ORIGIN: cdnOrigin, TRANSFORM_ASSETS_MODE: transformMode, TRANSFORM_ASSETS_OPTIONS_KIND: optionsKind, TRANSFORM_ASSETS_OPTIONS_CACHE: optionsCache, diff --git a/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts b/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts index d89758e684..421daf2790 100644 --- a/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts +++ b/e2e/react-start/transform-asset-urls/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/e2e/react-start/transform-asset-urls/src/server.ts b/e2e/react-start/transform-asset-urls/src/server.ts index a51f29ad66..241fc2fe51 100644 --- a/e2e/react-start/transform-asset-urls/src/server.ts +++ b/e2e/react-start/transform-asset-urls/src/server.ts @@ -83,18 +83,4 @@ const handler = createStartHandler( : defaultStreamHandler, ) -export default createServerEntry({ - fetch(request, options) { - const scriptUrl = request.headers.get('x-test-script-url') - if (scriptUrl) { - return createStartHandler({ - handler: defaultStreamHandler, - transformAssets: ({ kind, url }) => ({ - href: kind === 'script' ? scriptUrl : url, - }), - })(request, options) - } - - return handler(request, options) - }, -}) +export default createServerEntry({ fetch: handler }) diff --git a/e2e/react-start/transform-asset-urls/tests/cdn-server.mjs b/e2e/react-start/transform-asset-urls/tests/cdn-server.mjs index 280c626867..ea9bf62cd0 100644 --- a/e2e/react-start/transform-asset-urls/tests/cdn-server.mjs +++ b/e2e/react-start/transform-asset-urls/tests/cdn-server.mjs @@ -3,7 +3,7 @@ import path from 'node:path' import { fileURLToPath } from 'node:url' const __dirname = path.dirname(fileURLToPath(import.meta.url)) -const port = Number(process.env.CDN_PORT ?? 0) +const port = process.env.CDN_PORT || 3002 const app = express() @@ -36,7 +36,7 @@ app.use((req, res, next) => { app.use(express.static(path.resolve(__dirname, '..', 'dist', 'client'))) -const server = app.listen(port, (error) => { +app.listen(port, (error) => { if (error) throw error - console.info(`CDN Server: http://localhost:${server.address().port}`) + console.info(`CDN Server: http://localhost:${port}`) }) diff --git a/e2e/react-start/transform-asset-urls/tests/script-url-escaping.spec.ts b/e2e/react-start/transform-asset-urls/tests/script-url-escaping.spec.ts deleted file mode 100644 index 22251df671..0000000000 --- a/e2e/react-start/transform-asset-urls/tests/script-url-escaping.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { expect, test } from '@playwright/test' - -for (const [name, scriptUrl] of [ - [ - 'closing script tag', - '', endIndex) - const scriptCloseIndex = html.indexOf('', endIndex) - const bodyCloseIndex = html.indexOf('', scriptCloseIndex) - const htmlCloseIndex = html.indexOf('', bodyCloseIndex) - - expect(endIndex).toBeGreaterThan(-1) - expect(scriptOpenIndex).toBeGreaterThan(previousScriptCloseIndex) - expect(scriptCloseIndex).toBeGreaterThan(endIndex) - expect(payloadIndex).toBeGreaterThan(-1) - expect(payloadIndex).toBeLessThan(endIndex) - expect(html.slice(endIndex, scriptCloseIndex)).toContain(LATE_RECORD_CLOSE) - expect(scriptCloseIndex).toBeLessThan(bodyCloseIndex) - expect(bodyCloseIndex).toBeLessThan(htmlCloseIndex) -} - -async function verifyHydration( - page: Page, - { timeout = 10_000 }: { timeout?: number } = {}, -) { - const button = page.getByTestId('hydration-check-btn') - const status = page.getByTestId('hydration-status') - - await expect(button).toBeVisible() - await expect(async () => { - await button.click() - await expect(status).toHaveText('hydrated', { timeout: 100 }) - }).toPass({ timeout }) - - await expect(page.locator(STREAM_PART_SELECTOR)).toHaveCount(0) - await expect( - page.locator('script').filter({ hasText: STREAM_BOUNDARY_MARKER }), - ).toHaveCount(0) -} - -export { test } - -export const testWithHydration = test.extend({ - page: async ({ page }, use) => { - await use(page) - await verifyHydration(page) - }, -}) - -export { expect } diff --git a/e2e/streaming-ssr-fixtures/index.ts b/e2e/streaming-ssr-fixtures/index.ts deleted file mode 100644 index a70ef94459..0000000000 --- a/e2e/streaming-ssr-fixtures/index.ts +++ /dev/null @@ -1,381 +0,0 @@ -export type SourceMarker = 'server' | 'client' - -export type ServerData = { - name: string - timestamp: number - source: 'server' -} - -export type DeferredMessage = { - message: string - source: SourceMarker -} - -export type QueryType = 'sync' | 'fast-async' | 'slow-async' - -export type QueryData = { - type: QueryType - id: number - value: string - source: SourceMarker -} - -export const deferredDataMessage = 'Deferred data loaded!' -export const deferredDataDelay = 1000 -export const deferredServerDelay = 800 -export const deferredImmediateName = 'Fast User' -export const deferredSlowName = 'Slow User' -export const deferredErrorMessage = 'Error in deferred object' - -export const fastSerialStaticData = 'This is static data' -export const fastSerialSmallValue = 'small-data' - -export const syncOnlyMessage = 'Hello from sync loader!' -export const syncOnlyItems = ['item-1', 'item-2', 'item-3'] as const - -export const slowRenderDeferredMessage = 'Deferred resolved!' -export const slowRenderDeferredDelay = 50 -export const slowRenderQuickName = 'Quick data' -export const slowRenderComponents = [ - 'Slow component 1', - 'Slow component 2', - 'Slow component 3', -] as const - -export const nestedLevelDelays = [200, 400, 600] as const -export const nestedPlainDelay = 300 -export const nestedPlainMessage = 'Plain deferred resolved!' - -export const streamPromiseValue = 'promise-resolved' -export const streamPromiseDelay = 150 -export const streamChunkDelay = 200 -export const streamChunks = Array.from({ length: 5 }, (_, i) => `chunk-${i}`) - -export const routerHtmlPayloadChars = 17 * 1024 * 1024 -export const routerHtmlPayloadChar = 'x' -export const routerHtmlPayloadDelay = 100 - -export const manyPromiseItems = [ - { - key: 'immediate1', - testId: 'immediate-1', - label: 'Immediate 1', - value: 'immediate-1', - delayMs: 0, - }, - { - key: 'immediate2', - testId: 'immediate-2', - label: 'Immediate 2', - value: 'immediate-2', - delayMs: 10, - }, - { - key: 'immediate3', - testId: 'immediate-3', - label: 'Immediate 3', - value: 'immediate-3', - delayMs: 20, - }, - { - key: 'fast1', - testId: 'fast-1', - label: 'Fast 1', - value: 'fast-1', - delayMs: 50, - }, - { - key: 'fast2', - testId: 'fast-2', - label: 'Fast 2', - value: 'fast-2', - delayMs: 75, - }, - { - key: 'fast3', - testId: 'fast-3', - label: 'Fast 3', - value: 'fast-3', - delayMs: 100, - }, - { - key: 'fast4', - testId: 'fast-4', - label: 'Fast 4', - value: 'fast-4', - delayMs: 125, - }, - { - key: 'medium1', - testId: 'medium-1', - label: 'Medium 1', - value: 'medium-1', - delayMs: 150, - }, - { - key: 'medium2', - testId: 'medium-2', - label: 'Medium 2', - value: 'medium-2', - delayMs: 200, - }, - { - key: 'medium3', - testId: 'medium-3', - label: 'Medium 3', - value: 'medium-3', - delayMs: 250, - }, - { - key: 'slow1', - testId: 'slow-1', - label: 'Slow 1', - value: 'slow-1', - delayMs: 300, - }, - { - key: 'slow2', - testId: 'slow-2', - label: 'Slow 2', - value: 'slow-2', - delayMs: 400, - }, - { - key: 'slow3', - testId: 'slow-3', - label: 'Slow 3', - value: 'slow-3', - delayMs: 500, - }, - { - key: 'verySlow1', - testId: 'very-slow-1', - label: 'Very Slow 1', - value: 'very-slow-1', - delayMs: 600, - }, - { - key: 'verySlow2', - testId: 'very-slow-2', - label: 'Very Slow 2', - value: 'very-slow-2', - delayMs: 800, - }, -] as const - -export const concurrentBatchCount = 5 -export const concurrentBatchDelays = [100, 200, 300] as const - -export const queryHeavyItems = [ - { - type: 'sync', - id: 1, - value: 'sync-value-1', - delayMs: 0, - testId: 'sync-query-1', - fallback: 'Loading sync 1...', - }, - { - type: 'sync', - id: 2, - value: 'sync-value-2', - delayMs: 0, - testId: 'sync-query-2', - fallback: 'Loading sync 2...', - }, - { - type: 'sync', - id: 3, - value: 'sync-value-3', - delayMs: 0, - testId: 'sync-query-3', - fallback: 'Loading sync 3...', - }, - { - type: 'fast-async', - id: 1, - value: 'fast-async-1', - delayMs: 50, - testId: 'fast-async-query-1', - fallback: 'Loading fast 1...', - }, - { - type: 'fast-async', - id: 2, - value: 'fast-async-2', - delayMs: 75, - testId: 'fast-async-query-2', - fallback: 'Loading fast 2...', - }, - { - type: 'fast-async', - id: 3, - value: 'fast-async-3', - delayMs: 100, - testId: 'fast-async-query-3', - fallback: 'Loading fast 3...', - }, - { - type: 'slow-async', - id: 1, - value: 'slow-async-1', - delayMs: 200, - testId: 'slow-async-query-1', - fallback: 'Loading slow 1...', - }, - { - type: 'slow-async', - id: 2, - value: 'slow-async-2', - delayMs: 300, - testId: 'slow-async-query-2', - fallback: 'Loading slow 2...', - }, - { - type: 'slow-async', - id: 3, - value: 'slow-async-3', - delayMs: 400, - testId: 'slow-async-query-3', - fallback: 'Loading slow 3...', - }, -] as const - -export function sourceMarker(): SourceMarker { - return typeof window === 'undefined' ? 'server' : 'client' -} - -export function delay(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)) -} - -export function makeServerData(name: string): ServerData { - return { - name, - timestamp: Date.now(), - source: 'server', - } -} - -export function makeDeferred(value: T, delayMs: number): Promise { - return new Promise((resolve) => setTimeout(() => resolve(value), delayMs)) -} - -export function makeDeferredMessage( - message: string, - delayMs: number, -): Promise { - return makeDeferred({ message, source: sourceMarker() }, delayMs) -} - -export function makeFastSerialSmallData() { - return { - value: fastSerialSmallValue, - timestamp: Date.now(), - source: 'server' as const, - } -} - -export function makeSyncOnlyData() { - return { - message: syncOnlyMessage, - timestamp: Date.now(), - items: syncOnlyItems, - source: sourceMarker(), - } -} - -export function makeLevelData(level: number) { - return { level, timestamp: Date.now() } -} - -export function makeQueryData(item: { - type: QueryType - id: number - value: string -}): QueryData { - return { - type: item.type, - id: item.id, - value: item.value, - source: sourceMarker(), - } -} - -export function createManyPromises() { - return Object.fromEntries( - manyPromiseItems.map((item) => [ - item.key, - makeDeferred(item.value, item.delayMs), - ]), - ) as Record<(typeof manyPromiseItems)[number]['key'], Promise> -} - -export function createConcurrentPromises( - count: number, - delayMs: number, -): Array> { - const sharedPromise = delay(delayMs) - return Array.from({ length: count }, (_, i) => - sharedPromise.then(() => `concurrent-${i + 1}`), - ) -} - -export function createConcurrentLoaderData() { - const batch1 = createConcurrentPromises( - concurrentBatchCount, - concurrentBatchDelays[0], - ) - const batch2 = createConcurrentPromises( - concurrentBatchCount, - concurrentBatchDelays[1], - ) - const batch3 = createConcurrentPromises( - concurrentBatchCount, - concurrentBatchDelays[2], - ) - - return { - concurrent1_1: batch1[0], - concurrent1_2: batch1[1], - concurrent1_3: batch1[2], - concurrent1_4: batch1[3], - concurrent1_5: batch1[4], - concurrent2_1: batch2[0], - concurrent2_2: batch2[1], - concurrent2_3: batch2[2], - concurrent2_4: batch2[3], - concurrent2_5: batch2[4], - concurrent3_1: batch3[0], - concurrent3_2: batch3[1], - concurrent3_3: batch3[2], - concurrent3_4: batch3[3], - concurrent3_5: batch3[4], - } -} - -export function createStreamPromise(): Promise { - return makeDeferred(streamPromiseValue, streamPromiseDelay) -} - -export function createChunkStream(): ReadableStream { - return new ReadableStream({ - async start(controller) { - for (const chunk of streamChunks) { - await delay(streamChunkDelay) - controller.enqueue(chunk) - } - controller.close() - }, - }) -} - -export function createRouterHtmlPayload() { - return makeDeferred( - { - value: routerHtmlPayloadChar.repeat(routerHtmlPayloadChars), - source: sourceMarker(), - }, - routerHtmlPayloadDelay, - ) -} diff --git a/e2e/streaming-ssr-specs/client-navigation.ts b/e2e/streaming-ssr-specs/client-navigation.ts deleted file mode 100644 index 759f8e0282..0000000000 --- a/e2e/streaming-ssr-specs/client-navigation.ts +++ /dev/null @@ -1,372 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Client-side navigation between all routes', () => { - test.beforeEach(async ({ page }) => { - // Start from home page - await page.goto('/') - await page.waitForLoadState('networkidle') - }) - - test('home -> sync-only -> home works', async ({ page }) => { - // Navigate to sync-only - await page - .getByRole('navigation') - .getByRole('link', { name: 'Sync Only' }) - .click() - await expect(page).toHaveURL('/sync-only') - await expect(page.getByTestId('sync-message')).toBeVisible() - - // Navigate back to home - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - await expect(page.getByTestId('index-title')).toBeVisible() - }) - - test('home -> deferred -> home works', async ({ page }) => { - // Navigate to deferred (use exact: true to avoid matching "Nested Deferred") - await page - .getByRole('navigation') - .getByRole('link', { name: 'Deferred', exact: true }) - .click() - await expect(page).toHaveURL('/deferred') - await expect(page.getByTestId('immediate-data')).toBeVisible() - - // Wait for deferred data - await expect(page.getByTestId('deferred-data')).toBeVisible({ - timeout: 5000, - }) - - // Navigate back to home - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) - - test('home -> stream -> home works (no stream locking error)', async ({ - page, - }) => { - // This test specifically validates the ReadableStream locking fix - // Console errors are monitored by the fixture automatically - - // Navigate to stream - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - - // Wait for stream to start (at least one chunk or promise resolved) - await expect(page.getByTestId('promise-data')).toBeVisible({ - timeout: 5000, - }) - - // Navigate back without waiting for stream completion. - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) - - test('home -> stream -> wait for completion -> home works', async ({ - page, - }) => { - // Navigate to stream - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - - // Wait for stream to complete - await expect(page.getByTestId('stream-complete')).toBeVisible({ - timeout: 10000, - }) - - // Navigate back to home - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - await expect(page.getByTestId('index-title')).toBeVisible() - }) - - test('home -> stream -> home -> stream again works (fresh stream each time)', async ({ - page, - }) => { - // Console errors are monitored by the fixture automatically - - // First navigation to stream - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - await expect(page.getByTestId('promise-data')).toBeVisible({ - timeout: 5000, - }) - - // Navigate back to home - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - - // Second navigation to stream - should get fresh stream without errors - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - - // Wait for stream to complete - await expect(page.getByTestId('stream-complete')).toBeVisible({ - timeout: 10000, - }) - - // Verify all chunks are present - await expect(page.getByTestId('stream-chunk-0')).toBeVisible() - await expect(page.getByTestId('stream-chunk-4')).toBeVisible() - }) - - test('home -> fast-serial -> home works', async ({ page }) => { - await page - .getByRole('navigation') - .getByRole('link', { name: 'Fast Serial' }) - .click() - await expect(page).toHaveURL('/fast-serial') - await expect(page.getByTestId('server-data')).toBeVisible() - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) - - test('home -> slow-render -> home works', async ({ page }) => { - await page - .getByRole('navigation') - .getByRole('link', { name: 'Slow Render' }) - .click() - await expect(page).toHaveURL('/slow-render') - await expect(page.getByTestId('quick-data')).toBeVisible() - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) - - test('home -> nested-deferred -> home works', async ({ page }) => { - await page - .getByRole('navigation') - .getByRole('link', { name: 'Nested Deferred' }) - .click() - await expect(page).toHaveURL('/nested-deferred') - - // Wait for all levels to load - await expect(page.getByTestId('level3-data')).toBeVisible({ timeout: 5000 }) - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) - - test('navigation without waiting for route data works', async ({ page }) => { - // Console errors are monitored by the fixture automatically - - // Change routes as soon as each URL updates, without waiting for route data. - await page - .getByRole('navigation') - .getByRole('link', { name: 'Sync Only' }) - .click() - await expect(page).toHaveURL('/sync-only') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Deferred', exact: true }) - .click() - await expect(page).toHaveURL('/deferred') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Fast Serial' }) - .click() - await expect(page).toHaveURL('/fast-serial') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Slow Render' }) - .click() - await expect(page).toHaveURL('/slow-render') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Nested Deferred' }) - .click() - await expect(page).toHaveURL('/nested-deferred') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) -}) - -test.describe('Direct navigation followed by client navigation', () => { - test('direct to stream -> client nav to deferred works', async ({ page }) => { - // Direct navigation to stream - await page.goto('/stream') - await expect(page.getByTestId('promise-data')).toBeVisible({ - timeout: 5000, - }) - - // Client navigation to deferred (use exact: true) - await page - .getByRole('navigation') - .getByRole('link', { name: 'Deferred', exact: true }) - .click() - await expect(page).toHaveURL('/deferred') - await expect(page.getByTestId('immediate-data')).toBeVisible() - }) - - test('direct to deferred -> client nav to stream works', async ({ page }) => { - // Console errors are monitored by the fixture automatically - - // Direct navigation to deferred - await page.goto('/deferred') - await expect(page.getByTestId('immediate-data')).toBeVisible() - - // Client navigation to stream - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - await expect(page.getByTestId('stream-complete')).toBeVisible({ - timeout: 10000, - }) - }) - - test('direct to sync-only -> client nav to all routes works', async ({ - page, - }) => { - await page.goto('/sync-only') - await expect(page.getByTestId('sync-message')).toBeVisible() - - // Navigate through all routes - await page - .getByRole('navigation') - .getByRole('link', { name: 'Deferred', exact: true }) - .click() - await expect(page).toHaveURL('/deferred') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Stream' }) - .click() - await expect(page).toHaveURL('/stream') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Fast Serial' }) - .click() - await expect(page).toHaveURL('/fast-serial') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Home' }) - .click() - await expect(page).toHaveURL('/') - }) -}) - -testWithHydration.describe('Hydration after client navigation', () => { - testWithHydration( - 'interactive elements work after navigating to deferred', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Deferred', exact: true }) - .click() - await expect(page).toHaveURL('/deferred') - - // Wait for the page to be fully loaded - await expect(page.getByTestId('immediate-data')).toBeVisible() - }, - ) - - testWithHydration( - 'interactive elements work after navigating to fast-serial', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Fast Serial' }) - .click() - await expect(page).toHaveURL('/fast-serial') - - // Wait for page to load - await expect(page.getByTestId('server-data')).toBeVisible() - }, - ) - - testWithHydration( - 'interactive elements work after navigating to nested-deferred', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Nested Deferred' }) - .click() - await expect(page).toHaveURL('/nested-deferred') - - // Wait for page to load - await expect(page.getByTestId('plain-deferred')).toBeVisible({ - timeout: 5000, - }) - }, - ) - - testWithHydration( - 'interactive elements work after navigating to slow-render', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - await page - .getByRole('navigation') - .getByRole('link', { name: 'Slow Render' }) - .click() - await expect(page).toHaveURL('/slow-render') - - // Wait for page to load (slow-render has blocking loops) - await expect(page.getByTestId('quick-data')).toBeVisible() - }, - ) -}) diff --git a/e2e/streaming-ssr-specs/concurrent.ts b/e2e/streaming-ssr-specs/concurrent.ts deleted file mode 100644 index ef14f80367..0000000000 --- a/e2e/streaming-ssr-specs/concurrent.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Concurrent promise resolution (15 promises in 3 batches)', () => { - test('all concurrent promises resolve correctly', async ({ page }) => { - await page.goto('/concurrent') - - // Batch 1 (5 promises at 100ms) - await expect(page.getByTestId('concurrent-1-1')).toContainText( - 'concurrent-1', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-1-2')).toContainText( - 'concurrent-2', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-1-3')).toContainText( - 'concurrent-3', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-1-4')).toContainText( - 'concurrent-4', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-1-5')).toContainText( - 'concurrent-5', - { timeout: 5000 }, - ) - - // Batch 2 (5 promises at 200ms) - await expect(page.getByTestId('concurrent-2-1')).toContainText( - 'concurrent-1', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-2-2')).toContainText( - 'concurrent-2', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-2-3')).toContainText( - 'concurrent-3', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-2-4')).toContainText( - 'concurrent-4', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-2-5')).toContainText( - 'concurrent-5', - { timeout: 5000 }, - ) - - // Batch 3 (5 promises at 300ms) - await expect(page.getByTestId('concurrent-3-1')).toContainText( - 'concurrent-1', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-3-2')).toContainText( - 'concurrent-2', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-3-3')).toContainText( - 'concurrent-3', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-3-4')).toContainText( - 'concurrent-4', - { timeout: 5000 }, - ) - await expect(page.getByTestId('concurrent-3-5')).toContainText( - 'concurrent-5', - { timeout: 5000 }, - ) - }) - - testWithHydration( - 'hydration works with concurrent resolutions', - async ({ page }) => { - await page.goto('/concurrent') - await page.waitForLoadState('networkidle') - - // Wait for all batches - await expect(page.getByTestId('concurrent-3-5')).toBeVisible({ - timeout: 5000, - }) - }, - ) -}) diff --git a/e2e/streaming-ssr-specs/deferred-rejection.ts b/e2e/streaming-ssr-specs/deferred-rejection.ts deleted file mode 100644 index 3e944b1c0c..0000000000 --- a/e2e/streaming-ssr-specs/deferred-rejection.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { expect, test } from '../streaming-ssr-assertions' - -test.use({ - whitelistErrors: ['Error in deferred object'], -}) - -test('rejected deferred Await renders the route error boundary without killing SSR', async ({ - page, -}) => { - await page.goto('/deferred-rejection') - - await expect(page.getByTestId('deferred-error-boundary')).toContainText( - 'Error in deferred object', - { timeout: 5000 }, - ) - - await page.goto('/sync-only') - await expect(page.getByTestId('sync-message')).toContainText( - 'Hello from sync loader!', - ) -}) diff --git a/e2e/streaming-ssr-specs/deferred.ts b/e2e/streaming-ssr-specs/deferred.ts deleted file mode 100644 index abece0b43e..0000000000 --- a/e2e/streaming-ssr-specs/deferred.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { - expect, - expectDeferredRouteResponseOrder, - test, - testWithHydration, -} from '../streaming-ssr-assertions' - -test.describe('Deferred data streaming', () => { - test('finishes the router stream after renderer output', async ({ - baseURL, - }) => { - await expectDeferredRouteResponseOrder(baseURL) - }) - - test('renders immediate and deferred server data', async ({ page }) => { - await page.goto('/deferred') - - // Immediate loader data is rendered. - await expect(page.getByTestId('immediate-data')).toBeVisible() - await expect(page.getByTestId('immediate-data')).toContainText( - 'Immediate: Fast User', - ) - - // Verify immediate data came from server - await expect(page.getByTestId('immediate-source')).toContainText( - 'Immediate source: server', - ) - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - - // Deferred data should eventually appear with server source - await expect(page.getByTestId('deferred-data')).toContainText( - 'Deferred data loaded!', - { timeout: 5000 }, - ) - await expect(page.getByTestId('deferred-data')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('deferred-server-data')).toContainText( - 'Server: Slow User', - { timeout: 5000 }, - ) - await expect(page.getByTestId('deferred-server-data')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - }) - - testWithHydration( - 'hydration works - interactive elements respond', - async ({ page }) => { - await page.goto('/deferred') - await page.waitForLoadState('networkidle') - - // Wait for all deferred content to load - await expect(page.getByTestId('deferred-data')).toBeVisible({ - timeout: 5000, - }) - - // Verify all data came from server after hydration - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - await expect(page.getByTestId('deferred-data')).toContainText( - 'source: server', - ) - }, - ) - - test('client-side navigation to deferred route works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via client-side routing using nav link - await page.getByRole('link', { name: 'Deferred' }).first().click() - await expect(page).toHaveURL('/deferred') - - // Data should load - await expect(page.getByTestId('immediate-data')).toContainText('Fast User') - await expect(page.getByTestId('deferred-data')).toContainText( - 'Deferred data loaded!', - { timeout: 5000 }, - ) - }) - - test('all data sources are server', async ({ page }) => { - await page.goto('/deferred') - - // Wait for all deferred content - await expect(page.getByTestId('deferred-data')).toBeVisible({ - timeout: 5000, - }) - await expect(page.getByTestId('deferred-server-data')).toBeVisible({ - timeout: 5000, - }) - - // Count all elements showing 'server' source - should be 4: - // 1. immediate-source - // 2. loader-source - // 3. deferred-data (contains "source: server") - // 4. deferred-server-data (contains "source: server") - await expect(page.getByTestId('immediate-source')).toContainText('server') - await expect(page.getByTestId('loader-source')).toContainText('server') - await expect(page.getByTestId('deferred-data')).toContainText( - 'source: server', - ) - await expect(page.getByTestId('deferred-server-data')).toContainText( - 'source: server', - ) - }) -}) diff --git a/e2e/streaming-ssr-specs/fast-serial.ts b/e2e/streaming-ssr-specs/fast-serial.ts deleted file mode 100644 index 03201f0a55..0000000000 --- a/e2e/streaming-ssr-specs/fast-serial.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - expect, - expectRouterHydrationMarkers, - test, - testWithHydration, -} from '../streaming-ssr-assertions' - -test.describe('Fast serialization (serialization completes before render)', () => { - test('initial HTML contains router bootstrap + barrier', async ({ page }) => { - let responseHtml = '' - await page.route('/fast-serial', async (route) => { - const response = await route.fetch() - responseHtml = await response.text() - await route.fulfill({ response }) - }) - - await page.goto('/fast-serial') - await expect(page.getByTestId('server-data')).toBeVisible() - - expectRouterHydrationMarkers(responseHtml) - }) - - test('renders all server data', async ({ page }) => { - await page.goto('/fast-serial') - await page.waitForLoadState('networkidle') - - // All data should be visible - await expect(page.getByTestId('server-data')).toContainText('small-data') - await expect(page.getByTestId('static-data')).toContainText( - 'This is static data', - ) - await expect(page.getByTestId('loader-timestamp')).toBeVisible() - - // Verify the loader and server function ran during SSR. - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - await expect(page.getByTestId('server-fn-source')).toContainText( - 'Server function source: server', - ) - }) - - testWithHydration('hydration works correctly', async ({ page }) => { - await page.goto('/fast-serial') - await page.waitForLoadState('networkidle') - - // Verify data came from server after hydration - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - }) - - test('direct navigation renders correctly', async ({ page }) => { - // Direct navigation (SSR) - await page.goto('/fast-serial') - - // Should render without errors and show server source - await expect(page.getByTestId('server-data')).toBeVisible() - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - }) - - test('client-side navigation works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Fast Serial' }).first().click() - await expect(page).toHaveURL('/fast-serial') - - await expect(page.getByTestId('server-data')).toContainText('small-data') - }) -}) diff --git a/e2e/streaming-ssr-specs/home.ts b/e2e/streaming-ssr-specs/home.ts deleted file mode 100644 index d85e19bfa7..0000000000 --- a/e2e/streaming-ssr-specs/home.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Home page', () => { - testWithHydration( - 'renders index page with all navigation links', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - await expect(page.getByTestId('index-title')).toContainText( - 'Streaming SSR Test Scenarios', - ) - // Check links exist (they're in the nav and the body) - await expect( - page.getByRole('link', { name: 'Deferred' }).first(), - ).toBeVisible() - await expect( - page.getByRole('link', { name: 'Stream' }).first(), - ).toBeVisible() - }, - ) - - testWithHydration( - 'navigation from home to routes works', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Use the link in the content (not nav) - await page.getByTestId('link-deferred').click() - await expect(page).toHaveURL('/deferred') - }, - ) -}) diff --git a/e2e/streaming-ssr-specs/many-promises.ts b/e2e/streaming-ssr-specs/many-promises.ts deleted file mode 100644 index 768859c7e4..0000000000 --- a/e2e/streaming-ssr-specs/many-promises.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Many promises streaming (15 deferred)', () => { - test('all 15 promises eventually resolve', async ({ page }) => { - await page.goto('/many-promises') - - // Immediate group (0-20ms) - await expect(page.getByTestId('immediate-1')).toContainText('immediate-1', { - timeout: 5000, - }) - await expect(page.getByTestId('immediate-2')).toContainText('immediate-2', { - timeout: 5000, - }) - await expect(page.getByTestId('immediate-3')).toContainText('immediate-3', { - timeout: 5000, - }) - - // Fast group (50-125ms) - await expect(page.getByTestId('fast-1')).toContainText('fast-1', { - timeout: 5000, - }) - await expect(page.getByTestId('fast-2')).toContainText('fast-2', { - timeout: 5000, - }) - await expect(page.getByTestId('fast-3')).toContainText('fast-3', { - timeout: 5000, - }) - await expect(page.getByTestId('fast-4')).toContainText('fast-4', { - timeout: 5000, - }) - - // Medium group (150-250ms) - await expect(page.getByTestId('medium-1')).toContainText('medium-1', { - timeout: 5000, - }) - await expect(page.getByTestId('medium-2')).toContainText('medium-2', { - timeout: 5000, - }) - await expect(page.getByTestId('medium-3')).toContainText('medium-3', { - timeout: 5000, - }) - - // Slow group (300-500ms) - await expect(page.getByTestId('slow-1')).toContainText('slow-1', { - timeout: 5000, - }) - await expect(page.getByTestId('slow-2')).toContainText('slow-2', { - timeout: 5000, - }) - await expect(page.getByTestId('slow-3')).toContainText('slow-3', { - timeout: 5000, - }) - - // Very slow group (600-800ms) - await expect(page.getByTestId('very-slow-1')).toContainText('very-slow-1', { - timeout: 5000, - }) - await expect(page.getByTestId('very-slow-2')).toContainText('very-slow-2', { - timeout: 5000, - }) - }) - - testWithHydration('hydration works with many promises', async ({ page }) => { - await page.goto('/many-promises') - await page.waitForLoadState('networkidle') - - // Wait for all promises to resolve - await expect(page.getByTestId('very-slow-2')).toBeVisible({ timeout: 5000 }) - }) - - test('client-side navigation works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Many Promises' }).click() - await expect(page).toHaveURL('/many-promises') - - // All promises should eventually resolve - await expect(page.getByTestId('very-slow-2')).toBeVisible({ timeout: 5000 }) - }) -}) diff --git a/e2e/streaming-ssr-specs/nested-deferred.ts b/e2e/streaming-ssr-specs/nested-deferred.ts deleted file mode 100644 index 0146a23162..0000000000 --- a/e2e/streaming-ssr-specs/nested-deferred.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Nested deferred (multiple levels of deferred data)', () => { - test('all levels of deferred data eventually resolve', async ({ page }) => { - await page.goto('/nested-deferred') - - // All deferred values should eventually resolve. - await expect(page.getByTestId('plain-deferred')).toContainText( - 'Plain deferred resolved!', - { timeout: 5000 }, - ) - - await expect(page.getByTestId('level1-data')).toContainText('Level 1:', { - timeout: 5000, - }) - - await expect(page.getByTestId('level2-data')).toContainText('Level 2:', { - timeout: 5000, - }) - - await expect(page.getByTestId('level3-data')).toContainText('Level 3:', { - timeout: 5000, - }) - }) - - testWithHydration( - 'hydration works with nested deferred', - async ({ page }) => { - await page.goto('/nested-deferred') - await page.waitForLoadState('networkidle') - - // Wait for all data - await expect(page.getByTestId('level3-data')).toBeVisible({ - timeout: 10000, - }) - }, - ) - - test('client-side navigation works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Nested Deferred' }).first().click() - await expect(page).toHaveURL('/nested-deferred') - - // All levels should eventually render - await expect(page.getByTestId('level3-data')).toBeVisible({ - timeout: 10000, - }) - }) -}) diff --git a/e2e/streaming-ssr-specs/preview-streaming.ts b/e2e/streaming-ssr-specs/preview-streaming.ts deleted file mode 100644 index 5087dff730..0000000000 --- a/e2e/streaming-ssr-specs/preview-streaming.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { - expectDeferredRouteResponseOrder, - test, -} from '../streaming-ssr-assertions' - -test.skip( - process.env.MODE !== 'preview', - 'Only runs against vite preview: pnpm test:e2e:preview', -) - -test('vite preview preserves deferred HTML order', async ({ baseURL }) => { - await expectDeferredRouteResponseOrder(baseURL) -}) diff --git a/e2e/streaming-ssr-specs/query-heavy.ts b/e2e/streaming-ssr-specs/query-heavy.ts deleted file mode 100644 index b33a64f366..0000000000 --- a/e2e/streaming-ssr-specs/query-heavy.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { - expect, - expectQueryHeavyRouteStreamOrder, - test, - testWithHydration, -} from '../streaming-ssr-assertions' - -test.describe('Query heavy route (9 queries)', () => { - test('emits the complete router stream before document closes', async ({ - baseURL, - }) => { - await expectQueryHeavyRouteStreamOrder(baseURL) - }) - - test('all queries resolve with server data', async ({ page }) => { - await page.goto('/query-heavy') - - // Sync queries should show server source - await expect(page.getByTestId('sync-query-1')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('sync-query-2')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('sync-query-3')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - - // Fast async queries should show server source - await expect(page.getByTestId('fast-async-query-1')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('fast-async-query-2')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('fast-async-query-3')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - - // Slow async queries should show server source - await expect(page.getByTestId('slow-async-query-1')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('slow-async-query-2')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - await expect(page.getByTestId('slow-async-query-3')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - }) - - test('sync queries have correct values', async ({ page }) => { - await page.goto('/query-heavy') - - await expect(page.getByTestId('sync-query-1')).toContainText('sync-value-1') - await expect(page.getByTestId('sync-query-2')).toContainText('sync-value-2') - await expect(page.getByTestId('sync-query-3')).toContainText('sync-value-3') - }) - - test('async queries have correct values', async ({ page }) => { - await page.goto('/query-heavy') - - await expect(page.getByTestId('fast-async-query-1')).toContainText( - 'fast-async-1', - { timeout: 5000 }, - ) - await expect(page.getByTestId('fast-async-query-2')).toContainText( - 'fast-async-2', - { timeout: 5000 }, - ) - await expect(page.getByTestId('fast-async-query-3')).toContainText( - 'fast-async-3', - { timeout: 5000 }, - ) - - await expect(page.getByTestId('slow-async-query-1')).toContainText( - 'slow-async-1', - { timeout: 5000 }, - ) - await expect(page.getByTestId('slow-async-query-2')).toContainText( - 'slow-async-2', - { timeout: 5000 }, - ) - await expect(page.getByTestId('slow-async-query-3')).toContainText( - 'slow-async-3', - { timeout: 5000 }, - ) - }) - - testWithHydration('hydration works with many queries', async ({ page }) => { - await page.goto('/query-heavy') - await page.waitForLoadState('networkidle') - - // Wait for all queries to resolve - await expect(page.getByTestId('slow-async-query-3')).toBeVisible({ - timeout: 5000, - }) - }) - - test('client-side navigation works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Query Heavy' }).click() - await expect(page).toHaveURL('/query-heavy') - - // All queries should eventually resolve (on client) - await expect(page.getByTestId('slow-async-query-3')).toBeVisible({ - timeout: 5000, - }) - }) - - test('server query data hydrates without client refetch', async ({ - page, - }) => { - // If hydration missed the server data, these queries would re-execute on - // the client and show "client" as their source. - await page.goto('/query-heavy') - - // Wait for all queries - await expect(page.getByTestId('slow-async-query-3')).toBeVisible({ - timeout: 5000, - }) - - // Verify that all server results hydrated without a client refetch. - const serverSourceCount = await page - .locator('[data-testid*="query-"]') - .filter({ hasText: 'source: server' }) - .count() - expect(serverSourceCount).toBe(9) - }) -}) diff --git a/e2e/streaming-ssr-specs/slow-render.ts b/e2e/streaming-ssr-specs/slow-render.ts deleted file mode 100644 index 117559701e..0000000000 --- a/e2e/streaming-ssr-specs/slow-render.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -test.describe('Slow render (render takes longer than serialization)', () => { - test('all data eventually renders with server source', async ({ page }) => { - await page.goto('/slow-render') - await page.waitForLoadState('networkidle') - - // Quick data should be available with server source - await expect(page.getByTestId('quick-data')).toContainText('Quick:') - await expect(page.getByTestId('quick-source')).toContainText( - 'Quick data source: server', - ) - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - - // Deferred data should resolve with server source - await expect(page.getByTestId('deferred-resolved')).toContainText( - 'Deferred resolved!', - { timeout: 5000 }, - ) - await expect(page.getByTestId('deferred-resolved')).toContainText( - 'source: server', - { timeout: 5000 }, - ) - - // Slow components should have rendered - await expect(page.getByTestId('slow-component-1')).toBeVisible() - await expect(page.getByTestId('slow-component-2')).toBeVisible() - await expect(page.getByTestId('slow-component-3')).toBeVisible() - }) - - testWithHydration('hydration works after slow render', async ({ page }) => { - await page.goto('/slow-render') - await page.waitForLoadState('networkidle') - - // Wait for content and verify server source - await expect(page.getByTestId('slow-component-1')).toBeVisible() - await expect(page.getByTestId('loader-source')).toContainText( - 'Loader source: server', - ) - }) - - test('client-side navigation works', async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Slow Render' }).first().click() - await expect(page).toHaveURL('/slow-render') - - await expect(page.getByTestId('quick-data')).toBeVisible({ timeout: 10000 }) - }) - - test('all data sources are server', async ({ page }) => { - await page.goto('/slow-render') - await page.waitForLoadState('networkidle') - - // Wait for deferred content - await expect(page.getByTestId('deferred-resolved')).toBeVisible({ - timeout: 5000, - }) - - // Verify all sources are server - await expect(page.getByTestId('quick-source')).toContainText('server') - await expect(page.getByTestId('loader-source')).toContainText('server') - await expect(page.getByTestId('deferred-resolved')).toContainText( - 'source: server', - ) - }) -}) diff --git a/e2e/streaming-ssr-specs/stream.ts b/e2e/streaming-ssr-specs/stream.ts deleted file mode 100644 index ee61f170de..0000000000 --- a/e2e/streaming-ssr-specs/stream.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { expect, test, testWithHydration } from '../streaming-ssr-assertions' - -const expectedStreamChunks = [ - 'chunk-0', - 'chunk-1', - 'chunk-2', - 'chunk-3', - 'chunk-4', -] - -test.describe('ReadableStream deserialization', () => { - testWithHydration('promise data deserializes correctly', async ({ page }) => { - await page.goto('/stream') - - await expect(page.getByTestId('promise-data')).toContainText( - 'promise-resolved', - { timeout: 5000 }, - ) - }) - - testWithHydration( - 'stream chunks deserialize in source order', - async ({ page }) => { - await page.goto('/stream') - - await expect(page.getByTestId('stream-complete')).toBeVisible({ - timeout: 10000, - }) - - const chunks = page - .getByTestId('stream-data') - .locator('[data-testid^="stream-chunk-"]') - await expect(chunks).toHaveText(expectedStreamChunks) - - // This browser assertion covers deserialization and source order. The - // raw `/deferred` assertion covers server-response and router ordering. - }, - ) - - testWithHydration( - 'client-side navigation to stream route works', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - - // Navigate via nav link - await page.getByRole('link', { name: 'Stream' }).first().click() - await expect(page).toHaveURL('/stream') - - await expect(page.getByTestId('stream-complete')).toBeVisible({ - timeout: 10000, - }) - }, - ) -}) diff --git a/e2e/streaming-ssr-specs/sync-only.ts b/e2e/streaming-ssr-specs/sync-only.ts deleted file mode 100644 index 9850265109..0000000000 --- a/e2e/streaming-ssr-specs/sync-only.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - expect, - expectRouterHydrationMarkers, - test, - testWithHydration, -} from '../streaming-ssr-assertions' - -/** - * Tests for synchronous serialization - no deferred data, no streaming. - * This is the most common case where all loader data is immediately available. - * The hydration scripts should be included in the initial HTML response. - */ - -test('Sync-only route renders with loader data', async ({ page }) => { - await page.goto('/sync-only') - - // Verify the page content is rendered - await expect(page.getByTestId('sync-title')).toContainText( - 'Synchronous Serialization Test', - ) - await expect(page.getByTestId('sync-message')).toContainText( - 'Hello from sync loader!', - ) - - // Verify loader data items are rendered - await expect(page.getByTestId('sync-item-item-1')).toBeVisible() - await expect(page.getByTestId('sync-item-item-2')).toBeVisible() - await expect(page.getByTestId('sync-item-item-3')).toBeVisible() - - // Verify the loader ran during SSR. - await expect(page.getByTestId('sync-source')).toContainText('Source: server') -}) - -testWithHydration('Sync-only route hydrates correctly', async ({ page }) => { - await page.goto('/sync-only') - - // Verify client-side navigation works (proves hydration succeeded) - await page.getByRole('navigation').getByRole('link', { name: 'Home' }).click() - await expect(page.getByTestId('index-title')).toBeVisible() - - // Navigate back to sync-only via client-side navigation (use nav link to be specific) - await page - .getByRole('navigation') - .getByRole('link', { name: 'Sync Only' }) - .click() - await expect(page.getByTestId('sync-title')).toBeVisible() -}) - -test('Sync-only route has bootstrap scripts in initial HTML', async ({ - page, -}) => { - // Intercept the response to check the raw HTML - let responseHtml = '' - await page.route('/sync-only', async (route) => { - const response = await route.fetch() - responseHtml = await response.text() - await route.fulfill({ response }) - }) - - await page.goto('/sync-only') - - // Wait for page to load - await expect(page.getByTestId('sync-title')).toBeVisible() - - // Bootstrap, end record, and the boundary rendered by . - expectRouterHydrationMarkers(responseHtml) -}) - -test('Navigating to sync-only from home page', async ({ page }) => { - await page.goto('/') - - await page.getByTestId('link-sync-only').click() - - await expect(page.getByTestId('sync-title')).toContainText( - 'Synchronous Serialization Test', - ) - await expect(page.getByTestId('sync-message')).toContainText( - 'Hello from sync loader!', - ) -}) diff --git a/e2e/vue-router/basepath-file-based/package.json b/e2e/vue-router/basepath-file-based/package.json index 3af9176e83..4e3deac1c7 100644 --- a/e2e/vue-router/basepath-file-based/package.json +++ b/e2e/vue-router/basepath-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,17 +17,17 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basepath-file-based/playwright.config.ts b/e2e/vue-router/basepath-file-based/playwright.config.ts index 4eead86444..6069bbe59f 100644 --- a/e2e/vue-router/basepath-file-based/playwright.config.ts +++ b/e2e/vue-router/basepath-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basepath-file-based/src/routeTree.gen.ts b/e2e/vue-router/basepath-file-based/src/routeTree.gen.ts index 75b8119285..82b561baf1 100644 --- a/e2e/vue-router/basepath-file-based/src/routeTree.gen.ts +++ b/e2e/vue-router/basepath-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/e2e/vue-router/basepath-file-based/tests/setup/global.setup.ts b/e2e/vue-router/basepath-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basepath-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basepath-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/basepath-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basepath-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/package.json b/e2e/vue-router/basic-esbuild-file-based/package.json index a51cf9149c..e5422cd436 100644 --- a/e2e/vue-router/basic-esbuild-file-based/package.json +++ b/e2e/vue-router/basic-esbuild-file-based/package.json @@ -7,29 +7,28 @@ "build": "node src/esbuild.run.js build && vue-tsc --noEmit", "preview": "node src/esbuild.run.js preview", "start": "pnpm dev", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/router-plugin": "workspace:^", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "postcss": "^8.5.1", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { "@eslint/js": "^9.36.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@typescript-eslint/eslint-plugin": "^8.44.1", "@typescript-eslint/parser": "^8.44.1", "esbuild": "^0.27.4", "esbuild-plugin-vue3": "^0.5.1", "eslint-plugin-vue": "^9.33.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vue-eslint-parser": "^9.4.3", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-esbuild-file-based/playwright.config.ts b/e2e/vue-router/basic-esbuild-file-based/playwright.config.ts index 9d9c8d49a3..836ea41bd8 100644 --- a/e2e/vue-router/basic-esbuild-file-based/playwright.config.ts +++ b/e2e/vue-router/basic-esbuild-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-esbuild-file-based/src/esbuild.config.js b/e2e/vue-router/basic-esbuild-file-based/src/esbuild.config.js index 16f6fbca44..c4aba8798e 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/esbuild.config.js +++ b/e2e/vue-router/basic-esbuild-file-based/src/esbuild.config.js @@ -9,6 +9,7 @@ export default { }), tanstackRouter({ target: 'vue', + autoCodeSplitting: true, }), ], } diff --git a/e2e/vue-router/basic-esbuild-file-based/src/esbuild.run.js b/e2e/vue-router/basic-esbuild-file-based/src/esbuild.run.js index 0ab294f2bf..19e882c1a9 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/esbuild.run.js +++ b/e2e/vue-router/basic-esbuild-file-based/src/esbuild.run.js @@ -1,7 +1,8 @@ -import http from 'node:http' -import { createReadStream, promises as fs } from 'node:fs' -import path from 'node:path' import * as esbuild from 'esbuild' +import http from 'node:http' +import { createReadStream } from 'node:fs' +import { promises as fs } from 'node:fs' +import path from 'node:path' import esbuildConfig from './esbuild.config.js' const args = process.argv.slice(2) @@ -17,7 +18,7 @@ function getPort() { const fromArg = getArgValue('--port') const fromEnv = process.env.VITE_SERVER_PORT const port = Number(fromArg ?? fromEnv ?? 5601) - if (!Number.isFinite(port) || port < 0) { + if (!Number.isFinite(port) || port <= 0) { throw new Error(`Invalid port: ${String(fromArg ?? fromEnv)}`) } return port @@ -137,7 +138,7 @@ function startStaticServer({ port }) { return new Promise((resolve) => { server.listen(port, () => { - console.log(`E2E app: http://localhost:${server.address().port}`) + console.log(`http://localhost:${port}`) resolve(server) }) }) diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/(another-group)/onlyrouteinside.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/(another-group)/onlyrouteinside.tsx index 8869cefc01..727c1b4d94 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/(another-group)/onlyrouteinside.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/(another-group)/onlyrouteinside.tsx @@ -1,32 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const OnlyRouteInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ - from: '/(another-group)/onlyrouteinside', - }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(another-group)/onlyrouteinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: OnlyRouteInsideComponent, }) const routeApi = getRouteApi('/(another-group)/onlyrouteinside') + +function OnlyRouteInsideComponent() { + const searchViaHook = useSearch({ from: '/(another-group)/onlyrouteinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/_layout.insidelayout.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/_layout.insidelayout.tsx index f2998803fd..4b239f3ef4 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/_layout.insidelayout.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/_layout.insidelayout.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const InsideLayoutComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/_layout/insidelayout')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideLayoutComponent, }) const routeApi = getRouteApi('/(group)/_layout/insidelayout') + +function InsideLayoutComponent() { + const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/inside.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/inside.tsx index 20e0d5afdb..f12ca517d3 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/inside.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/inside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const InsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideComponent, }) const routeApi = getRouteApi('/(group)/inside') + +function InsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/lazyinside.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/lazyinside.tsx index a46da658d6..05b34eb201 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/lazyinside.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/lazyinside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const LazyInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/lazyinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: LazyInsideComponent, }) const routeApi = getRouteApi('/(group)/lazyinside') + +function LazyInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/subfolder/inside.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/subfolder/inside.tsx index 715d2cc972..317c766186 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/subfolder/inside.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/(group)/subfolder/inside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const SubfolderInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/subfolder/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: SubfolderInsideComponent, }) const routeApi = getRouteApi('/(group)/subfolder/inside') + +function SubfolderInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/__root.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/__root.tsx index 62c4af3aa4..59c9e6fa48 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/__root.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/__root.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { HeadContent, Link, @@ -11,97 +10,95 @@ import { import { TanStackRouterDevtools } from '@tanstack/vue-router-devtools' import NotFoundComponent from '../components/NotFoundComponent.vue' -const RootComponent = defineComponent({ - setup() { - const router = useRouter() - const canGoBack = useCanGoBack() - // test useRouterState doesn't crash client side navigation - const _state = useRouterState() - - return () => ( - <> - -
    - - - Home - - - Posts - - - Layout - - - Only Route Inside Group - - - Inside Group - - - Inside Subfolder Inside Group - - - Inside Group Inside Layout - - - Lazy Inside Group - - - unicode path - - - This Route Does Not Exist - -
    -
    - - - - ) - }, -}) - export const Route = createRootRoute({ component: RootComponent, notFoundComponent: NotFoundComponent, }) + +function RootComponent() { + const router = useRouter() + const canGoBack = useCanGoBack() + // test useRouterState doesn't crash client side navigation + const _state = useRouterState() + + return ( + <> + +
    + + + Home + + + Posts + + + Layout + + + Only Route Inside Group + + + Inside Group + + + Inside Subfolder Inside Group + + + Inside Group Inside Layout + + + Lazy Inside Group + + + unicode path + + + This Route Does Not Exist + +
    +
    + + + + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.$postId.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.$postId.tsx index 54ae789c8e..15d17387c8 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.$postId.tsx @@ -1,27 +1,24 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import PostErrorComponent from '../components/PostErrorComponent.vue' import { fetchPost } from '../posts' import type { PostType } from '../posts' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    - {(post.value as PostType).title} -

    -
    {(post.value as PostType).body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), component: PostComponent, errorComponent: PostErrorComponent, notFoundComponent: () =>

    Post not found

    , }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    + {(post.value as PostType).title} +

    +
    {(post.value as PostType).body}
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.tsx index e0afd27b4c..ae580dfc02 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts.tsx @@ -1,38 +1,7 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../posts' import type { PostType } from '../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...(posts.value as Array), - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ head: () => ({ meta: [ @@ -44,3 +13,31 @@ export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...(posts.value as Array), + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts_.$postId.edit.tsx b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts_.$postId.edit.tsx index 22979c93c9..57963c6b64 100644 --- a/e2e/vue-router/basic-esbuild-file-based/src/routes/posts_.$postId.edit.tsx +++ b/e2e/vue-router/basic-esbuild-file-based/src/routes/posts_.$postId.edit.tsx @@ -1,28 +1,23 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useParams } from '@tanstack/vue-router' -const PostEditComponent = defineComponent({ - setup() { - const paramsViaApi = api.useParams() - const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) - const paramsViaRouteHook = api.useParams() - - return () => ( -
    -
    {paramsViaHook.value.postId}
    -
    - {paramsViaRouteHook.value.postId} -
    -
    - {paramsViaApi.value.postId} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts_/$postId/edit')({ component: PostEditComponent, }) const api = getRouteApi('/posts_/$postId/edit') + +function PostEditComponent() { + const paramsViaApi = api.useParams() + const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) + const paramsViaRouteHook = api.useParams() + + return ( +
    +
    {paramsViaHook.value.postId}
    +
    + {paramsViaRouteHook.value.postId} +
    +
    {paramsViaApi.value.postId}
    +
    + ) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/tests/app.spec.ts b/e2e/vue-router/basic-esbuild-file-based/tests/app.spec.ts index 7380859e7b..543746d64d 100644 --- a/e2e/vue-router/basic-esbuild-file-based/tests/app.spec.ts +++ b/e2e/vue-router/basic-esbuild-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' test.beforeEach(async ({ page }) => { diff --git a/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.setup.ts b/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-esbuild-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-file-based-jsx/package.json b/e2e/vue-router/basic-file-based-jsx/package.json index 9ab7f21e82..b029b1ab4f 100644 --- a/e2e/vue-router/basic-file-based-jsx/package.json +++ b/e2e/vue-router/basic-file-based-jsx/package.json @@ -8,21 +8,21 @@ "build": "vite build && vue-tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/router-plugin": "workspace:^", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { "@eslint/js": "^9.36.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@typescript-eslint/eslint-plugin": "^8.44.1", "@typescript-eslint/parser": "^8.44.1", @@ -32,6 +32,6 @@ "typescript": "~5.8.3", "vite": "^8.0.14", "vue-eslint-parser": "^9.4.3", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-file-based-jsx/playwright.config.ts b/e2e/vue-router/basic-file-based-jsx/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic-file-based-jsx/playwright.config.ts +++ b/e2e/vue-router/basic-file-based-jsx/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-file-based-jsx/src/posts.tsx b/e2e/vue-router/basic-file-based-jsx/src/posts.tsx index f7a1941605..1b4c92b41d 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/posts.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/basic-file-based-jsx/src/routeTree.gen.ts b/e2e/vue-router/basic-file-based-jsx/src/routeTree.gen.ts index 5922c5f7b1..f5cd519d7f 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routeTree.gen.ts +++ b/e2e/vue-router/basic-file-based-jsx/src/routeTree.gen.ts @@ -11,62 +11,34 @@ import { lazyRouteComponent } from '@tanstack/vue-router' import { Route as rootRouteImport } from './routes/__root' -import { Route as IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as EditingARouteImport } from './routes/editing-a' -import { Route as EditingBRouteImport } from './routes/editing-b' -import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RemountDepsRouteImport } from './routes/remountDeps' -import { Route as SfcComponentRouteImport } from './routes/sfcComponent' import { Route as Char45824Char54620Char48124Char44397RouteImport } from './routes/대한민국' -import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' -import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' -import { Route as groupInsideRouteImport } from './routes/(group)/inside' -import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as SfcComponentRouteImport } from './routes/sfcComponent' +import { Route as RemountDepsRouteImport } from './routes/remountDeps' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' +import { Route as EditingBRouteImport } from './routes/editing-b' +import { Route as EditingARouteImport } from './routes/editing-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' +import { Route as groupInsideRouteImport } from './routes/(group)/inside' +import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' +import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' +import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const EditingARoute = EditingARouteImport.update({ - id: '/editing-a', - path: '/editing-a', - getParentRoute: () => rootRouteImport, -} as any) -const EditingBRoute = EditingBRouteImport.update({ - id: '/editing-b', - path: '/editing-b', - getParentRoute: () => rootRouteImport, -} as any) -const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ - id: '/notRemountDeps', - path: '/notRemountDeps', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RemountDepsRoute = RemountDepsRouteImport.update({ - id: '/remountDeps', - path: '/remountDeps', - getParentRoute: () => rootRouteImport, -} as any) +const Char45824Char54620Char48124Char44397Route = + Char45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => rootRouteImport, + } as any) const SfcComponentRoute = SfcComponentRouteImport.update({ id: '/sfcComponent', path: '/sfcComponent', @@ -77,35 +49,39 @@ const SfcComponentRoute = SfcComponentRouteImport.update({ 'default', ), }) -const Char45824Char54620Char48124Char44397Route = - Char45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => rootRouteImport, - } as any) -const anotherGroupOnlyrouteinsideRoute = - anotherGroupOnlyrouteinsideRouteImport.update({ - id: '/(another-group)/onlyrouteinside', - path: '/onlyrouteinside', - getParentRoute: () => rootRouteImport, - } as any) -const groupLayoutRoute = groupLayoutRouteImport.update({ - id: '/(group)/_layout', +const RemountDepsRoute = RemountDepsRouteImport.update({ + id: '/remountDeps', + path: '/remountDeps', getParentRoute: () => rootRouteImport, } as any) -const groupInsideRoute = groupInsideRouteImport.update({ - id: '/(group)/inside', - path: '/inside', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const groupLazyinsideRoute = groupLazyinsideRouteImport.update({ - id: '/(group)/lazyinside', - path: '/lazyinside', +const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ + id: '/notRemountDeps', + path: '/notRemountDeps', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const EditingBRoute = EditingBRouteImport.update({ + id: '/editing-b', + path: '/editing-b', + getParentRoute: () => rootRouteImport, +} as any) +const EditingARoute = EditingARouteImport.update({ + id: '/editing-a', + path: '/editing-a', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', @@ -117,31 +93,55 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ - id: '/insidelayout', - path: '/insidelayout', - getParentRoute: () => groupLayoutRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) -const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ - id: '/(group)/subfolder/inside', - path: '/subfolder/inside', +const groupLazyinsideRoute = groupLazyinsideRouteImport.update({ + id: '/(group)/lazyinside', + path: '/lazyinside', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const groupInsideRoute = groupInsideRouteImport.update({ + id: '/(group)/inside', + path: '/inside', + getParentRoute: () => rootRouteImport, +} as any) +const groupLayoutRoute = groupLayoutRouteImport.update({ + id: '/(group)/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const anotherGroupOnlyrouteinsideRoute = + anotherGroupOnlyrouteinsideRouteImport.update({ + id: '/(another-group)/onlyrouteinside', + path: '/onlyrouteinside', + getParentRoute: () => rootRouteImport, + } as any) +const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ + id: '/posts_/$postId/edit', + path: '/posts/$postId/edit', + getParentRoute: () => rootRouteImport, } as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) -const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ - id: '/posts_/$postId/edit', - path: '/posts/$postId/edit', +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) +const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ + id: '/(group)/subfolder/inside', + path: '/subfolder/inside', getParentRoute: () => rootRouteImport, } as any) +const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ + id: '/insidelayout', + path: '/insidelayout', + getParentRoute: () => groupLayoutRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -291,53 +291,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/editing-a': { - id: '/editing-a' - path: '/editing-a' - fullPath: '/editing-a' - preLoaderRoute: typeof EditingARouteImport - parentRoute: typeof rootRouteImport - } - '/editing-b': { - id: '/editing-b' - path: '/editing-b' - fullPath: '/editing-b' - preLoaderRoute: typeof EditingBRouteImport - parentRoute: typeof rootRouteImport - } - '/notRemountDeps': { - id: '/notRemountDeps' - path: '/notRemountDeps' - fullPath: '/notRemountDeps' - preLoaderRoute: typeof NotRemountDepsRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/remountDeps': { - id: '/remountDeps' - path: '/remountDeps' - fullPath: '/remountDeps' - preLoaderRoute: typeof RemountDepsRouteImport + '/대한민국': { + id: '/대한민국' + path: '/대한민국' + fullPath: '/대한민국' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport parentRoute: typeof rootRouteImport } '/sfcComponent': { @@ -347,47 +305,54 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SfcComponentRouteImport parentRoute: typeof rootRouteImport } - '/대한민국': { - id: '/대한민국' - path: '/대한민국' - fullPath: '/대한민국' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport + '/remountDeps': { + id: '/remountDeps' + path: '/remountDeps' + fullPath: '/remountDeps' + preLoaderRoute: typeof RemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/(another-group)/onlyrouteinside': { - id: '/(another-group)/onlyrouteinside' - path: '/onlyrouteinside' - fullPath: '/onlyrouteinside' - preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout': { - id: '/(group)/_layout' + '/notRemountDeps': { + id: '/notRemountDeps' + path: '/notRemountDeps' + fullPath: '/notRemountDeps' + preLoaderRoute: typeof NotRemountDepsRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-b': { + id: '/editing-b' + path: '/editing-b' + fullPath: '/editing-b' + preLoaderRoute: typeof EditingBRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-a': { + id: '/editing-a' + path: '/editing-a' + fullPath: '/editing-a' + preLoaderRoute: typeof EditingARouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof groupLayoutRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/(group)/inside': { - id: '/(group)/inside' - path: '/inside' - fullPath: '/inside' - preLoaderRoute: typeof groupInsideRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/lazyinside': { - id: '/(group)/lazyinside' - path: '/lazyinside' - fullPath: '/lazyinside' - preLoaderRoute: typeof groupLazyinsideRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -403,26 +368,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/(group)/_layout/insidelayout': { - id: '/(group)/_layout/insidelayout' - path: '/insidelayout' - fullPath: '/insidelayout' - preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport - parentRoute: typeof groupLayoutRoute + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } - '/(group)/subfolder/inside': { - id: '/(group)/subfolder/inside' - path: '/subfolder/inside' - fullPath: '/subfolder/inside' - preLoaderRoute: typeof groupSubfolderInsideRouteImport + '/(group)/lazyinside': { + id: '/(group)/lazyinside' + path: '/lazyinside' + fullPath: '/lazyinside' + preLoaderRoute: typeof groupLazyinsideRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/(group)/inside': { + id: '/(group)/inside' + path: '/inside' + fullPath: '/inside' + preLoaderRoute: typeof groupInsideRouteImport + parentRoute: typeof rootRouteImport + } + '/(group)/_layout': { + id: '/(group)/_layout' + path: '' + fullPath: '' + preLoaderRoute: typeof groupLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/(another-group)/onlyrouteinside': { + id: '/(another-group)/onlyrouteinside' + path: '/onlyrouteinside' + fullPath: '/onlyrouteinside' + preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + parentRoute: typeof rootRouteImport + } + '/posts_/$postId/edit': { + id: '/posts_/$postId/edit' + path: '/posts/$postId/edit' + fullPath: '/posts/$postId/edit' + preLoaderRoute: typeof PostsPostIdEditRouteImport + parentRoute: typeof rootRouteImport } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -431,13 +417,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts_/$postId/edit': { - id: '/posts_/$postId/edit' - path: '/posts/$postId/edit' - fullPath: '/posts/$postId/edit' - preLoaderRoute: typeof PostsPostIdEditRouteImport + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/(group)/subfolder/inside': { + id: '/(group)/subfolder/inside' + path: '/subfolder/inside' + fullPath: '/subfolder/inside' + preLoaderRoute: typeof groupSubfolderInsideRouteImport parentRoute: typeof rootRouteImport } + '/(group)/_layout/insidelayout': { + id: '/(group)/_layout/insidelayout' + path: '/insidelayout' + fullPath: '/insidelayout' + preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport + parentRoute: typeof groupLayoutRoute + } } } diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx index 8869cefc01..727c1b4d94 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx @@ -1,32 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const OnlyRouteInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ - from: '/(another-group)/onlyrouteinside', - }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(another-group)/onlyrouteinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: OnlyRouteInsideComponent, }) const routeApi = getRouteApi('/(another-group)/onlyrouteinside') + +function OnlyRouteInsideComponent() { + const searchViaHook = useSearch({ from: '/(another-group)/onlyrouteinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx index f2998803fd..4b239f3ef4 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const InsideLayoutComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/_layout/insidelayout')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideLayoutComponent, }) const routeApi = getRouteApi('/(group)/_layout/insidelayout') + +function InsideLayoutComponent() { + const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/inside.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/inside.tsx index 20e0d5afdb..f12ca517d3 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/inside.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/inside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const InsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideComponent, }) const routeApi = getRouteApi('/(group)/inside') + +function InsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx index a46da658d6..05b34eb201 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const LazyInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/lazyinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: LazyInsideComponent, }) const routeApi = getRouteApi('/(group)/lazyinside') + +function LazyInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx index 715d2cc972..317c766186 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx @@ -1,30 +1,27 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' import { z } from 'zod' -const SubfolderInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
    -
    {searchViaHook.value.hello}
    -
    - {searchViaRouteHook.value.hello} -
    -
    - {searchViaRouteApi.value.hello} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/(group)/subfolder/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: SubfolderInsideComponent, }) const routeApi = getRouteApi('/(group)/subfolder/inside') + +function SubfolderInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
    +
    {searchViaHook.value.hello}
    +
    + {searchViaRouteHook.value.hello} +
    +
    + {searchViaRouteApi.value.hello} +
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/__root.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/__root.tsx index 62c4af3aa4..59c9e6fa48 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/__root.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/__root.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { HeadContent, Link, @@ -11,97 +10,95 @@ import { import { TanStackRouterDevtools } from '@tanstack/vue-router-devtools' import NotFoundComponent from '../components/NotFoundComponent.vue' -const RootComponent = defineComponent({ - setup() { - const router = useRouter() - const canGoBack = useCanGoBack() - // test useRouterState doesn't crash client side navigation - const _state = useRouterState() - - return () => ( - <> - -
    - - - Home - - - Posts - - - Layout - - - Only Route Inside Group - - - Inside Group - - - Inside Subfolder Inside Group - - - Inside Group Inside Layout - - - Lazy Inside Group - - - unicode path - - - This Route Does Not Exist - -
    -
    - - - - ) - }, -}) - export const Route = createRootRoute({ component: RootComponent, notFoundComponent: NotFoundComponent, }) + +function RootComponent() { + const router = useRouter() + const canGoBack = useCanGoBack() + // test useRouterState doesn't crash client side navigation + const _state = useRouterState() + + return ( + <> + +
    + + + Home + + + Posts + + + Layout + + + Only Route Inside Group + + + Inside Group + + + Inside Subfolder Inside Group + + + Inside Group Inside Layout + + + Lazy Inside Group + + + unicode path + + + This Route Does Not Exist + +
    +
    + + + + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/posts.$postId.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/posts.$postId.tsx index 54ae789c8e..15d17387c8 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/posts.$postId.tsx @@ -1,27 +1,24 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import PostErrorComponent from '../components/PostErrorComponent.vue' import { fetchPost } from '../posts' import type { PostType } from '../posts' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    - {(post.value as PostType).title} -

    -
    {(post.value as PostType).body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), component: PostComponent, errorComponent: PostErrorComponent, notFoundComponent: () =>

    Post not found

    , }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    + {(post.value as PostType).title} +

    +
    {(post.value as PostType).body}
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/posts.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/posts.tsx index e0afd27b4c..ae580dfc02 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/posts.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/posts.tsx @@ -1,38 +1,7 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../posts' import type { PostType } from '../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...(posts.value as Array), - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ head: () => ({ meta: [ @@ -44,3 +13,31 @@ export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...(posts.value as Array), + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx b/e2e/vue-router/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx index 22979c93c9..57963c6b64 100644 --- a/e2e/vue-router/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx +++ b/e2e/vue-router/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx @@ -1,28 +1,23 @@ -import { defineComponent } from 'vue' import { createFileRoute, getRouteApi, useParams } from '@tanstack/vue-router' -const PostEditComponent = defineComponent({ - setup() { - const paramsViaApi = api.useParams() - const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) - const paramsViaRouteHook = api.useParams() - - return () => ( -
    -
    {paramsViaHook.value.postId}
    -
    - {paramsViaRouteHook.value.postId} -
    -
    - {paramsViaApi.value.postId} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts_/$postId/edit')({ component: PostEditComponent, }) const api = getRouteApi('/posts_/$postId/edit') + +function PostEditComponent() { + const paramsViaApi = api.useParams() + const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) + const paramsViaRouteHook = api.useParams() + + return ( +
    +
    {paramsViaHook.value.postId}
    +
    + {paramsViaRouteHook.value.postId} +
    +
    {paramsViaApi.value.postId}
    +
    + ) +} diff --git a/e2e/vue-router/basic-file-based-jsx/tests/app.spec.ts b/e2e/vue-router/basic-file-based-jsx/tests/app.spec.ts index 7380859e7b..543746d64d 100644 --- a/e2e/vue-router/basic-file-based-jsx/tests/app.spec.ts +++ b/e2e/vue-router/basic-file-based-jsx/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' test.beforeEach(async ({ page }) => { diff --git a/e2e/vue-router/basic-file-based-jsx/tests/setup/global.setup.ts b/e2e/vue-router/basic-file-based-jsx/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-file-based-jsx/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-file-based-jsx/tests/setup/global.teardown.ts b/e2e/vue-router/basic-file-based-jsx/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-file-based-jsx/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-file-based-sfc/package.json b/e2e/vue-router/basic-file-based-sfc/package.json index e6ffa156f9..369a0b1fdc 100644 --- a/e2e/vue-router/basic-file-based-sfc/package.json +++ b/e2e/vue-router/basic-file-based-sfc/package.json @@ -8,25 +8,25 @@ "build": "vite build && vue-tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/router-plugin": "workspace:^", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-file-based-sfc/playwright.config.ts b/e2e/vue-router/basic-file-based-sfc/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic-file-based-sfc/playwright.config.ts +++ b/e2e/vue-router/basic-file-based-sfc/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-file-based-sfc/src/posts.ts b/e2e/vue-router/basic-file-based-sfc/src/posts.ts index f7a1941605..1b4c92b41d 100644 --- a/e2e/vue-router/basic-file-based-sfc/src/posts.ts +++ b/e2e/vue-router/basic-file-based-sfc/src/posts.ts @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/basic-file-based-sfc/src/routeTree.gen.ts b/e2e/vue-router/basic-file-based-sfc/src/routeTree.gen.ts index 0bfdddab3d..fa00eb1ce0 100644 --- a/e2e/vue-router/basic-file-based-sfc/src/routeTree.gen.ts +++ b/e2e/vue-router/basic-file-based-sfc/src/routeTree.gen.ts @@ -11,73 +11,45 @@ import { lazyRouteComponent } from '@tanstack/vue-router' import { Route as rootRouteImport } from './routes/__root' -import { Route as IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as EditingARouteImport } from './routes/editing-a' -import { Route as EditingBRouteImport } from './routes/editing-b' -import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RemountDepsRouteImport } from './routes/remountDeps' import { Route as Char45824Char54620Char48124Char44397RouteImport } from './routes/대한민국' -import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' -import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' -import { Route as groupInsideRouteImport } from './routes/(group)/inside' -import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as RemountDepsRouteImport } from './routes/remountDeps' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' +import { Route as EditingBRouteImport } from './routes/editing-b' +import { Route as EditingARouteImport } from './routes/editing-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' +import { Route as groupInsideRouteImport } from './routes/(group)/inside' +import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' +import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' +import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const Char45824Char54620Char48124Char44397Route = + Char45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => rootRouteImport, + } as any).update({ + component: lazyRouteComponent( + () => import('./routes/대한민국.component.vue'), + 'default', + ), + }) +const RemountDepsRoute = RemountDepsRouteImport.update({ + id: '/remountDeps', + path: '/remountDeps', getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/index.component.vue'), - 'default', - ), -}) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/_layout.component.vue'), - 'default', - ), -}) -const EditingARoute = EditingARouteImport.update({ - id: '/editing-a', - path: '/editing-a', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/editing-a.component.vue'), - 'default', - ), -}) -const EditingBRoute = EditingBRouteImport.update({ - id: '/editing-b', - path: '/editing-b', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/editing-b.component.vue'), - 'default', - ), -}) -const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ - id: '/notRemountDeps', - path: '/notRemountDeps', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/notRemountDeps.component.vue'), + () => import('./routes/remountDeps.component.vue'), 'default', ), }) @@ -91,80 +63,52 @@ const PostsRoute = PostsRouteImport.update({ 'default', ), }) -const RemountDepsRoute = RemountDepsRouteImport.update({ - id: '/remountDeps', - path: '/remountDeps', +const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ + id: '/notRemountDeps', + path: '/notRemountDeps', getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/remountDeps.component.vue'), + () => import('./routes/notRemountDeps.component.vue'), 'default', ), }) -const Char45824Char54620Char48124Char44397Route = - Char45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => rootRouteImport, - } as any).update({ - component: lazyRouteComponent( - () => import('./routes/대한민국.component.vue'), - 'default', - ), - }) -const anotherGroupOnlyrouteinsideRoute = anotherGroupOnlyrouteinsideRouteImport - .update({ - id: '/(another-group)/onlyrouteinside', - path: '/onlyrouteinside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(another-group)/onlyrouteinside.component.vue'), - 'default', - ), - }) -const groupLayoutRoute = groupLayoutRouteImport - .update({ - id: '/(group)/_layout', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/_layout.component.vue'), - 'default', - ), - }) -const groupInsideRoute = groupInsideRouteImport - .update({ - id: '/(group)/inside', - path: '/inside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/inside.component.vue'), - 'default', - ), - }) -const groupLazyinsideRoute = groupLazyinsideRouteImport - .update({ - id: '/(group)/lazyinside', - path: '/lazyinside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/lazyinside.component.vue'), - 'default', - ), - }) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const EditingBRoute = EditingBRouteImport.update({ + id: '/editing-b', + path: '/editing-b', + getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/_layout/_layout-2.component.vue'), + () => import('./routes/editing-b.component.vue'), + 'default', + ), +}) +const EditingARoute = EditingARouteImport.update({ + id: '/editing-a', + path: '/editing-a', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/editing-a.component.vue'), + 'default', + ), +}) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/_layout.component.vue'), + 'default', + ), +}) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/index.component.vue'), 'default', ), }) @@ -192,37 +136,69 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ 'default', ), }) -const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/_layout/_layout-2.component.vue'), + 'default', + ), +}) +const groupLazyinsideRoute = groupLazyinsideRouteImport .update({ - id: '/insidelayout', - path: '/insidelayout', - getParentRoute: () => groupLayoutRoute, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/_layout.insidelayout.component.vue'), - 'default', - ), - }) -const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport - .update({ - id: '/(group)/subfolder/inside', - path: '/subfolder/inside', + id: '/(group)/lazyinside', + path: '/lazyinside', getParentRoute: () => rootRouteImport, } as any) .update({ component: lazyRouteComponent( - () => import('./routes/(group)/subfolder/inside.component.vue'), + () => import('./routes/(group)/lazyinside.component.vue'), 'default', ), }) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const groupInsideRoute = groupInsideRouteImport + .update({ + id: '/(group)/inside', + path: '/inside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/inside.component.vue'), + 'default', + ), + }) +const groupLayoutRoute = groupLayoutRouteImport + .update({ + id: '/(group)/_layout', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/_layout.component.vue'), + 'default', + ), + }) +const anotherGroupOnlyrouteinsideRoute = anotherGroupOnlyrouteinsideRouteImport + .update({ + id: '/(another-group)/onlyrouteinside', + path: '/onlyrouteinside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(another-group)/onlyrouteinside.component.vue'), + 'default', + ), + }) +const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ + id: '/posts_/$postId/edit', + path: '/posts/$postId/edit', + getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/_layout/_layout-2/layout-a.component.vue'), + () => import('./routes/posts_.$postId.edit.component.vue'), 'default', ), }) @@ -236,16 +212,40 @@ const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ 'default', ), }) -const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ - id: '/posts_/$postId/edit', - path: '/posts/$postId/edit', - getParentRoute: () => rootRouteImport, +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any).update({ component: lazyRouteComponent( - () => import('./routes/posts_.$postId.edit.component.vue'), + () => import('./routes/_layout/_layout-2/layout-a.component.vue'), 'default', ), }) +const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport + .update({ + id: '/(group)/subfolder/inside', + path: '/subfolder/inside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/subfolder/inside.component.vue'), + 'default', + ), + }) +const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport + .update({ + id: '/insidelayout', + path: '/insidelayout', + getParentRoute: () => groupLayoutRoute, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/_layout.insidelayout.component.vue'), + 'default', + ), + }) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -388,46 +388,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/editing-a': { - id: '/editing-a' - path: '/editing-a' - fullPath: '/editing-a' - preLoaderRoute: typeof EditingARouteImport - parentRoute: typeof rootRouteImport - } - '/editing-b': { - id: '/editing-b' - path: '/editing-b' - fullPath: '/editing-b' - preLoaderRoute: typeof EditingBRouteImport - parentRoute: typeof rootRouteImport - } - '/notRemountDeps': { - id: '/notRemountDeps' - path: '/notRemountDeps' - fullPath: '/notRemountDeps' - preLoaderRoute: typeof NotRemountDepsRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/대한민국': { + id: '/대한민국' + path: '/대한민국' + fullPath: '/대한민국' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport parentRoute: typeof rootRouteImport } '/remountDeps': { @@ -437,47 +402,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/대한민국': { - id: '/대한민국' - path: '/대한민국' - fullPath: '/대한민국' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/(another-group)/onlyrouteinside': { - id: '/(another-group)/onlyrouteinside' - path: '/onlyrouteinside' - fullPath: '/onlyrouteinside' - preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + '/notRemountDeps': { + id: '/notRemountDeps' + path: '/notRemountDeps' + fullPath: '/notRemountDeps' + preLoaderRoute: typeof NotRemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout': { - id: '/(group)/_layout' + '/editing-b': { + id: '/editing-b' + path: '/editing-b' + fullPath: '/editing-b' + preLoaderRoute: typeof EditingBRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-a': { + id: '/editing-a' + path: '/editing-a' + fullPath: '/editing-a' + preLoaderRoute: typeof EditingARouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof groupLayoutRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/(group)/inside': { - id: '/(group)/inside' - path: '/inside' - fullPath: '/inside' - preLoaderRoute: typeof groupInsideRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/lazyinside': { - id: '/(group)/lazyinside' - path: '/lazyinside' - fullPath: '/lazyinside' - preLoaderRoute: typeof groupLazyinsideRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -493,26 +458,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/(group)/_layout/insidelayout': { - id: '/(group)/_layout/insidelayout' - path: '/insidelayout' - fullPath: '/insidelayout' - preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport - parentRoute: typeof groupLayoutRoute + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } - '/(group)/subfolder/inside': { - id: '/(group)/subfolder/inside' - path: '/subfolder/inside' - fullPath: '/subfolder/inside' - preLoaderRoute: typeof groupSubfolderInsideRouteImport + '/(group)/lazyinside': { + id: '/(group)/lazyinside' + path: '/lazyinside' + fullPath: '/lazyinside' + preLoaderRoute: typeof groupLazyinsideRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/(group)/inside': { + id: '/(group)/inside' + path: '/inside' + fullPath: '/inside' + preLoaderRoute: typeof groupInsideRouteImport + parentRoute: typeof rootRouteImport + } + '/(group)/_layout': { + id: '/(group)/_layout' + path: '' + fullPath: '' + preLoaderRoute: typeof groupLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/(another-group)/onlyrouteinside': { + id: '/(another-group)/onlyrouteinside' + path: '/onlyrouteinside' + fullPath: '/onlyrouteinside' + preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + parentRoute: typeof rootRouteImport + } + '/posts_/$postId/edit': { + id: '/posts_/$postId/edit' + path: '/posts/$postId/edit' + fullPath: '/posts/$postId/edit' + preLoaderRoute: typeof PostsPostIdEditRouteImport + parentRoute: typeof rootRouteImport } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -521,13 +507,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts_/$postId/edit': { - id: '/posts_/$postId/edit' - path: '/posts/$postId/edit' - fullPath: '/posts/$postId/edit' - preLoaderRoute: typeof PostsPostIdEditRouteImport + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/(group)/subfolder/inside': { + id: '/(group)/subfolder/inside' + path: '/subfolder/inside' + fullPath: '/subfolder/inside' + preLoaderRoute: typeof groupSubfolderInsideRouteImport parentRoute: typeof rootRouteImport } + '/(group)/_layout/insidelayout': { + id: '/(group)/_layout/insidelayout' + path: '/insidelayout' + fullPath: '/insidelayout' + preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport + parentRoute: typeof groupLayoutRoute + } } } diff --git a/e2e/vue-router/basic-file-based-sfc/tests/app.spec.ts b/e2e/vue-router/basic-file-based-sfc/tests/app.spec.ts index 7380859e7b..543746d64d 100644 --- a/e2e/vue-router/basic-file-based-sfc/tests/app.spec.ts +++ b/e2e/vue-router/basic-file-based-sfc/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import type { Page } from '@playwright/test' test.beforeEach(async ({ page }) => { diff --git a/e2e/vue-router/basic-file-based-sfc/tests/setup/global.setup.ts b/e2e/vue-router/basic-file-based-sfc/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-file-based-sfc/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-file-based-sfc/tests/setup/global.teardown.ts b/e2e/vue-router/basic-file-based-sfc/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-file-based-sfc/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-scroll-restoration/package.json b/e2e/vue-router/basic-scroll-restoration/package.json index f4616a5651..daa2519eed 100644 --- a/e2e/vue-router/basic-scroll-restoration/package.json +++ b/e2e/vue-router/basic-scroll-restoration/package.json @@ -8,24 +8,24 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-virtual": "^3.13.0", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.16", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "vite": "^8.0.14", - "vue-tsc": "^3.3.8", + "vue-tsc": "^3.1.5", "typescript": "~5.9.0" } } diff --git a/e2e/vue-router/basic-scroll-restoration/playwright.config.ts b/e2e/vue-router/basic-scroll-restoration/playwright.config.ts index 6a684ac89e..0c5cee43e4 100644 --- a/e2e/vue-router/basic-scroll-restoration/playwright.config.ts +++ b/e2e/vue-router/basic-scroll-restoration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-virtual-file-based/package.json b/e2e/vue-router/basic-virtual-file-based/package.json index 3701c2254c..946addb3bf 100644 --- a/e2e/vue-router/basic-virtual-file-based/package.json +++ b/e2e/vue-router/basic-virtual-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,17 +18,17 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-virtual-file-based/playwright.config.ts b/e2e/vue-router/basic-virtual-file-based/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic-virtual-file-based/playwright.config.ts +++ b/e2e/vue-router/basic-virtual-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-virtual-file-based/src/posts.tsx b/e2e/vue-router/basic-virtual-file-based/src/posts.tsx index 5f5463a668..8576a3799a 100644 --- a/e2e/vue-router/basic-virtual-file-based/src/posts.tsx +++ b/e2e/vue-router/basic-virtual-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts b/e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts index 1bae3d69a1..3798afaa01 100644 --- a/e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts +++ b/e2e/vue-router/basic-virtual-file-based/src/routeTree.gen.ts @@ -9,76 +9,76 @@ // 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 homeRouteImport } from './routes/home' -import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' import { Route as postsPostsRouteImport } from './routes/posts/posts' -import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' -import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' -import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' +import { Route as homeRouteImport } from './routes/home' import { Route as postsPostsDetailRouteImport } from './routes/posts/posts-detail' -import { Route as aRouteImport } from './routes/a' -import { Route as bRouteImport } from './routes/b' +import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' +import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' import { Route as ClassicHelloIndexRouteImport } from './routes/file-based-subtree/hello/index' -import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as ClassicHelloWorldRouteImport } from './routes/file-based-subtree/hello/world' +import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' +import { Route as bRouteImport } from './routes/b' +import { Route as aRouteImport } from './routes/a' -const homeRoute = homeRouteImport.update({ - id: '/', - path: '/', +const postsPostsRoute = postsPostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ id: '/_first', getParentRoute: () => rootRouteImport, } as any) -const postsPostsRoute = postsPostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ - id: '/_second', - getParentRoute: () => layoutFirstLayoutRoute, -} as any) -const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ - id: '/classic/hello', - path: '/classic/hello', - getParentRoute: () => rootRouteImport, -} as any) -const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ +const homeRoute = homeRouteImport.update({ id: '/', path: '/', - getParentRoute: () => postsPostsRoute, + getParentRoute: () => rootRouteImport, } as any) const postsPostsDetailRoute = postsPostsDetailRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => postsPostsRoute, } as any) -const aRoute = aRouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => layoutSecondLayoutRoute, +const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ + id: '/_second', + getParentRoute: () => layoutFirstLayoutRoute, } as any) -const bRoute = bRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => layoutSecondLayoutRoute, +const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => postsPostsRoute, +} as any) +const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ + id: '/classic/hello', + path: '/classic/hello', + getParentRoute: () => rootRouteImport, } as any) const ClassicHelloIndexRoute = ClassicHelloIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ClassicHelloRouteRoute, } as any) +const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ + id: '/world', + path: '/world', + getParentRoute: () => ClassicHelloRouteRoute, +} as any) const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ id: '/universe', path: '/universe', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ - id: '/world', - path: '/world', - getParentRoute: () => ClassicHelloRouteRoute, +const bRoute = bRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => layoutSecondLayoutRoute, +} as any) +const aRoute = aRouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => layoutSecondLayoutRoute, } as any) export interface FileRoutesByFullPath { @@ -166,11 +166,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof homeRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof postsPostsRouteImport parentRoute: typeof rootRouteImport } '/_first': { @@ -180,33 +180,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof layoutFirstLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof postsPostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_first/_second': { - id: '/_first/_second' - path: '' - fullPath: '/' - preLoaderRoute: typeof layoutSecondLayoutRouteImport - parentRoute: typeof layoutFirstLayoutRoute - } - '/classic/hello': { - id: '/classic/hello' - path: '/classic/hello' - fullPath: '/classic/hello' - preLoaderRoute: typeof ClassicHelloRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof postsPostsHomeRouteImport - parentRoute: typeof postsPostsRoute + fullPath: '/' + preLoaderRoute: typeof homeRouteImport + parentRoute: typeof rootRouteImport } '/posts/$postId': { id: '/posts/$postId' @@ -215,19 +194,26 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof postsPostsDetailRouteImport parentRoute: typeof postsPostsRoute } - '/_first/_second/layout-a': { - id: '/_first/_second/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof aRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/_first/_second': { + id: '/_first/_second' + path: '' + fullPath: '/' + preLoaderRoute: typeof layoutSecondLayoutRouteImport + parentRoute: typeof layoutFirstLayoutRoute } - '/_first/_second/layout-b': { - id: '/_first/_second/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof bRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof postsPostsHomeRouteImport + parentRoute: typeof postsPostsRoute + } + '/classic/hello': { + id: '/classic/hello' + path: '/classic/hello' + fullPath: '/classic/hello' + preLoaderRoute: typeof ClassicHelloRouteRouteImport + parentRoute: typeof rootRouteImport } '/classic/hello/': { id: '/classic/hello/' @@ -236,6 +222,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ClassicHelloIndexRouteImport parentRoute: typeof ClassicHelloRouteRoute } + '/classic/hello/world': { + id: '/classic/hello/world' + path: '/world' + fullPath: '/classic/hello/world' + preLoaderRoute: typeof ClassicHelloWorldRouteImport + parentRoute: typeof ClassicHelloRouteRoute + } '/classic/hello/universe': { id: '/classic/hello/universe' path: '/universe' @@ -243,12 +236,19 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ClassicHelloUniverseRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/classic/hello/world': { - id: '/classic/hello/world' - path: '/world' - fullPath: '/classic/hello/world' - preLoaderRoute: typeof ClassicHelloWorldRouteImport - parentRoute: typeof ClassicHelloRouteRoute + '/_first/_second/layout-b': { + id: '/_first/_second/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof bRouteImport + parentRoute: typeof layoutSecondLayoutRoute + } + '/_first/_second/layout-a': { + id: '/_first/_second/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof aRouteImport + parentRoute: typeof layoutSecondLayoutRoute } } } diff --git a/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx b/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx index aa5387a4d8..b4c91d3e85 100644 --- a/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx +++ b/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts-detail.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -7,19 +6,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value?.title}

    -
    {post.value?.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent as any, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ }, component: PostComponent, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value?.title}

    +
    {post.value?.body}
    +
    + ) +} diff --git a/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx b/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx index 2a4e8deddd..265faaf650 100644 --- a/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx +++ b/e2e/vue-router/basic-virtual-file-based/src/routes/posts/posts.tsx @@ -1,42 +1,39 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts b/e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts +++ b/e2e/vue-router/basic-virtual-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts b/e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-virtual-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-virtual-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/package.json b/e2e/vue-router/basic-virtual-named-export-config-file-based/package.json index d3a69ed573..f73d3ad8b2 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/package.json +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -18,17 +18,17 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts b/e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx index 5f5463a668..8576a3799a 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx index aa5387a4d8..b4c91d3e85 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -7,19 +6,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value?.title}

    -
    {post.value?.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent as any, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ }, component: PostComponent, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value?.title}

    +
    {post.value?.body}
    +
    + ) +} diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx index 2a4e8deddd..265faaf650 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx @@ -1,42 +1,39 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-vue-query-file-based/package.json b/e2e/vue-router/basic-vue-query-file-based/package.json index 3b4422d8d8..75395b20f8 100644 --- a/e2e/vue-router/basic-vue-query-file-based/package.json +++ b/e2e/vue-router/basic-vue-query-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && vue-tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,18 +17,18 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-vue-query-file-based/playwright.config.ts b/e2e/vue-router/basic-vue-query-file-based/playwright.config.ts index fbda9bd451..6e7c123f74 100644 --- a/e2e/vue-router/basic-vue-query-file-based/playwright.config.ts +++ b/e2e/vue-router/basic-vue-query-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -12,15 +17,17 @@ export default defineConfig({ workers: 1, reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-vue-query-file-based/src/posts.tsx b/e2e/vue-router/basic-vue-query-file-based/src/posts.tsx index 1f6cb8e308..1becc2c242 100644 --- a/e2e/vue-router/basic-vue-query-file-based/src/posts.tsx +++ b/e2e/vue-router/basic-vue-query-file-based/src/posts.tsx @@ -8,7 +8,11 @@ export type PostType = { export class PostNotFoundError extends Error {} -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/basic-vue-query-file-based/src/routeTree.gen.ts b/e2e/vue-router/basic-vue-query-file-based/src/routeTree.gen.ts index 0af0e21dbd..9dd7ada796 100644 --- a/e2e/vue-router/basic-vue-query-file-based/src/routeTree.gen.ts +++ b/e2e/vue-router/basic-vue-query-file-based/src/routeTree.gen.ts @@ -9,33 +9,29 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' import { Route as PostsRouteImport } from './routes/posts' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const LayoutRoute = LayoutRouteImport.update({ id: '/_layout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, -} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -46,16 +42,20 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -114,11 +114,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_layout': { @@ -128,19 +128,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -156,12 +149,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -170,6 +163,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } } } diff --git a/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.$postId.tsx b/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.$postId.tsx index e8b66ddf5d..72109fc891 100644 --- a/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.$postId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { ErrorComponent, useRouter } from '@tanstack/vue-router' import { useQuery } from '@tanstack/vue-query' @@ -6,21 +5,6 @@ import { PostNotFoundError } from '../posts' import { postQueryOptions } from '../postQueryOptions' import type { ErrorComponentProps } from '@tanstack/vue-router' -const PostComponent = defineComponent({ - setup() { - const params = Route.useParams() - useQuery(() => postQueryOptions(params.value.postId)) - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: ({ context: { queryClient }, params: { postId } }) => { return queryClient.ensureQueryData(postQueryOptions(postId)) @@ -48,3 +32,16 @@ export function PostErrorComponent({ error }: ErrorComponentProps) {
    ) } + +function PostComponent() { + const postId = Route.useParams().value.postId + useQuery(postQueryOptions(postId)) + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.tsx b/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.tsx index e1c35d59ad..f9e20f99d6 100644 --- a/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.tsx +++ b/e2e/vue-router/basic-vue-query-file-based/src/routes/posts.tsx @@ -1,45 +1,42 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { useQuery } from '@tanstack/vue-query' import { postsQueryOptions } from '../postsQueryOptions' -const PostsComponent = defineComponent({ - setup() { - useQuery(postsQueryOptions) - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: ({ context: { queryClient } }) => queryClient.ensureQueryData(postsQueryOptions), component: PostsComponent, }) + +function PostsComponent() { + useQuery(postsQueryOptions) + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-vue-query-file-based/tests/app.spec.ts b/e2e/vue-router/basic-vue-query-file-based/tests/app.spec.ts index 2b42d6d589..d80e8dada5 100644 --- a/e2e/vue-router/basic-vue-query-file-based/tests/app.spec.ts +++ b/e2e/vue-router/basic-vue-query-file-based/tests/app.spec.ts @@ -1,23 +1,24 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' +import { getDummyServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } test.beforeEach(async ({ page }) => { await page.goto('/') }) -test('GetPosts with networking disabled', async ({ page, context }) => { - await page.goto('about:blank') - await context.setOffline(true) - const { status, posts, post } = await page.evaluate(async () => { - const response = await fetch('https://jsonplaceholder.typicode.com/posts') - const posts = await response.json() - const post = await fetch( - 'https://jsonplaceholder.typicode.com/posts/1', - ).then((r) => r.json()) - return { status: response.status, posts, post } - }) - expect(status).toBe(200) +test('GetPosts', async () => { + const port = await getDummyServerPort(packageJson.name) + const res = await fetch(`http://localhost:${port}/posts`) + + expect(res.status).toBe(200) + + const posts = await res.json() + expect(posts.length).toBeGreaterThan(0) + + const postRes = await fetch(`http://localhost:${port}/posts/1`) + expect(postRes.status).toBe(200) + const post = await postRes.json() expect(post).toEqual(posts[0]) }) diff --git a/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.setup.ts b/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-vue-query-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-vue-query-file-based/tsconfig.json b/e2e/vue-router/basic-vue-query-file-based/tsconfig.json index 28889522fc..123a2f4122 100644 --- a/e2e/vue-router/basic-vue-query-file-based/tsconfig.json +++ b/e2e/vue-router/basic-vue-query-file-based/tsconfig.json @@ -10,7 +10,7 @@ "skipLibCheck": true, "noEmit": true, "resolveJsonModule": true, - "types": ["vite/client", "node"] + "types": ["vite/client"] }, "include": ["src", "tests"], "exclude": ["node_modules", "dist"] diff --git a/e2e/vue-router/basic-vue-query/package.json b/e2e/vue-router/basic-vue-query/package.json index 68f1a8c9ea..be46a064c6 100644 --- a/e2e/vue-router/basic-vue-query/package.json +++ b/e2e/vue-router/basic-vue-query/package.json @@ -8,7 +8,7 @@ "build": "vite build && vue-tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -16,17 +16,17 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic-vue-query/playwright.config.ts b/e2e/vue-router/basic-vue-query/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic-vue-query/playwright.config.ts +++ b/e2e/vue-router/basic-vue-query/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic-vue-query/src/main.tsx b/e2e/vue-router/basic-vue-query/src/main.tsx index 3235f26ce3..4f862a9b31 100644 --- a/e2e/vue-router/basic-vue-query/src/main.tsx +++ b/e2e/vue-router/basic-vue-query/src/main.tsx @@ -1,4 +1,4 @@ -import { createApp, defineComponent } from 'vue' +import { createApp } from 'vue' import { ErrorComponent, Link, @@ -108,21 +108,6 @@ function PostsIndexRouteComponent() { return
    Select a post.
    } -const PostRouteComponent = defineComponent({ - setup() { - const params = postRoute.useParams() - useQuery(() => postQueryOptions(params.value.postId)) - const post = postRoute.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - const postRoute = createRoute({ getParentRoute: () => postsRoute, path: '$postId', @@ -152,6 +137,19 @@ function PostErrorComponent({ error }: ErrorComponentProps) { ) } +function PostRouteComponent() { + const postId = postRoute.useParams().value.postId + useQuery(postQueryOptions(postId)) + const post = postRoute.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} + const layoutRoute = createRoute({ getParentRoute: () => rootRoute, id: '_layout', diff --git a/e2e/vue-router/basic-vue-query/src/posts.lazy.tsx b/e2e/vue-router/basic-vue-query/src/posts.lazy.tsx index d42d3d49dc..eb844bc68d 100644 --- a/e2e/vue-router/basic-vue-query/src/posts.lazy.tsx +++ b/e2e/vue-router/basic-vue-query/src/posts.lazy.tsx @@ -1,42 +1,39 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createLazyRoute } from '@tanstack/vue-router' import { useQuery } from '@tanstack/vue-query' import { postsQueryOptions } from './posts' -const PostsComponent = defineComponent({ - setup() { - const postsQuery = useQuery(postsQueryOptions) - const posts = postsQuery.data - - return () => ( -
    -
      - {[ - ...((posts.value ?? []) as Array<{ id: string; title: string }>), - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    - -
    - ) - }, -}) - export const Route = createLazyRoute('/posts')({ component: PostsComponent, }) + +function PostsComponent() { + const postsQuery = useQuery(postsQueryOptions) + const posts = postsQuery.data + + return ( +
    +
      + {[ + ...((posts.value ?? []) as Array<{ id: string; title: string }>), + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    + +
    + ) +} diff --git a/e2e/vue-router/basic-vue-query/src/posts.ts b/e2e/vue-router/basic-vue-query/src/posts.ts index 69e1814af5..18f8a9f93f 100644 --- a/e2e/vue-router/basic-vue-query/src/posts.ts +++ b/e2e/vue-router/basic-vue-query/src/posts.ts @@ -9,7 +9,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/vue-router/basic-vue-query/tests/app.spec.ts b/e2e/vue-router/basic-vue-query/tests/app.spec.ts index fbf093cd51..3e5a69ccaa 100644 --- a/e2e/vue-router/basic-vue-query/tests/app.spec.ts +++ b/e2e/vue-router/basic-vue-query/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/basic-vue-query/tests/setup/global.setup.ts b/e2e/vue-router/basic-vue-query/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic-vue-query/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic-vue-query/tests/setup/global.teardown.ts b/e2e/vue-router/basic-vue-query/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic-vue-query/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic/package.json b/e2e/vue-router/basic/package.json index 1b57dae772..c779a572e9 100644 --- a/e2e/vue-router/basic/package.json +++ b/e2e/vue-router/basic/package.json @@ -8,22 +8,22 @@ "build": "vite build && vue-tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/basic/playwright.config.ts b/e2e/vue-router/basic/playwright.config.ts index 4eead86444..836ea41bd8 100644 --- a/e2e/vue-router/basic/playwright.config.ts +++ b/e2e/vue-router/basic/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/basic/src/main.tsx b/e2e/vue-router/basic/src/main.tsx index c2293018fc..3e5ac6f1e0 100644 --- a/e2e/vue-router/basic/src/main.tsx +++ b/e2e/vue-router/basic/src/main.tsx @@ -1,4 +1,4 @@ -import { createApp, defineComponent } from 'vue' +import { createApp } from 'vue' import { ErrorComponent, Link, @@ -133,20 +133,6 @@ function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = postRoute.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    -
    {post.value.body}
    -
    - ) - }, -}) - const postRoute = createRoute({ getParentRoute: () => postsRoute, path: '$postId', @@ -155,6 +141,18 @@ const postRoute = createRoute({ component: PostComponent, }) +function PostComponent() { + const post = postRoute.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    +
    {post.value.body}
    +
    + ) +} + const layoutRoute = createRoute({ getParentRoute: () => rootRoute, id: '_layout', @@ -317,30 +315,14 @@ const paramsPsNamedIndexRoute = createRoute({ }, }) -const ParamsNamedFoo = defineComponent({ - setup() { - const p = paramsPsNamedFooRoute.useParams() - return () => ( -
    -

    ParamsNamedFoo

    -
    {JSON.stringify(p.value)}
    -
    - ) - }, -}) - const paramsPsNamedFooRoute = createRoute({ getParentRoute: () => paramsPsNamedRoute, path: '/$foo', - component: ParamsNamedFoo, -}) - -const ParamsNamedFooMarkdown = defineComponent({ - setup() { - const p = paramsPsNamedFooPrefixRoute.useParams() - return () => ( + component: function ParamsNamedFoo() { + const p = paramsPsNamedFooRoute.useParams() + return (
    -

    ParamsNamedFooPrefix

    +

    ParamsNamedFoo

    {JSON.stringify(p.value)}
    ) @@ -350,15 +332,11 @@ const ParamsNamedFooMarkdown = defineComponent({ const paramsPsNamedFooPrefixRoute = createRoute({ getParentRoute: () => paramsPsNamedRoute, path: '/prefix{$foo}', - component: ParamsNamedFooMarkdown, -}) - -const ParamsNamedFooSuffix = defineComponent({ - setup() { - const p = paramsPsNamedFooSuffixRoute.useParams() - return () => ( + component: function ParamsNamedFooMarkdown() { + const p = paramsPsNamedFooPrefixRoute.useParams() + return (
    -

    ParamsNamedFooSuffix

    +

    ParamsNamedFooPrefix

    {JSON.stringify(p.value)}
    ) @@ -368,7 +346,15 @@ const ParamsNamedFooSuffix = defineComponent({ const paramsPsNamedFooSuffixRoute = createRoute({ getParentRoute: () => paramsPsNamedRoute, path: '/{$foo}suffix', - component: ParamsNamedFooSuffix, + component: function ParamsNamedFooSuffix() { + const p = paramsPsNamedFooSuffixRoute.useParams() + return ( +
    +

    ParamsNamedFooSuffix

    +
    {JSON.stringify(p.value)}
    +
    + ) + }, }) const paramsPsWildcardRoute = createRoute({ @@ -384,30 +370,14 @@ const paramsPsWildcardIndexRoute = createRoute({ }, }) -const ParamsWildcardSplat = defineComponent({ - setup() { - const p = paramsPsWildcardSplatRoute.useParams() - return () => ( -
    -

    ParamsWildcardSplat

    -
    {JSON.stringify(p.value)}
    -
    - ) - }, -}) - const paramsPsWildcardSplatRoute = createRoute({ getParentRoute: () => paramsPsWildcardRoute, path: '$', - component: ParamsWildcardSplat, -}) - -const ParamsWildcardSplatPrefix = defineComponent({ - setup() { - const p = paramsPsWildcardSplatPrefixRoute.useParams() - return () => ( + component: function ParamsWildcardSplat() { + const p = paramsPsWildcardSplatRoute.useParams() + return (
    -

    ParamsWildcardSplatPrefix

    +

    ParamsWildcardSplat

    {JSON.stringify(p.value)}
    ) @@ -417,15 +387,11 @@ const ParamsWildcardSplatPrefix = defineComponent({ const paramsPsWildcardSplatPrefixRoute = createRoute({ getParentRoute: () => paramsPsWildcardRoute, path: 'prefix{$}', - component: ParamsWildcardSplatPrefix, -}) - -const ParamsWildcardSplatSuffix = defineComponent({ - setup() { - const p = paramsPsWildcardSplatSuffixRoute.useParams() - return () => ( + component: function ParamsWildcardSplatPrefix() { + const p = paramsPsWildcardSplatPrefixRoute.useParams() + return (
    -

    ParamsWildcardSplatSuffix

    +

    ParamsWildcardSplatPrefix

    {JSON.stringify(p.value)}
    ) @@ -435,7 +401,15 @@ const ParamsWildcardSplatSuffix = defineComponent({ const paramsPsWildcardSplatSuffixRoute = createRoute({ getParentRoute: () => paramsPsWildcardRoute, path: '{$}suffix', - component: ParamsWildcardSplatSuffix, + component: function ParamsWildcardSplatSuffix() { + const p = paramsPsWildcardSplatSuffixRoute.useParams() + return ( +
    +

    ParamsWildcardSplatSuffix

    +
    {JSON.stringify(p.value)}
    +
    + ) + }, }) const routeTree = rootRoute.addChildren([ diff --git a/e2e/vue-router/basic/src/posts.lazy.tsx b/e2e/vue-router/basic/src/posts.lazy.tsx index a236404d84..b2df740010 100644 --- a/e2e/vue-router/basic/src/posts.lazy.tsx +++ b/e2e/vue-router/basic/src/posts.lazy.tsx @@ -1,39 +1,36 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createLazyRoute } from '@tanstack/vue-router' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    - -
    - ) - }, -}) - export const Route = createLazyRoute('/posts')({ component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    + +
    + ) +} diff --git a/e2e/vue-router/basic/src/posts.ts b/e2e/vue-router/basic/src/posts.ts index f72d16fee3..e859645746 100644 --- a/e2e/vue-router/basic/src/posts.ts +++ b/e2e/vue-router/basic/src/posts.ts @@ -8,7 +8,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/vue-router/basic/tests/app.spec.ts b/e2e/vue-router/basic/tests/app.spec.ts index 9c0a6b6901..ec0e24d8a4 100644 --- a/e2e/vue-router/basic/tests/app.spec.ts +++ b/e2e/vue-router/basic/tests/app.spec.ts @@ -1,7 +1,8 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from '../package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/basic/tests/params.spec.ts b/e2e/vue-router/basic/tests/params.spec.ts index f673138047..ac18f39864 100644 --- a/e2e/vue-router/basic/tests/params.spec.ts +++ b/e2e/vue-router/basic/tests/params.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.describe('params operations + prefix/suffix', () => { test.beforeEach(async ({ page }) => { diff --git a/e2e/vue-router/basic/tests/setup/global.setup.ts b/e2e/vue-router/basic/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/basic/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/basic/tests/setup/global.teardown.ts b/e2e/vue-router/basic/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/basic/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/generator-cli-only/package.json b/e2e/vue-router/generator-cli-only/package.json index f9324643ac..14cdafcd48 100644 --- a/e2e/vue-router/generator-cli-only/package.json +++ b/e2e/vue-router/generator-cli-only/package.json @@ -8,24 +8,24 @@ "build": "tsr generate && vite build && tsc --noEmit", "preview": "vite preview", "start": "tsr generate && vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/router-cli": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.16", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/generator-cli-only/playwright.config.ts b/e2e/vue-router/generator-cli-only/playwright.config.ts index 4eead86444..c9d9a76ae7 100644 --- a/e2e/vue-router/generator-cli-only/playwright.config.ts +++ b/e2e/vue-router/generator-cli-only/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/generator-cli-only/src/posts.ts b/e2e/vue-router/generator-cli-only/src/posts.ts index f72d16fee3..e859645746 100644 --- a/e2e/vue-router/generator-cli-only/src/posts.ts +++ b/e2e/vue-router/generator-cli-only/src/posts.ts @@ -8,7 +8,11 @@ type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/vue-router/generator-cli-only/src/routeTree.gen.ts b/e2e/vue-router/generator-cli-only/src/routeTree.gen.ts index decb53754c..c769c841f0 100644 --- a/e2e/vue-router/generator-cli-only/src/routeTree.gen.ts +++ b/e2e/vue-router/generator-cli-only/src/routeTree.gen.ts @@ -9,20 +9,15 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, @@ -32,11 +27,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,13 +117,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_pathlessLayout': { id: '/_pathlessLayout' path: '' @@ -138,12 +131,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/e2e/vue-router/generator-cli-only/src/routes/posts.$postId.tsx b/e2e/vue-router/generator-cli-only/src/routes/posts.$postId.tsx index bb2d728afd..f4f1b04f88 100644 --- a/e2e/vue-router/generator-cli-only/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/generator-cli-only/src/routes/posts.$postId.tsx @@ -1,21 +1,7 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ export function PostErrorComponent({ error }: ErrorComponentProps) { return } + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/generator-cli-only/src/routes/posts.route.tsx b/e2e/vue-router/generator-cli-only/src/routes/posts.route.tsx index 518bdc3d70..eaaa35fd5c 100644 --- a/e2e/vue-router/generator-cli-only/src/routes/posts.route.tsx +++ b/e2e/vue-router/generator-cli-only/src/routes/posts.route.tsx @@ -1,42 +1,39 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../posts' -const PostsLayoutComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsLayoutComponent, }) + +function PostsLayoutComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/generator-cli-only/tests/app.spec.ts b/e2e/vue-router/generator-cli-only/tests/app.spec.ts index ced5ac9310..5a83a314f2 100644 --- a/e2e/vue-router/generator-cli-only/tests/app.spec.ts +++ b/e2e/vue-router/generator-cli-only/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/generator-cli-only/tests/setup/global.setup.ts b/e2e/vue-router/generator-cli-only/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/generator-cli-only/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/generator-cli-only/tests/setup/global.teardown.ts b/e2e/vue-router/generator-cli-only/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/generator-cli-only/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/js-only-file-based/package.json b/e2e/vue-router/js-only-file-based/package.json index cda098978c..05a86b7cf1 100644 --- a/e2e/vue-router/js-only-file-based/package.json +++ b/e2e/vue-router/js-only-file-based/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,12 +17,12 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", diff --git a/e2e/vue-router/js-only-file-based/playwright.config.ts b/e2e/vue-router/js-only-file-based/playwright.config.ts index 0925936d55..4f93bc1413 100644 --- a/e2e/vue-router/js-only-file-based/playwright.config.ts +++ b/e2e/vue-router/js-only-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,15 +18,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/js-only-file-based/src/posts.js b/e2e/vue-router/js-only-file-based/src/posts.js index 36c1c281f6..979e5e381c 100644 --- a/e2e/vue-router/js-only-file-based/src/posts.js +++ b/e2e/vue-router/js-only-file-based/src/posts.js @@ -2,7 +2,11 @@ import axios from 'redaxios' export class NotFoundError extends Error {} -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPosts = async () => { console.info('Fetching posts...') diff --git a/e2e/vue-router/js-only-file-based/src/routeTree.gen.ts b/e2e/vue-router/js-only-file-based/src/routeTree.gen.ts index decb53754c..c769c841f0 100644 --- a/e2e/vue-router/js-only-file-based/src/routeTree.gen.ts +++ b/e2e/vue-router/js-only-file-based/src/routeTree.gen.ts @@ -9,20 +9,15 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, @@ -32,11 +27,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,13 +117,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_pathlessLayout': { id: '/_pathlessLayout' path: '' @@ -138,12 +131,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/e2e/vue-router/js-only-file-based/src/routes/posts.$postId.jsx b/e2e/vue-router/js-only-file-based/src/routes/posts.$postId.jsx index 05599a6780..b769e23862 100644 --- a/e2e/vue-router/js-only-file-based/src/routes/posts.$postId.jsx +++ b/e2e/vue-router/js-only-file-based/src/routes/posts.$postId.jsx @@ -1,22 +1,8 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { ErrorComponent } from '@tanstack/vue-router' import { fetchPost } from '../posts' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent, @@ -29,3 +15,14 @@ export const Route = createFileRoute('/posts/$postId')({ export function PostErrorComponent({ error }) { return } + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/js-only-file-based/src/routes/posts.route.jsx b/e2e/vue-router/js-only-file-based/src/routes/posts.route.jsx index 5925dbed54..c1fef7213d 100644 --- a/e2e/vue-router/js-only-file-based/src/routes/posts.route.jsx +++ b/e2e/vue-router/js-only-file-based/src/routes/posts.route.jsx @@ -1,44 +1,41 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { Link, Outlet } from '@tanstack/vue-router' import { fetchPosts } from '../posts' -const PostsLayoutComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsLayoutComponent, }) + +function PostsLayoutComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/js-only-file-based/tests/app.spec.ts b/e2e/vue-router/js-only-file-based/tests/app.spec.ts index ced5ac9310..5a83a314f2 100644 --- a/e2e/vue-router/js-only-file-based/tests/app.spec.ts +++ b/e2e/vue-router/js-only-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/js-only-file-based/tests/setup/global.setup.ts b/e2e/vue-router/js-only-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/js-only-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/js-only-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/js-only-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/js-only-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/rspack-basic-file-based/package.json b/e2e/vue-router/rspack-basic-file-based/package.json index 93439f7d5b..5d8a072d87 100644 --- a/e2e/vue-router/rspack-basic-file-based/package.json +++ b/e2e/vue-router/rspack-basic-file-based/package.json @@ -7,17 +7,17 @@ "build": "rsbuild build && tsc --noEmit", "preview": "rsbuild preview", "start": "rsbuild preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-babel": "^1.1.2", "@rsbuild/plugin-vue": "^1.2.7", "@rsbuild/plugin-vue-jsx": "^2.0.0", @@ -27,8 +27,7 @@ "@tanstack/virtual-file-routes": "workspace:^", "postcss": "^8.5.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vue-tsc": "^3.3.8" + "typescript": "^6.0.2", + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/rspack-basic-file-based/playwright.config.ts b/e2e/vue-router/rspack-basic-file-based/playwright.config.ts index 4eead86444..5f20415459 100644 --- a/e2e/vue-router/rspack-basic-file-based/playwright.config.ts +++ b/e2e/vue-router/rspack-basic-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `PUBLIC_NODE_ENV="test" PUBLIC_EXTERNAL_PORT=${EXTERNAL_PORT} PUBLIC_SERVER_PORT=${PORT} pnpm build && PUBLIC_NODE_ENV="test" PUBLIC_EXTERNAL_PORT=${EXTERNAL_PORT} PUBLIC_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/rspack-basic-file-based/rsbuild.config.ts b/e2e/vue-router/rspack-basic-file-based/rsbuild.config.ts index c91449b6c3..d5e4b7456c 100644 --- a/e2e/vue-router/rspack-basic-file-based/rsbuild.config.ts +++ b/e2e/vue-router/rspack-basic-file-based/rsbuild.config.ts @@ -12,6 +12,19 @@ export default defineConfig({ pluginVue(), pluginVueJsx(), ], + source: { + define: { + // Rsbuild only defines `import.meta.env.PUBLIC_*` when the env var exists. + // When it doesn't, rspack can transform `import.meta.env` to `void 0`, which + // makes `import.meta.env.PUBLIC_*` crash at runtime. + 'import.meta.env.PUBLIC_NODE_ENV': JSON.stringify( + process.env.PUBLIC_NODE_ENV ?? '', + ), + 'import.meta.env.PUBLIC_EXTERNAL_PORT': JSON.stringify( + process.env.PUBLIC_EXTERNAL_PORT ?? '', + ), + }, + }, tools: { rspack: { plugins: [tanstackRouter({ target: 'vue', autoCodeSplitting: true })], diff --git a/e2e/vue-router/rspack-basic-file-based/src/posts.tsx b/e2e/vue-router/rspack-basic-file-based/src/posts.tsx index 5f5463a668..0b557a0f65 100644 --- a/e2e/vue-router/rspack-basic-file-based/src/posts.tsx +++ b/e2e/vue-router/rspack-basic-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.PUBLIC_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.PUBLIC_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/rspack-basic-file-based/src/routes/posts.$postId.tsx b/e2e/vue-router/rspack-basic-file-based/src/routes/posts.$postId.tsx index a86ea0762f..e271c139f5 100644 --- a/e2e/vue-router/rspack-basic-file-based/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/rspack-basic-file-based/src/routes/posts.$postId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -7,19 +6,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ }, component: PostComponent, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/rspack-basic-file-based/src/routes/posts.tsx b/e2e/vue-router/rspack-basic-file-based/src/routes/posts.tsx index 90744370ff..653918c370 100644 --- a/e2e/vue-router/rspack-basic-file-based/src/routes/posts.tsx +++ b/e2e/vue-router/rspack-basic-file-based/src/routes/posts.tsx @@ -1,43 +1,40 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/rspack-basic-file-based/tests/app.spec.ts b/e2e/vue-router/rspack-basic-file-based/tests/app.spec.ts index d230263bfe..10beff655f 100644 --- a/e2e/vue-router/rspack-basic-file-based/tests/app.spec.ts +++ b/e2e/vue-router/rspack-basic-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/rspack-basic-file-based/tests/setup/global.setup.ts b/e2e/vue-router/rspack-basic-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/rspack-basic-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/rspack-basic-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/rspack-basic-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/rspack-basic-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/package.json b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/package.json index 536435a09e..11f61237d3 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/package.json +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/package.json @@ -7,17 +7,17 @@ "build": "rsbuild build && tsc --noEmit", "preview": "rsbuild preview", "start": "rsbuild preview", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-babel": "^1.1.2", "@rsbuild/plugin-vue": "^1.2.7", "@rsbuild/plugin-vue-jsx": "^2.0.0", @@ -27,8 +27,7 @@ "@tanstack/virtual-file-routes": "workspace:^", "postcss": "^8.5.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vue-tsc": "^3.3.8" + "typescript": "^6.0.2", + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts index 1c1d021f2f..bf3adc082c 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +17,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && pnpm start --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `PUBLIC_NODE_ENV="test" PUBLIC_EXTERNAL_PORT=${EXTERNAL_PORT} PUBLIC_SERVER_PORT=${PORT} pnpm build && PUBLIC_SERVER_PORT=${PORT} pnpm start --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/rsbuild.config.ts b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/rsbuild.config.ts index e5c7e8b77e..b09f6ccda8 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/rsbuild.config.ts +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/rsbuild.config.ts @@ -12,6 +12,19 @@ export default defineConfig({ pluginVue(), pluginVueJsx(), ], + source: { + define: { + // Rsbuild only defines `import.meta.env.PUBLIC_*` when the env var exists. + // When it doesn't, rspack can transform `import.meta.env` to `void 0`, which + // makes `import.meta.env.PUBLIC_*` crash at runtime. + 'import.meta.env.PUBLIC_NODE_ENV': JSON.stringify( + process.env.PUBLIC_NODE_ENV ?? '', + ), + 'import.meta.env.PUBLIC_EXTERNAL_PORT': JSON.stringify( + process.env.PUBLIC_EXTERNAL_PORT ?? '', + ), + }, + }, tools: { rspack: { plugins: [ diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx index 5f5463a668..0b557a0f65 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.PUBLIC_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.PUBLIC_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx index 5e3fe4d130..cb1924e993 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts-detail.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -7,19 +6,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent as any, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ }, component: PostComponent, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx index 2a4e8deddd..265faaf650 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/src/routes/posts/posts.tsx @@ -1,42 +1,39 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    + +
    + ) +} diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts index d230263bfe..10beff655f 100644 --- a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/rspack-basic-virtual-named-export-config-file-based/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/package.json b/e2e/vue-router/scroll-restoration-sandbox-vite/package.json index d071ee546a..a7dc67fd6b 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/package.json +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/package.json @@ -11,35 +11,25 @@ "start": "vite", "test:e2e:browser": "VITE_APP_HISTORY=browser playwright test --config=playwright.browser.config.ts --project=chromium", "test:e2e:hash": "VITE_APP_HISTORY=hash playwright test --config=playwright.hash.config.ts --project=chromium", - "test:e2e": "pnpm run test:e2e:browser && pnpm run test:e2e:hash" + "test:e2e": "rm -rf port*.txt; pnpm run test:e2e:browser && pnpm run test:e2e:hash" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/router-plugin": "workspace:^", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/dist-hash" - ] - } - } + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts index e2681daea5..9d7691f0fd 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.browser.config.ts @@ -1,7 +1,15 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, + resolveRuntimeSuffix, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort( + packageJson.name + `-${resolveRuntimeSuffix('browser')}`, +) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +20,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `VITE_APP_HISTORY=browser pnpm build && VITE_APP_HISTORY=browser pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=browser pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=browser pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts index 445616b9bd..80a340cef4 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/playwright.hash.config.ts @@ -1,7 +1,15 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, + resolveRuntimeSuffix, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort( + packageJson.name + `-${resolveRuntimeSuffix('hash')}`, +) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -12,15 +20,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `VITE_APP_HISTORY=hash vite build --outDir dist-hash && VITE_APP_HISTORY=hash pnpm preview --port ${PORT} --outDir dist-hash`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=hash vite build --outDir dist-hash && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} VITE_APP_HISTORY=hash pnpm preview --port ${PORT} --outDir dist-hash`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/src/posts.tsx b/e2e/vue-router/scroll-restoration-sandbox-vite/src/posts.tsx index bc56dff904..c6cba486ab 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/src/posts.tsx +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/src/posts.tsx @@ -12,7 +12,11 @@ export type PostType = { export class PostNotFoundError extends Error {} -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts index e85be2bf37..69dda324fe 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/src/routeTree.gen.ts @@ -12,10 +12,10 @@ import { createFileRoute } from '@tanstack/vue-router' import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as testsLazyPageRouteImport } from './routes/(tests)/lazy-page' -import { Route as testsLazyWithLoaderPageRouteImport } from './routes/(tests)/lazy-with-loader-page' -import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' import { Route as testsPageWithSearchRouteImport } from './routes/(tests)/page-with-search' +import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' +import { Route as testsLazyWithLoaderPageRouteImport } from './routes/(tests)/lazy-with-loader-page' +import { Route as testsLazyPageRouteImport } from './routes/(tests)/lazy-page' const testsVirtualPageLazyRouteImport = createFileRoute( '/(tests)/virtual-page', @@ -26,13 +26,23 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) -const testsLazyPageRoute = testsLazyPageRouteImport +const testsVirtualPageLazyRoute = testsVirtualPageLazyRouteImport .update({ - id: '/(tests)/lazy-page', - path: '/lazy-page', + id: '/(tests)/virtual-page', + path: '/virtual-page', getParentRoute: () => rootRouteImport, } as any) - .lazy(() => import('./routes/(tests)/lazy-page.lazy').then((d) => d.Route)) + .lazy(() => import('./routes/(tests)/virtual-page.lazy').then((d) => d.Route)) +const testsPageWithSearchRoute = testsPageWithSearchRouteImport.update({ + id: '/(tests)/page-with-search', + path: '/page-with-search', + getParentRoute: () => rootRouteImport, +} as any) +const testsNormalPageRoute = testsNormalPageRouteImport.update({ + id: '/(tests)/normal-page', + path: '/normal-page', + getParentRoute: () => rootRouteImport, +} as any) const testsLazyWithLoaderPageRoute = testsLazyWithLoaderPageRouteImport .update({ id: '/(tests)/lazy-with-loader-page', @@ -42,23 +52,13 @@ const testsLazyWithLoaderPageRoute = testsLazyWithLoaderPageRouteImport .lazy(() => import('./routes/(tests)/lazy-with-loader-page.lazy').then((d) => d.Route), ) -const testsNormalPageRoute = testsNormalPageRouteImport.update({ - id: '/(tests)/normal-page', - path: '/normal-page', - getParentRoute: () => rootRouteImport, -} as any) -const testsPageWithSearchRoute = testsPageWithSearchRouteImport.update({ - id: '/(tests)/page-with-search', - path: '/page-with-search', - getParentRoute: () => rootRouteImport, -} as any) -const testsVirtualPageLazyRoute = testsVirtualPageLazyRouteImport +const testsLazyPageRoute = testsLazyPageRouteImport .update({ - id: '/(tests)/virtual-page', - path: '/virtual-page', + id: '/(tests)/lazy-page', + path: '/lazy-page', getParentRoute: () => rootRouteImport, } as any) - .lazy(() => import('./routes/(tests)/virtual-page.lazy').then((d) => d.Route)) + .lazy(() => import('./routes/(tests)/lazy-page.lazy').then((d) => d.Route)) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -130,25 +130,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/lazy-page': { - id: '/(tests)/lazy-page' - path: '/lazy-page' - fullPath: '/lazy-page' - preLoaderRoute: typeof testsLazyPageRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/lazy-with-loader-page': { - id: '/(tests)/lazy-with-loader-page' - path: '/lazy-with-loader-page' - fullPath: '/lazy-with-loader-page' - preLoaderRoute: typeof testsLazyWithLoaderPageRouteImport - parentRoute: typeof rootRouteImport - } - '/(tests)/normal-page': { - id: '/(tests)/normal-page' - path: '/normal-page' - fullPath: '/normal-page' - preLoaderRoute: typeof testsNormalPageRouteImport + '/(tests)/virtual-page': { + id: '/(tests)/virtual-page' + path: '/virtual-page' + fullPath: '/virtual-page' + preLoaderRoute: typeof testsVirtualPageLazyRouteImport parentRoute: typeof rootRouteImport } '/(tests)/page-with-search': { @@ -158,11 +144,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof testsPageWithSearchRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/virtual-page': { - id: '/(tests)/virtual-page' - path: '/virtual-page' - fullPath: '/virtual-page' - preLoaderRoute: typeof testsVirtualPageLazyRouteImport + '/(tests)/normal-page': { + id: '/(tests)/normal-page' + path: '/normal-page' + fullPath: '/normal-page' + preLoaderRoute: typeof testsNormalPageRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/lazy-with-loader-page': { + id: '/(tests)/lazy-with-loader-page' + path: '/lazy-with-loader-page' + fullPath: '/lazy-with-loader-page' + preLoaderRoute: typeof testsLazyWithLoaderPageRouteImport + parentRoute: typeof rootRouteImport + } + '/(tests)/lazy-page': { + id: '/(tests)/lazy-page' + path: '/lazy-page' + fullPath: '/lazy-page' + preLoaderRoute: typeof testsLazyPageRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/tests/app.spec.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/app.spec.ts index 067f0341c4..5f226c6db3 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/tests/app.spec.ts +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' import { toRuntimePath } from '@tanstack/router-e2e-utils' test('Smoke - Renders home', async ({ page }) => { diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/scroll-restoration-sandbox-vite/tsconfig.json b/e2e/vue-router/scroll-restoration-sandbox-vite/tsconfig.json index b47cca9589..3e5b04987f 100644 --- a/e2e/vue-router/scroll-restoration-sandbox-vite/tsconfig.json +++ b/e2e/vue-router/scroll-restoration-sandbox-vite/tsconfig.json @@ -12,5 +12,5 @@ "allowJs": true, "types": ["vite/client", "node"] }, - "exclude": ["node_modules", "dist", "dist-hash"] + "exclude": ["node_modules", "dist"] } diff --git a/e2e/vue-router/sentry-integration/package.json b/e2e/vue-router/sentry-integration/package.json index 045ddd99be..cbf6bf8499 100644 --- a/e2e/vue-router/sentry-integration/package.json +++ b/e2e/vue-router/sentry-integration/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@sentry/vue": "^10.32.0", @@ -17,16 +17,16 @@ "@tailwindcss/vite": "^4.2.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/sentry-integration/playwright.config.ts b/e2e/vue-router/sentry-integration/playwright.config.ts index 6a684ac89e..0c5cee43e4 100644 --- a/e2e/vue-router/sentry-integration/playwright.config.ts +++ b/e2e/vue-router/sentry-integration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && VITE_SERVER_PORT=${PORT} pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/view-transitions/package.json b/e2e/vue-router/view-transitions/package.json index 21a0f1d8a0..493b3e45ce 100644 --- a/e2e/vue-router/view-transitions/package.json +++ b/e2e/vue-router/view-transitions/package.json @@ -8,7 +8,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "vite", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tailwindcss/vite": "^4.2.2", @@ -17,17 +17,17 @@ "@tanstack/vue-query-devtools": "^6.1.2", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/e2e/vue-router/view-transitions/playwright.config.ts b/e2e/vue-router/view-transitions/playwright.config.ts index 4eead86444..c5de6b5611 100644 --- a/e2e/vue-router/view-transitions/playwright.config.ts +++ b/e2e/vue-router/view-transitions/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -17,10 +22,13 @@ export default defineConfig({ baseURL, }, + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + webServer: { - command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_SERVER_PORT=${PORT} VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && pnpm preview --port ${PORT}`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-router/view-transitions/src/routeTree.gen.ts b/e2e/vue-router/view-transitions/src/routeTree.gen.ts index 04708c29a8..465362a7a2 100644 --- a/e2e/vue-router/view-transitions/src/routeTree.gen.ts +++ b/e2e/vue-router/view-transitions/src/routeTree.gen.ts @@ -9,16 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ExploreRouteImport } from './routes/explore' import { Route as HowItWorksRouteImport } from './routes/how-it-works' +import { Route as ExploreRouteImport } from './routes/explore' import { Route as PostsRouteRouteImport } from './routes/posts.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const HowItWorksRoute = HowItWorksRouteImport.update({ + id: '/how-it-works', + path: '/how-it-works', getParentRoute: () => rootRouteImport, } as any) const ExploreRoute = ExploreRouteImport.update({ @@ -26,16 +26,16 @@ const ExploreRoute = ExploreRouteImport.update({ path: '/explore', getParentRoute: () => rootRouteImport, } as any) -const HowItWorksRoute = HowItWorksRouteImport.update({ - id: '/how-it-works', - path: '/how-it-works', - getParentRoute: () => rootRouteImport, -} as any) const PostsRouteRoute = PostsRouteRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -101,11 +101,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/how-it-works': { + id: '/how-it-works' + path: '/how-it-works' + fullPath: '/how-it-works' + preLoaderRoute: typeof HowItWorksRouteImport parentRoute: typeof rootRouteImport } '/explore': { @@ -115,13 +115,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ExploreRouteImport parentRoute: typeof rootRouteImport } - '/how-it-works': { - id: '/how-it-works' - path: '/how-it-works' - fullPath: '/how-it-works' - preLoaderRoute: typeof HowItWorksRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -129,6 +122,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/e2e/vue-router/view-transitions/src/routes/posts.$postId.tsx b/e2e/vue-router/view-transitions/src/routes/posts.$postId.tsx index a86ea0762f..e271c139f5 100644 --- a/e2e/vue-router/view-transitions/src/routes/posts.$postId.tsx +++ b/e2e/vue-router/view-transitions/src/routes/posts.$postId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -7,19 +6,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent, @@ -28,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ }, component: PostComponent, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-router/view-transitions/src/routes/posts.route.tsx b/e2e/vue-router/view-transitions/src/routes/posts.route.tsx index 6802b073f6..01d90b7ad6 100644 --- a/e2e/vue-router/view-transitions/src/routes/posts.route.tsx +++ b/e2e/vue-router/view-transitions/src/routes/posts.route.tsx @@ -1,46 +1,43 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../posts' -const PostsLayoutComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - })} -
    -
    -
    - -
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsLayoutComponent, }) + +function PostsLayoutComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ) + })} +
    +
    +
    + +
    +
    + ) +} diff --git a/e2e/vue-router/view-transitions/tests/app.spec.ts b/e2e/vue-router/view-transitions/tests/app.spec.ts index 6c1ccf1a6e..472bd6ed0b 100644 --- a/e2e/vue-router/view-transitions/tests/app.spec.ts +++ b/e2e/vue-router/view-transitions/tests/app.spec.ts @@ -1,4 +1,4 @@ -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-router/view-transitions/tests/setup/global.setup.ts b/e2e/vue-router/view-transitions/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-router/view-transitions/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/view-transitions/tests/setup/global.teardown.ts b/e2e/vue-router/view-transitions/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-router/view-transitions/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-router/view-transitions/tests/view-transitions.spec.ts b/e2e/vue-router/view-transitions/tests/view-transitions.spec.ts index e62662a1d2..31d8b12b04 100644 --- a/e2e/vue-router/view-transitions/tests/view-transitions.spec.ts +++ b/e2e/vue-router/view-transitions/tests/view-transitions.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.addInitScript(() => { diff --git a/e2e/vue-start/basic-auth/package.json b/e2e/vue-start/basic-auth/package.json index 7f6fb798da..3a572536e9 100644 --- a/e2e/vue-start/basic-auth/package.json +++ b/e2e/vue-start/basic-auth/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", "prisma-generate": "prisma generate", - "test:e2e": "mkdir -p .tmp; rm -f .tmp/dev.db .tmp/dev.db-journal .tmp/dev.db-wal .tmp/dev.db-shm; export DATABASE_URL=file:./.tmp/dev.db; pnpm run prisma-generate && pnpm exec prisma migrate deploy && playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; mkdir -p .tmp; rm -f .tmp/dev.db .tmp/dev.db-journal .tmp/dev.db-wal .tmp/dev.db-shm; export DATABASE_URL=file:./.tmp/dev.db; pnpm run prisma-generate && pnpm exec prisma migrate deploy && playwright test --project=chromium" }, "dependencies": { "@libsql/client": "^0.15.15", @@ -19,13 +19,12 @@ "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-start": "workspace:^", - "iron-session": "^9.0.1", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", @@ -33,21 +32,9 @@ "@vitejs/plugin-vue-jsx": "^5.1.5", "dotenv": "^17.2.3", "prisma": "^7.0.0", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/.tmp", - "{projectRoot}/src/prisma-generated" - ] - } - } } } diff --git a/e2e/vue-start/basic-auth/playwright.config.ts b/e2e/vue-start/basic-auth/playwright.config.ts index 82678ac00b..18b8905468 100644 --- a/e2e/vue-start/basic-auth/playwright.config.ts +++ b/e2e/vue-start/basic-auth/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/basic-auth/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/basic-auth/src/components/DefaultCatchBoundary.tsx index 0687372ae0..02caf56456 100644 --- a/e2e/vue-start/basic-auth/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/basic-auth/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/basic-auth/src/routeTree.gen.ts b/e2e/vue-start/basic-auth/src/routeTree.gen.ts index 058f8674ac..a0a61b0279 100644 --- a/e2e/vue-start/basic-auth/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-auth/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/e2e/vue-start/basic-auth/src/routes/__root.tsx b/e2e/vue-start/basic-auth/src/routes/__root.tsx index e5b6f6778f..89802cfd2f 100644 --- a/e2e/vue-start/basic-auth/src/routes/__root.tsx +++ b/e2e/vue-start/basic-auth/src/routes/__root.tsx @@ -1,5 +1,4 @@ /// -import { defineComponent } from 'vue' import { Body, HeadContent, @@ -16,69 +15,21 @@ import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary.js' import { NotFound } from '~/components/NotFound.js' import appCss from '~/styles/app.css?url' import { seo } from '~/utils/seo.js' -import { getAppSession } from '~/utils/session.js' +import { useAppSession } from '~/utils/session.js' const fetchUser = createServerFn({ method: 'GET' }).handler(async () => { // We need to auth on the server so we have access to secure cookies - const session = await getAppSession() + const session = await useAppSession() - if (!session.userEmail) { + if (!session.data.userEmail) { return null } return { - email: session.userEmail, + email: session.data.userEmail, } }) -const RootShell = defineComponent({ - setup(_, { slots }) { - const routeContext = Route.useRouteContext() - return () => ( - - - - - -
    - - Home - {' '} - - Posts - -
    - {routeContext.value.user ? ( - <> - {routeContext.value.user.email} - Logout - - ) : ( - Login - )} -
    -
    -
    - {slots.default?.()} - - - - - ) - }, -}) - export const Route = createRootRoute({ beforeLoad: async () => { const user = await fetchUser() @@ -130,3 +81,50 @@ export const Route = createRootRoute({ notFoundComponent: () => , component: () => , }) + +function RootShell(_: unknown, { slots }: { slots: any }) { + const routeContext = Route.useRouteContext() + + return ( + + + + + +
    + + Home + {' '} + + Posts + +
    + {routeContext.value.user ? ( + <> + {routeContext.value.user.email} + Logout + + ) : ( + Login + )} +
    +
    +
    + {slots.default?.()} + + + + + ) +} diff --git a/e2e/vue-start/basic-auth/src/routes/_authed.tsx b/e2e/vue-start/basic-auth/src/routes/_authed.tsx index 606de3e487..153efc39eb 100644 --- a/e2e/vue-start/basic-auth/src/routes/_authed.tsx +++ b/e2e/vue-start/basic-auth/src/routes/_authed.tsx @@ -3,7 +3,7 @@ import { createServerFn } from '@tanstack/vue-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { Login } from '~/components/Login' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const loginFn = createServerFn({ method: 'POST', @@ -37,11 +37,12 @@ export const loginFn = createServerFn({ } // Create a session - const session = await getAppSession() + const session = await useAppSession() // Store the user's email in the session - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) }) export const Route = createFileRoute('/_authed')({ @@ -51,7 +52,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return } diff --git a/e2e/vue-start/basic-auth/src/routes/_authed/posts.$postId.tsx b/e2e/vue-start/basic-auth/src/routes/_authed/posts.$postId.tsx index 45d6bbab0d..da0c26f27f 100644 --- a/e2e/vue-start/basic-auth/src/routes/_authed/posts.$postId.tsx +++ b/e2e/vue-start/basic-auth/src/routes/_authed/posts.$postId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -9,18 +8,6 @@ export function PostErrorComponent({ error }: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/_authed/posts/$postId')({ loader: ({ params: { postId } }) => fetchPost({ data: postId }), errorComponent: PostErrorComponent, @@ -29,3 +16,14 @@ export const Route = createFileRoute('/_authed/posts/$postId')({ return Post not found }, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-start/basic-auth/src/routes/_authed/posts.tsx b/e2e/vue-start/basic-auth/src/routes/_authed/posts.tsx index 6b8b54c666..cfac133b51 100644 --- a/e2e/vue-start/basic-auth/src/routes/_authed/posts.tsx +++ b/e2e/vue-start/basic-auth/src/routes/_authed/posts.tsx @@ -1,38 +1,36 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '~/utils/posts.js' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} export const Route = createFileRoute('/_authed/posts')({ loader: () => fetchPosts(), diff --git a/e2e/vue-start/basic-auth/src/routes/logout.tsx b/e2e/vue-start/basic-auth/src/routes/logout.tsx index 8372b33608..f1d7b58e29 100644 --- a/e2e/vue-start/basic-auth/src/routes/logout.tsx +++ b/e2e/vue-start/basic-auth/src/routes/logout.tsx @@ -1,12 +1,12 @@ import { redirect, createFileRoute } from '@tanstack/vue-router' import { createServerFn } from '@tanstack/vue-start' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' const logoutFn = createServerFn({ method: 'POST' }).handler(async () => { - const session = await getAppSession() + const session = await useAppSession() - session.destroy() + session.clear() throw redirect({ href: '/', diff --git a/e2e/vue-start/basic-auth/src/routes/signup.tsx b/e2e/vue-start/basic-auth/src/routes/signup.tsx index 5f37f109c7..eade8363e6 100644 --- a/e2e/vue-start/basic-auth/src/routes/signup.tsx +++ b/e2e/vue-start/basic-auth/src/routes/signup.tsx @@ -5,7 +5,7 @@ import { defineComponent } from 'vue' import { hashPassword, prismaClient } from '~/utils/prisma' import { useMutation } from '~/hooks/useMutation' import { Auth } from '~/components/Auth' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const signupFn = createServerFn({ method: 'POST', @@ -25,7 +25,7 @@ export const signupFn = createServerFn({ const password = await hashPassword(payload.password) // Create a session - const session = await getAppSession() + const session = await useAppSession() if (found) { if (found.password !== password) { @@ -37,8 +37,9 @@ export const signupFn = createServerFn({ } // Store the user's email in the session - session.userEmail = found.email - await session.save() + await session.update({ + userEmail: found.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ @@ -55,8 +56,9 @@ export const signupFn = createServerFn({ }) // Store the user's email in the session - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ diff --git a/e2e/vue-start/basic-auth/src/utils/session.ts b/e2e/vue-start/basic-auth/src/utils/session.ts index 7d078225a0..7cf2a41792 100644 --- a/e2e/vue-start/basic-auth/src/utils/session.ts +++ b/e2e/vue-start/basic-auth/src/utils/session.ts @@ -1,25 +1,13 @@ -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/vue-start/server' +// src/services/session.server.ts +import { useSession } from '@tanstack/vue-start/server' import type { User } from '~/prisma-generated/client' type SessionUser = { userEmail: User['email'] } -export function getAppSession() { - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'test-auth-session', - // This fixture only runs locally with test credentials. - password: 'local-e2e-only-session-password-at-least-32-characters', - ttl: 60 * 60, - cookieOptions: { - httpOnly: true, - secure: false, - sameSite: 'lax', - path: '/', - }, - }, - ) +export function useAppSession() { + return useSession({ + password: 'ChangeThisBeforeShippingToProdOrYouWillBeFired', + }) } diff --git a/e2e/vue-start/basic-cloudflare/package.json b/e2e/vue-start/basic-cloudflare/package.json index 5ab77db8fc..c7e55f7937 100644 --- a/e2e/vue-start/basic-cloudflare/package.json +++ b/e2e/vue-start/basic-cloudflare/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "cf-typegen": "wrangler types", "postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -20,26 +20,15 @@ }, "devDependencies": { "@cloudflare/vite-plugin": "^1.29.0", - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "wrangler": "^4.74.0" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/.wrangler/deploy" - ] - } - } } } diff --git a/e2e/vue-start/basic-cloudflare/playwright.config.ts b/e2e/vue-start/basic-cloudflare/playwright.config.ts index 0925936d55..a545dff891 100644 --- a/e2e/vue-start/basic-cloudflare/playwright.config.ts +++ b/e2e/vue-start/basic-cloudflare/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,6 +14,9 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, @@ -20,8 +24,8 @@ export default defineConfig({ webServer: { command: `pnpm build && pnpm preview --port ${PORT}`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/basic-cloudflare/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/basic-cloudflare/src/components/DefaultCatchBoundary.tsx index 0687372ae0..02caf56456 100644 --- a/e2e/vue-start/basic-cloudflare/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/basic-cloudflare/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts b/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts index c52a88360b..30451e7ab7 100644 --- a/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-cloudflare/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as StaticRouteImport } from './routes/static' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const StaticRoute = StaticRouteImport.update({ id: '/static', path: '/static', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/static': { id: '/static' path: '/static' @@ -65,6 +58,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof StaticRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/e2e/vue-start/basic-cloudflare/src/routes/index.tsx b/e2e/vue-start/basic-cloudflare/src/routes/index.tsx index d3a020c7ad..1c708a7ec6 100644 --- a/e2e/vue-start/basic-cloudflare/src/routes/index.tsx +++ b/e2e/vue-start/basic-cloudflare/src/routes/index.tsx @@ -1,21 +1,7 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { createServerFn } from '@tanstack/vue-start' import { env } from 'cloudflare:workers' -const Home = defineComponent({ - setup() { - const data = Route.useLoaderData() - return () => ( -
    -

    Welcome Home!!!

    -

    {data.value.message}

    -

    {data.value.myVar}

    -
    - ) - }, -}) - export const Route = createFileRoute('/')({ loader: () => getData(), component: Home, @@ -27,3 +13,15 @@ const getData = createServerFn().handler(() => { myVar: env.MY_VAR, } }) + +function Home() { + const data = Route.useLoaderData() + + return ( +
    +

    Welcome Home!!!

    +

    {data.value.message}

    +

    {data.value.myVar}

    +
    + ) +} diff --git a/e2e/vue-start/basic-cloudflare/src/routes/static.tsx b/e2e/vue-start/basic-cloudflare/src/routes/static.tsx index 14d0c06294..7b0f9fd232 100644 --- a/e2e/vue-start/basic-cloudflare/src/routes/static.tsx +++ b/e2e/vue-start/basic-cloudflare/src/routes/static.tsx @@ -1,20 +1,7 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { createServerFn } from '@tanstack/vue-start' import { env } from 'cloudflare:workers' -const StaticPage = defineComponent({ - setup() { - const data = Route.useLoaderData() - return () => ( -
    -

    Static Page

    -

    The value is {data.value.myVar}

    -
    - ) - }, -}) - export const Route = createFileRoute('/static')({ loader: () => getData(), component: StaticPage, @@ -25,3 +12,14 @@ const getData = createServerFn().handler(() => { myVar: env.MY_VAR, } }) + +function StaticPage() { + const data = Route.useLoaderData() + + return ( +
    +

    Static Page

    +

    The value is {data.value.myVar}

    +
    + ) +} diff --git a/e2e/vue-start/basic-cloudflare/tests/setup/global.setup.ts b/e2e/vue-start/basic-cloudflare/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-start/basic-cloudflare/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/basic-cloudflare/tests/setup/global.teardown.ts b/e2e/vue-start/basic-cloudflare/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/basic-cloudflare/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/basic-tsr-config/package.json b/e2e/vue-start/basic-tsr-config/package.json index 828dce5b2a..93c3b272fa 100644 --- a/e2e/vue-start/basic-tsr-config/package.json +++ b/e2e/vue-start/basic-tsr-config/package.json @@ -8,7 +8,7 @@ "dev:e2e": "vite dev", "build": "rimraf ./count.txt && vite build && tsc --noEmit", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -19,12 +19,10 @@ "devDependencies": { "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "vite": "^8.0.14", - "rimraf": "catalog:" + "vite": "^8.0.14" } } diff --git a/e2e/vue-start/basic-tsr-config/playwright.config.ts b/e2e/vue-start/basic-tsr-config/playwright.config.ts index e6b92ce385..f6dd61ba6c 100644 --- a/e2e/vue-start/basic-tsr-config/playwright.config.ts +++ b/e2e/vue-start/basic-tsr-config/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/basic-tsr-config/src/app/routes/index.tsx b/e2e/vue-start/basic-tsr-config/src/app/routes/index.tsx index b4b520e8af..3f4de50817 100644 --- a/e2e/vue-start/basic-tsr-config/src/app/routes/index.tsx +++ b/e2e/vue-start/basic-tsr-config/src/app/routes/index.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import * as fs from 'node:fs' import { createFileRoute, useRouter } from '@tanstack/vue-router' import { createServerFn } from '@tanstack/vue-start' @@ -18,26 +17,25 @@ const updateCount = createServerFn({ method: 'POST' }) const count = await getCount() await fs.promises.writeFile(filePath, `${count + data}`) }) -const Home = defineComponent({ - setup() { - const router = useRouter() - const state = Route.useLoaderData() - return () => ( - - ) - }, -}) - export const Route = createFileRoute('/')({ component: Home, loader: async () => await getCount(), }) + +function Home() { + const router = useRouter() + const state = Route.useLoaderData() + + return ( + + ) +} diff --git a/e2e/vue-start/basic-vue-query/package.json b/e2e/vue-start/basic-vue-query/package.json index ab9589376d..3189e8e867 100644 --- a/e2e/vue-start/basic-vue-query/package.json +++ b/e2e/vue-start/basic-vue-query/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-query": "^5.92.1", @@ -18,22 +18,21 @@ "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-router-ssr-query": "workspace:^", "@tanstack/vue-start": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/basic-vue-query/playwright.config.ts b/e2e/vue-start/basic-vue-query/playwright.config.ts index 0618b7272a..84636ab0f9 100644 --- a/e2e/vue-start/basic-vue-query/playwright.config.ts +++ b/e2e/vue-start/basic-vue-query/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` @@ -11,18 +16,18 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts b/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts index 10e8a56450..2c514d54ea 100644 --- a/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts +++ b/e2e/vue-start/basic-vue-query/src/routeTree.gen.ts @@ -9,41 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as SuspenseTransitionRouteImport } from './routes/suspense-transition' import { Route as UsersRouteImport } from './routes/users' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' -import { Route as ApiUsersRouteImport } from './routes/api.users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as SuspenseTransitionRouteImport } from './routes/suspense-transition' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' -import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api.users' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as TransitionCountQueryRouteImport } from './routes/transition/count/query' +import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const SuspenseTransitionRoute = SuspenseTransitionRouteImport.update({ @@ -51,64 +37,78 @@ const SuspenseTransitionRoute = SuspenseTransitionRouteImport.update({ path: '/suspense-transition', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, -} as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => LayoutLayout2Route, +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, +} as any) +const TransitionCountQueryRoute = TransitionCountQueryRouteImport.update({ + id: '/transition/count/query', + path: '/transition/count/query', + getParentRoute: () => rootRouteImport, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const TransitionCountQueryRoute = TransitionCountQueryRouteImport.update({ - id: '/transition/count/query', - path: '/transition/count/query', - getParentRoute: () => rootRouteImport, +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) +const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => LayoutLayout2Route, +} as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any) export interface FileRoutesByFullPath { @@ -231,32 +231,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/suspense-transition': { @@ -266,11 +245,67 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SuspenseTransitionRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_layout/_layout-2': { @@ -280,62 +315,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2RouteImport parentRoute: typeof LayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/transition/count/query': { + id: '/transition/count/query' + path: '/transition/count/query' + fullPath: '/transition/count/query' + preLoaderRoute: typeof TransitionCountQueryRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route - } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport - parentRoute: typeof LayoutLayout2Route - } - '/api/users/$id': { - id: '/api/users/$id' - path: '/$id' - fullPath: '/api/users/$id' - preLoaderRoute: typeof ApiUsersIdRouteImport - parentRoute: typeof ApiUsersRoute - } '/posts_/$postId/deep': { id: '/posts_/$postId/deep' path: '/posts/$postId/deep' @@ -343,12 +329,26 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/transition/count/query': { - id: '/transition/count/query' - path: '/transition/count/query' - fullPath: '/transition/count/query' - preLoaderRoute: typeof TransitionCountQueryRouteImport - parentRoute: typeof rootRouteImport + '/api/users/$id': { + id: '/api/users/$id' + path: '/$id' + fullPath: '/api/users/$id' + preLoaderRoute: typeof ApiUsersIdRouteImport + parentRoute: typeof ApiUsersRoute + } + '/_layout/_layout-2/layout-b': { + id: '/_layout/_layout-2/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport + parentRoute: typeof LayoutLayout2Route + } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route } } } diff --git a/e2e/vue-start/basic-vue-query/src/routes/api.users.ts b/e2e/vue-start/basic-vue-query/src/routes/api.users.ts index f9330a87db..cab4cafc3f 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/api.users.ts +++ b/e2e/vue-start/basic-vue-query/src/routes/api.users.ts @@ -2,7 +2,11 @@ import { createFileRoute } from '@tanstack/vue-router' import axios from 'redaxios' import type { User } from '../utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users')({ server: { diff --git a/e2e/vue-start/basic-vue-query/src/routes/api/users.$id.ts b/e2e/vue-start/basic-vue-query/src/routes/api/users.$id.ts index d138746730..4cc4b33a0b 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/api/users.$id.ts +++ b/e2e/vue-start/basic-vue-query/src/routes/api/users.$id.ts @@ -2,7 +2,11 @@ import { createFileRoute } from '@tanstack/vue-router' import axios from 'redaxios' import type { User } from '../../utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users/$id')({ server: { diff --git a/e2e/vue-start/basic-vue-query/src/routes/posts.$postId.tsx b/e2e/vue-start/basic-vue-query/src/routes/posts.$postId.tsx index fd8deaf291..27baf4bd5f 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/posts.$postId.tsx +++ b/e2e/vue-start/basic-vue-query/src/routes/posts.$postId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { useQuery } from '@tanstack/vue-query' import { ErrorComponent, @@ -12,30 +11,27 @@ export function PostErrorComponent(props: ErrorComponentProps) { return } -const PostComponent = defineComponent({ - setup() { - const params = Route.useParams() - const postQuery = useQuery(() => postQueryOptions(params.value.postId)) - return () => ( -
    -

    - {postQuery.data.value?.title} -

    -
    {postQuery.data.value?.body}
    - - Deep View - -
    - ) - }, -}) +function PostComponent() { + const params = Route.useParams() + const postQuery = useQuery(() => postQueryOptions(params.value.postId)) + + return ( +
    +

    {postQuery.data.value?.title}

    +
    {postQuery.data.value?.body}
    + + Deep View + +
    + ) +} export const Route = createFileRoute('/posts/$postId')({ loader: async ({ context, params }) => { diff --git a/e2e/vue-start/basic-vue-query/src/routes/posts_.$postId.deep.tsx b/e2e/vue-start/basic-vue-query/src/routes/posts_.$postId.deep.tsx index 211b3ca4b1..38e7429f6e 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/posts_.$postId.deep.tsx +++ b/e2e/vue-start/basic-vue-query/src/routes/posts_.$postId.deep.tsx @@ -1,26 +1,22 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { useQuery } from '@tanstack/vue-query' import { postQueryOptions } from '../utils/posts' import { PostErrorComponent } from './posts.$postId' -const PostDeepComponent = defineComponent({ - setup() { - const params = Route.useParams() - const postQuery = useQuery(() => postQueryOptions(params.value.postId)) - return () => ( -
    - - ← All Posts - -

    - {postQuery.data.value?.title} -

    -
    {postQuery.data.value?.body}
    -
    - ) - }, -}) +function PostDeepComponent() { + const params = Route.useParams() + const postQuery = useQuery(() => postQueryOptions(params.value.postId)) + + return ( +
    + + ← All Posts + +

    {postQuery.data.value?.title}

    +
    {postQuery.data.value?.body}
    +
    + ) +} export const Route = createFileRoute('/posts_/$postId/deep')({ loader: async ({ params: { postId }, context }) => { diff --git a/e2e/vue-start/basic-vue-query/src/routes/suspense-transition.tsx b/e2e/vue-start/basic-vue-query/src/routes/suspense-transition.tsx index f5004aa21d..6d12790dc9 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/suspense-transition.tsx +++ b/e2e/vue-start/basic-vue-query/src/routes/suspense-transition.tsx @@ -1,6 +1,6 @@ import { queryOptions, useQuery } from '@tanstack/vue-query' import { Link, createFileRoute } from '@tanstack/vue-router' -import { defineComponent, ref, watchEffect } from 'vue' +import { ref, watchEffect } from 'vue' const doubleQueryOptions = (n: number) => queryOptions({ @@ -19,37 +19,6 @@ export const Route = createFileRoute('/suspense-transition')({ ssr: false, // Disable SSR to avoid suspense issues during initial load }) -const Result = defineComponent({ - setup() { - const search = Route.useSearch() - const doubleQuery = useQuery(() => doubleQueryOptions(search.value.n)) - const displayedN = ref(search.value.n) - const displayedDouble = ref(undefined) - watchEffect(() => { - if (doubleQuery.data.value !== undefined) { - displayedN.value = search.value.n - displayedDouble.value = doubleQuery.data.value - } - }) - return () => ( -
    -
    - Loading... -
    -
    -
    - n: {displayedN.value} -
    -
    - double:{' '} - {displayedDouble.value} -
    -
    -
    - ) - }, -}) - function SuspenseTransitionComponent() { return (
    @@ -70,3 +39,34 @@ function SuspenseTransitionComponent() {
    ) } + +function Result() { + const search = Route.useSearch() + const doubleQuery = useQuery(() => doubleQueryOptions(search.value.n)) + const displayedN = ref(search.value.n) + const displayedDouble = ref(undefined) + + watchEffect(() => { + if (doubleQuery.data.value !== undefined) { + displayedN.value = search.value.n + displayedDouble.value = doubleQuery.data.value + } + }) + + return ( +
    +
    + Loading... +
    +
    +
    + n: {displayedN.value} +
    +
    + double:{' '} + {displayedDouble.value} +
    +
    +
    + ) +} diff --git a/e2e/vue-start/basic-vue-query/src/routes/transition/count/query.tsx b/e2e/vue-start/basic-vue-query/src/routes/transition/count/query.tsx index 32b1943c71..2ab0562203 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/transition/count/query.tsx +++ b/e2e/vue-start/basic-vue-query/src/routes/transition/count/query.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { queryOptions, useQuery } from '@tanstack/vue-query' import { z } from 'zod' @@ -17,32 +16,6 @@ const doubleQueryOptions = (n: number) => placeholderData: (oldData) => oldData, }) -const TransitionPage = defineComponent({ - setup() { - const search = Route.useSearch() - const doubleQuery = useQuery(() => doubleQueryOptions(search.value.n)) - return () => ( -
    - ({ n: s.n + 1 })} - > - Increase - - -
    -
    n: {doubleQuery.data.value?.n}
    -
    - double: {doubleQuery.data.value?.double} -
    -
    -
    - ) - }, -}) - export const Route = createFileRoute('/transition/count/query')({ validateSearch: searchSchema, loader: ({ context: { queryClient }, location }) => { @@ -51,3 +24,28 @@ export const Route = createFileRoute('/transition/count/query')({ }, component: TransitionPage, }) + +function TransitionPage() { + const search = Route.useSearch() + const doubleQuery = useQuery(() => doubleQueryOptions(search.value.n)) + + return ( +
    + ({ n: s.n + 1 })} + > + Increase + + +
    +
    n: {doubleQuery.data.value?.n}
    +
    + double: {doubleQuery.data.value?.double} +
    +
    +
    + ) +} diff --git a/e2e/vue-start/basic-vue-query/src/routes/users.$userId.tsx b/e2e/vue-start/basic-vue-query/src/routes/users.$userId.tsx index bf1b75861e..91376b9498 100644 --- a/e2e/vue-start/basic-vue-query/src/routes/users.$userId.tsx +++ b/e2e/vue-start/basic-vue-query/src/routes/users.$userId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { useQuery } from '@tanstack/vue-query' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' @@ -6,20 +5,19 @@ import type { ErrorComponentProps } from '@tanstack/vue-router' import { NotFound } from '~/components/NotFound' import { userQueryOptions } from '~/utils/users' -const UserComponent = defineComponent({ - setup() { - const params = Route.useParams() - const userQuery = useQuery(() => userQueryOptions(params.value.userId)) - return () => ( -
    -

    - {userQuery.data.value?.name ?? 'loading...'} -

    -
    {userQuery.data.value?.email ?? ''}
    -
    - ) - }, -}) +function UserComponent() { + const params = Route.useParams() + const userQuery = useQuery(() => userQueryOptions(params.value.userId)) + + return ( +
    +

    + {userQuery.data.value?.name ?? 'loading...'} +

    +
    {userQuery.data.value?.email ?? ''}
    +
    + ) +} export const Route = createFileRoute('/users/$userId')({ loader: async ({ context, params: { userId } }) => { diff --git a/e2e/vue-start/basic-vue-query/src/utils/posts.tsx b/e2e/vue-start/basic-vue-query/src/utils/posts.tsx index c6b5e70a0b..b0a0b8f60d 100644 --- a/e2e/vue-start/basic-vue-query/src/utils/posts.tsx +++ b/e2e/vue-start/basic-vue-query/src/utils/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const postsQueryOptions = () => queryOptions({ diff --git a/e2e/vue-start/basic-vue-query/src/utils/users.tsx b/e2e/vue-start/basic-vue-query/src/utils/users.tsx index fe7a902fa2..29bf08c315 100644 --- a/e2e/vue-start/basic-vue-query/src/utils/users.tsx +++ b/e2e/vue-start/basic-vue-query/src/utils/users.tsx @@ -1,6 +1,4 @@ import { queryOptions } from '@tanstack/vue-query' -import { createIsomorphicFn } from '@tanstack/vue-start' -import { getRequestUrl } from '@tanstack/vue-start/server' import axios from 'redaxios' export type User = { @@ -9,16 +7,17 @@ export type User = { email: string } -const getOrigin = createIsomorphicFn() - .server(() => getRequestUrl().origin) - .client(() => window.location.origin) +const PORT = + import.meta.env.VITE_SERVER_PORT || process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` export const usersQueryOptions = () => queryOptions({ queryKey: ['users'], queryFn: () => axios - .get>(getOrigin() + '/api/users') + .get>(DEPLOY_URL + '/api/users') .then((r) => r.data) .catch(() => { throw new Error('Failed to fetch users') @@ -30,7 +29,7 @@ export const userQueryOptions = (id: string) => queryKey: ['users', id], queryFn: () => axios - .get(getOrigin() + '/api/users/' + id) + .get(DEPLOY_URL + '/api/users/' + id) .then((r) => r.data) .catch(() => { throw new Error('Failed to fetch user') diff --git a/e2e/vue-start/basic-vue-query/tests/app.spec.ts b/e2e/vue-start/basic-vue-query/tests/app.spec.ts index 4ce5c20ef7..ab2469f68d 100644 --- a/e2e/vue-start/basic-vue-query/tests/app.spec.ts +++ b/e2e/vue-start/basic-vue-query/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test('Navigating to post', async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-start/basic-vue-query/tests/setup/global.setup.ts b/e2e/vue-start/basic-vue-query/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-start/basic-vue-query/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/basic-vue-query/tests/setup/global.teardown.ts b/e2e/vue-start/basic-vue-query/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/basic-vue-query/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/basic-vue-query/tests/transition.spec.ts b/e2e/vue-start/basic-vue-query/tests/transition.spec.ts index a0f3bf0964..2c28fc72a2 100644 --- a/e2e/vue-start/basic-vue-query/tests/transition.spec.ts +++ b/e2e/vue-start/basic-vue-query/tests/transition.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test('transitions/count/query should keep old values visible during navigation', async ({ page, diff --git a/e2e/vue-start/basic/package.json b/e2e/vue-start/basic/package.json index 2ff8329543..073627701a 100644 --- a/e2e/vue-start/basic/package.json +++ b/e2e/vue-start/basic/package.json @@ -6,12 +6,12 @@ "scripts": { "dev": "vite dev --port 3000", "dev:e2e": "vite dev", - "build": "pnpm build:vite", + "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "node server.js", - "test:e2e:local": "playwright test --project=chromium", - "build:vite": "vite build && tsc --noEmit", - "build:rsbuild": "rsbuild build && tsc --noEmit" + "test:e2e:startDummyServer": "node -e 'import(\"./tests/setup/global.setup.ts\").then(m => m.default())' & node -e 'import(\"./tests/setup/waitForDummyServer.ts\").then(m => m.default())'", + "test:e2e:stopDummyServer": "node -e 'import(\"./tests/setup/global.teardown.ts\").then(m => m.default())'", + "test:e2e:local": "playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -20,17 +20,17 @@ "express": "^5.2.1", "http-proxy-middleware": "^3.0.5", "js-cookie": "^3.0.5", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.16", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", - "@rsbuild/core": "^2.3.1", - "@rsbuild/plugin-babel": "^1.1.2", - "@rsbuild/plugin-vue": "^1.2.7", - "@rsbuild/plugin-vue-jsx": "^2.0.0", + "@playwright/test": "^1.50.1", + "@rsbuild/core": "^2.0.11", + "@rsbuild/plugin-babel": "^1.0.5", + "@rsbuild/plugin-vue": "^1.2.2", + "@rsbuild/plugin-vue-jsx": "^1.1.1", "@tailwindcss/postcss": "^4.2.2", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", @@ -39,10 +39,9 @@ "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { @@ -59,10 +58,7 @@ }, { "toolchain": "vite", - "mode": "prerender", - "env": { - "NODE_OPTIONS": "--import=@tanstack/router-e2e-utils/mock-api" - } + "mode": "prerender" }, { "toolchain": "vite", diff --git a/e2e/vue-start/basic/playwright.config.ts b/e2e/vue-start/basic/playwright.config.ts index 9322874f3a..6924134cd1 100644 --- a/e2e/vue-start/basic/playwright.config.ts +++ b/e2e/vue-start/basic/playwright.config.ts @@ -1,37 +1,59 @@ +import fs from 'node:fs' import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const mode = process.env.MODE ?? 'ssr' - +const e2ePortKey = process.env.E2E_PORT_KEY ?? packageJson.name const distDir = process.env.E2E_DIST_DIR ?? 'dist' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +if (process.env.TEST_WORKER_INDEX === undefined) { + for (const portFile of [ + `port-${e2ePortKey}.txt`, + `port-${e2ePortKey}_start.txt`, + `port-${e2ePortKey}-external.txt`, + ]) { + fs.rmSync(portFile, { force: true }) + } +} + +const PORT = await getTestServerPort(e2ePortKey) +const START_PORT = await getTestServerPort(`${e2ePortKey}_start`) +const EXTERNAL_PORT = await getDummyServerPort(e2ePortKey) const baseURL = `http://localhost:${PORT}` const commandByMode = mode === 'preview' - ? `pnpm preview --host 0.0.0.0 --outDir ${distDir} --port ${PORT}` - : `pnpm start` + ? `pnpm run test:e2e:startDummyServer && pnpm preview --outDir ${distDir} --port ${PORT}` + : `pnpm run test:e2e:startDummyServer && pnpm start` export default defineConfig({ testDir: './tests', workers: 1, reporter: [['line']], + globalTeardown: './tests/setup/global.teardown.ts', + use: { baseURL, }, webServer: { command: commandByMode, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, MODE: mode, - START_PORT: '0', + VITE_NODE_ENV: 'test', + VITE_EXTERNAL_PORT: String(EXTERNAL_PORT), + VITE_SERVER_PORT: String(PORT), + START_PORT: String(START_PORT), PORT: String(PORT), E2E_DIST_DIR: distDir, + E2E_PORT_KEY: e2ePortKey, }, }, diff --git a/e2e/vue-start/basic/rsbuild.config.ts b/e2e/vue-start/basic/rsbuild.config.ts index aad3a76e73..93af798c3c 100644 --- a/e2e/vue-start/basic/rsbuild.config.ts +++ b/e2e/vue-start/basic/rsbuild.config.ts @@ -16,6 +16,11 @@ export default defineConfig({ pluginVueJsx(), tanstackStart(), ], + performance: { + chunkSplit: { + strategy: 'split-by-experience', + }, + }, source: { define: { __TSR_PRERENDER__: JSON.stringify(isPrerender), diff --git a/e2e/vue-start/basic/server.js b/e2e/vue-start/basic/server.js index 3e1ddab400..69c1e4ca91 100644 --- a/e2e/vue-start/basic/server.js +++ b/e2e/vue-start/basic/server.js @@ -1,12 +1,12 @@ +import { toNodeHandler } from 'srvx/node' import fs from 'node:fs' import path from 'node:path' -import { toNodeHandler } from 'srvx/node' import express from 'express' import { createProxyMiddleware } from 'http-proxy-middleware' -const port = Number(process.env.PORT ?? 3000) +const port = process.env.PORT || 3000 -const startPort = Number(process.env.START_PORT ?? 0) +const startPort = process.env.START_PORT || 3001 const isSpaMode = process.env.MODE === 'spa' const isPrerender = process.env.MODE === 'prerender' @@ -49,13 +49,13 @@ export async function createStartServer() { return { app } } -export async function createSpaServer(backendPort) { +export async function createSpaServer() { const app = express() app.use( '/api', createProxyMiddleware({ - target: `http://localhost:${backendPort}/api`, // Replace with your target server's URL + target: `http://localhost:${startPort}/api`, // Replace with your target server's URL changeOrigin: false, // Needed for virtual hosted sites, }), ) @@ -63,7 +63,7 @@ export async function createSpaServer(backendPort) { app.use( '/_serverFn', createProxyMiddleware({ - target: `http://localhost:${backendPort}/_serverFn`, // Replace with your target server's URL + target: `http://localhost:${startPort}/_serverFn`, // Replace with your target server's URL changeOrigin: false, // Needed for virtual hosted sites, }), ) @@ -71,28 +71,31 @@ export async function createSpaServer(backendPort) { app.use(express.static(distClientDir)) app.get('/{*splat}', (req, res) => { - res.sendFile('index.html', { root: distClientDir }) + res.sendFile(path.resolve(distClientDir, 'index.html')) }) return { app } } -// Bind the backend first so the SPA proxy receives the port actually held by it. -const { app: startApp } = await createStartServer() -const backend = startApp.listen(isSpaMode ? startPort : port, async (error) => { - if (error) { - throw error - } - const backendPort = backend.address().port - if (isSpaMode) { - const { app } = await createSpaServer(backendPort) - const frontend = app.listen(port, (frontendError) => { - if (frontendError) { - throw frontendError - } - console.info(`E2E app: http://localhost:${frontend.address().port}`) - }) - } else { - console.info(`E2E app: http://localhost:${backendPort}`) - } -}) +if (isSpaMode) { + createSpaServer().then(async ({ app }) => + app.listen(port, (error) => { + if (error) throw error + console.info(`Client Server: http://localhost:${port}`) + }), + ) + + createStartServer().then(async ({ app }) => + app.listen(startPort, (error) => { + if (error) throw error + console.info(`Start Server: http://localhost:${startPort}`) + }), + ) +} else { + createStartServer().then(async ({ app }) => + app.listen(port, (error) => { + if (error) throw error + console.info(`Start Server: http://localhost:${port}`) + }), + ) +} diff --git a/e2e/vue-start/basic/src/routeTree.gen.ts b/e2e/vue-start/basic/src/routeTree.gen.ts index 7fbcd192b6..016a292835 100644 --- a/e2e/vue-start/basic/src/routeTree.gen.ts +++ b/e2e/vue-start/basic/src/routeTree.gen.ts @@ -9,116 +9,67 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as InlineScriptsRouteImport } from './routes/inline-scripts' -import { Route as LinksRouteImport } from './routes/links' -import { Route as NotFoundRouteRouteImport } from './routes/not-found/route' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RawStreamRouteImport } from './routes/raw-stream' -import { Route as ScriptsRouteImport } from './routes/scripts' -import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' -import { Route as SpecialCharsRouteRouteImport } from './routes/specialChars/route' -import { Route as StreamRouteImport } from './routes/stream' import { Route as UsersRouteImport } from './routes/users' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as MultiCookieRedirectIndexRouteImport } from './routes/multi-cookie-redirect/index' -import { Route as MultiCookieRedirectTargetRouteImport } from './routes/multi-cookie-redirect/target' -import { Route as NotFoundIndexRouteImport } from './routes/not-found/index' -import { Route as NotFoundParentBoundaryRouteRouteImport } from './routes/not-found/parent-boundary/route' -import { Route as NotFoundViaBeforeLoadRouteImport } from './routes/not-found/via-beforeLoad' -import { Route as NotFoundViaBeforeLoadTargetRootRouteImport } from './routes/not-found/via-beforeLoad-target-root' -import { Route as NotFoundViaLoaderRouteImport } from './routes/not-found/via-loader' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as RawStreamIndexRouteImport } from './routes/raw-stream/index' -import { Route as RawStreamClientCallRouteImport } from './routes/raw-stream/client-call' -import { Route as RawStreamSsrBinaryHintRouteImport } from './routes/raw-stream/ssr-binary-hint' -import { Route as RawStreamSsrMixedRouteImport } from './routes/raw-stream/ssr-mixed' -import { Route as RawStreamSsrMultipleRouteImport } from './routes/raw-stream/ssr-multiple' -import { Route as RawStreamSsrSingleRouteImport } from './routes/raw-stream/ssr-single' -import { Route as RawStreamSsrTextHintRouteImport } from './routes/raw-stream/ssr-text-hint' -import { Route as RedirectIndexRouteImport } from './routes/redirect/index' -import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' -import { Route as SearchParamsIndexRouteImport } from './routes/search-params/index' -import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' -import { Route as SearchParamsLoaderThrowsRedirectRouteImport } from './routes/search-params/loader-throws-redirect' -import { Route as SpecialCharsParamRouteImport } from './routes/specialChars/$param' -import { Route as SpecialCharsHashRouteImport } from './routes/specialChars/hash' -import { Route as SpecialCharsMalformedRouteRouteImport } from './routes/specialChars/malformed/route' -import { Route as SpecialCharsSearchRouteImport } from './routes/specialChars/search' -import { Route as SpecialCharsChar45824Char54620Char48124Char44397RouteImport } from './routes/specialChars/대한민국' +import { Route as StreamRouteImport } from './routes/stream' +import { Route as ScriptsRouteImport } from './routes/scripts' +import { Route as RawStreamRouteImport } from './routes/raw-stream' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as LinksRouteImport } from './routes/links' +import { Route as InlineScriptsRouteImport } from './routes/inline-scripts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as SpecialCharsRouteRouteImport } from './routes/specialChars/route' +import { Route as SearchParamsRouteRouteImport } from './routes/search-params/route' +import { Route as NotFoundRouteRouteImport } from './routes/not-found/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as SearchParamsIndexRouteImport } from './routes/search-params/index' +import { Route as RedirectIndexRouteImport } from './routes/redirect/index' +import { Route as RawStreamIndexRouteImport } from './routes/raw-stream/index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' +import { Route as NotFoundIndexRouteImport } from './routes/not-found/index' +import { Route as MultiCookieRedirectIndexRouteImport } from './routes/multi-cookie-redirect/index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' -import { Route as NotFoundParentBoundaryViaBeforeLoadRouteImport } from './routes/not-found/parent-boundary/via-beforeLoad' -import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as SpecialCharsChar45824Char54620Char48124Char44397RouteImport } from './routes/specialChars/대한민국' +import { Route as SpecialCharsSearchRouteImport } from './routes/specialChars/search' +import { Route as SpecialCharsHashRouteImport } from './routes/specialChars/hash' +import { Route as SpecialCharsParamRouteImport } from './routes/specialChars/$param' +import { Route as SearchParamsLoaderThrowsRedirectRouteImport } from './routes/search-params/loader-throws-redirect' +import { Route as SearchParamsDefaultRouteImport } from './routes/search-params/default' +import { Route as RedirectTargetRouteImport } from './routes/redirect/$target' +import { Route as RawStreamSsrTextHintRouteImport } from './routes/raw-stream/ssr-text-hint' +import { Route as RawStreamSsrSingleRouteImport } from './routes/raw-stream/ssr-single' +import { Route as RawStreamSsrMultipleRouteImport } from './routes/raw-stream/ssr-multiple' +import { Route as RawStreamSsrMixedRouteImport } from './routes/raw-stream/ssr-mixed' +import { Route as RawStreamSsrBinaryHintRouteImport } from './routes/raw-stream/ssr-binary-hint' +import { Route as RawStreamClientCallRouteImport } from './routes/raw-stream/client-call' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as NotFoundViaLoaderRouteImport } from './routes/not-found/via-loader' +import { Route as NotFoundViaBeforeLoadTargetRootRouteImport } from './routes/not-found/via-beforeLoad-target-root' +import { Route as NotFoundViaBeforeLoadRouteImport } from './routes/not-found/via-beforeLoad' +import { Route as MultiCookieRedirectTargetRouteImport } from './routes/multi-cookie-redirect/target' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as SpecialCharsMalformedRouteRouteImport } from './routes/specialChars/malformed/route' +import { Route as NotFoundParentBoundaryRouteRouteImport } from './routes/not-found/parent-boundary/route' import { Route as RedirectTargetIndexRouteImport } from './routes/redirect/$target/index' -import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' -import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' -import { Route as SpecialCharsMalformedParamRouteImport } from './routes/specialChars/malformed/$param' import { Route as SpecialCharsMalformedSearchRouteImport } from './routes/specialChars/malformed/search' +import { Route as SpecialCharsMalformedParamRouteImport } from './routes/specialChars/malformed/$param' +import { Route as RedirectTargetViaLoaderRouteImport } from './routes/redirect/$target/via-loader' +import { Route as RedirectTargetViaBeforeLoadRouteImport } from './routes/redirect/$target/via-beforeLoad' +import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as NotFoundParentBoundaryViaBeforeLoadRouteImport } from './routes/not-found/parent-boundary/via-beforeLoad' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' import { Route as RedirectTargetServerFnIndexRouteImport } from './routes/redirect/$target/serverFn/index' -import { Route as RedirectTargetServerFnViaBeforeLoadRouteImport } from './routes/redirect/$target/serverFn/via-beforeLoad' -import { Route as RedirectTargetServerFnViaLoaderRouteImport } from './routes/redirect/$target/serverFn/via-loader' import { Route as RedirectTargetServerFnViaUseServerFnRouteImport } from './routes/redirect/$target/serverFn/via-useServerFn' +import { Route as RedirectTargetServerFnViaLoaderRouteImport } from './routes/redirect/$target/serverFn/via-loader' +import { Route as RedirectTargetServerFnViaBeforeLoadRouteImport } from './routes/redirect/$target/serverFn/via-beforeLoad' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const InlineScriptsRoute = InlineScriptsRouteImport.update({ - id: '/inline-scripts', - path: '/inline-scripts', - getParentRoute: () => rootRouteImport, -} as any) -const LinksRoute = LinksRouteImport.update({ - id: '/links', - path: '/links', - getParentRoute: () => rootRouteImport, -} as any) -const NotFoundRouteRoute = NotFoundRouteRouteImport.update({ - id: '/not-found', - path: '/not-found', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RawStreamRoute = RawStreamRouteImport.update({ - id: '/raw-stream', - path: '/raw-stream', - getParentRoute: () => rootRouteImport, -} as any) -const ScriptsRoute = ScriptsRouteImport.update({ - id: '/scripts', - path: '/scripts', - getParentRoute: () => rootRouteImport, -} as any) -const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ - id: '/search-params', - path: '/search-params', - getParentRoute: () => rootRouteImport, -} as any) -const SpecialCharsRouteRoute = SpecialCharsRouteRouteImport.update({ - id: '/specialChars', - path: '/specialChars', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const StreamRoute = StreamRouteImport.update({ @@ -126,46 +77,176 @@ const StreamRoute = StreamRouteImport.update({ path: '/stream', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const ScriptsRoute = ScriptsRouteImport.update({ + id: '/scripts', + path: '/scripts', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, -} as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const RawStreamRoute = RawStreamRouteImport.update({ + id: '/raw-stream', + path: '/raw-stream', getParentRoute: () => rootRouteImport, } as any) +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const LinksRoute = LinksRouteImport.update({ + id: '/links', + path: '/links', + getParentRoute: () => rootRouteImport, +} as any) +const InlineScriptsRoute = InlineScriptsRouteImport.update({ + id: '/inline-scripts', + path: '/inline-scripts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const SpecialCharsRouteRoute = SpecialCharsRouteRouteImport.update({ + id: '/specialChars', + path: '/specialChars', + getParentRoute: () => rootRouteImport, +} as any) +const SearchParamsRouteRoute = SearchParamsRouteRouteImport.update({ + id: '/search-params', + path: '/search-params', + getParentRoute: () => rootRouteImport, +} as any) +const NotFoundRouteRoute = NotFoundRouteRouteImport.update({ + id: '/not-found', + path: '/not-found', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RedirectIndexRoute = RedirectIndexRouteImport.update({ + id: '/redirect/', + path: '/redirect/', + getParentRoute: () => rootRouteImport, +} as any) +const RawStreamIndexRoute = RawStreamIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => RawStreamRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const NotFoundIndexRoute = NotFoundIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => NotFoundRouteRoute, +} as any) const MultiCookieRedirectIndexRoute = MultiCookieRedirectIndexRouteImport.update({ id: '/multi-cookie-redirect/', path: '/multi-cookie-redirect/', getParentRoute: () => rootRouteImport, } as any) -const MultiCookieRedirectTargetRoute = - MultiCookieRedirectTargetRouteImport.update({ - id: '/multi-cookie-redirect/target', - path: '/multi-cookie-redirect/target', - getParentRoute: () => rootRouteImport, - } as any) -const NotFoundIndexRoute = NotFoundIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => NotFoundRouteRoute, +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, } as any) -const NotFoundParentBoundaryRouteRoute = - NotFoundParentBoundaryRouteRouteImport.update({ - id: '/parent-boundary', - path: '/parent-boundary', - getParentRoute: () => NotFoundRouteRoute, +const SpecialCharsChar45824Char54620Char48124Char44397Route = + SpecialCharsChar45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => SpecialCharsRouteRoute, } as any) -const NotFoundViaBeforeLoadRoute = NotFoundViaBeforeLoadRouteImport.update({ - id: '/via-beforeLoad', - path: '/via-beforeLoad', +const SpecialCharsSearchRoute = SpecialCharsSearchRouteImport.update({ + id: '/search', + path: '/search', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SpecialCharsHashRoute = SpecialCharsHashRouteImport.update({ + id: '/hash', + path: '/hash', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SpecialCharsParamRoute = SpecialCharsParamRouteImport.update({ + id: '/$param', + path: '/$param', + getParentRoute: () => SpecialCharsRouteRoute, +} as any) +const SearchParamsLoaderThrowsRedirectRoute = + SearchParamsLoaderThrowsRedirectRouteImport.update({ + id: '/loader-throws-redirect', + path: '/loader-throws-redirect', + getParentRoute: () => SearchParamsRouteRoute, + } as any) +const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ + id: '/default', + path: '/default', + getParentRoute: () => SearchParamsRouteRoute, +} as any) +const RedirectTargetRoute = RedirectTargetRouteImport.update({ + id: '/redirect/$target', + path: '/redirect/$target', + getParentRoute: () => rootRouteImport, +} as any) +const RawStreamSsrTextHintRoute = RawStreamSsrTextHintRouteImport.update({ + id: '/ssr-text-hint', + path: '/ssr-text-hint', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrSingleRoute = RawStreamSsrSingleRouteImport.update({ + id: '/ssr-single', + path: '/ssr-single', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrMultipleRoute = RawStreamSsrMultipleRouteImport.update({ + id: '/ssr-multiple', + path: '/ssr-multiple', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrMixedRoute = RawStreamSsrMixedRouteImport.update({ + id: '/ssr-mixed', + path: '/ssr-mixed', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamSsrBinaryHintRoute = RawStreamSsrBinaryHintRouteImport.update({ + id: '/ssr-binary-hint', + path: '/ssr-binary-hint', + getParentRoute: () => RawStreamRoute, +} as any) +const RawStreamClientCallRoute = RawStreamClientCallRouteImport.update({ + id: '/client-call', + path: '/client-call', + getParentRoute: () => RawStreamRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const NotFoundViaLoaderRoute = NotFoundViaLoaderRouteImport.update({ + id: '/via-loader', + path: '/via-loader', getParentRoute: () => NotFoundRouteRoute, } as any) const NotFoundViaBeforeLoadTargetRootRoute = @@ -174,91 +255,25 @@ const NotFoundViaBeforeLoadTargetRootRoute = path: '/via-beforeLoad-target-root', getParentRoute: () => NotFoundRouteRoute, } as any) -const NotFoundViaLoaderRoute = NotFoundViaLoaderRouteImport.update({ - id: '/via-loader', - path: '/via-loader', +const NotFoundViaBeforeLoadRoute = NotFoundViaBeforeLoadRouteImport.update({ + id: '/via-beforeLoad', + path: '/via-beforeLoad', getParentRoute: () => NotFoundRouteRoute, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const RawStreamIndexRoute = RawStreamIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamClientCallRoute = RawStreamClientCallRouteImport.update({ - id: '/client-call', - path: '/client-call', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrBinaryHintRoute = RawStreamSsrBinaryHintRouteImport.update({ - id: '/ssr-binary-hint', - path: '/ssr-binary-hint', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrMixedRoute = RawStreamSsrMixedRouteImport.update({ - id: '/ssr-mixed', - path: '/ssr-mixed', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrMultipleRoute = RawStreamSsrMultipleRouteImport.update({ - id: '/ssr-multiple', - path: '/ssr-multiple', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrSingleRoute = RawStreamSsrSingleRouteImport.update({ - id: '/ssr-single', - path: '/ssr-single', - getParentRoute: () => RawStreamRoute, -} as any) -const RawStreamSsrTextHintRoute = RawStreamSsrTextHintRouteImport.update({ - id: '/ssr-text-hint', - path: '/ssr-text-hint', - getParentRoute: () => RawStreamRoute, -} as any) -const RedirectIndexRoute = RedirectIndexRouteImport.update({ - id: '/redirect/', - path: '/redirect/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectTargetRoute = RedirectTargetRouteImport.update({ - id: '/redirect/$target', - path: '/redirect/$target', - getParentRoute: () => rootRouteImport, -} as any) -const SearchParamsIndexRoute = SearchParamsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const SearchParamsDefaultRoute = SearchParamsDefaultRouteImport.update({ - id: '/default', - path: '/default', - getParentRoute: () => SearchParamsRouteRoute, -} as any) -const SearchParamsLoaderThrowsRedirectRoute = - SearchParamsLoaderThrowsRedirectRouteImport.update({ - id: '/loader-throws-redirect', - path: '/loader-throws-redirect', - getParentRoute: () => SearchParamsRouteRoute, +const MultiCookieRedirectTargetRoute = + MultiCookieRedirectTargetRouteImport.update({ + id: '/multi-cookie-redirect/target', + path: '/multi-cookie-redirect/target', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsParamRoute = SpecialCharsParamRouteImport.update({ - id: '/$param', - path: '/$param', - getParentRoute: () => SpecialCharsRouteRoute, +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsHashRoute = SpecialCharsHashRouteImport.update({ - id: '/hash', - path: '/hash', - getParentRoute: () => SpecialCharsRouteRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) const SpecialCharsMalformedRouteRoute = SpecialCharsMalformedRouteRouteImport.update({ @@ -266,91 +281,76 @@ const SpecialCharsMalformedRouteRoute = path: '/malformed', getParentRoute: () => SpecialCharsRouteRoute, } as any) -const SpecialCharsSearchRoute = SpecialCharsSearchRouteImport.update({ - id: '/search', - path: '/search', - getParentRoute: () => SpecialCharsRouteRoute, -} as any) -const SpecialCharsChar45824Char54620Char48124Char44397Route = - SpecialCharsChar45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => SpecialCharsRouteRoute, +const NotFoundParentBoundaryRouteRoute = + NotFoundParentBoundaryRouteRouteImport.update({ + id: '/parent-boundary', + path: '/parent-boundary', + getParentRoute: () => NotFoundRouteRoute, } as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => UsersRoute, -} as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, -} as any) -const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ - id: '/layout-b', - path: '/layout-b', - getParentRoute: () => LayoutLayout2Route, -} as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const NotFoundParentBoundaryViaBeforeLoadRoute = - NotFoundParentBoundaryViaBeforeLoadRouteImport.update({ - id: '/via-beforeLoad', - path: '/via-beforeLoad', - getParentRoute: () => NotFoundParentBoundaryRouteRoute, - } as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) const RedirectTargetIndexRoute = RedirectTargetIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => RedirectTargetRoute, } as any) +const SpecialCharsMalformedSearchRoute = + SpecialCharsMalformedSearchRouteImport.update({ + id: '/search', + path: '/search', + getParentRoute: () => SpecialCharsMalformedRouteRoute, + } as any) +const SpecialCharsMalformedParamRoute = + SpecialCharsMalformedParamRouteImport.update({ + id: '/$param', + path: '/$param', + getParentRoute: () => SpecialCharsMalformedRouteRoute, + } as any) +const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ + id: '/via-loader', + path: '/via-loader', + getParentRoute: () => RedirectTargetRoute, +} as any) const RedirectTargetViaBeforeLoadRoute = RedirectTargetViaBeforeLoadRouteImport.update({ id: '/via-beforeLoad', path: '/via-beforeLoad', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectTargetViaLoaderRoute = RedirectTargetViaLoaderRouteImport.update({ - id: '/via-loader', - path: '/via-loader', - getParentRoute: () => RedirectTargetRoute, +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', + getParentRoute: () => rootRouteImport, } as any) -const SpecialCharsMalformedParamRoute = - SpecialCharsMalformedParamRouteImport.update({ - id: '/$param', - path: '/$param', - getParentRoute: () => SpecialCharsMalformedRouteRoute, - } as any) -const SpecialCharsMalformedSearchRoute = - SpecialCharsMalformedSearchRouteImport.update({ - id: '/search', - path: '/search', - getParentRoute: () => SpecialCharsMalformedRouteRoute, +const NotFoundParentBoundaryViaBeforeLoadRoute = + NotFoundParentBoundaryViaBeforeLoadRouteImport.update({ + id: '/via-beforeLoad', + path: '/via-beforeLoad', + getParentRoute: () => NotFoundParentBoundaryRouteRoute, } as any) +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => ApiUsersRoute, +} as any) +const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ + id: '/layout-b', + path: '/layout-b', + getParentRoute: () => LayoutLayout2Route, +} as any) +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) const RedirectTargetServerFnIndexRoute = RedirectTargetServerFnIndexRouteImport.update({ id: '/serverFn/', path: '/serverFn/', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectTargetServerFnViaBeforeLoadRoute = - RedirectTargetServerFnViaBeforeLoadRouteImport.update({ - id: '/serverFn/via-beforeLoad', - path: '/serverFn/via-beforeLoad', +const RedirectTargetServerFnViaUseServerFnRoute = + RedirectTargetServerFnViaUseServerFnRouteImport.update({ + id: '/serverFn/via-useServerFn', + path: '/serverFn/via-useServerFn', getParentRoute: () => RedirectTargetRoute, } as any) const RedirectTargetServerFnViaLoaderRoute = @@ -359,10 +359,10 @@ const RedirectTargetServerFnViaLoaderRoute = path: '/serverFn/via-loader', getParentRoute: () => RedirectTargetRoute, } as any) -const RedirectTargetServerFnViaUseServerFnRoute = - RedirectTargetServerFnViaUseServerFnRouteImport.update({ - id: '/serverFn/via-useServerFn', - path: '/serverFn/via-useServerFn', +const RedirectTargetServerFnViaBeforeLoadRoute = + RedirectTargetServerFnViaBeforeLoadRouteImport.update({ + id: '/serverFn/via-beforeLoad', + path: '/serverFn/via-beforeLoad', getParentRoute: () => RedirectTargetRoute, } as any) @@ -728,81 +728,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/inline-scripts': { - id: '/inline-scripts' - path: '/inline-scripts' - fullPath: '/inline-scripts' - preLoaderRoute: typeof InlineScriptsRouteImport - parentRoute: typeof rootRouteImport - } - '/links': { - id: '/links' - path: '/links' - fullPath: '/links' - preLoaderRoute: typeof LinksRouteImport - parentRoute: typeof rootRouteImport - } - '/not-found': { - id: '/not-found' - path: '/not-found' - fullPath: '/not-found' - preLoaderRoute: typeof NotFoundRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/raw-stream': { - id: '/raw-stream' - path: '/raw-stream' - fullPath: '/raw-stream' - preLoaderRoute: typeof RawStreamRouteImport - parentRoute: typeof rootRouteImport - } - '/scripts': { - id: '/scripts' - path: '/scripts' - fullPath: '/scripts' - preLoaderRoute: typeof ScriptsRouteImport - parentRoute: typeof rootRouteImport - } - '/search-params': { - id: '/search-params' - path: '/search-params' - fullPath: '/search-params' - preLoaderRoute: typeof SearchParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/specialChars': { - id: '/specialChars' - path: '/specialChars' - fullPath: '/specialChars' - preLoaderRoute: typeof SpecialCharsRouteRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/stream': { @@ -812,152 +742,89 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof StreamRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/scripts': { + id: '/scripts' + path: '/scripts' + fullPath: '/scripts' + preLoaderRoute: typeof ScriptsRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' + '/raw-stream': { + id: '/raw-stream' + path: '/raw-stream' + fullPath: '/raw-stream' + preLoaderRoute: typeof RawStreamRouteImport + parentRoute: typeof rootRouteImport + } + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/links': { + id: '/links' + path: '/links' + fullPath: '/links' + preLoaderRoute: typeof LinksRouteImport + parentRoute: typeof rootRouteImport + } + '/inline-scripts': { + id: '/inline-scripts' + path: '/inline-scripts' + fullPath: '/inline-scripts' + preLoaderRoute: typeof InlineScriptsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/multi-cookie-redirect/': { - id: '/multi-cookie-redirect/' - path: '/multi-cookie-redirect' - fullPath: '/multi-cookie-redirect/' - preLoaderRoute: typeof MultiCookieRedirectIndexRouteImport + '/specialChars': { + id: '/specialChars' + path: '/specialChars' + fullPath: '/specialChars' + preLoaderRoute: typeof SpecialCharsRouteRouteImport parentRoute: typeof rootRouteImport } - '/multi-cookie-redirect/target': { - id: '/multi-cookie-redirect/target' - path: '/multi-cookie-redirect/target' - fullPath: '/multi-cookie-redirect/target' - preLoaderRoute: typeof MultiCookieRedirectTargetRouteImport + '/search-params': { + id: '/search-params' + path: '/search-params' + fullPath: '/search-params' + preLoaderRoute: typeof SearchParamsRouteRouteImport parentRoute: typeof rootRouteImport } - '/not-found/': { - id: '/not-found/' + '/not-found': { + id: '/not-found' + path: '/not-found' + fullPath: '/not-found' + preLoaderRoute: typeof NotFoundRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' path: '/' - fullPath: '/not-found/' - preLoaderRoute: typeof NotFoundIndexRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/parent-boundary': { - id: '/not-found/parent-boundary' - path: '/parent-boundary' - fullPath: '/not-found/parent-boundary' - preLoaderRoute: typeof NotFoundParentBoundaryRouteRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-beforeLoad': { - id: '/not-found/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/not-found/via-beforeLoad' - preLoaderRoute: typeof NotFoundViaBeforeLoadRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-beforeLoad-target-root': { - id: '/not-found/via-beforeLoad-target-root' - path: '/via-beforeLoad-target-root' - fullPath: '/not-found/via-beforeLoad-target-root' - preLoaderRoute: typeof NotFoundViaBeforeLoadTargetRootRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/not-found/via-loader': { - id: '/not-found/via-loader' - path: '/via-loader' - fullPath: '/not-found/via-loader' - preLoaderRoute: typeof NotFoundViaLoaderRouteImport - parentRoute: typeof NotFoundRouteRoute - } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/raw-stream/': { - id: '/raw-stream/' - path: '/' - fullPath: '/raw-stream/' - preLoaderRoute: typeof RawStreamIndexRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/client-call': { - id: '/raw-stream/client-call' - path: '/client-call' - fullPath: '/raw-stream/client-call' - preLoaderRoute: typeof RawStreamClientCallRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-binary-hint': { - id: '/raw-stream/ssr-binary-hint' - path: '/ssr-binary-hint' - fullPath: '/raw-stream/ssr-binary-hint' - preLoaderRoute: typeof RawStreamSsrBinaryHintRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-mixed': { - id: '/raw-stream/ssr-mixed' - path: '/ssr-mixed' - fullPath: '/raw-stream/ssr-mixed' - preLoaderRoute: typeof RawStreamSsrMixedRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-multiple': { - id: '/raw-stream/ssr-multiple' - path: '/ssr-multiple' - fullPath: '/raw-stream/ssr-multiple' - preLoaderRoute: typeof RawStreamSsrMultipleRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-single': { - id: '/raw-stream/ssr-single' - path: '/ssr-single' - fullPath: '/raw-stream/ssr-single' - preLoaderRoute: typeof RawStreamSsrSingleRouteImport - parentRoute: typeof RawStreamRoute - } - '/raw-stream/ssr-text-hint': { - id: '/raw-stream/ssr-text-hint' - path: '/ssr-text-hint' - fullPath: '/raw-stream/ssr-text-hint' - preLoaderRoute: typeof RawStreamSsrTextHintRouteImport - parentRoute: typeof RawStreamRoute - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect/' - preLoaderRoute: typeof RedirectIndexRouteImport + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/redirect/$target': { - id: '/redirect/$target' - path: '/redirect/$target' - fullPath: '/redirect/$target' - preLoaderRoute: typeof RedirectTargetRouteImport - parentRoute: typeof rootRouteImport + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute } '/search-params/': { id: '/search-params/' @@ -966,39 +833,53 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SearchParamsIndexRouteImport parentRoute: typeof SearchParamsRouteRoute } - '/search-params/default': { - id: '/search-params/default' - path: '/default' - fullPath: '/search-params/default' - preLoaderRoute: typeof SearchParamsDefaultRouteImport - parentRoute: typeof SearchParamsRouteRoute + '/redirect/': { + id: '/redirect/' + path: '/redirect' + fullPath: '/redirect/' + preLoaderRoute: typeof RedirectIndexRouteImport + parentRoute: typeof rootRouteImport } - '/search-params/loader-throws-redirect': { - id: '/search-params/loader-throws-redirect' - path: '/loader-throws-redirect' - fullPath: '/search-params/loader-throws-redirect' - preLoaderRoute: typeof SearchParamsLoaderThrowsRedirectRouteImport - parentRoute: typeof SearchParamsRouteRoute + '/raw-stream/': { + id: '/raw-stream/' + path: '/' + fullPath: '/raw-stream/' + preLoaderRoute: typeof RawStreamIndexRouteImport + parentRoute: typeof RawStreamRoute } - '/specialChars/$param': { - id: '/specialChars/$param' - path: '/$param' - fullPath: '/specialChars/$param' - preLoaderRoute: typeof SpecialCharsParamRouteImport - parentRoute: typeof SpecialCharsRouteRoute + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute } - '/specialChars/hash': { - id: '/specialChars/hash' - path: '/hash' - fullPath: '/specialChars/hash' - preLoaderRoute: typeof SpecialCharsHashRouteImport - parentRoute: typeof SpecialCharsRouteRoute + '/not-found/': { + id: '/not-found/' + path: '/' + fullPath: '/not-found/' + preLoaderRoute: typeof NotFoundIndexRouteImport + parentRoute: typeof NotFoundRouteRoute } - '/specialChars/malformed': { - id: '/specialChars/malformed' - path: '/malformed' - fullPath: '/specialChars/malformed' - preLoaderRoute: typeof SpecialCharsMalformedRouteRouteImport + '/multi-cookie-redirect/': { + id: '/multi-cookie-redirect/' + path: '/multi-cookie-redirect' + fullPath: '/multi-cookie-redirect/' + preLoaderRoute: typeof MultiCookieRedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/specialChars/대한민국': { + id: '/specialChars/대한민국' + path: '/대한민국' + fullPath: '/specialChars/대한민국' + preLoaderRoute: typeof SpecialCharsChar45824Char54620Char48124Char44397RouteImport parentRoute: typeof SpecialCharsRouteRoute } '/specialChars/search': { @@ -1008,62 +889,146 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SpecialCharsSearchRouteImport parentRoute: typeof SpecialCharsRouteRoute } - '/specialChars/대한민국': { - id: '/specialChars/대한민국' - path: '/대한민국' - fullPath: '/specialChars/대한민국' - preLoaderRoute: typeof SpecialCharsChar45824Char54620Char48124Char44397RouteImport + '/specialChars/hash': { + id: '/specialChars/hash' + path: '/hash' + fullPath: '/specialChars/hash' + preLoaderRoute: typeof SpecialCharsHashRouteImport parentRoute: typeof SpecialCharsRouteRoute } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute + '/specialChars/$param': { + id: '/specialChars/$param' + path: '/$param' + fullPath: '/specialChars/$param' + preLoaderRoute: typeof SpecialCharsParamRouteImport + parentRoute: typeof SpecialCharsRouteRoute } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute + '/search-params/loader-throws-redirect': { + id: '/search-params/loader-throws-redirect' + path: '/loader-throws-redirect' + fullPath: '/search-params/loader-throws-redirect' + preLoaderRoute: typeof SearchParamsLoaderThrowsRedirectRouteImport + parentRoute: typeof SearchParamsRouteRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/search-params/default': { + id: '/search-params/default' + path: '/default' + fullPath: '/search-params/default' + preLoaderRoute: typeof SearchParamsDefaultRouteImport + parentRoute: typeof SearchParamsRouteRoute } - '/_layout/_layout-2/layout-b': { - id: '/_layout/_layout-2/layout-b' - path: '/layout-b' - fullPath: '/layout-b' - preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport - parentRoute: typeof LayoutLayout2Route - } - '/api/users/$userId': { - id: '/api/users/$userId' - path: '/$userId' - fullPath: '/api/users/$userId' - preLoaderRoute: typeof ApiUsersUserIdRouteImport - parentRoute: typeof ApiUsersRoute - } - '/not-found/parent-boundary/via-beforeLoad': { - id: '/not-found/parent-boundary/via-beforeLoad' - path: '/via-beforeLoad' - fullPath: '/not-found/parent-boundary/via-beforeLoad' - preLoaderRoute: typeof NotFoundParentBoundaryViaBeforeLoadRouteImport - parentRoute: typeof NotFoundParentBoundaryRouteRoute - } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport + '/redirect/$target': { + id: '/redirect/$target' + path: '/redirect/$target' + fullPath: '/redirect/$target' + preLoaderRoute: typeof RedirectTargetRouteImport parentRoute: typeof rootRouteImport } + '/raw-stream/ssr-text-hint': { + id: '/raw-stream/ssr-text-hint' + path: '/ssr-text-hint' + fullPath: '/raw-stream/ssr-text-hint' + preLoaderRoute: typeof RawStreamSsrTextHintRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-single': { + id: '/raw-stream/ssr-single' + path: '/ssr-single' + fullPath: '/raw-stream/ssr-single' + preLoaderRoute: typeof RawStreamSsrSingleRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-multiple': { + id: '/raw-stream/ssr-multiple' + path: '/ssr-multiple' + fullPath: '/raw-stream/ssr-multiple' + preLoaderRoute: typeof RawStreamSsrMultipleRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-mixed': { + id: '/raw-stream/ssr-mixed' + path: '/ssr-mixed' + fullPath: '/raw-stream/ssr-mixed' + preLoaderRoute: typeof RawStreamSsrMixedRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/ssr-binary-hint': { + id: '/raw-stream/ssr-binary-hint' + path: '/ssr-binary-hint' + fullPath: '/raw-stream/ssr-binary-hint' + preLoaderRoute: typeof RawStreamSsrBinaryHintRouteImport + parentRoute: typeof RawStreamRoute + } + '/raw-stream/client-call': { + id: '/raw-stream/client-call' + path: '/client-call' + fullPath: '/raw-stream/client-call' + preLoaderRoute: typeof RawStreamClientCallRouteImport + parentRoute: typeof RawStreamRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/not-found/via-loader': { + id: '/not-found/via-loader' + path: '/via-loader' + fullPath: '/not-found/via-loader' + preLoaderRoute: typeof NotFoundViaLoaderRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/not-found/via-beforeLoad-target-root': { + id: '/not-found/via-beforeLoad-target-root' + path: '/via-beforeLoad-target-root' + fullPath: '/not-found/via-beforeLoad-target-root' + preLoaderRoute: typeof NotFoundViaBeforeLoadTargetRootRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/not-found/via-beforeLoad': { + id: '/not-found/via-beforeLoad' + path: '/via-beforeLoad' + fullPath: '/not-found/via-beforeLoad' + preLoaderRoute: typeof NotFoundViaBeforeLoadRouteImport + parentRoute: typeof NotFoundRouteRoute + } + '/multi-cookie-redirect/target': { + id: '/multi-cookie-redirect/target' + path: '/multi-cookie-redirect/target' + fullPath: '/multi-cookie-redirect/target' + preLoaderRoute: typeof MultiCookieRedirectTargetRouteImport + parentRoute: typeof rootRouteImport + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport + } + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute + } + '/specialChars/malformed': { + id: '/specialChars/malformed' + path: '/malformed' + fullPath: '/specialChars/malformed' + preLoaderRoute: typeof SpecialCharsMalformedRouteRouteImport + parentRoute: typeof SpecialCharsRouteRoute + } + '/not-found/parent-boundary': { + id: '/not-found/parent-boundary' + path: '/parent-boundary' + fullPath: '/not-found/parent-boundary' + preLoaderRoute: typeof NotFoundParentBoundaryRouteRouteImport + parentRoute: typeof NotFoundRouteRoute + } '/redirect/$target/': { id: '/redirect/$target/' path: '/' @@ -1071,6 +1036,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTargetIndexRouteImport parentRoute: typeof RedirectTargetRoute } + '/specialChars/malformed/search': { + id: '/specialChars/malformed/search' + path: '/search' + fullPath: '/specialChars/malformed/search' + preLoaderRoute: typeof SpecialCharsMalformedSearchRouteImport + parentRoute: typeof SpecialCharsMalformedRouteRoute + } + '/specialChars/malformed/$param': { + id: '/specialChars/malformed/$param' + path: '/$param' + fullPath: '/specialChars/malformed/$param' + preLoaderRoute: typeof SpecialCharsMalformedParamRouteImport + parentRoute: typeof SpecialCharsMalformedRouteRoute + } + '/redirect/$target/via-loader': { + id: '/redirect/$target/via-loader' + path: '/via-loader' + fullPath: '/redirect/$target/via-loader' + preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport + parentRoute: typeof RedirectTargetRoute + } '/redirect/$target/via-beforeLoad': { id: '/redirect/$target/via-beforeLoad' path: '/via-beforeLoad' @@ -1078,26 +1064,40 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTargetViaBeforeLoadRouteImport parentRoute: typeof RedirectTargetRoute } - '/redirect/$target/via-loader': { - id: '/redirect/$target/via-loader' - path: '/via-loader' - fullPath: '/redirect/$target/via-loader' - preLoaderRoute: typeof RedirectTargetViaLoaderRouteImport - parentRoute: typeof RedirectTargetRoute + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport } - '/specialChars/malformed/$param': { - id: '/specialChars/malformed/$param' - path: '/$param' - fullPath: '/specialChars/malformed/$param' - preLoaderRoute: typeof SpecialCharsMalformedParamRouteImport - parentRoute: typeof SpecialCharsMalformedRouteRoute + '/not-found/parent-boundary/via-beforeLoad': { + id: '/not-found/parent-boundary/via-beforeLoad' + path: '/via-beforeLoad' + fullPath: '/not-found/parent-boundary/via-beforeLoad' + preLoaderRoute: typeof NotFoundParentBoundaryViaBeforeLoadRouteImport + parentRoute: typeof NotFoundParentBoundaryRouteRoute } - '/specialChars/malformed/search': { - id: '/specialChars/malformed/search' - path: '/search' - fullPath: '/specialChars/malformed/search' - preLoaderRoute: typeof SpecialCharsMalformedSearchRouteImport - parentRoute: typeof SpecialCharsMalformedRouteRoute + '/api/users/$userId': { + id: '/api/users/$userId' + path: '/$userId' + fullPath: '/api/users/$userId' + preLoaderRoute: typeof ApiUsersUserIdRouteImport + parentRoute: typeof ApiUsersRoute + } + '/_layout/_layout-2/layout-b': { + id: '/_layout/_layout-2/layout-b' + path: '/layout-b' + fullPath: '/layout-b' + preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport + parentRoute: typeof LayoutLayout2Route + } + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route } '/redirect/$target/serverFn/': { id: '/redirect/$target/serverFn/' @@ -1106,11 +1106,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTargetServerFnIndexRouteImport parentRoute: typeof RedirectTargetRoute } - '/redirect/$target/serverFn/via-beforeLoad': { - id: '/redirect/$target/serverFn/via-beforeLoad' - path: '/serverFn/via-beforeLoad' - fullPath: '/redirect/$target/serverFn/via-beforeLoad' - preLoaderRoute: typeof RedirectTargetServerFnViaBeforeLoadRouteImport + '/redirect/$target/serverFn/via-useServerFn': { + id: '/redirect/$target/serverFn/via-useServerFn' + path: '/serverFn/via-useServerFn' + fullPath: '/redirect/$target/serverFn/via-useServerFn' + preLoaderRoute: typeof RedirectTargetServerFnViaUseServerFnRouteImport parentRoute: typeof RedirectTargetRoute } '/redirect/$target/serverFn/via-loader': { @@ -1120,11 +1120,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTargetServerFnViaLoaderRouteImport parentRoute: typeof RedirectTargetRoute } - '/redirect/$target/serverFn/via-useServerFn': { - id: '/redirect/$target/serverFn/via-useServerFn' - path: '/serverFn/via-useServerFn' - fullPath: '/redirect/$target/serverFn/via-useServerFn' - preLoaderRoute: typeof RedirectTargetServerFnViaUseServerFnRouteImport + '/redirect/$target/serverFn/via-beforeLoad': { + id: '/redirect/$target/serverFn/via-beforeLoad' + path: '/serverFn/via-beforeLoad' + fullPath: '/redirect/$target/serverFn/via-beforeLoad' + preLoaderRoute: typeof RedirectTargetServerFnViaBeforeLoadRouteImport parentRoute: typeof RedirectTargetRoute } } diff --git a/e2e/vue-start/basic/src/routes/__root.tsx b/e2e/vue-start/basic/src/routes/__root.tsx index 9da2c581fe..843ec05893 100644 --- a/e2e/vue-start/basic/src/routes/__root.tsx +++ b/e2e/vue-start/basic/src/routes/__root.tsx @@ -1,5 +1,4 @@ /// -import { defineComponent } from 'vue' import { Body, ClientOnly, @@ -17,119 +16,6 @@ import { NotFound } from '~/components/NotFound' import '~/styles/app.css' import { seo } from '~/utils/seo' -const RootComponent = defineComponent({ - setup() { - const routerState = useRouterState({ - select: (state) => ({ isLoading: state.isLoading, status: state.status }), - }) - return () => ( - - - - - -
    - - Home - {' '} - - Posts - {' '} - - Users - {' '} - - Layout - {' '} - - Scripts - {' '} - - Inline Scripts - {' '} - - Deferred - {' '} - - redirect - {' '} - - Raw Stream - {' '} - - This Route Does Not Exist - -
    - - - - -
    This is an inline styled div
    - - - - - ) - }, -}) - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -176,11 +62,119 @@ export const Route = createRootRoute({ }, ], }), - errorComponent: (props) => ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ), + errorComponent: (props) =>

    {props.error.stack}

    , notFoundComponent: () => , component: RootComponent, }) + +function RootComponent() { + const routerState = useRouterState({ + select: (state) => ({ isLoading: state.isLoading, status: state.status }), + }) + + return ( + + + + + +
    + + Home + {' '} + + Posts + {' '} + + Users + {' '} + + Layout + {' '} + + Scripts + {' '} + + Inline Scripts + {' '} + + Deferred + {' '} + + redirect + {' '} + + Raw Stream + {' '} + + This Route Does Not Exist + +
    + + + + +
    This is an inline styled div
    + + + + + ) +} diff --git a/e2e/vue-start/basic/src/routes/api/users.$userId.ts b/e2e/vue-start/basic/src/routes/api/users.$userId.ts index 24938d51c2..4948768fa2 100644 --- a/e2e/vue-start/basic/src/routes/api/users.$userId.ts +++ b/e2e/vue-start/basic/src/routes/api/users.$userId.ts @@ -1,15 +1,23 @@ import { createFileRoute } from '@tanstack/vue-router' import type { User } from '~/utils/users' +// resolved at request time (server-side only) so the built app picks up the +// dummy server the e2e harness starts — Playwright at test time, the vite +// config at prerender build time +function getQueryURL() { + if (process.env.VITE_NODE_ENV === 'test') { + return `http://localhost:${process.env.VITE_EXTERNAL_PORT}` + } + return 'https://jsonplaceholder.typicode.com' +} + export const Route = createFileRoute('/api/users/$userId')({ server: { handlers: { GET: async ({ params, request }) => { console.info(`Fetching users by id=${params.userId}... @`, request.url) try { - const res = await fetch( - `https://jsonplaceholder.typicode.com/users/${params.userId}`, - ) + const res = await fetch(`${getQueryURL()}/users/${params.userId}`) if (!res.ok) { throw new Error('Failed to fetch user') } diff --git a/e2e/vue-start/basic/src/routes/api/users.ts b/e2e/vue-start/basic/src/routes/api/users.ts index c6045977b8..08eaff6807 100644 --- a/e2e/vue-start/basic/src/routes/api/users.ts +++ b/e2e/vue-start/basic/src/routes/api/users.ts @@ -38,13 +38,23 @@ const testMiddleware = createMiddleware() return result }) +// resolved at request time (server-side only) so the built app picks up the +// dummy server the e2e harness starts — Playwright at test time, the vite +// config at prerender build time +function getQueryURL() { + if (process.env.VITE_NODE_ENV === 'test') { + return `http://localhost:${process.env.VITE_EXTERNAL_PORT}` + } + return 'https://jsonplaceholder.typicode.com' +} + export const Route = createFileRoute('/api/users')({ server: { middleware: [testMiddleware, userLoggerMiddleware, testParentMiddleware], handlers: { GET: async ({ request }) => { console.info('Fetching users... @', request.url) - const res = await fetch('https://jsonplaceholder.typicode.com/users') + const res = await fetch(`${getQueryURL()}/users`) if (!res.ok) { throw new Error('Failed to fetch users') } diff --git a/e2e/vue-start/basic/src/routes/not-found/index.tsx b/e2e/vue-start/basic/src/routes/not-found/index.tsx index ecd12d1dad..9f7e3b4b33 100644 --- a/e2e/vue-start/basic/src/routes/not-found/index.tsx +++ b/e2e/vue-start/basic/src/routes/not-found/index.tsx @@ -1,10 +1,9 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { +export const Route = createFileRoute('/not-found/')({ + component: () => { const preload = Route.useSearch({ select: (s) => s.preload }) - return () => ( + return (
    ( -
    -
    - {loaderData.value.parentLoaderData} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/not-found/parent-boundary')({ loader: () => ({ parentLoaderData: 'ready', @@ -29,3 +15,15 @@ function RouteComponent() {
    ) } + +function ParentBoundaryNotFoundComponent() { + const loaderData = Route.useLoaderData() + + return ( +
    +
    + {loaderData.value.parentLoaderData} +
    +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/posts.$postId.tsx b/e2e/vue-start/basic/src/routes/posts.$postId.tsx index edda7f0017..4d71080d64 100644 --- a/e2e/vue-start/basic/src/routes/posts.$postId.tsx +++ b/e2e/vue-start/basic/src/routes/posts.$postId.tsx @@ -1,32 +1,9 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '~/utils/posts' import { NotFound } from '~/components/NotFound' import { PostErrorComponent } from '~/components/PostErrorComponent' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    - - Deep View - -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost({ data: postId }), errorComponent: PostErrorComponent, @@ -35,3 +12,24 @@ export const Route = createFileRoute('/posts/$postId')({ return Post not found }, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    + + Deep View + +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/posts.tsx b/e2e/vue-start/basic/src/routes/posts.tsx index 64d4754f2f..1a9d58a31d 100644 --- a/e2e/vue-start/basic/src/routes/posts.tsx +++ b/e2e/vue-start/basic/src/routes/posts.tsx @@ -1,36 +1,7 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '~/utils/posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - return () => ( -
    -
      - {posts.value.map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ head: () => ({ meta: [ @@ -42,3 +13,30 @@ export const Route = createFileRoute('/posts')({ loader: async () => fetchPosts(), component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {posts.value.map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/posts_.$postId.deep.tsx b/e2e/vue-start/basic/src/routes/posts_.$postId.deep.tsx index f77ae7d3ab..a52c6f32f7 100644 --- a/e2e/vue-start/basic/src/routes/posts_.$postId.deep.tsx +++ b/e2e/vue-start/basic/src/routes/posts_.$postId.deep.tsx @@ -1,26 +1,24 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { PostErrorComponent } from '~/components/PostErrorComponent' import { fetchPost } from '~/utils/posts' -const PostDeepComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    - - ← All Posts - -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts_/$postId/deep')({ loader: async ({ params: { postId } }) => fetchPost({ data: postId }), errorComponent: PostErrorComponent, component: PostDeepComponent, }) + +function PostDeepComponent() { + const post = Route.useLoaderData() + + return ( +
    + + ← All Posts + +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/redirect/$target/index.tsx b/e2e/vue-start/basic/src/routes/redirect/$target/index.tsx index e39bda5bcf..a8c3c75b1f 100644 --- a/e2e/vue-start/basic/src/routes/redirect/$target/index.tsx +++ b/e2e/vue-start/basic/src/routes/redirect/$target/index.tsx @@ -1,10 +1,9 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { +export const Route = createFileRoute('/redirect/$target/')({ + component: () => { const preload = Route.useSearch({ select: (s) => s.preload }) - return () => ( + return (
    { const params = Route.useParams() - return () => ( + return (

    redirect test with server functions (target {params.value.target}) @@ -88,7 +87,3 @@ const RouteComponent = defineComponent({ ) }, }) - -export const Route = createFileRoute('/redirect/$target/serverFn/')({ - component: RouteComponent, -}) diff --git a/e2e/vue-start/basic/src/routes/redirect/$target/serverFn/via-useServerFn.tsx b/e2e/vue-start/basic/src/routes/redirect/$target/serverFn/via-useServerFn.tsx index 093a591636..399e8ac995 100644 --- a/e2e/vue-start/basic/src/routes/redirect/$target/serverFn/via-useServerFn.tsx +++ b/e2e/vue-start/basic/src/routes/redirect/$target/serverFn/via-useServerFn.tsx @@ -1,12 +1,13 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { RedirectOnClick } from '~/components/RedirectOnClick' -const RouteComponent = defineComponent({ - setup() { +export const Route = createFileRoute( + '/redirect/$target/serverFn/via-useServerFn', +)({ + component: () => { const params = Route.useParams() const search = Route.useSearch() - return () => ( + return ( ( - <> -
    {search.value.default}
    -
    {context.value.hello}
    - - ) - }, -}) - export const Route = createFileRoute('/search-params/default')({ validateSearch: z.object({ default: z.string().default('d1'), @@ -29,5 +15,14 @@ export const Route = createFileRoute('/search-params/default')({ throw new Error('Context hello is not "world"') } }, - component: RouteComponent, + component: () => { + const search = Route.useSearch() + const context = Route.useRouteContext() + return ( + <> +
    {search.value.default}
    +
    {context.value.hello}
    + + ) + }, }) diff --git a/e2e/vue-start/basic/src/routes/search-params/loader-throws-redirect.tsx b/e2e/vue-start/basic/src/routes/search-params/loader-throws-redirect.tsx index ccd1276387..14b137abc6 100644 --- a/e2e/vue-start/basic/src/routes/search-params/loader-throws-redirect.tsx +++ b/e2e/vue-start/basic/src/routes/search-params/loader-throws-redirect.tsx @@ -1,19 +1,6 @@ -import { defineComponent } from 'vue' import { redirect, createFileRoute } from '@tanstack/vue-router' import { z } from 'zod' -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - return () => ( -
    -

    SearchParams

    -
    {search.value.step}
    -
    - ) - }, -}) - export const Route = createFileRoute('/search-params/loader-throws-redirect')({ validateSearch: z.object({ step: z.enum(['a', 'b', 'c']).optional(), @@ -27,5 +14,13 @@ export const Route = createFileRoute('/search-params/loader-throws-redirect')({ }) } }, - component: RouteComponent, + component: () => { + const search = Route.useSearch() + return ( +
    +

    SearchParams

    +
    {search.value.step}
    +
    + ) + }, }) diff --git a/e2e/vue-start/basic/src/routes/specialChars/$param.tsx b/e2e/vue-start/basic/src/routes/specialChars/$param.tsx index ec315ede1f..de3cba0a97 100644 --- a/e2e/vue-start/basic/src/routes/specialChars/$param.tsx +++ b/e2e/vue-start/basic/src/routes/specialChars/$param.tsx @@ -1,18 +1,15 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { - const params = Route.useParams() - return () => ( -
    - Hello "/specialChars/$param":{' '} - {params.value.param} -
    - ) - }, -}) - export const Route = createFileRoute('/specialChars/$param')({ component: RouteComponent, }) + +function RouteComponent() { + const params = Route.useParams() + return ( +
    + Hello "/specialChars/$param":{' '} + {params.value.param} +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/specialChars/malformed/$param.tsx b/e2e/vue-start/basic/src/routes/specialChars/malformed/$param.tsx index 2b19e7e36e..7160964549 100644 --- a/e2e/vue-start/basic/src/routes/specialChars/malformed/$param.tsx +++ b/e2e/vue-start/basic/src/routes/specialChars/malformed/$param.tsx @@ -1,20 +1,15 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { - const params = Route.useParams() - return () => ( -
    - Hello "/specialChars/malformed/$param":{' '} - - {params.value.param} - -
    - ) - }, -}) - export const Route = createFileRoute('/specialChars/malformed/$param')({ component: RouteComponent, }) + +function RouteComponent() { + const params = Route.useParams() + return ( +
    + Hello "/specialChars/malformed/$param":{' '} + {params.value.param} +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/specialChars/malformed/search.tsx b/e2e/vue-start/basic/src/routes/specialChars/malformed/search.tsx index 8d6ad5b1dd..2438604954 100644 --- a/e2e/vue-start/basic/src/routes/specialChars/malformed/search.tsx +++ b/e2e/vue-start/basic/src/routes/specialChars/malformed/search.tsx @@ -1,24 +1,22 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import z from 'zod' -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - return () => ( -
    - Hello "/specialChars/malformed/search"! - - {search.value.searchParam} - -
    - ) - }, -}) - export const Route = createFileRoute('/specialChars/malformed/search')({ validateSearch: z.object({ searchParam: z.string(), }), component: RouteComponent, }) + +function RouteComponent() { + const search = Route.useSearch() + + return ( +
    + Hello "/specialChars/malformed/search"! + + {search.value.searchParam} + +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/specialChars/search.tsx b/e2e/vue-start/basic/src/routes/specialChars/search.tsx index b4e022639d..5ba858e747 100644 --- a/e2e/vue-start/basic/src/routes/specialChars/search.tsx +++ b/e2e/vue-start/basic/src/routes/specialChars/search.tsx @@ -1,24 +1,22 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import z from 'zod' -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - return () => ( -
    - Hello "/specialChars/search"! - - {search.value.searchParam} - -
    - ) - }, -}) - export const Route = createFileRoute('/specialChars/search')({ validateSearch: z.object({ searchParam: z.string(), }), component: RouteComponent, }) + +function RouteComponent() { + const search = Route.useSearch() + + return ( +
    + Hello "/specialChars/search"! + + {search.value.searchParam} + +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/users.$userId.tsx b/e2e/vue-start/basic/src/routes/users.$userId.tsx index 76340cf9fb..420b7e4a50 100644 --- a/e2e/vue-start/basic/src/routes/users.$userId.tsx +++ b/e2e/vue-start/basic/src/routes/users.$userId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import axios from 'redaxios' @@ -7,18 +6,6 @@ import type { User } from '~/utils/users' import { NotFound } from '~/components/NotFound' import { UserErrorComponent } from '~/components/UserErrorComponent' -const UserComponent = defineComponent({ - setup() { - const user = Route.useLoaderData() - return () => ( -
    -

    {user.value.name}

    -
    {user.value.email}
    -
    - ) - }, -}) - export const Route = createFileRoute('/users/$userId')({ loader: async ({ params: { userId } }) => { const router = await getRouterInstance() @@ -35,3 +22,14 @@ export const Route = createFileRoute('/users/$userId')({ return User not found }, }) + +function UserComponent() { + const user = Route.useLoaderData() + + return ( +
    +

    {user.value.name}

    +
    {user.value.email}
    +
    + ) +} diff --git a/e2e/vue-start/basic/src/routes/users.tsx b/e2e/vue-start/basic/src/routes/users.tsx index 3d8ef31598..1e0b297dd2 100644 --- a/e2e/vue-start/basic/src/routes/users.tsx +++ b/e2e/vue-start/basic/src/routes/users.tsx @@ -1,41 +1,9 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { getRouterInstance } from '@tanstack/vue-start' import axios from 'redaxios' import type { User } from '~/utils/users' -const UsersComponent = defineComponent({ - setup() { - const users = Route.useLoaderData() - return () => ( -
    -
      - {[ - ...users.value, - { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, - ].map((user) => ( -
    • - -
      {user.name}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/users')({ loader: async () => { const router = await getRouterInstance() @@ -48,3 +16,33 @@ export const Route = createFileRoute('/users')({ }, component: UsersComponent, }) + +function UsersComponent() { + const users = Route.useLoaderData() + + return ( +
    +
      + {[ + ...users.value, + { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, + ].map((user) => ( +
    • + +
      {user.name}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-start/basic/src/utils/posts.tsx b/e2e/vue-start/basic/src/utils/posts.tsx index d8e2dc7450..98b7b572e9 100644 --- a/e2e/vue-start/basic/src/utils/posts.tsx +++ b/e2e/vue-start/basic/src/utils/posts.tsx @@ -8,12 +8,22 @@ export type PostType = { body: string } +// resolved at request time (server-side only) so the built app picks up the +// dummy server the e2e harness starts — Playwright at test time, the vite +// config at prerender build time +function getQueryURL() { + if (process.env.VITE_NODE_ENV === 'test') { + return `http://localhost:${process.env.VITE_EXTERNAL_PORT}` + } + return 'https://jsonplaceholder.typicode.com' +} + export const fetchPost = createServerFn({ method: 'GET' }) .validator((postId: string) => postId) .handler(async ({ data: postId }) => { - console.info(`Fetching post with id ${postId}...`) + console.info(`Fetching post with id ${postId} from ${getQueryURL()}...`) const post = await axios - .get(`https://jsonplaceholder.typicode.com/posts/${postId}`) + .get(`${getQueryURL()}/posts/${postId}`) .then((r) => r.data) .catch((err) => { console.error(err) @@ -28,9 +38,9 @@ export const fetchPost = createServerFn({ method: 'GET' }) export const fetchPosts = createServerFn({ method: 'GET' }).handler( async () => { - console.info('Fetching posts...') + console.info(`Fetching posts from ${getQueryURL()}...`) return axios - .get>('https://jsonplaceholder.typicode.com/posts') + .get>(`${getQueryURL()}/posts`) .then((r) => r.data.slice(0, 10)) }, ) diff --git a/e2e/vue-start/basic/src/utils/users.tsx b/e2e/vue-start/basic/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/vue-start/basic/src/utils/users.tsx +++ b/e2e/vue-start/basic/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` diff --git a/e2e/vue-start/basic/src/vite-env.d.ts b/e2e/vue-start/basic/src/vite-env.d.ts index 4da6234c8a..e8259b1e33 100644 --- a/e2e/vue-start/basic/src/vite-env.d.ts +++ b/e2e/vue-start/basic/src/vite-env.d.ts @@ -2,6 +2,7 @@ interface ImportMetaEnv { readonly VITE_NODE_ENV: string + readonly VITE_EXTERNAL_PORT: string readonly VITE_SERVER_PORT: string } diff --git a/e2e/vue-start/basic/tests/fixture-api.spec.ts b/e2e/vue-start/basic/tests/fixture-api.spec.ts deleted file mode 100644 index 6c9b26dc4c..0000000000 --- a/e2e/vue-start/basic/tests/fixture-api.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('server API receives canned users without a fixture listener', async ({ - request, -}) => { - const response = await request.get('/api/users') - expect(response.ok()).toBe(true) - const users = await response.json() - expect(users).toHaveLength(10) - expect(users[0]).toMatchObject({ id: 1, name: 'Leanne Graham' }) -}) diff --git a/e2e/vue-start/basic/tests/redirect.spec.ts b/e2e/vue-start/basic/tests/redirect.spec.ts index 8e6ceba5b9..2f6354aa81 100644 --- a/e2e/vue-start/basic/tests/redirect.spec.ts +++ b/e2e/vue-start/basic/tests/redirect.spec.ts @@ -1,14 +1,19 @@ import queryString from 'node:querystring' -import { expect } from '@playwright/test' -import { test } from '@tanstack/router-e2e-utils' +import { expect, type Page } from '@playwright/test' import combinateImport from 'combinate' -import type { Page } from '@playwright/test' +import { + getDummyServerPort, + getTestServerPort, + test, +} from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from './utils/getE2EPortKey.ts' // somehow playwright does not correctly import default exports const combinate = (combinateImport as any).default as typeof combinateImport -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const EXTERNAL_ORIGIN = `http://127.0.0.1:${PORT}` +const e2ePortKey = getE2EPortKey() +const PORT = await getTestServerPort(e2ePortKey) +const EXTERNAL_HOST_PORT = await getDummyServerPort(e2ePortKey) const POSTS_URL = `http://localhost:${PORT}/posts` async function waitForRouterIdle(page: Page) { @@ -101,7 +106,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, }) if (scenario === 'navigate') { @@ -114,7 +119,7 @@ test.describe('redirects', () => { await page.goto(`/redirect/external/via-${thrower}?${q}`) } - const url = `${EXTERNAL_ORIGIN}/` + const url = `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) @@ -135,7 +140,7 @@ test.describe('redirects', () => { }) => { let fullPageLoad = false const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, reloadDocument, }) @@ -154,7 +159,10 @@ test.describe('redirects', () => { await page.goto(`/redirect/${target}/serverFn/via-${thrower}?${q}`) } - const url = target === 'internal' ? POSTS_URL : `${EXTERNAL_ORIGIN}/` + const url = + target === 'internal' + ? POSTS_URL + : `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) if (target === 'internal' && scenario === 'navigate') { @@ -176,7 +184,7 @@ test.describe('redirects', () => { page, }) => { const q = queryString.stringify({ - externalHost: `${EXTERNAL_ORIGIN}/`, + externalHost: `http://localhost:${EXTERNAL_HOST_PORT}/`, reloadDocument, }) @@ -193,7 +201,10 @@ test.describe('redirects', () => { await button.click() - const url = target === 'internal' ? POSTS_URL : `${EXTERNAL_ORIGIN}/` + const url = + target === 'internal' + ? POSTS_URL + : `http://localhost:${EXTERNAL_HOST_PORT}/` await page.waitForURL(url) expect(page.url()).toBe(url) if (target === 'internal') { diff --git a/e2e/vue-start/basic/tests/setup/global.setup.ts b/e2e/vue-start/basic/tests/setup/global.setup.ts new file mode 100644 index 0000000000..cd38c35885 --- /dev/null +++ b/e2e/vue-start/basic/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +export default async function setup() { + await e2eStartDummyServer(getE2EPortKey()) +} diff --git a/e2e/vue-start/basic/tests/setup/global.teardown.ts b/e2e/vue-start/basic/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..36e5c92858 --- /dev/null +++ b/e2e/vue-start/basic/tests/setup/global.teardown.ts @@ -0,0 +1,8 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +export default async function teardown() { + try { + await e2eStopDummyServer(getE2EPortKey()) + } catch {} +} diff --git a/e2e/vue-start/basic/tests/setup/waitForDummyServer.ts b/e2e/vue-start/basic/tests/setup/waitForDummyServer.ts new file mode 100644 index 0000000000..88c18fd79e --- /dev/null +++ b/e2e/vue-start/basic/tests/setup/waitForDummyServer.ts @@ -0,0 +1,24 @@ +import { getDummyServerPort } from '@tanstack/router-e2e-utils' +import { getE2EPortKey } from '../utils/getE2EPortKey.ts' + +const timeoutMs = 10_000 +const retryIntervalMs = 100 + +export default async function waitForDummyServer() { + const port = await getDummyServerPort(getE2EPortKey()) + const deadline = Date.now() + timeoutMs + + while (Date.now() < deadline) { + try { + const response = await fetch(`http://localhost:${port}/`) + + if (response.ok) { + return + } + } catch {} + + await new Promise((resolve) => setTimeout(resolve, retryIntervalMs)) + } + + throw new Error(`Timed out waiting for dummy server on port ${port}`) +} diff --git a/e2e/vue-start/basic/tests/utils/getE2EPortKey.ts b/e2e/vue-start/basic/tests/utils/getE2EPortKey.ts new file mode 100644 index 0000000000..48be6a9027 --- /dev/null +++ b/e2e/vue-start/basic/tests/utils/getE2EPortKey.ts @@ -0,0 +1,5 @@ +import { getPackageName } from './getPackageName.ts' + +export function getE2EPortKey() { + return process.env.E2E_PORT_KEY ?? getPackageName() +} diff --git a/e2e/vue-start/basic/vite.config.ts b/e2e/vue-start/basic/vite.config.ts index 6fe8d5d194..cdbaefea44 100644 --- a/e2e/vue-start/basic/vite.config.ts +++ b/e2e/vue-start/basic/vite.config.ts @@ -1,10 +1,15 @@ import { defineConfig } from 'vite' import { tanstackStart } from '@tanstack/vue-start/plugin/vite' import vueJsx from '@vitejs/plugin-vue-jsx' +import { e2eStartDummyServerForBuild } from '@tanstack/router-e2e-utils' import { isSpaMode } from './tests/utils/isSpaMode' import { isPrerender } from './tests/utils/isPrerender' import tailwindcss from '@tailwindcss/vite' +if (isPrerender) { + await e2eStartDummyServerForBuild() +} + const spaModeConfiguration = { enabled: true, prerender: { @@ -28,6 +33,8 @@ const prerenderConfiguration = { '/users', ].some((p) => page.path.includes(p)), maxRedirects: 100, + retryCount: 2, + retryDelay: 1000, } const outDir = process.env.E2E_DIST_DIR ?? 'dist' diff --git a/e2e/vue-start/css-modules/package.json b/e2e/vue-start/css-modules/package.json index 3671774644..9b7d36333d 100644 --- a/e2e/vue-start/css-modules/package.json +++ b/e2e/vue-start/css-modules/package.json @@ -11,7 +11,7 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js", "test:e2e:dev": "MODE=dev playwright test --project=chromium", "test:e2e:prod": "playwright test --project=chromium", - "test:e2e": "pnpm run test:e2e:dev" + "test:e2e": "rm -rf port*.txt; pnpm run test:e2e:dev" }, "dependencies": { "@tanstack/vue-router": "workspace:*", @@ -19,14 +19,13 @@ "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:*", "@types/node": "^22.10.2", "@vitejs/plugin-vue-jsx": "^5.1.5", "sass": "^1.97.2", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/css-modules/playwright.config.ts b/e2e/vue-start/css-modules/playwright.config.ts index a50ac5ae63..0b810d5372 100644 --- a/e2e/vue-start/css-modules/playwright.config.ts +++ b/e2e/vue-start/css-modules/playwright.config.ts @@ -1,9 +1,10 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } const mode = process.env.MODE ?? 'prod' const isDev = mode === 'dev' -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -12,17 +13,16 @@ export default defineConfig({ reporter: [['line']], globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', use: { baseURL, }, webServer: { - command: isDev - ? `pnpm dev:e2e --port 0` - : `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: isDev ? `pnpm dev:e2e` : `pnpm build && PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', env: { VITE_NODE_ENV: 'test', diff --git a/e2e/vue-start/css-modules/tests/setup/global.setup.ts b/e2e/vue-start/css-modules/tests/setup/global.setup.ts index 17be637f77..2d3a1db946 100644 --- a/e2e/vue-start/css-modules/tests/setup/global.setup.ts +++ b/e2e/vue-start/css-modules/tests/setup/global.setup.ts @@ -1,9 +1,17 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' +import { + e2eStartDummyServer, + getTestServerPort, + preOptimizeDevServer, + waitForServer, +} from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } export default async function setup() { + await e2eStartDummyServer(packageJson.name) + if (process.env.MODE !== 'dev') return - const port = Number(process.env.E2E_APP_PORT ?? 0) + const port = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${port}` await waitForServer(baseURL) diff --git a/e2e/vue-start/css-modules/tests/setup/global.teardown.ts b/e2e/vue-start/css-modules/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/css-modules/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/custom-basepath/express-server.ts b/e2e/vue-start/custom-basepath/express-server.ts index b9bf393466..1884c5eb5a 100644 --- a/e2e/vue-start/custom-basepath/express-server.ts +++ b/e2e/vue-start/custom-basepath/express-server.ts @@ -1,6 +1,5 @@ import express from 'express' import { toNodeHandler } from 'srvx/node' -import type { AddressInfo } from 'node:net' import type { NodeHttp1Handler } from 'srvx' const DEVELOPMENT = process.env.NODE_ENV === 'development' @@ -41,11 +40,7 @@ if (DEVELOPMENT) { }) } -const httpServer = app.listen(PORT, (error) => { - if (error) { - throw error - } - console.log( - `E2E app: http://localhost:${(httpServer.address() as AddressInfo).port}`, - ) +app.listen(PORT, (error) => { + if (error) throw error + console.log(`Server is running on http://localhost:${PORT}`) }) diff --git a/e2e/vue-start/custom-basepath/package.json b/e2e/vue-start/custom-basepath/package.json index c1032ea88b..759e13b48e 100644 --- a/e2e/vue-start/custom-basepath/package.json +++ b/e2e/vue-start/custom-basepath/package.json @@ -8,28 +8,27 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "tsx express-server.ts", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-start": "workspace:^", "express": "^5.2.1", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "vue": "^3.5.25" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/express": "^5.0.6", "@types/node": "^22.10.2", "cross-env": "^10.0.0", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", "tsx": "^4.20.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5" diff --git a/e2e/vue-start/custom-basepath/playwright.config.ts b/e2e/vue-start/custom-basepath/playwright.config.ts index e113ce64ad..5095425f47 100644 --- a/e2e/vue-start/custom-basepath/playwright.config.ts +++ b/e2e/vue-start/custom-basepath/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}/custom/basepath` /** @@ -13,19 +18,19 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/vue-start/custom-basepath/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/custom-basepath/src/components/DefaultCatchBoundary.tsx index 77c03c5afa..d06f4a948b 100644 --- a/e2e/vue-start/custom-basepath/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/custom-basepath/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/routeTree.gen.ts b/e2e/vue-start/custom-basepath/src/routeTree.gen.ts index 605193fbec..ea7e127d8e 100644 --- a/e2e/vue-start/custom-basepath/src/routeTree.gen.ts +++ b/e2e/vue-start/custom-basepath/src/routeTree.gen.ts @@ -9,34 +9,24 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as LogoutRouteImport } from './routes/logout' -import { Route as PostsRouteImport } from './routes/posts' import { Route as UsersRouteImport } from './routes/users' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as RedirectIndexRouteImport } from './routes/redirect.index' -import { Route as RedirectThrowItRouteImport } from './routes/redirect.throw-it' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as RedirectIndexRouteImport } from './routes/redirect.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as RedirectThrowItRouteImport } from './routes/redirect.throw-it' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const LogoutRoute = LogoutRouteImport.update({ - id: '/logout', - path: '/logout', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const PostsRoute = PostsRouteImport.update({ @@ -44,34 +34,19 @@ const PostsRoute = PostsRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const LogoutRoute = LogoutRouteImport.update({ + id: '/logout', + path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const RedirectIndexRoute = RedirectIndexRouteImport.update({ - id: '/redirect/', - path: '/redirect/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectThrowItRoute = RedirectThrowItRouteImport.update({ - id: '/redirect/throw-it', - path: '/redirect/throw-it', getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ @@ -79,21 +54,46 @@ const UsersIndexRoute = UsersIndexRouteImport.update({ path: '/', getParentRoute: () => UsersRoute, } as any) +const RedirectIndexRoute = RedirectIndexRouteImport.update({ + id: '/redirect/', + path: '/redirect/', + getParentRoute: () => rootRouteImport, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, +const RedirectThrowItRoute = RedirectThrowItRouteImport.update({ + id: '/redirect/throw-it', + path: '/redirect/throw-it', + getParentRoute: () => rootRouteImport, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => ApiUsersRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -205,25 +205,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/logout': { - id: '/logout' - path: '/logout' - fullPath: '/logout' - preLoaderRoute: typeof LogoutRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/posts': { @@ -233,46 +219,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/logout': { + id: '/logout' + path: '/logout' + fullPath: '/logout' + preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/redirect/': { - id: '/redirect/' - path: '/redirect' - fullPath: '/redirect/' - preLoaderRoute: typeof RedirectIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect/throw-it': { - id: '/redirect/throw-it' - path: '/redirect/throw-it' - fullPath: '/redirect/throw-it' - preLoaderRoute: typeof RedirectThrowItRouteImport + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/users/': { @@ -282,6 +247,20 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRoute } + '/redirect/': { + id: '/redirect/' + path: '/redirect' + fullPath: '/redirect/' + preLoaderRoute: typeof RedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -289,12 +268,26 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRoute } - '/api/users/$userId': { - id: '/api/users/$userId' - path: '/$userId' - fullPath: '/api/users/$userId' - preLoaderRoute: typeof ApiUsersUserIdRouteImport - parentRoute: typeof ApiUsersRoute + '/redirect/throw-it': { + id: '/redirect/throw-it' + path: '/redirect/throw-it' + fullPath: '/redirect/throw-it' + preLoaderRoute: typeof RedirectThrowItRouteImport + parentRoute: typeof rootRouteImport + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport } '/posts_/$postId/deep': { id: '/posts_/$postId/deep' @@ -303,6 +296,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } + '/api/users/$userId': { + id: '/api/users/$userId' + path: '/$userId' + fullPath: '/api/users/$userId' + preLoaderRoute: typeof ApiUsersUserIdRouteImport + parentRoute: typeof ApiUsersRoute + } } } diff --git a/e2e/vue-start/custom-basepath/src/routes/__root.tsx b/e2e/vue-start/custom-basepath/src/routes/__root.tsx index c6d1eb197c..8bc947b03a 100644 --- a/e2e/vue-start/custom-basepath/src/routes/__root.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/__root.tsx @@ -49,11 +49,7 @@ export const Route = createRootRoute({ { rel: 'icon', href: '/favicon.ico' }, ], }), - errorComponent: (props) => ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ), + errorComponent: (props) =>

    {props.error.stack}

    , notFoundComponent: () => , component: RootComponent, }) diff --git a/e2e/vue-start/custom-basepath/src/routes/api/users.$userId.ts b/e2e/vue-start/custom-basepath/src/routes/api/users.$userId.ts index 7e3f528d68..50b9ca995a 100644 --- a/e2e/vue-start/custom-basepath/src/routes/api/users.$userId.ts +++ b/e2e/vue-start/custom-basepath/src/routes/api/users.$userId.ts @@ -1,7 +1,11 @@ import { createFileRoute } from '@tanstack/vue-router' import type { User } from '~/utils/users' -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users/$userId')({ server: { diff --git a/e2e/vue-start/custom-basepath/src/routes/api/users.ts b/e2e/vue-start/custom-basepath/src/routes/api/users.ts index dfdb5cd844..97989b93ca 100644 --- a/e2e/vue-start/custom-basepath/src/routes/api/users.ts +++ b/e2e/vue-start/custom-basepath/src/routes/api/users.ts @@ -38,7 +38,11 @@ const testMiddleware = createMiddleware() return result }) -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const Route = createFileRoute('/api/users')({ server: { diff --git a/e2e/vue-start/custom-basepath/src/routes/posts.$postId.tsx b/e2e/vue-start/custom-basepath/src/routes/posts.$postId.tsx index 599e0f046e..b4e5a8a6a2 100644 --- a/e2e/vue-start/custom-basepath/src/routes/posts.$postId.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/posts.$postId.tsx @@ -1,32 +1,9 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '~/utils/posts' import { NotFound } from '~/components/NotFound' import { PostErrorComponent } from '~/components/PostErrorComponent' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    - - Deep View - -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost({ data: postId }), errorComponent: PostErrorComponent, @@ -35,3 +12,24 @@ export const Route = createFileRoute('/posts/$postId')({ return Post not found }, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    + + Deep View + +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/routes/posts.tsx b/e2e/vue-start/custom-basepath/src/routes/posts.tsx index 64d4754f2f..1a9d58a31d 100644 --- a/e2e/vue-start/custom-basepath/src/routes/posts.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/posts.tsx @@ -1,36 +1,7 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '~/utils/posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - return () => ( -
    -
      - {posts.value.map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ head: () => ({ meta: [ @@ -42,3 +13,30 @@ export const Route = createFileRoute('/posts')({ loader: async () => fetchPosts(), component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {posts.value.map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/routes/posts_.$postId.deep.tsx b/e2e/vue-start/custom-basepath/src/routes/posts_.$postId.deep.tsx index f77ae7d3ab..a52c6f32f7 100644 --- a/e2e/vue-start/custom-basepath/src/routes/posts_.$postId.deep.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/posts_.$postId.deep.tsx @@ -1,26 +1,24 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { PostErrorComponent } from '~/components/PostErrorComponent' import { fetchPost } from '~/utils/posts' -const PostDeepComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    - - ← All Posts - -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts_/$postId/deep')({ loader: async ({ params: { postId } }) => fetchPost({ data: postId }), errorComponent: PostErrorComponent, component: PostDeepComponent, }) + +function PostDeepComponent() { + const post = Route.useLoaderData() + + return ( +
    + + ← All Posts + +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/routes/users.$userId.tsx b/e2e/vue-start/custom-basepath/src/routes/users.$userId.tsx index 4effec0d5b..fb7fce5f4c 100644 --- a/e2e/vue-start/custom-basepath/src/routes/users.$userId.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/users.$userId.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import axios from 'redaxios' @@ -7,18 +6,6 @@ import { NotFound } from '~/components/NotFound' import { UserErrorComponent } from '~/components/UserErrorComponent' import { basepath } from '~/utils/basepath' -const UserComponent = defineComponent({ - setup() { - const user = Route.useLoaderData() - return () => ( -
    -

    {user.value.name}

    -
    {user.value.email}
    -
    - ) - }, -}) - export const Route = createFileRoute('/users/$userId')({ loader: async ({ params: { userId } }) => { return await axios @@ -34,3 +21,14 @@ export const Route = createFileRoute('/users/$userId')({ return User not found }, }) + +function UserComponent() { + const user = Route.useLoaderData() + + return ( +
    +

    {user.value.name}

    +
    {user.value.email}
    +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/routes/users.tsx b/e2e/vue-start/custom-basepath/src/routes/users.tsx index fe926d0a44..1432e50451 100644 --- a/e2e/vue-start/custom-basepath/src/routes/users.tsx +++ b/e2e/vue-start/custom-basepath/src/routes/users.tsx @@ -1,40 +1,8 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import axios from 'redaxios' import type { User } from '~/utils/users' import { basepath } from '~/utils/basepath' -const UsersComponent = defineComponent({ - setup() { - const users = Route.useLoaderData() - return () => ( -
    -
      - {[ - ...users.value, - { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, - ].map((user) => ( -
    • - -
      {user.name}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/users')({ loader: async () => { return await axios @@ -46,3 +14,33 @@ export const Route = createFileRoute('/users')({ }, component: UsersComponent, }) + +function UsersComponent() { + const users = Route.useLoaderData() + + return ( +
    +
      + {[ + ...users.value, + { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, + ].map((user) => ( +
    • + +
      {user.name}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-start/custom-basepath/src/utils/posts.tsx b/e2e/vue-start/custom-basepath/src/utils/posts.tsx index 11d80d08b5..66cb298f83 100644 --- a/e2e/vue-start/custom-basepath/src/utils/posts.tsx +++ b/e2e/vue-start/custom-basepath/src/utils/posts.tsx @@ -8,7 +8,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = createServerFn({ method: 'GET' }) .validator((postId: string) => postId) diff --git a/e2e/vue-start/custom-basepath/src/utils/users.tsx b/e2e/vue-start/custom-basepath/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/vue-start/custom-basepath/src/utils/users.tsx +++ b/e2e/vue-start/custom-basepath/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` diff --git a/e2e/vue-start/custom-basepath/tests/setup/global.setup.ts b/e2e/vue-start/custom-basepath/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-start/custom-basepath/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/custom-basepath/tests/setup/global.teardown.ts b/e2e/vue-start/custom-basepath/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/custom-basepath/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/dev-ssr-styles/.gitignore b/e2e/vue-start/dev-ssr-styles/.gitignore deleted file mode 100644 index 950326609c..0000000000 --- a/e2e/vue-start/dev-ssr-styles/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules -dist -.routeTree.gen.ts -src/routeTree.gen.ts -test-results -playwright-report -port*.txt diff --git a/e2e/vue-start/dev-ssr-styles/package.json b/e2e/vue-start/dev-ssr-styles/package.json deleted file mode 100644 index 0033a0a5cc..0000000000 --- a/e2e/vue-start/dev-ssr-styles/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "tanstack-vue-start-e2e-dev-ssr-styles", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "dev": "vite dev --port 3000", - "dev:e2e": "vite dev --port 0", - "build": "vite build && tsc --noEmit", - "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e:dev": "MODE=dev playwright test --project=chromium", - "test:e2e": "pnpm run test:e2e:dev && pnpm run test:e2e:dev:bundled-dev", - "test:e2e:dev:bundled-dev": "MODE=dev E2E_VITE_BUNDLED_DEV=true playwright test --project=chromium" - }, - "dependencies": { - "@tanstack/vue-router": "workspace:*", - "@tanstack/vue-start": "workspace:*", - "vue": "^3.5.16" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-core": "workspace:*", - "@tanstack/router-e2e-utils": "workspace:*", - "@types/node": "^22.10.2", - "@vitejs/plugin-vue": "^6.0.5", - "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14", - "@typescript/native": "npm:typescript@^7.0.2" - } -} diff --git a/e2e/vue-start/dev-ssr-styles/playwright.config.ts b/e2e/vue-start/dev-ssr-styles/playwright.config.ts deleted file mode 100644 index 723cd32789..0000000000 --- a/e2e/vue-start/dev-ssr-styles/playwright.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -export default defineConfig({ - testDir: './tests', - workers: 1, - reporter: [['line']], - globalSetup: './tests/setup/global.setup.ts', - use: { baseURL }, - webServer: { - command: 'pnpm dev:e2e', - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - env: { - VITE_NODE_ENV: 'test', - }, - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/vue-start/dev-ssr-styles/src/components/SfcStyledBox.vue b/e2e/vue-start/dev-ssr-styles/src/components/SfcStyledBox.vue deleted file mode 100644 index bd92215136..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/components/SfcStyledBox.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/e2e/vue-start/dev-ssr-styles/src/router.tsx b/e2e/vue-start/dev-ssr-styles/src/router.tsx deleted file mode 100644 index c0d7f2b200..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/router.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { createRouter } from '@tanstack/vue-router' -import { routeTree } from './routeTree.gen' - -export function getRouter() { - return createRouter({ - routeTree, - scrollRestoration: true, - defaultPreload: false, - }) -} diff --git a/e2e/vue-start/dev-ssr-styles/src/routes/__root.tsx b/e2e/vue-start/dev-ssr-styles/src/routes/__root.tsx deleted file mode 100644 index 0dec479a07..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/routes/__root.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { - Body, - HeadContent, - Html, - Outlet, - Scripts, - createRootRoute, -} from '@tanstack/vue-router' -import '~/styles/app.css' - -export const Route = createRootRoute({ - component: RootComponent, -}) - -function RootComponent() { - return ( - - - - - - - - - - ) -} diff --git a/e2e/vue-start/dev-ssr-styles/src/routes/index.tsx b/e2e/vue-start/dev-ssr-styles/src/routes/index.tsx deleted file mode 100644 index 733bc1d559..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/routes/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/vue-router' -import SfcStyledBox from '../components/SfcStyledBox.vue' - -export const Route = createFileRoute('/')({ - component: Home, -}) - -function Home() { - return ( -
    -

    Vue Dev SSR Styles Test

    - -
    - ) -} diff --git a/e2e/vue-start/dev-ssr-styles/src/styles/app.css b/e2e/vue-start/dev-ssr-styles/src/styles/app.css deleted file mode 100644 index 9a67f9b153..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/styles/app.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - font-family: sans-serif; - margin: 0; - padding: 20px; -} diff --git a/e2e/vue-start/dev-ssr-styles/src/vue-shim.d.ts b/e2e/vue-start/dev-ssr-styles/src/vue-shim.d.ts deleted file mode 100644 index fe00a856b2..0000000000 --- a/e2e/vue-start/dev-ssr-styles/src/vue-shim.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.vue' { - import type { DefineComponent } from 'vue' - - const component: DefineComponent - export default component -} diff --git a/e2e/vue-start/dev-ssr-styles/tests/app.spec.ts b/e2e/vue-start/dev-ssr-styles/tests/app.spec.ts deleted file mode 100644 index 0e052441b7..0000000000 --- a/e2e/vue-start/dev-ssr-styles/tests/app.spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { expect } from '@playwright/test' -import { DEV_STYLES_ATTR } from '@tanstack/router-core' -import { test } from '@tanstack/router-e2e-utils' - -const whitelistErrors = [ - 'Failed to load resource: net::ERR_NAME_NOT_RESOLVED', - 'Failed to load resource: the server responded with a status of 504', -] - -test.describe('dev SSR styles', () => { - test.use({ whitelistErrors }) - - test.describe('with JavaScript disabled', () => { - test.use({ javaScriptEnabled: false, whitelistErrors }) - - test('includes a Vue SFC style block during SSR', async ({ page }) => { - await page.goto('/') - - const element = page.getByTestId('styled-box') - await expect(element).toBeVisible() - await expect(element).toHaveCSS('background-color', 'rgb(126, 34, 206)') - - const href = await page - .locator(`link[${DEV_STYLES_ATTR}]`) - .getAttribute('href') - expect(href).toBeTruthy() - - const response = await page.request.get(new URL(href!, page.url()).href) - expect(response.ok()).toBeTruthy() - const css = await response.text() - expect(css).toContain('--vue-sfc-style-marker') - expect(css).toMatch( - /\/src\/components\/SfcStyledBox\.vue\?vue&type=style[^\n]*&lang\.css/, - ) - }) - }) - - test('keeps CSS output stable after client modules load', async ({ - page, - }) => { - const initialResponsePromise = page.waitForResponse((response) => - new URL(response.url()).pathname.endsWith('/@tanstack-start/styles.css'), - ) - await page.goto('/') - await expect(page.getByTestId('styled-box')).toBeVisible() - const initialResponse = await initialResponsePromise - expect(initialResponse.ok()).toBeTruthy() - const initialCss = await initialResponse.text() - - const reloadedResponsePromise = page.waitForResponse((response) => - new URL(response.url()).pathname.endsWith('/@tanstack-start/styles.css'), - ) - await page.reload() - await expect(page.getByTestId('styled-box')).toBeVisible() - const reloadedResponse = await reloadedResponsePromise - expect(reloadedResponse.ok()).toBeTruthy() - const reloadedCss = await reloadedResponse.text() - - expect(reloadedCss).toBe(initialCss) - }) -}) diff --git a/e2e/vue-start/dev-ssr-styles/tests/setup/global.setup.ts b/e2e/vue-start/dev-ssr-styles/tests/setup/global.setup.ts deleted file mode 100644 index b03b6485c8..0000000000 --- a/e2e/vue-start/dev-ssr-styles/tests/setup/global.setup.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { preOptimizeDevServer, waitForServer } from '@tanstack/router-e2e-utils' - -export default async function setup() { - if (process.env.MODE !== 'dev') { - return - } - - const port = Number(process.env.E2E_APP_PORT ?? 0) - const baseURL = `http://localhost:${port}` - await waitForServer(baseURL) - await preOptimizeDevServer({ - baseURL, - readyTestId: 'home-heading', - }) -} diff --git a/e2e/vue-start/dev-ssr-styles/tsconfig.json b/e2e/vue-start/dev-ssr-styles/tsconfig.json deleted file mode 100644 index 898ea214b1..0000000000 --- a/e2e/vue-start/dev-ssr-styles/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "include": ["**/*.ts", "**/*.tsx", "**/*.vue"], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "preserve", - "jsxImportSource": "vue", - "module": "ESNext", - "moduleResolution": "Bundler", - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "isolatedModules": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "target": "ES2022", - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "~/*": ["./src/*"] - }, - "noEmit": true, - "types": ["vite/client"] - } -} diff --git a/e2e/vue-start/dev-ssr-styles/vite.config.ts b/e2e/vue-start/dev-ssr-styles/vite.config.ts deleted file mode 100644 index f8b7293af9..0000000000 --- a/e2e/vue-start/dev-ssr-styles/vite.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'vite' -import { tanstackStart } from '@tanstack/vue-start/plugin/vite' -import vue from '@vitejs/plugin-vue' -import vueJsx from '@vitejs/plugin-vue-jsx' - -export default defineConfig({ - resolve: { tsconfigPaths: true }, - experimental: - process.env.E2E_VITE_BUNDLED_DEV === 'true' - ? { bundledDev: true } - : undefined, - server: { port: 3000 }, - plugins: [tanstackStart(), vue(), vueJsx()], -}) diff --git a/e2e/vue-start/query-integration/package.json b/e2e/vue-start/query-integration/package.json index 617ce4f430..d44bd58376 100644 --- a/e2e/vue-start/query-integration/package.json +++ b/e2e/vue-start/query-integration/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-query": "^5.90.0", @@ -23,15 +23,14 @@ "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/query-integration/playwright.config.ts b/e2e/vue-start/query-integration/playwright.config.ts index 82678ac00b..4d86a1dbe7 100644 --- a/e2e/vue-start/query-integration/playwright.config.ts +++ b/e2e/vue-start/query-integration/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { derivePort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await derivePort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/query-integration/src/routeTree.gen.ts b/e2e/vue-start/query-integration/src/routeTree.gen.ts index c5a9f02a7a..d4d30083a0 100644 --- a/e2e/vue-start/query-integration/src/routeTree.gen.ts +++ b/e2e/vue-start/query-integration/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as UseQueryRouteImport } from './routes/useQuery' +import { Route as IndexRouteImport } from './routes/index' import { Route as LoaderFetchQueryTypeRouteImport } from './routes/loader-fetchQuery/$type' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const UseQueryRoute = UseQueryRouteImport.update({ id: '/useQuery', path: '/useQuery', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const LoaderFetchQueryTypeRoute = LoaderFetchQueryTypeRouteImport.update({ id: '/loader-fetchQuery/$type', path: '/loader-fetchQuery/$type', @@ -61,13 +61,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/useQuery': { id: '/useQuery' path: '/useQuery' @@ -75,6 +68,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof UseQueryRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/loader-fetchQuery/$type': { id: '/loader-fetchQuery/$type' path: '/loader-fetchQuery/$type' diff --git a/e2e/vue-start/query-integration/src/routes/loader-fetchQuery/$type.tsx b/e2e/vue-start/query-integration/src/routes/loader-fetchQuery/$type.tsx index 38f1e209dc..9e928feafe 100644 --- a/e2e/vue-start/query-integration/src/routes/loader-fetchQuery/$type.tsx +++ b/e2e/vue-start/query-integration/src/routes/loader-fetchQuery/$type.tsx @@ -1,29 +1,8 @@ -import { defineComponent } from 'vue' import { useQuery } from '@tanstack/vue-query' import { createFileRoute } from '@tanstack/vue-router' import z from 'zod' import { makeQueryOptions } from '~/queryOptions' -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - const query = useQuery(() => context.value.queryOptions) - return () => ( -
    -
    - loader data:{' '} -
    {loaderData.value ?? 'undefined'}
    -
    -
    - query data:{' '} -
    {query.data.value ?? 'loading...'}
    -
    -
    - ) - }, -}) - export const Route = createFileRoute('/loader-fetchQuery/$type')({ component: RouteComponent, params: { @@ -45,3 +24,21 @@ export const Route = createFileRoute('/loader-fetchQuery/$type')({ }, ssr: 'data-only', }) + +function RouteComponent() { + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + const query = useQuery(context.value.queryOptions) + return ( +
    +
    + loader data:{' '} +
    {loaderData.value ?? 'undefined'}
    +
    +
    + query data:{' '} +
    {query.data.value ?? 'loading...'}
    +
    +
    + ) +} diff --git a/e2e/vue-start/scroll-restoration/package.json b/e2e/vue-start/scroll-restoration/package.json index 025b0225be..871200e852 100644 --- a/e2e/vue-start/scroll-restoration/package.json +++ b/e2e/vue-start/scroll-restoration/package.json @@ -9,29 +9,28 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-start": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/scroll-restoration/playwright.config.ts b/e2e/vue-start/scroll-restoration/playwright.config.ts index 1862174905..b0c365f8bd 100644 --- a/e2e/vue-start/scroll-restoration/playwright.config.ts +++ b/e2e/vue-start/scroll-restoration/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,19 +18,19 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/vue-start/scroll-restoration/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/scroll-restoration/src/components/DefaultCatchBoundary.tsx index 77c03c5afa..d06f4a948b 100644 --- a/e2e/vue-start/scroll-restoration/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/scroll-restoration/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts b/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts index 49b34fc68f..86dc966e78 100644 --- a/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts +++ b/e2e/vue-start/scroll-restoration/src/routeTree.gen.ts @@ -10,18 +10,18 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' -import { Route as testsWithLoaderRouteImport } from './routes/(tests)/with-loader' import { Route as testsWithSearchRouteImport } from './routes/(tests)/with-search' +import { Route as testsWithLoaderRouteImport } from './routes/(tests)/with-loader' +import { Route as testsNormalPageRouteImport } from './routes/(tests)/normal-page' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const testsNormalPageRoute = testsNormalPageRouteImport.update({ - id: '/(tests)/normal-page', - path: '/normal-page', +const testsWithSearchRoute = testsWithSearchRouteImport.update({ + id: '/(tests)/with-search', + path: '/with-search', getParentRoute: () => rootRouteImport, } as any) const testsWithLoaderRoute = testsWithLoaderRouteImport.update({ @@ -29,9 +29,9 @@ const testsWithLoaderRoute = testsWithLoaderRouteImport.update({ path: '/with-loader', getParentRoute: () => rootRouteImport, } as any) -const testsWithSearchRoute = testsWithSearchRouteImport.update({ - id: '/(tests)/with-search', - path: '/with-search', +const testsNormalPageRoute = testsNormalPageRouteImport.update({ + id: '/(tests)/normal-page', + path: '/normal-page', getParentRoute: () => rootRouteImport, } as any) @@ -83,11 +83,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/normal-page': { - id: '/(tests)/normal-page' - path: '/normal-page' - fullPath: '/normal-page' - preLoaderRoute: typeof testsNormalPageRouteImport + '/(tests)/with-search': { + id: '/(tests)/with-search' + path: '/with-search' + fullPath: '/with-search' + preLoaderRoute: typeof testsWithSearchRouteImport parentRoute: typeof rootRouteImport } '/(tests)/with-loader': { @@ -97,11 +97,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof testsWithLoaderRouteImport parentRoute: typeof rootRouteImport } - '/(tests)/with-search': { - id: '/(tests)/with-search' - path: '/with-search' - fullPath: '/with-search' - preLoaderRoute: typeof testsWithSearchRouteImport + '/(tests)/normal-page': { + id: '/(tests)/normal-page' + path: '/normal-page' + fullPath: '/normal-page' + preLoaderRoute: typeof testsNormalPageRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/vue-start/scroll-restoration/src/routes/__root.tsx b/e2e/vue-start/scroll-restoration/src/routes/__root.tsx index cd8a558359..a28ab59f79 100644 --- a/e2e/vue-start/scroll-restoration/src/routes/__root.tsx +++ b/e2e/vue-start/scroll-restoration/src/routes/__root.tsx @@ -53,11 +53,7 @@ export const Route = createRootRoute({ ], }), errorComponent: (props) => { - return ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ) + return

    {props.error.stack}

    }, notFoundComponent: () => , component: RootComponent, diff --git a/e2e/vue-start/scroll-restoration/src/utils/posts.tsx b/e2e/vue-start/scroll-restoration/src/utils/posts.tsx index c4a2d0dcca..e45ef52969 100644 --- a/e2e/vue-start/scroll-restoration/src/utils/posts.tsx +++ b/e2e/vue-start/scroll-restoration/src/utils/posts.tsx @@ -10,7 +10,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export class PostNotFoundError extends Error {} diff --git a/e2e/vue-start/scroll-restoration/src/utils/users.tsx b/e2e/vue-start/scroll-restoration/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/vue-start/scroll-restoration/src/utils/users.tsx +++ b/e2e/vue-start/scroll-restoration/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` 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 deleted file mode 100644 index df75cba73c..0000000000 --- a/e2e/vue-start/scroll-restoration/tests/scroll-restoration-lifecycle.spec.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { test } from '@tanstack/router-e2e-utils' -import { scrollRestorationLifecycleTests } from '../../../scroll-restoration-lifecycle' - -scrollRestorationLifecycleTests(test) diff --git a/e2e/vue-start/scroll-restoration/tests/setup/global.setup.ts b/e2e/vue-start/scroll-restoration/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-start/scroll-restoration/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/scroll-restoration/tests/setup/global.teardown.ts b/e2e/vue-start/scroll-restoration/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/scroll-restoration/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/selective-ssr/package.json b/e2e/vue-start/selective-ssr/package.json index b555a01c26..95c82b2511 100644 --- a/e2e/vue-start/selective-ssr/package.json +++ b/e2e/vue-start/selective-ssr/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -22,11 +22,10 @@ "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.8" } } diff --git a/e2e/vue-start/selective-ssr/playwright.config.ts b/e2e/vue-start/selective-ssr/playwright.config.ts index 630989e41f..badd6db0eb 100644 --- a/e2e/vue-start/selective-ssr/playwright.config.ts +++ b/e2e/vue-start/selective-ssr/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && NODE_ENV=production PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/selective-ssr/src/routeTree.gen.ts b/e2e/vue-start/selective-ssr/src/routeTree.gen.ts index 0d44b648ee..474705b7e7 100644 --- a/e2e/vue-start/selective-ssr/src/routeTree.gen.ts +++ b/e2e/vue-start/selective-ssr/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostsRouteImport } from './routes/posts' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostsRoute = PostsRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsPostIdRoute = PostsPostIdRouteImport.update({ id: '/$postId', path: '/$postId', @@ -60,13 +60,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -74,6 +67,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/$postId': { id: '/posts/$postId' path: '/$postId' diff --git a/e2e/vue-start/selective-ssr/src/routes/__root.tsx b/e2e/vue-start/selective-ssr/src/routes/__root.tsx index 9319a0982a..a952abd4e0 100644 --- a/e2e/vue-start/selective-ssr/src/routes/__root.tsx +++ b/e2e/vue-start/selective-ssr/src/routes/__root.tsx @@ -1,5 +1,4 @@ /// -import { defineComponent } from 'vue' import { Body, ClientOnly, @@ -15,93 +14,6 @@ import { z } from 'zod' import { ssrSchema } from '~/search' import appCss from '~/styles/app.css?url' -const RootDocument = defineComponent({ - setup(_, { slots }) { - const routerState = useRouterState({ - select: (state) => ({ - isLoading: state.isLoading, - status: state.status, - }), - }) - return () => ( - - - - - -
    -

    Selective SSR E2E Test

    - - Home - -
    -
    - -
    - router isLoading:{' '} - - {routerState.value.isLoading ? 'true' : 'false'} - -
    -
    - router status:{' '} - {routerState.value.status} -
    -
    -
    - {slots.default?.()} - - - - ) - }, -}) - -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => { - if ( - typeof window === 'undefined' && - search.value.root?.expected?.render === 'client-only' - ) { - const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` - console.error(error) - throw new Error(error) - } - return ( -
    -

    root

    -
    - ssr: {JSON.stringify(search.value.root?.ssr ?? 'undefined')} -
    -
    - expected data location execution:{' '} - - {search.value.root?.expected?.data} - -
    -
    - loader: {loaderData.value.root} -
    -
    - context: {context.value.root} -
    -
    - -
    - ) - } - }, -}) - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -162,5 +74,84 @@ export const Route = createRootRoute({ return { root: typeof window === 'undefined' ? 'server' : 'client' } }, shellComponent: RootDocument, - component: RouteComponent, + component: () => { + const search = Route.useSearch() + if ( + typeof window === 'undefined' && + search.value.root?.expected?.render === 'client-only' + ) { + const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` + console.error(error) + throw new Error(error) + } + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + return ( +
    +

    root

    +
    + ssr: {JSON.stringify(search.value.root?.ssr ?? 'undefined')} +
    +
    + expected data location execution:{' '} + + {search.value.root?.expected?.data} + +
    +
    + loader: {loaderData.value.root} +
    +
    + context: {context.value.root} +
    +
    + +
    + ) + }, }) + +function RootDocument(_: unknown, { slots }: { slots: any }) { + const routerState = useRouterState({ + select: (state) => ({ + isLoading: state.isLoading, + status: state.status, + }), + }) + return ( + + + + + +
    +

    Selective SSR E2E Test

    + + Home + +
    +
    + +
    + router isLoading:{' '} + + {routerState.value.isLoading ? 'true' : 'false'} + +
    +
    + router status:{' '} + {routerState.value.status} +
    +
    +
    + {slots.default?.()} + + + + ) +} diff --git a/e2e/vue-start/selective-ssr/src/routes/posts.$postId.tsx b/e2e/vue-start/selective-ssr/src/routes/posts.$postId.tsx index 522b5e9b8e..4e7065cc48 100644 --- a/e2e/vue-start/selective-ssr/src/routes/posts.$postId.tsx +++ b/e2e/vue-start/selective-ssr/src/routes/posts.$postId.tsx @@ -1,47 +1,7 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import z from 'zod' import { ssrSchema } from '~/search' -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => { - if ( - typeof window === 'undefined' && - search.value.postId?.expected?.render === 'client-only' - ) { - const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` - console.error(error) - throw new Error(error) - } - return ( -
    -

    postId

    -
    - ssr:{' '} - {JSON.stringify(search.value.postId?.ssr ?? 'undefined')} -
    -
    - expected data location execution:{' '} - - {search.value.postId?.expected?.data} - -
    -
    - loader: {loaderData.value.postId} -
    -
    - context: {context.value.postId} -
    -
    - ) - } - }, -}) - export const Route = createFileRoute('/posts/$postId')({ validateSearch: z.object({ postId: ssrSchema }), ssr: ({ search }) => { @@ -86,5 +46,37 @@ export const Route = createFileRoute('/posts/$postId')({ } return { postId: typeof window === 'undefined' ? 'server' : 'client' } }, - component: RouteComponent, + component: () => { + const search = Route.useSearch() + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + if ( + typeof window === 'undefined' && + search.value.postId?.expected?.render === 'client-only' + ) { + const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` + console.error(error) + throw new Error(error) + } + return ( +
    +

    postId

    +
    + ssr: {JSON.stringify(search.value.postId?.ssr ?? 'undefined')} +
    +
    + expected data location execution:{' '} + + {search.value.postId?.expected?.data} + +
    +
    + loader: {loaderData.value.postId} +
    +
    + context: {context.value.postId} +
    +
    + ) + }, }) diff --git a/e2e/vue-start/selective-ssr/src/routes/posts.tsx b/e2e/vue-start/selective-ssr/src/routes/posts.tsx index 514628b229..6c4e490dde 100644 --- a/e2e/vue-start/selective-ssr/src/routes/posts.tsx +++ b/e2e/vue-start/selective-ssr/src/routes/posts.tsx @@ -1,48 +1,7 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import z from 'zod' import { ssrSchema } from '~/search' -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => { - if ( - typeof window === 'undefined' && - search.value.posts?.expected?.render === 'client-only' - ) { - const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` - console.error(error) - throw new Error(error) - } - return ( -
    -

    posts

    -
    - ssr: {JSON.stringify(search.value.posts?.ssr ?? 'undefined')} -
    -
    - expected data location execution:{' '} - - {search.value.posts?.expected?.data} - -
    -
    - loader: {loaderData.value.posts} -
    -
    - context: {context.value.posts} -
    -
    - -
    - ) - } - }, -}) - export const Route = createFileRoute('/posts')({ validateSearch: z.object({ posts: ssrSchema }), ssr: ({ search }) => { @@ -87,5 +46,39 @@ export const Route = createFileRoute('/posts')({ } return { posts: typeof window === 'undefined' ? 'server' : 'client' } }, - component: RouteComponent, + component: () => { + const search = Route.useSearch() + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + if ( + typeof window === 'undefined' && + search.value.posts?.expected?.render === 'client-only' + ) { + const error = `Expected component for ${Route.id} to be executed on the client, but it is running on the server` + console.error(error) + throw new Error(error) + } + return ( +
    +

    posts

    +
    + ssr: {JSON.stringify(search.value.posts?.ssr ?? 'undefined')} +
    +
    + expected data location execution:{' '} + + {search.value.posts?.expected?.data} + +
    +
    + loader: {loaderData.value.posts} +
    +
    + context: {context.value.posts} +
    +
    + +
    + ) + }, }) diff --git a/e2e/vue-start/serialization-adapters/package.json b/e2e/vue-start/serialization-adapters/package.json index a056e21da3..d854c0bb7c 100644 --- a/e2e/vue-start/serialization-adapters/package.json +++ b/e2e/vue-start/serialization-adapters/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -23,11 +23,10 @@ "@tanstack/router-e2e-utils": "workspace:^", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.8" } } diff --git a/e2e/vue-start/serialization-adapters/playwright.config.ts b/e2e/vue-start/serialization-adapters/playwright.config.ts index 630989e41f..badd6db0eb 100644 --- a/e2e/vue-start/serialization-adapters/playwright.config.ts +++ b/e2e/vue-start/serialization-adapters/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && NODE_ENV=production PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts b/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts index c684bbc82c..79b17ac82b 100644 --- a/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts +++ b/e2e/vue-start/serialization-adapters/src/routeTree.gen.ts @@ -10,43 +10,43 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as ServerFunctionCustomErrorRouteImport } from './routes/server-function/custom-error' -import { Route as ServerFunctionNestedRouteImport } from './routes/server-function/nested' -import { Route as SsrDataOnlyRouteImport } from './routes/ssr/data-only' -import { Route as SsrNestedRouteImport } from './routes/ssr/nested' import { Route as SsrStreamRouteImport } from './routes/ssr/stream' +import { Route as SsrNestedRouteImport } from './routes/ssr/nested' +import { Route as SsrDataOnlyRouteImport } from './routes/ssr/data-only' +import { Route as ServerFunctionNestedRouteImport } from './routes/server-function/nested' +import { Route as ServerFunctionCustomErrorRouteImport } from './routes/server-function/custom-error' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) +const SsrStreamRoute = SsrStreamRouteImport.update({ + id: '/ssr/stream', + path: '/ssr/stream', + getParentRoute: () => rootRouteImport, +} as any) +const SsrNestedRoute = SsrNestedRouteImport.update({ + id: '/ssr/nested', + path: '/ssr/nested', + getParentRoute: () => rootRouteImport, +} as any) +const SsrDataOnlyRoute = SsrDataOnlyRouteImport.update({ + id: '/ssr/data-only', + path: '/ssr/data-only', + getParentRoute: () => rootRouteImport, +} as any) +const ServerFunctionNestedRoute = ServerFunctionNestedRouteImport.update({ + id: '/server-function/nested', + path: '/server-function/nested', + getParentRoute: () => rootRouteImport, +} as any) const ServerFunctionCustomErrorRoute = ServerFunctionCustomErrorRouteImport.update({ id: '/server-function/custom-error', path: '/server-function/custom-error', getParentRoute: () => rootRouteImport, } as any) -const ServerFunctionNestedRoute = ServerFunctionNestedRouteImport.update({ - id: '/server-function/nested', - path: '/server-function/nested', - getParentRoute: () => rootRouteImport, -} as any) -const SsrDataOnlyRoute = SsrDataOnlyRouteImport.update({ - id: '/ssr/data-only', - path: '/ssr/data-only', - getParentRoute: () => rootRouteImport, -} as any) -const SsrNestedRoute = SsrNestedRouteImport.update({ - id: '/ssr/nested', - path: '/ssr/nested', - getParentRoute: () => rootRouteImport, -} as any) -const SsrStreamRoute = SsrStreamRouteImport.update({ - id: '/ssr/stream', - path: '/ssr/stream', - getParentRoute: () => rootRouteImport, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -118,25 +118,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/server-function/custom-error': { - id: '/server-function/custom-error' - path: '/server-function/custom-error' - fullPath: '/server-function/custom-error' - preLoaderRoute: typeof ServerFunctionCustomErrorRouteImport - parentRoute: typeof rootRouteImport - } - '/server-function/nested': { - id: '/server-function/nested' - path: '/server-function/nested' - fullPath: '/server-function/nested' - preLoaderRoute: typeof ServerFunctionNestedRouteImport - parentRoute: typeof rootRouteImport - } - '/ssr/data-only': { - id: '/ssr/data-only' - path: '/ssr/data-only' - fullPath: '/ssr/data-only' - preLoaderRoute: typeof SsrDataOnlyRouteImport + '/ssr/stream': { + id: '/ssr/stream' + path: '/ssr/stream' + fullPath: '/ssr/stream' + preLoaderRoute: typeof SsrStreamRouteImport parentRoute: typeof rootRouteImport } '/ssr/nested': { @@ -146,11 +132,25 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SsrNestedRouteImport parentRoute: typeof rootRouteImport } - '/ssr/stream': { - id: '/ssr/stream' - path: '/ssr/stream' - fullPath: '/ssr/stream' - preLoaderRoute: typeof SsrStreamRouteImport + '/ssr/data-only': { + id: '/ssr/data-only' + path: '/ssr/data-only' + fullPath: '/ssr/data-only' + preLoaderRoute: typeof SsrDataOnlyRouteImport + parentRoute: typeof rootRouteImport + } + '/server-function/nested': { + id: '/server-function/nested' + path: '/server-function/nested' + fullPath: '/server-function/nested' + preLoaderRoute: typeof ServerFunctionNestedRouteImport + parentRoute: typeof rootRouteImport + } + '/server-function/custom-error': { + id: '/server-function/custom-error' + path: '/server-function/custom-error' + fullPath: '/server-function/custom-error' + preLoaderRoute: typeof ServerFunctionCustomErrorRouteImport parentRoute: typeof rootRouteImport } } diff --git a/e2e/vue-start/serialization-adapters/src/routes/__root.tsx b/e2e/vue-start/serialization-adapters/src/routes/__root.tsx index 3ea36c7d46..96911d2500 100644 --- a/e2e/vue-start/serialization-adapters/src/routes/__root.tsx +++ b/e2e/vue-start/serialization-adapters/src/routes/__root.tsx @@ -1,5 +1,4 @@ /// -import { defineComponent } from 'vue' import { Body, ClientOnly, @@ -13,51 +12,6 @@ import { import { TanStackRouterDevtoolsInProd } from '@tanstack/vue-router-devtools' import appCss from '~/styles/app.css?url' -const RootDocument = defineComponent({ - setup(_, { slots }) { - const routerState = useRouterState({ - select: (state) => ({ isLoading: state.isLoading, status: state.status }), - }) - return () => ( - - - - - -
    -

    Serialization Adapters E2E Test

    - - Home - -
    -
    - -
    - router isLoading:{' '} - - {routerState.value.isLoading ? 'true' : 'false'} - -
    -
    - router status:{' '} - {routerState.value.status} -
    -
    -
    - {slots.default?.()} - - - - - ) - }, -}) - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -77,3 +31,46 @@ export const Route = createRootRoute({ shellComponent: RootDocument, notFoundComponent: (e) =>
    404 - Not Found {JSON.stringify(e.data)}
    , }) + +function RootDocument(_: unknown, { slots }: { slots: any }) { + const routerState = useRouterState({ + select: (state) => ({ isLoading: state.isLoading, status: state.status }), + }) + return ( + + + + + +
    +

    Serialization Adapters E2E Test

    + + Home + +
    +
    + +
    + router isLoading:{' '} + + {routerState.value.isLoading ? 'true' : 'false'} + +
    +
    + router status:{' '} + {routerState.value.status} +
    +
    +
    + {slots.default?.()} + + + + + ) +} diff --git a/e2e/vue-start/serialization-adapters/src/routes/index.tsx b/e2e/vue-start/serialization-adapters/src/routes/index.tsx index d6bacefdc0..2d90e4b073 100644 --- a/e2e/vue-start/serialization-adapters/src/routes/index.tsx +++ b/e2e/vue-start/serialization-adapters/src/routes/index.tsx @@ -2,9 +2,7 @@ import { Link, createFileRoute } from '@tanstack/vue-router' export const Route = createFileRoute('/')({ component: Home, - errorComponent: (e) => ( -
    {e.error instanceof Error ? e.error.message : String(e.error)}
    - ), + errorComponent: (e) =>
    {e.error.message}
    , }) function Home() { diff --git a/e2e/vue-start/serialization-adapters/src/routes/ssr/data-only.tsx b/e2e/vue-start/serialization-adapters/src/routes/ssr/data-only.tsx index e71906f03e..ecb35d0a55 100644 --- a/e2e/vue-start/serialization-adapters/src/routes/ssr/data-only.tsx +++ b/e2e/vue-start/serialization-adapters/src/routes/ssr/data-only.tsx @@ -1,47 +1,6 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' import { RenderData, makeData } from '~/data' -const RouteComponent = defineComponent({ - setup() { - const context = Route.useRouteContext() - const loaderData = Route.useLoaderData() - return () => { - const localData = makeData() - const expectedHonkState = localData.car.singleInstance.honk() - const honkState = loaderData.value.car.singleInstance.honk() - return ( -
    -

    data-only

    -
    - context: -
    -
    - loader: -
    -
    -

    honk

    -
    - expected:{' '} -
    - {JSON.stringify(expectedHonkState)} -
    -
    -
    - actual:{' '} -
    - {JSON.stringify(honkState)} -
    -
    -
    -
    - -
    - ) - } - }, -}) - export const Route = createFileRoute('/ssr/data-only')({ ssr: 'data-only', beforeLoad: () => { @@ -50,6 +9,43 @@ export const Route = createFileRoute('/ssr/data-only')({ loader: ({ context }) => { return context }, - component: RouteComponent, + component: () => { + const context = Route.useRouteContext() + const loaderData = Route.useLoaderData() + + const localData = makeData() + const expectedHonkState = localData.car.singleInstance.honk() + + const honkState = loaderData.value.car.singleInstance.honk() + + return ( +
    +

    data-only

    +
    + context: +
    +
    + loader: +
    +
    +

    honk

    +
    + expected:{' '} +
    + {JSON.stringify(expectedHonkState)} +
    +
    +
    + actual:{' '} +
    + {JSON.stringify(honkState)} +
    +
    +
    +
    + +
    + ) + }, pendingComponent: () =>
    posts Loading...
    , }) diff --git a/e2e/vue-start/serialization-adapters/src/routes/ssr/nested.tsx b/e2e/vue-start/serialization-adapters/src/routes/ssr/nested.tsx index b4f7fd8f23..bbc240b96d 100644 --- a/e2e/vue-start/serialization-adapters/src/routes/ssr/nested.tsx +++ b/e2e/vue-start/serialization-adapters/src/routes/ssr/nested.tsx @@ -1,14 +1,6 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { RenderNestedData, makeNested } from '~/data' -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - return () => - }, -}) - export const Route = createFileRoute('/ssr/nested')({ beforeLoad: () => { return { nested: makeNested() } @@ -16,5 +8,8 @@ export const Route = createFileRoute('/ssr/nested')({ loader: ({ context }) => { return context }, - component: RouteComponent, + component: () => { + const loaderData = Route.useLoaderData() + return + }, }) diff --git a/e2e/vue-start/serialization-adapters/src/routes/ssr/stream.tsx b/e2e/vue-start/serialization-adapters/src/routes/ssr/stream.tsx index f6056699af..4fce3271f8 100644 --- a/e2e/vue-start/serialization-adapters/src/routes/ssr/stream.tsx +++ b/e2e/vue-start/serialization-adapters/src/routes/ssr/stream.tsx @@ -1,32 +1,7 @@ import { Await, createFileRoute } from '@tanstack/vue-router' -import { defineComponent, Suspense } from 'vue' +import { Suspense } from 'vue' import { RenderData, makeData } from '~/data' -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - return () => ( -
    -

    Stream

    -
    {loaderData.value.someString}
    - - {{ - default: () => ( - ) => ( - - )} - /> - ), - fallback: () =>
    Loading...
    , - }} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/ssr/stream')({ loader: () => { const dataPromise = new Promise>((r) => @@ -38,8 +13,29 @@ export const Route = createFileRoute('/ssr/stream')({ } }, - errorComponent: (e) => ( -
    {e.error instanceof Error ? e.error.message : String(e.error)}
    - ), + errorComponent: (e) =>
    {e.error.message}
    , component: RouteComponent, }) + +function RouteComponent() { + const loaderData = Route.useLoaderData() + return ( +
    +

    Stream

    +
    {loaderData.value.someString}
    + + {{ + default: () => ( + ) => ( + + )} + /> + ), + fallback: () =>
    Loading...
    , + }} +
    +
    + ) +} diff --git a/e2e/vue-start/server-functions/package.json b/e2e/vue-start/server-functions/package.json index dd1a7a9c6b..2e84c6238e 100644 --- a/e2e/vue-start/server-functions/package.json +++ b/e2e/vue-start/server-functions/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-query": "^5.90.9", @@ -18,13 +18,13 @@ "@tanstack/vue-router-ssr-query": "workspace:^", "@tanstack/vue-start": "workspace:^", "js-cookie": "^3.0.5", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/js-cookie": "^3.0.6", @@ -32,10 +32,9 @@ "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/server-functions/playwright.config.ts b/e2e/vue-start/server-functions/playwright.config.ts index 48e14683f4..cb1da03b94 100644 --- a/e2e/vue-start/server-functions/playwright.config.ts +++ b/e2e/vue-start/server-functions/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -export const PORT = Number(process.env.E2E_APP_PORT ?? 0) +export const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/server-functions/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/server-functions/src/components/DefaultCatchBoundary.tsx index 77c03c5afa..d06f4a948b 100644 --- a/e2e/vue-start/server-functions/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/server-functions/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/server-functions/src/routeTree.gen.ts b/e2e/vue-start/server-functions/src/routeTree.gen.ts index 96e5b7ba29..43a6eb4ae6 100644 --- a/e2e/vue-start/server-functions/src/routeTree.gen.ts +++ b/e2e/vue-start/server-functions/src/routeTree.gen.ts @@ -9,89 +9,39 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AbortSignalRouteImport } from './routes/abort-signal' -import { Route as ConsistentRouteImport } from './routes/consistent' -import { Route as DeadCodePreserveRouteImport } from './routes/dead-code-preserve' -import { Route as EnvOnlyRouteImport } from './routes/env-only' -import { Route as HeadersRouteImport } from './routes/headers' -import { Route as IsomorphicFnsRouteImport } from './routes/isomorphic-fns' -import { Route as MultipartRouteImport } from './routes/multipart' -import { Route as RawResponseRouteImport } from './routes/raw-response' -import { Route as ReturnNullRouteImport } from './routes/return-null' -import { Route as SerializeFormDataRouteImport } from './routes/serialize-form-data' -import { Route as StatusRouteImport } from './routes/status' import { Route as SubmitPostFormdataRouteImport } from './routes/submit-post-formdata' -import { Route as CookiesIndexRouteImport } from './routes/cookies/index' -import { Route as CookiesSetRouteImport } from './routes/cookies/set' -import { Route as FactoryIndexRouteImport } from './routes/factory/index' -import { Route as FormdataRedirectIndexRouteImport } from './routes/formdata-redirect/index' -import { Route as FunctionMetadataIndexRouteImport } from './routes/function-metadata/index' -import { Route as FunctionMethodIndexRouteImport } from './routes/function-method/index' -import { Route as MiddlewareIndexRouteImport } from './routes/middleware/index' -import { Route as MiddlewareClientMiddlewareRouterRouteImport } from './routes/middleware/client-middleware-router' -import { Route as MiddlewareRequestMiddlewareRouteImport } from './routes/middleware/request-middleware' -import { Route as MiddlewareSendServerFnRouteImport } from './routes/middleware/send-serverFn' -import { Route as PrimitivesIndexRouteImport } from './routes/primitives/index' -import { Route as RedirectTestSsrIndexRouteImport } from './routes/redirect-test-ssr/index' -import { Route as RedirectTestSsrTargetRouteImport } from './routes/redirect-test-ssr/target' +import { Route as StatusRouteImport } from './routes/status' +import { Route as SerializeFormDataRouteImport } from './routes/serialize-form-data' +import { Route as ReturnNullRouteImport } from './routes/return-null' +import { Route as RawResponseRouteImport } from './routes/raw-response' +import { Route as MultipartRouteImport } from './routes/multipart' +import { Route as IsomorphicFnsRouteImport } from './routes/isomorphic-fns' +import { Route as HeadersRouteImport } from './routes/headers' +import { Route as EnvOnlyRouteImport } from './routes/env-only' +import { Route as DeadCodePreserveRouteImport } from './routes/dead-code-preserve' +import { Route as ConsistentRouteImport } from './routes/consistent' +import { Route as AbortSignalRouteImport } from './routes/abort-signal' +import { Route as IndexRouteImport } from './routes/index' import { Route as RedirectTestIndexRouteImport } from './routes/redirect-test/index' +import { Route as RedirectTestSsrIndexRouteImport } from './routes/redirect-test-ssr/index' +import { Route as PrimitivesIndexRouteImport } from './routes/primitives/index' +import { Route as MiddlewareIndexRouteImport } from './routes/middleware/index' +import { Route as FunctionMethodIndexRouteImport } from './routes/function-method/index' +import { Route as FunctionMetadataIndexRouteImport } from './routes/function-metadata/index' +import { Route as FormdataRedirectIndexRouteImport } from './routes/formdata-redirect/index' +import { Route as FactoryIndexRouteImport } from './routes/factory/index' +import { Route as CookiesIndexRouteImport } from './routes/cookies/index' import { Route as RedirectTestTargetRouteImport } from './routes/redirect-test/target' +import { Route as RedirectTestSsrTargetRouteImport } from './routes/redirect-test-ssr/target' +import { Route as MiddlewareSendServerFnRouteImport } from './routes/middleware/send-serverFn' +import { Route as MiddlewareRequestMiddlewareRouteImport } from './routes/middleware/request-middleware' +import { Route as MiddlewareClientMiddlewareRouterRouteImport } from './routes/middleware/client-middleware-router' +import { Route as CookiesSetRouteImport } from './routes/cookies/set' import { Route as FormdataRedirectTargetNameRouteImport } from './routes/formdata-redirect/target.$name' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AbortSignalRoute = AbortSignalRouteImport.update({ - id: '/abort-signal', - path: '/abort-signal', - getParentRoute: () => rootRouteImport, -} as any) -const ConsistentRoute = ConsistentRouteImport.update({ - id: '/consistent', - path: '/consistent', - getParentRoute: () => rootRouteImport, -} as any) -const DeadCodePreserveRoute = DeadCodePreserveRouteImport.update({ - id: '/dead-code-preserve', - path: '/dead-code-preserve', - getParentRoute: () => rootRouteImport, -} as any) -const EnvOnlyRoute = EnvOnlyRouteImport.update({ - id: '/env-only', - path: '/env-only', - getParentRoute: () => rootRouteImport, -} as any) -const HeadersRoute = HeadersRouteImport.update({ - id: '/headers', - path: '/headers', - getParentRoute: () => rootRouteImport, -} as any) -const IsomorphicFnsRoute = IsomorphicFnsRouteImport.update({ - id: '/isomorphic-fns', - path: '/isomorphic-fns', - getParentRoute: () => rootRouteImport, -} as any) -const MultipartRoute = MultipartRouteImport.update({ - id: '/multipart', - path: '/multipart', - getParentRoute: () => rootRouteImport, -} as any) -const RawResponseRoute = RawResponseRouteImport.update({ - id: '/raw-response', - path: '/raw-response', - getParentRoute: () => rootRouteImport, -} as any) -const ReturnNullRoute = ReturnNullRouteImport.update({ - id: '/return-null', - path: '/return-null', - getParentRoute: () => rootRouteImport, -} as any) -const SerializeFormDataRoute = SerializeFormDataRouteImport.update({ - id: '/serialize-form-data', - path: '/serialize-form-data', +const SubmitPostFormdataRoute = SubmitPostFormdataRouteImport.update({ + id: '/submit-post-formdata', + path: '/submit-post-formdata', getParentRoute: () => rootRouteImport, } as any) const StatusRoute = StatusRouteImport.update({ @@ -99,76 +49,59 @@ const StatusRoute = StatusRouteImport.update({ path: '/status', getParentRoute: () => rootRouteImport, } as any) -const SubmitPostFormdataRoute = SubmitPostFormdataRouteImport.update({ - id: '/submit-post-formdata', - path: '/submit-post-formdata', +const SerializeFormDataRoute = SerializeFormDataRouteImport.update({ + id: '/serialize-form-data', + path: '/serialize-form-data', getParentRoute: () => rootRouteImport, } as any) -const CookiesIndexRoute = CookiesIndexRouteImport.update({ - id: '/cookies/', - path: '/cookies/', +const ReturnNullRoute = ReturnNullRouteImport.update({ + id: '/return-null', + path: '/return-null', getParentRoute: () => rootRouteImport, } as any) -const CookiesSetRoute = CookiesSetRouteImport.update({ - id: '/cookies/set', - path: '/cookies/set', +const RawResponseRoute = RawResponseRouteImport.update({ + id: '/raw-response', + path: '/raw-response', getParentRoute: () => rootRouteImport, } as any) -const FactoryIndexRoute = FactoryIndexRouteImport.update({ - id: '/factory/', - path: '/factory/', +const MultipartRoute = MultipartRouteImport.update({ + id: '/multipart', + path: '/multipart', getParentRoute: () => rootRouteImport, } as any) -const FormdataRedirectIndexRoute = FormdataRedirectIndexRouteImport.update({ - id: '/formdata-redirect/', - path: '/formdata-redirect/', +const IsomorphicFnsRoute = IsomorphicFnsRouteImport.update({ + id: '/isomorphic-fns', + path: '/isomorphic-fns', getParentRoute: () => rootRouteImport, } as any) -const FunctionMetadataIndexRoute = FunctionMetadataIndexRouteImport.update({ - id: '/function-metadata/', - path: '/function-metadata/', +const HeadersRoute = HeadersRouteImport.update({ + id: '/headers', + path: '/headers', getParentRoute: () => rootRouteImport, } as any) -const FunctionMethodIndexRoute = FunctionMethodIndexRouteImport.update({ - id: '/function-method/', - path: '/function-method/', +const EnvOnlyRoute = EnvOnlyRouteImport.update({ + id: '/env-only', + path: '/env-only', getParentRoute: () => rootRouteImport, } as any) -const MiddlewareIndexRoute = MiddlewareIndexRouteImport.update({ - id: '/middleware/', - path: '/middleware/', +const DeadCodePreserveRoute = DeadCodePreserveRouteImport.update({ + id: '/dead-code-preserve', + path: '/dead-code-preserve', getParentRoute: () => rootRouteImport, } as any) -const MiddlewareClientMiddlewareRouterRoute = - MiddlewareClientMiddlewareRouterRouteImport.update({ - id: '/middleware/client-middleware-router', - path: '/middleware/client-middleware-router', - getParentRoute: () => rootRouteImport, - } as any) -const MiddlewareRequestMiddlewareRoute = - MiddlewareRequestMiddlewareRouteImport.update({ - id: '/middleware/request-middleware', - path: '/middleware/request-middleware', - getParentRoute: () => rootRouteImport, - } as any) -const MiddlewareSendServerFnRoute = MiddlewareSendServerFnRouteImport.update({ - id: '/middleware/send-serverFn', - path: '/middleware/send-serverFn', +const ConsistentRoute = ConsistentRouteImport.update({ + id: '/consistent', + path: '/consistent', getParentRoute: () => rootRouteImport, } as any) -const PrimitivesIndexRoute = PrimitivesIndexRouteImport.update({ - id: '/primitives/', - path: '/primitives/', +const AbortSignalRoute = AbortSignalRouteImport.update({ + id: '/abort-signal', + path: '/abort-signal', getParentRoute: () => rootRouteImport, } as any) -const RedirectTestSsrIndexRoute = RedirectTestSsrIndexRouteImport.update({ - id: '/redirect-test-ssr/', - path: '/redirect-test-ssr/', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectTestSsrTargetRoute = RedirectTestSsrTargetRouteImport.update({ - id: '/redirect-test-ssr/target', - path: '/redirect-test-ssr/target', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const RedirectTestIndexRoute = RedirectTestIndexRouteImport.update({ @@ -176,11 +109,78 @@ const RedirectTestIndexRoute = RedirectTestIndexRouteImport.update({ path: '/redirect-test/', getParentRoute: () => rootRouteImport, } as any) +const RedirectTestSsrIndexRoute = RedirectTestSsrIndexRouteImport.update({ + id: '/redirect-test-ssr/', + path: '/redirect-test-ssr/', + getParentRoute: () => rootRouteImport, +} as any) +const PrimitivesIndexRoute = PrimitivesIndexRouteImport.update({ + id: '/primitives/', + path: '/primitives/', + getParentRoute: () => rootRouteImport, +} as any) +const MiddlewareIndexRoute = MiddlewareIndexRouteImport.update({ + id: '/middleware/', + path: '/middleware/', + getParentRoute: () => rootRouteImport, +} as any) +const FunctionMethodIndexRoute = FunctionMethodIndexRouteImport.update({ + id: '/function-method/', + path: '/function-method/', + getParentRoute: () => rootRouteImport, +} as any) +const FunctionMetadataIndexRoute = FunctionMetadataIndexRouteImport.update({ + id: '/function-metadata/', + path: '/function-metadata/', + getParentRoute: () => rootRouteImport, +} as any) +const FormdataRedirectIndexRoute = FormdataRedirectIndexRouteImport.update({ + id: '/formdata-redirect/', + path: '/formdata-redirect/', + getParentRoute: () => rootRouteImport, +} as any) +const FactoryIndexRoute = FactoryIndexRouteImport.update({ + id: '/factory/', + path: '/factory/', + getParentRoute: () => rootRouteImport, +} as any) +const CookiesIndexRoute = CookiesIndexRouteImport.update({ + id: '/cookies/', + path: '/cookies/', + getParentRoute: () => rootRouteImport, +} as any) const RedirectTestTargetRoute = RedirectTestTargetRouteImport.update({ id: '/redirect-test/target', path: '/redirect-test/target', getParentRoute: () => rootRouteImport, } as any) +const RedirectTestSsrTargetRoute = RedirectTestSsrTargetRouteImport.update({ + id: '/redirect-test-ssr/target', + path: '/redirect-test-ssr/target', + getParentRoute: () => rootRouteImport, +} as any) +const MiddlewareSendServerFnRoute = MiddlewareSendServerFnRouteImport.update({ + id: '/middleware/send-serverFn', + path: '/middleware/send-serverFn', + getParentRoute: () => rootRouteImport, +} as any) +const MiddlewareRequestMiddlewareRoute = + MiddlewareRequestMiddlewareRouteImport.update({ + id: '/middleware/request-middleware', + path: '/middleware/request-middleware', + getParentRoute: () => rootRouteImport, + } as any) +const MiddlewareClientMiddlewareRouterRoute = + MiddlewareClientMiddlewareRouterRouteImport.update({ + id: '/middleware/client-middleware-router', + path: '/middleware/client-middleware-router', + getParentRoute: () => rootRouteImport, + } as any) +const CookiesSetRoute = CookiesSetRouteImport.update({ + id: '/cookies/set', + path: '/cookies/set', + getParentRoute: () => rootRouteImport, +} as any) const FormdataRedirectTargetNameRoute = FormdataRedirectTargetNameRouteImport.update({ id: '/formdata-redirect/target/$name', @@ -412,81 +412,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/abort-signal': { - id: '/abort-signal' - path: '/abort-signal' - fullPath: '/abort-signal' - preLoaderRoute: typeof AbortSignalRouteImport - parentRoute: typeof rootRouteImport - } - '/consistent': { - id: '/consistent' - path: '/consistent' - fullPath: '/consistent' - preLoaderRoute: typeof ConsistentRouteImport - parentRoute: typeof rootRouteImport - } - '/dead-code-preserve': { - id: '/dead-code-preserve' - path: '/dead-code-preserve' - fullPath: '/dead-code-preserve' - preLoaderRoute: typeof DeadCodePreserveRouteImport - parentRoute: typeof rootRouteImport - } - '/env-only': { - id: '/env-only' - path: '/env-only' - fullPath: '/env-only' - preLoaderRoute: typeof EnvOnlyRouteImport - parentRoute: typeof rootRouteImport - } - '/headers': { - id: '/headers' - path: '/headers' - fullPath: '/headers' - preLoaderRoute: typeof HeadersRouteImport - parentRoute: typeof rootRouteImport - } - '/isomorphic-fns': { - id: '/isomorphic-fns' - path: '/isomorphic-fns' - fullPath: '/isomorphic-fns' - preLoaderRoute: typeof IsomorphicFnsRouteImport - parentRoute: typeof rootRouteImport - } - '/multipart': { - id: '/multipart' - path: '/multipart' - fullPath: '/multipart' - preLoaderRoute: typeof MultipartRouteImport - parentRoute: typeof rootRouteImport - } - '/raw-response': { - id: '/raw-response' - path: '/raw-response' - fullPath: '/raw-response' - preLoaderRoute: typeof RawResponseRouteImport - parentRoute: typeof rootRouteImport - } - '/return-null': { - id: '/return-null' - path: '/return-null' - fullPath: '/return-null' - preLoaderRoute: typeof ReturnNullRouteImport - parentRoute: typeof rootRouteImport - } - '/serialize-form-data': { - id: '/serialize-form-data' - path: '/serialize-form-data' - fullPath: '/serialize-form-data' - preLoaderRoute: typeof SerializeFormDataRouteImport + '/submit-post-formdata': { + id: '/submit-post-formdata' + path: '/submit-post-formdata' + fullPath: '/submit-post-formdata' + preLoaderRoute: typeof SubmitPostFormdataRouteImport parentRoute: typeof rootRouteImport } '/status': { @@ -496,102 +426,81 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof StatusRouteImport parentRoute: typeof rootRouteImport } - '/submit-post-formdata': { - id: '/submit-post-formdata' - path: '/submit-post-formdata' - fullPath: '/submit-post-formdata' - preLoaderRoute: typeof SubmitPostFormdataRouteImport + '/serialize-form-data': { + id: '/serialize-form-data' + path: '/serialize-form-data' + fullPath: '/serialize-form-data' + preLoaderRoute: typeof SerializeFormDataRouteImport parentRoute: typeof rootRouteImport } - '/cookies/': { - id: '/cookies/' - path: '/cookies' - fullPath: '/cookies/' - preLoaderRoute: typeof CookiesIndexRouteImport + '/return-null': { + id: '/return-null' + path: '/return-null' + fullPath: '/return-null' + preLoaderRoute: typeof ReturnNullRouteImport parentRoute: typeof rootRouteImport } - '/cookies/set': { - id: '/cookies/set' - path: '/cookies/set' - fullPath: '/cookies/set' - preLoaderRoute: typeof CookiesSetRouteImport + '/raw-response': { + id: '/raw-response' + path: '/raw-response' + fullPath: '/raw-response' + preLoaderRoute: typeof RawResponseRouteImport parentRoute: typeof rootRouteImport } - '/factory/': { - id: '/factory/' - path: '/factory' - fullPath: '/factory/' - preLoaderRoute: typeof FactoryIndexRouteImport + '/multipart': { + id: '/multipart' + path: '/multipart' + fullPath: '/multipart' + preLoaderRoute: typeof MultipartRouteImport parentRoute: typeof rootRouteImport } - '/formdata-redirect/': { - id: '/formdata-redirect/' - path: '/formdata-redirect' - fullPath: '/formdata-redirect/' - preLoaderRoute: typeof FormdataRedirectIndexRouteImport + '/isomorphic-fns': { + id: '/isomorphic-fns' + path: '/isomorphic-fns' + fullPath: '/isomorphic-fns' + preLoaderRoute: typeof IsomorphicFnsRouteImport parentRoute: typeof rootRouteImport } - '/function-metadata/': { - id: '/function-metadata/' - path: '/function-metadata' - fullPath: '/function-metadata/' - preLoaderRoute: typeof FunctionMetadataIndexRouteImport + '/headers': { + id: '/headers' + path: '/headers' + fullPath: '/headers' + preLoaderRoute: typeof HeadersRouteImport parentRoute: typeof rootRouteImport } - '/function-method/': { - id: '/function-method/' - path: '/function-method' - fullPath: '/function-method/' - preLoaderRoute: typeof FunctionMethodIndexRouteImport + '/env-only': { + id: '/env-only' + path: '/env-only' + fullPath: '/env-only' + preLoaderRoute: typeof EnvOnlyRouteImport parentRoute: typeof rootRouteImport } - '/middleware/': { - id: '/middleware/' - path: '/middleware' - fullPath: '/middleware/' - preLoaderRoute: typeof MiddlewareIndexRouteImport + '/dead-code-preserve': { + id: '/dead-code-preserve' + path: '/dead-code-preserve' + fullPath: '/dead-code-preserve' + preLoaderRoute: typeof DeadCodePreserveRouteImport parentRoute: typeof rootRouteImport } - '/middleware/client-middleware-router': { - id: '/middleware/client-middleware-router' - path: '/middleware/client-middleware-router' - fullPath: '/middleware/client-middleware-router' - preLoaderRoute: typeof MiddlewareClientMiddlewareRouterRouteImport + '/consistent': { + id: '/consistent' + path: '/consistent' + fullPath: '/consistent' + preLoaderRoute: typeof ConsistentRouteImport parentRoute: typeof rootRouteImport } - '/middleware/request-middleware': { - id: '/middleware/request-middleware' - path: '/middleware/request-middleware' - fullPath: '/middleware/request-middleware' - preLoaderRoute: typeof MiddlewareRequestMiddlewareRouteImport + '/abort-signal': { + id: '/abort-signal' + path: '/abort-signal' + fullPath: '/abort-signal' + preLoaderRoute: typeof AbortSignalRouteImport parentRoute: typeof rootRouteImport } - '/middleware/send-serverFn': { - id: '/middleware/send-serverFn' - path: '/middleware/send-serverFn' - fullPath: '/middleware/send-serverFn' - preLoaderRoute: typeof MiddlewareSendServerFnRouteImport - parentRoute: typeof rootRouteImport - } - '/primitives/': { - id: '/primitives/' - path: '/primitives' - fullPath: '/primitives/' - preLoaderRoute: typeof PrimitivesIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect-test-ssr/': { - id: '/redirect-test-ssr/' - path: '/redirect-test-ssr' - fullPath: '/redirect-test-ssr/' - preLoaderRoute: typeof RedirectTestSsrIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect-test-ssr/target': { - id: '/redirect-test-ssr/target' - path: '/redirect-test-ssr/target' - fullPath: '/redirect-test-ssr/target' - preLoaderRoute: typeof RedirectTestSsrTargetRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/redirect-test/': { @@ -601,6 +510,62 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTestIndexRouteImport parentRoute: typeof rootRouteImport } + '/redirect-test-ssr/': { + id: '/redirect-test-ssr/' + path: '/redirect-test-ssr' + fullPath: '/redirect-test-ssr/' + preLoaderRoute: typeof RedirectTestSsrIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/primitives/': { + id: '/primitives/' + path: '/primitives' + fullPath: '/primitives/' + preLoaderRoute: typeof PrimitivesIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/middleware/': { + id: '/middleware/' + path: '/middleware' + fullPath: '/middleware/' + preLoaderRoute: typeof MiddlewareIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/function-method/': { + id: '/function-method/' + path: '/function-method' + fullPath: '/function-method/' + preLoaderRoute: typeof FunctionMethodIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/function-metadata/': { + id: '/function-metadata/' + path: '/function-metadata' + fullPath: '/function-metadata/' + preLoaderRoute: typeof FunctionMetadataIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/formdata-redirect/': { + id: '/formdata-redirect/' + path: '/formdata-redirect' + fullPath: '/formdata-redirect/' + preLoaderRoute: typeof FormdataRedirectIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/factory/': { + id: '/factory/' + path: '/factory' + fullPath: '/factory/' + preLoaderRoute: typeof FactoryIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/cookies/': { + id: '/cookies/' + path: '/cookies' + fullPath: '/cookies/' + preLoaderRoute: typeof CookiesIndexRouteImport + parentRoute: typeof rootRouteImport + } '/redirect-test/target': { id: '/redirect-test/target' path: '/redirect-test/target' @@ -608,6 +573,41 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RedirectTestTargetRouteImport parentRoute: typeof rootRouteImport } + '/redirect-test-ssr/target': { + id: '/redirect-test-ssr/target' + path: '/redirect-test-ssr/target' + fullPath: '/redirect-test-ssr/target' + preLoaderRoute: typeof RedirectTestSsrTargetRouteImport + parentRoute: typeof rootRouteImport + } + '/middleware/send-serverFn': { + id: '/middleware/send-serverFn' + path: '/middleware/send-serverFn' + fullPath: '/middleware/send-serverFn' + preLoaderRoute: typeof MiddlewareSendServerFnRouteImport + parentRoute: typeof rootRouteImport + } + '/middleware/request-middleware': { + id: '/middleware/request-middleware' + path: '/middleware/request-middleware' + fullPath: '/middleware/request-middleware' + preLoaderRoute: typeof MiddlewareRequestMiddlewareRouteImport + parentRoute: typeof rootRouteImport + } + '/middleware/client-middleware-router': { + id: '/middleware/client-middleware-router' + path: '/middleware/client-middleware-router' + fullPath: '/middleware/client-middleware-router' + preLoaderRoute: typeof MiddlewareClientMiddlewareRouterRouteImport + parentRoute: typeof rootRouteImport + } + '/cookies/set': { + id: '/cookies/set' + path: '/cookies/set' + fullPath: '/cookies/set' + preLoaderRoute: typeof CookiesSetRouteImport + parentRoute: typeof rootRouteImport + } '/formdata-redirect/target/$name': { id: '/formdata-redirect/target/$name' path: '/formdata-redirect/target/$name' diff --git a/e2e/vue-start/server-functions/src/routes/__root.tsx b/e2e/vue-start/server-functions/src/routes/__root.tsx index a52b12deae..342f7a79b3 100644 --- a/e2e/vue-start/server-functions/src/routes/__root.tsx +++ b/e2e/vue-start/server-functions/src/routes/__root.tsx @@ -25,11 +25,7 @@ export const Route = createRootRoute({ links: [{ rel: 'stylesheet', href: appCss }], }), errorComponent: (props) => { - return ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ) + return

    {props.error.stack}

    }, notFoundComponent: () => , component: RootComponent, diff --git a/e2e/vue-start/server-functions/src/routes/cookies/index.tsx b/e2e/vue-start/server-functions/src/routes/cookies/index.tsx index 90dddad0af..d7fef10223 100644 --- a/e2e/vue-start/server-functions/src/routes/cookies/index.tsx +++ b/e2e/vue-start/server-functions/src/routes/cookies/index.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' import { z } from 'zod' @@ -6,23 +5,21 @@ const cookieSchema = z .object({ value: z.string().default(() => `CLIENT-${Date.now()}`) }) .prefault({}) .catch(() => ({ value: `CLIENT-${Date.now()}` })) -const RouteComponent = defineComponent({ - setup() { - const search = Route.useSearch() - return () => ( - - got to route that sets the cookies with {JSON.stringify(search.value)} - - ) - }, -}) - export const Route = createFileRoute('/cookies/')({ validateSearch: cookieSchema, component: RouteComponent, }) + +function RouteComponent() { + const search = Route.useSearch() + return ( + + got to route that sets the cookies with {JSON.stringify(search.value)} + + ) +} diff --git a/e2e/vue-start/server-functions/src/routes/formdata-redirect/index.tsx b/e2e/vue-start/server-functions/src/routes/formdata-redirect/index.tsx index 8bfcc55ca3..8b0c623b8c 100644 --- a/e2e/vue-start/server-functions/src/routes/formdata-redirect/index.tsx +++ b/e2e/vue-start/server-functions/src/routes/formdata-redirect/index.tsx @@ -1,51 +1,7 @@ -import { defineComponent } from 'vue' import { createFileRoute, redirect } from '@tanstack/vue-router' import { createServerFn, useServerFn } from '@tanstack/vue-start' import { z } from 'zod' -const SubmitPostFormDataFn = defineComponent({ - setup() { - const mode = Route.useSearch({ select: (search) => search.mode }) - const greetUserFn = useServerFn(greetUser) - return () => ( -
    -

    Submit POST FormData Fn Call

    -
    - It should return redirect to /formdata-redirect/target/ - {testValues.name} and greet the user with their name: - -
    -              {testValues.name}
    -            
    -
    -
    -
    { - if (mode.value === 'js') { - evt.preventDefault() - const data = new FormData(evt.currentTarget as HTMLFormElement) - await greetUserFn({ data }) - } - }} - > - - -
    -
    - ) - }, -}) - export const Route = createFileRoute('/formdata-redirect/')({ component: SubmitPostFormDataFn, validateSearch: z.object({ @@ -75,3 +31,44 @@ export const greetUser = createServerFn({ method: 'POST' }) .handler(({ data: { name } }) => { throw redirect({ to: '/formdata-redirect/target/$name', params: { name } }) }) + +function SubmitPostFormDataFn() { + const mode = Route.useSearch({ select: (search) => search.mode }) + const greetUserFn = useServerFn(greetUser) + return ( +
    +

    Submit POST FormData Fn Call

    +
    + It should return redirect to /formdata-redirect/target/{testValues.name}{' '} + and greet the user with their name: + +
    +            {testValues.name}
    +          
    +
    +
    +
    { + if (mode.value === 'js') { + evt.preventDefault() + const data = new FormData(evt.currentTarget as HTMLFormElement) + await greetUserFn({ data }) + } + }} + > + + +
    +
    + ) +} diff --git a/e2e/vue-start/server-functions/src/routes/formdata-redirect/target.$name.tsx b/e2e/vue-start/server-functions/src/routes/formdata-redirect/target.$name.tsx index 099a8665bf..958aeaf617 100644 --- a/e2e/vue-start/server-functions/src/routes/formdata-redirect/target.$name.tsx +++ b/e2e/vue-start/server-functions/src/routes/formdata-redirect/target.$name.tsx @@ -1,21 +1,18 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { - const params = Route.useParams() - return () => ( -
    - Hello{' '} - - {params.value.name} - - ! -
    - ) - }, -}) - export const Route = createFileRoute('/formdata-redirect/target/$name')({ component: RouteComponent, }) + +function RouteComponent() { + const params = Route.useParams() + return ( +
    + Hello{' '} + + {params.value.name} + + ! +
    + ) +} diff --git a/e2e/vue-start/server-routes/package.json b/e2e/vue-start/server-routes/package.json index 6a8e1babed..6e5c7cdced 100644 --- a/e2e/vue-start/server-routes/package.json +++ b/e2e/vue-start/server-routes/package.json @@ -18,13 +18,13 @@ "@tanstack/vue-router-ssr-query": "workspace:^", "@tanstack/vue-start": "workspace:^", "js-cookie": "^3.0.5", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/js-cookie": "^3.0.6", @@ -32,10 +32,9 @@ "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/server-routes/playwright.config.ts b/e2e/vue-start/server-routes/playwright.config.ts index 48e14683f4..cb1da03b94 100644 --- a/e2e/vue-start/server-routes/playwright.config.ts +++ b/e2e/vue-start/server-routes/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -export const PORT = Number(process.env.E2E_APP_PORT ?? 0) +export const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/server-routes/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/server-routes/src/components/DefaultCatchBoundary.tsx index 77c03c5afa..d06f4a948b 100644 --- a/e2e/vue-start/server-routes/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/server-routes/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/server-routes/src/routeTree.gen.ts b/e2e/vue-start/server-routes/src/routeTree.gen.ts index 603560da2a..7d9d463772 100644 --- a/e2e/vue-start/server-routes/src/routeTree.gen.ts +++ b/e2e/vue-start/server-routes/src/routeTree.gen.ts @@ -9,21 +9,16 @@ // 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 IndexRouteImport } from './routes/index' import { Route as MergeMiddlewareContextRouteImport } from './routes/merge-middleware-context' import { Route as MethodsRouteRouteImport } from './routes/methods/route' -import { Route as ApiMiddlewareContextRouteImport } from './routes/api/middleware-context' -import { Route as ApiOnlyAnyRouteImport } from './routes/api/only-any' +import { Route as IndexRouteImport } from './routes/index' import { Route as MethodsIndexRouteImport } from './routes/methods/index' import { Route as MethodsOnlyAnyRouteImport } from './routes/methods/only-any' +import { Route as ApiOnlyAnyRouteImport } from './routes/api/only-any' +import { Route as ApiMiddlewareContextRouteImport } from './routes/api/middleware-context' import { Route as ApiParamsFooRouteRouteImport } from './routes/api/params/$foo/route' import { Route as ApiParamsFooBarRouteImport } from './routes/api/params/$foo/$bar' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const MergeMiddlewareContextRoute = MergeMiddlewareContextRouteImport.update({ id: '/merge-middleware-context', path: '/merge-middleware-context', @@ -34,14 +29,9 @@ const MethodsRouteRoute = MethodsRouteRouteImport.update({ path: '/methods', getParentRoute: () => rootRouteImport, } as any) -const ApiMiddlewareContextRoute = ApiMiddlewareContextRouteImport.update({ - id: '/api/middleware-context', - path: '/api/middleware-context', - getParentRoute: () => rootRouteImport, -} as any) -const ApiOnlyAnyRoute = ApiOnlyAnyRouteImport.update({ - id: '/api/only-any', - path: '/api/only-any', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const MethodsIndexRoute = MethodsIndexRouteImport.update({ @@ -54,6 +44,16 @@ const MethodsOnlyAnyRoute = MethodsOnlyAnyRouteImport.update({ path: '/only-any', getParentRoute: () => MethodsRouteRoute, } as any) +const ApiOnlyAnyRoute = ApiOnlyAnyRouteImport.update({ + id: '/api/only-any', + path: '/api/only-any', + getParentRoute: () => rootRouteImport, +} as any) +const ApiMiddlewareContextRoute = ApiMiddlewareContextRouteImport.update({ + id: '/api/middleware-context', + path: '/api/middleware-context', + getParentRoute: () => rootRouteImport, +} as any) const ApiParamsFooRouteRoute = ApiParamsFooRouteRouteImport.update({ id: '/api/params/$foo', path: '/api/params/$foo', @@ -144,13 +144,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/merge-middleware-context': { id: '/merge-middleware-context' path: '/merge-middleware-context' @@ -165,18 +158,11 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof MethodsRouteRouteImport parentRoute: typeof rootRouteImport } - '/api/middleware-context': { - id: '/api/middleware-context' - path: '/api/middleware-context' - fullPath: '/api/middleware-context' - preLoaderRoute: typeof ApiMiddlewareContextRouteImport - parentRoute: typeof rootRouteImport - } - '/api/only-any': { - id: '/api/only-any' - path: '/api/only-any' - fullPath: '/api/only-any' - preLoaderRoute: typeof ApiOnlyAnyRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/methods/': { @@ -193,6 +179,20 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof MethodsOnlyAnyRouteImport parentRoute: typeof MethodsRouteRoute } + '/api/only-any': { + id: '/api/only-any' + path: '/api/only-any' + fullPath: '/api/only-any' + preLoaderRoute: typeof ApiOnlyAnyRouteImport + parentRoute: typeof rootRouteImport + } + '/api/middleware-context': { + id: '/api/middleware-context' + path: '/api/middleware-context' + fullPath: '/api/middleware-context' + preLoaderRoute: typeof ApiMiddlewareContextRouteImport + parentRoute: typeof rootRouteImport + } '/api/params/$foo': { id: '/api/params/$foo' path: '/api/params/$foo' diff --git a/e2e/vue-start/server-routes/src/routes/__root.tsx b/e2e/vue-start/server-routes/src/routes/__root.tsx index aa4b1f31fa..999d80fff1 100644 --- a/e2e/vue-start/server-routes/src/routes/__root.tsx +++ b/e2e/vue-start/server-routes/src/routes/__root.tsx @@ -25,11 +25,7 @@ export const Route = createRootRoute({ links: [{ rel: 'stylesheet', href: appCss }], }), errorComponent: (props) => { - return ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ) + return

    {props.error.stack}

    }, notFoundComponent: () => , component: RootComponent, diff --git a/e2e/vue-start/spa-mode/package.json b/e2e/vue-start/spa-mode/package.json index c4270cfccd..1795d2d5c4 100644 --- a/e2e/vue-start/spa-mode/package.json +++ b/e2e/vue-start/spa-mode/package.json @@ -9,7 +9,7 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "npx serve dist/client", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", @@ -24,8 +24,7 @@ "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/spa-mode/playwright.config.ts b/e2e/vue-start/spa-mode/playwright.config.ts index 630989e41f..badd6db0eb 100644 --- a/e2e/vue-start/spa-mode/playwright.config.ts +++ b/e2e/vue-start/spa-mode/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** * See https://playwright.dev/docs/test-configuration. @@ -19,8 +20,8 @@ export default defineConfig({ webServer: { command: `VITE_SERVER_PORT=${PORT} pnpm build && NODE_ENV=production PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/spa-mode/src/routeTree.gen.ts b/e2e/vue-start/spa-mode/src/routeTree.gen.ts index 0d44b648ee..474705b7e7 100644 --- a/e2e/vue-start/spa-mode/src/routeTree.gen.ts +++ b/e2e/vue-start/spa-mode/src/routeTree.gen.ts @@ -9,20 +9,20 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostsRouteImport } from './routes/posts' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostsRoute = PostsRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsPostIdRoute = PostsPostIdRouteImport.update({ id: '/$postId', path: '/$postId', @@ -60,13 +60,6 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -74,6 +67,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/$postId': { id: '/posts/$postId' path: '/$postId' diff --git a/e2e/vue-start/spa-mode/src/routes/__root.tsx b/e2e/vue-start/spa-mode/src/routes/__root.tsx index 45aee73c06..1e38664739 100644 --- a/e2e/vue-start/spa-mode/src/routes/__root.tsx +++ b/e2e/vue-start/spa-mode/src/routes/__root.tsx @@ -1,5 +1,4 @@ /// -import { defineComponent } from 'vue' import { Body, ClientOnly, @@ -14,71 +13,6 @@ import { import { TanStackRouterDevtools } from '@tanstack/vue-router-devtools' import appCss from '~/styles/app.css?url' -const RootDocument = defineComponent({ - setup(_, { slots }) { - const routerState = useRouterState({ - select: (state) => ({ isLoading: state.isLoading, status: state.status }), - }) - return () => ( - - - - - -
    -

    SPA Mode E2E Test

    - - Home - -
    -
    - -
    - router isLoading:{' '} - - {routerState.value.isLoading ? 'true' : 'false'} - -
    -
    - router status:{' '} - {routerState.value.status} -
    -
    -
    - {slots.default?.()} - - - - - ) - }, -}) - -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => ( -
    -

    root

    -
    - loader: {loaderData.value.root} -
    -
    - context: {context.value.root} -
    -
    - -
    - ) - }, -}) - export const Route = createRootRoute({ head: () => ({ meta: [ @@ -110,6 +44,65 @@ export const Route = createRootRoute({ return { root: typeof window === 'undefined' ? 'server' : 'client' } }, shellComponent: RootDocument, - component: RouteComponent, + component: () => { + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + return ( +
    +

    root

    +
    + loader: {loaderData.value.root} +
    +
    + context: {context.value.root} +
    +
    + +
    + ) + }, pendingComponent: () =>
    __root Loading...
    , }) + +function RootDocument(_: unknown, { slots }: { slots: any }) { + const routerState = useRouterState({ + select: (state) => ({ isLoading: state.isLoading, status: state.status }), + }) + return ( + + + + + +
    +

    SPA Mode E2E Test

    + + Home + +
    +
    + +
    + router isLoading:{' '} + + {routerState.value.isLoading ? 'true' : 'false'} + +
    +
    + router status:{' '} + {routerState.value.status} +
    +
    +
    + {slots.default?.()} + + + + + ) +} diff --git a/e2e/vue-start/spa-mode/src/routes/posts.$postId.tsx b/e2e/vue-start/spa-mode/src/routes/posts.$postId.tsx index 9c25cbad25..6733ef7436 100644 --- a/e2e/vue-start/spa-mode/src/routes/posts.$postId.tsx +++ b/e2e/vue-start/spa-mode/src/routes/posts.$postId.tsx @@ -1,24 +1,5 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => ( -
    -

    postId

    -
    - loader: {loaderData.value.postId} -
    -
    - context: {context.value.postId} -
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ beforeLoad: () => { console.log( @@ -34,6 +15,20 @@ export const Route = createFileRoute('/posts/$postId')({ ) return { postId: typeof window === 'undefined' ? 'server' : 'client' } }, - component: RouteComponent, + component: () => { + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + return ( +
    +

    postId

    +
    + loader: {loaderData.value.postId} +
    +
    + context: {context.value.postId} +
    +
    + ) + }, pendingComponent: () =>
    $postId Loading...
    , }) diff --git a/e2e/vue-start/spa-mode/src/routes/posts.tsx b/e2e/vue-start/spa-mode/src/routes/posts.tsx index 44c536adc4..e69ae1ea86 100644 --- a/e2e/vue-start/spa-mode/src/routes/posts.tsx +++ b/e2e/vue-start/spa-mode/src/routes/posts.tsx @@ -1,26 +1,5 @@ -import { defineComponent } from 'vue' import { Outlet, createFileRoute } from '@tanstack/vue-router' -const RouteComponent = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - const context = Route.useRouteContext() - return () => ( -
    -

    posts

    -
    - loader: {loaderData.value.posts} -
    -
    - context: {context.value.posts} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ beforeLoad: () => { console.log( @@ -37,6 +16,22 @@ export const Route = createFileRoute('/posts')({ return { posts: typeof window === 'undefined' ? 'server' : 'client' } }, - component: RouteComponent, + component: () => { + const loaderData = Route.useLoaderData() + const context = Route.useRouteContext() + return ( +
    +

    posts

    +
    + loader: {loaderData.value.posts} +
    +
    + context: {context.value.posts} +
    +
    + +
    + ) + }, pendingComponent: () =>
    posts Loading...
    , }) diff --git a/e2e/vue-start/start-manifest/package.json b/e2e/vue-start/start-manifest/package.json index ae682f7a9d..841aa5da85 100644 --- a/e2e/vue-start/start-manifest/package.json +++ b/e2e/vue-start/start-manifest/package.json @@ -15,13 +15,12 @@ "vue": "^3.5.16" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "srvx": "^0.11.9", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "nx": { diff --git a/e2e/vue-start/start-manifest/playwright.config.ts b/e2e/vue-start/start-manifest/playwright.config.ts index 653e08253f..b9f835c16a 100644 --- a/e2e/vue-start/start-manifest/playwright.config.ts +++ b/e2e/vue-start/start-manifest/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` export default defineConfig({ @@ -15,8 +16,8 @@ export default defineConfig({ webServer: { command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/start-manifest/src/routeTree.gen.ts b/e2e/vue-start/start-manifest/src/routeTree.gen.ts index fc42a1e404..357d3be62b 100644 --- a/e2e/vue-start/start-manifest/src/routeTree.gen.ts +++ b/e2e/vue-start/start-manifest/src/routeTree.gen.ts @@ -9,79 +9,24 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ARouteImport } from './routes/a' -import { Route as BRouteImport } from './routes/b' -import { Route as LazyCssLazyRouteImport } from './routes/lazy-css-lazy' -import { Route as LazyCssStaticRouteImport } from './routes/lazy-css-static' -import { Route as R1RouteImport } from './routes/r1' -import { Route as R2RouteImport } from './routes/r2' -import { Route as R3RouteImport } from './routes/r3' -import { Route as R4RouteImport } from './routes/r4' -import { Route as R5RouteImport } from './routes/r5' -import { Route as R6RouteImport } from './routes/r6' -import { Route as SharedARouteImport } from './routes/shared-a' -import { Route as SharedBRouteImport } from './routes/shared-b' import { Route as SharedCRouteImport } from './routes/shared-c' +import { Route as SharedBRouteImport } from './routes/shared-b' +import { Route as SharedARouteImport } from './routes/shared-a' +import { Route as R6RouteImport } from './routes/r6' +import { Route as R5RouteImport } from './routes/r5' +import { Route as R4RouteImport } from './routes/r4' +import { Route as R3RouteImport } from './routes/r3' +import { Route as R2RouteImport } from './routes/r2' +import { Route as R1RouteImport } from './routes/r1' +import { Route as LazyCssStaticRouteImport } from './routes/lazy-css-static' +import { Route as LazyCssLazyRouteImport } from './routes/lazy-css-lazy' +import { Route as BRouteImport } from './routes/b' +import { Route as ARouteImport } from './routes/a' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const ARoute = ARouteImport.update({ - id: '/a', - path: '/a', - getParentRoute: () => rootRouteImport, -} as any) -const BRoute = BRouteImport.update({ - id: '/b', - path: '/b', - getParentRoute: () => rootRouteImport, -} as any) -const LazyCssLazyRoute = LazyCssLazyRouteImport.update({ - id: '/lazy-css-lazy', - path: '/lazy-css-lazy', - getParentRoute: () => rootRouteImport, -} as any) -const LazyCssStaticRoute = LazyCssStaticRouteImport.update({ - id: '/lazy-css-static', - path: '/lazy-css-static', - getParentRoute: () => rootRouteImport, -} as any) -const R1Route = R1RouteImport.update({ - id: '/r1', - path: '/r1', - getParentRoute: () => rootRouteImport, -} as any) -const R2Route = R2RouteImport.update({ - id: '/r2', - path: '/r2', - getParentRoute: () => rootRouteImport, -} as any) -const R3Route = R3RouteImport.update({ - id: '/r3', - path: '/r3', - getParentRoute: () => rootRouteImport, -} as any) -const R4Route = R4RouteImport.update({ - id: '/r4', - path: '/r4', - getParentRoute: () => rootRouteImport, -} as any) -const R5Route = R5RouteImport.update({ - id: '/r5', - path: '/r5', - getParentRoute: () => rootRouteImport, -} as any) -const R6Route = R6RouteImport.update({ - id: '/r6', - path: '/r6', - getParentRoute: () => rootRouteImport, -} as any) -const SharedARoute = SharedARouteImport.update({ - id: '/shared-a', - path: '/shared-a', +const SharedCRoute = SharedCRouteImport.update({ + id: '/shared-c', + path: '/shared-c', getParentRoute: () => rootRouteImport, } as any) const SharedBRoute = SharedBRouteImport.update({ @@ -89,9 +34,64 @@ const SharedBRoute = SharedBRouteImport.update({ path: '/shared-b', getParentRoute: () => rootRouteImport, } as any) -const SharedCRoute = SharedCRouteImport.update({ - id: '/shared-c', - path: '/shared-c', +const SharedARoute = SharedARouteImport.update({ + id: '/shared-a', + path: '/shared-a', + getParentRoute: () => rootRouteImport, +} as any) +const R6Route = R6RouteImport.update({ + id: '/r6', + path: '/r6', + getParentRoute: () => rootRouteImport, +} as any) +const R5Route = R5RouteImport.update({ + id: '/r5', + path: '/r5', + getParentRoute: () => rootRouteImport, +} as any) +const R4Route = R4RouteImport.update({ + id: '/r4', + path: '/r4', + getParentRoute: () => rootRouteImport, +} as any) +const R3Route = R3RouteImport.update({ + id: '/r3', + path: '/r3', + getParentRoute: () => rootRouteImport, +} as any) +const R2Route = R2RouteImport.update({ + id: '/r2', + path: '/r2', + getParentRoute: () => rootRouteImport, +} as any) +const R1Route = R1RouteImport.update({ + id: '/r1', + path: '/r1', + getParentRoute: () => rootRouteImport, +} as any) +const LazyCssStaticRoute = LazyCssStaticRouteImport.update({ + id: '/lazy-css-static', + path: '/lazy-css-static', + getParentRoute: () => rootRouteImport, +} as any) +const LazyCssLazyRoute = LazyCssLazyRouteImport.update({ + id: '/lazy-css-lazy', + path: '/lazy-css-lazy', + getParentRoute: () => rootRouteImport, +} as any) +const BRoute = BRouteImport.update({ + id: '/b', + path: '/b', + getParentRoute: () => rootRouteImport, +} as any) +const ARoute = ARouteImport.update({ + id: '/a', + path: '/a', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) @@ -214,88 +214,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/a': { - id: '/a' - path: '/a' - fullPath: '/a' - preLoaderRoute: typeof ARouteImport - parentRoute: typeof rootRouteImport - } - '/b': { - id: '/b' - path: '/b' - fullPath: '/b' - preLoaderRoute: typeof BRouteImport - parentRoute: typeof rootRouteImport - } - '/lazy-css-lazy': { - id: '/lazy-css-lazy' - path: '/lazy-css-lazy' - fullPath: '/lazy-css-lazy' - preLoaderRoute: typeof LazyCssLazyRouteImport - parentRoute: typeof rootRouteImport - } - '/lazy-css-static': { - id: '/lazy-css-static' - path: '/lazy-css-static' - fullPath: '/lazy-css-static' - preLoaderRoute: typeof LazyCssStaticRouteImport - parentRoute: typeof rootRouteImport - } - '/r1': { - id: '/r1' - path: '/r1' - fullPath: '/r1' - preLoaderRoute: typeof R1RouteImport - parentRoute: typeof rootRouteImport - } - '/r2': { - id: '/r2' - path: '/r2' - fullPath: '/r2' - preLoaderRoute: typeof R2RouteImport - parentRoute: typeof rootRouteImport - } - '/r3': { - id: '/r3' - path: '/r3' - fullPath: '/r3' - preLoaderRoute: typeof R3RouteImport - parentRoute: typeof rootRouteImport - } - '/r4': { - id: '/r4' - path: '/r4' - fullPath: '/r4' - preLoaderRoute: typeof R4RouteImport - parentRoute: typeof rootRouteImport - } - '/r5': { - id: '/r5' - path: '/r5' - fullPath: '/r5' - preLoaderRoute: typeof R5RouteImport - parentRoute: typeof rootRouteImport - } - '/r6': { - id: '/r6' - path: '/r6' - fullPath: '/r6' - preLoaderRoute: typeof R6RouteImport - parentRoute: typeof rootRouteImport - } - '/shared-a': { - id: '/shared-a' - path: '/shared-a' - fullPath: '/shared-a' - preLoaderRoute: typeof SharedARouteImport + '/shared-c': { + id: '/shared-c' + path: '/shared-c' + fullPath: '/shared-c' + preLoaderRoute: typeof SharedCRouteImport parentRoute: typeof rootRouteImport } '/shared-b': { @@ -305,11 +228,88 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SharedBRouteImport parentRoute: typeof rootRouteImport } - '/shared-c': { - id: '/shared-c' - path: '/shared-c' - fullPath: '/shared-c' - preLoaderRoute: typeof SharedCRouteImport + '/shared-a': { + id: '/shared-a' + path: '/shared-a' + fullPath: '/shared-a' + preLoaderRoute: typeof SharedARouteImport + parentRoute: typeof rootRouteImport + } + '/r6': { + id: '/r6' + path: '/r6' + fullPath: '/r6' + preLoaderRoute: typeof R6RouteImport + parentRoute: typeof rootRouteImport + } + '/r5': { + id: '/r5' + path: '/r5' + fullPath: '/r5' + preLoaderRoute: typeof R5RouteImport + parentRoute: typeof rootRouteImport + } + '/r4': { + id: '/r4' + path: '/r4' + fullPath: '/r4' + preLoaderRoute: typeof R4RouteImport + parentRoute: typeof rootRouteImport + } + '/r3': { + id: '/r3' + path: '/r3' + fullPath: '/r3' + preLoaderRoute: typeof R3RouteImport + parentRoute: typeof rootRouteImport + } + '/r2': { + id: '/r2' + path: '/r2' + fullPath: '/r2' + preLoaderRoute: typeof R2RouteImport + parentRoute: typeof rootRouteImport + } + '/r1': { + id: '/r1' + path: '/r1' + fullPath: '/r1' + preLoaderRoute: typeof R1RouteImport + parentRoute: typeof rootRouteImport + } + '/lazy-css-static': { + id: '/lazy-css-static' + path: '/lazy-css-static' + fullPath: '/lazy-css-static' + preLoaderRoute: typeof LazyCssStaticRouteImport + parentRoute: typeof rootRouteImport + } + '/lazy-css-lazy': { + id: '/lazy-css-lazy' + path: '/lazy-css-lazy' + fullPath: '/lazy-css-lazy' + preLoaderRoute: typeof LazyCssLazyRouteImport + parentRoute: typeof rootRouteImport + } + '/b': { + id: '/b' + path: '/b' + fullPath: '/b' + preLoaderRoute: typeof BRouteImport + parentRoute: typeof rootRouteImport + } + '/a': { + id: '/a' + path: '/a' + fullPath: '/a' + preLoaderRoute: typeof ARouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } } 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 4d5bea0a33..6c0f0d15ab 100644 --- a/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts +++ b/e2e/vue-start/start-manifest/tests/start-manifest.spec.ts @@ -372,19 +372,24 @@ test('shared widget CSS stays applied when navigating from static to lazy route' const widget = page.getByTestId('shared-widget') await expect(widget).toBeVisible() - await expect(widget).toHaveCSS('background-color', SHARED_WIDGET_BG) - await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER) + expect(await getBackgroundColor('shared-widget', page)).toBe(SHARED_WIDGET_BG) + expect( + await widget.evaluate( + (element) => getComputedStyle(element).borderTopColor, + ), + ).toBe(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(widget).toHaveCSS('background-color', SHARED_WIDGET_BG) - await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER) + await expect + .poll(() => getBackgroundColor('shared-widget', page), { + timeout: 5_000, + }) + .toBe(SHARED_WIDGET_BG) }) test('shared widget CSS stays applied when navigating from lazy to static route', async ({ @@ -394,19 +399,27 @@ 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() - 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 expect + .poll(() => getBackgroundColor('shared-widget', page), { + timeout: 5_000, + }) + .toBe(SHARED_WIDGET_BG) 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(widget).toHaveCSS('background-color', SHARED_WIDGET_BG) - await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER) + 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) }) test('shared widget CSS is applied on direct navigation to lazy route', async ({ @@ -418,8 +431,17 @@ 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(widget).toHaveCSS('background-color', SHARED_WIDGET_BG) - await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER) + + 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) }) test('shared widget CSS persists after navigating away from lazy and back', async ({ @@ -429,21 +451,19 @@ 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('lazy-css-lazy-heading')).toBeVisible() - await expect(widget).toBeVisible() + await expect(page.getByTestId('shared-widget')).toBeVisible() await page.getByTestId('nav-home').click() - await page.waitForURL((url) => url.pathname === '/') - await expect(page.getByTestId('home-copy')).toBeVisible() + await page.waitForURL(/\/([^/]*)(\/)?($|\?)/) 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(widget).toHaveCSS('background-color', SHARED_WIDGET_BG) - await expect(widget).toHaveCSS('border-top-color', SHARED_WIDGET_BORDER) + await expect + .poll(() => getBackgroundColor('shared-widget', page), { + timeout: 5_000, + }) + .toBe(SHARED_WIDGET_BG) }) diff --git a/e2e/vue-start/streaming-ssr/package.json b/e2e/vue-start/streaming-ssr/package.json deleted file mode 100644 index 382120860a..0000000000 --- a/e2e/vue-start/streaming-ssr/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "tanstack-vue-start-e2e-streaming-ssr", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "dev": "vite dev --port 3000", - "dev:e2e": "vite dev", - "build": "vite build && tsc --noEmit", - "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "preview": "vite preview", - "test:e2e": "playwright test --project=chromium", - "test:e2e:preview": "MODE=preview playwright test preview-streaming.spec.ts --project=chromium" - }, - "dependencies": { - "@tanstack/vue-query": "^5.90.0", - "@tanstack/vue-router": "workspace:^", - "@tanstack/vue-router-ssr-query": "workspace:^", - "@tanstack/vue-start": "workspace:^", - "vue": "^3.5.16" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@tanstack/router-e2e-utils": "workspace:^", - "@types/node": "^22.10.2", - "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" - }, - "nx": { - "targets": { - "build": { - "inputs": [ - "buildProduction", - "^buildProduction", - "dependentTaskOutputs", - "streamingSsrTests" - ] - }, - "test:e2e": { - "inputs": [ - "default", - "^production", - "dependentTaskOutputs", - "streamingSsrTests" - ] - }, - "test:e2e:preview": { - "inputs": [ - "default", - "^production", - "streamingSsrTests" - ] - } - } - } -} diff --git a/e2e/vue-start/streaming-ssr/playwright.config.ts b/e2e/vue-start/streaming-ssr/playwright.config.ts deleted file mode 100644 index c2f3b67a0c..0000000000 --- a/e2e/vue-start/streaming-ssr/playwright.config.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' - -const isPreview = process.env.MODE === 'preview' - -const PORT = Number(process.env.E2E_APP_PORT ?? 0) -const baseURL = `http://localhost:${PORT}` - -const ssrCommand = `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start` -const previewCommand = `VITE_SERVER_PORT=${PORT} pnpm build && pnpm preview --port ${PORT}` - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - testDir: './tests', - workers: 1, - - reporter: [['line']], - - use: { - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL, - }, - - webServer: { - command: isPreview ? previewCommand : ssrCommand, - wait: appServerReady, - reuseExistingServer: false, - stdout: 'pipe', - }, - - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - ], -}) diff --git a/e2e/vue-start/streaming-ssr/src/routeTree.gen.ts b/e2e/vue-start/streaming-ssr/src/routeTree.gen.ts deleted file mode 100644 index ac4c9ab156..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routeTree.gen.ts +++ /dev/null @@ -1,282 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as ConcurrentRouteImport } from './routes/concurrent' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as DeferredRejectionRouteImport } from './routes/deferred-rejection' -import { Route as FastSerialRouteImport } from './routes/fast-serial' -import { Route as ManyPromisesRouteImport } from './routes/many-promises' -import { Route as NestedDeferredRouteImport } from './routes/nested-deferred' -import { Route as QueryHeavyRouteImport } from './routes/query-heavy' -import { Route as SlowRenderRouteImport } from './routes/slow-render' -import { Route as StreamRouteImport } from './routes/stream' -import { Route as SyncOnlyRouteImport } from './routes/sync-only' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const ConcurrentRoute = ConcurrentRouteImport.update({ - id: '/concurrent', - path: '/concurrent', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRejectionRoute = DeferredRejectionRouteImport.update({ - id: '/deferred-rejection', - path: '/deferred-rejection', - getParentRoute: () => rootRouteImport, -} as any) -const FastSerialRoute = FastSerialRouteImport.update({ - id: '/fast-serial', - path: '/fast-serial', - getParentRoute: () => rootRouteImport, -} as any) -const ManyPromisesRoute = ManyPromisesRouteImport.update({ - id: '/many-promises', - path: '/many-promises', - getParentRoute: () => rootRouteImport, -} as any) -const NestedDeferredRoute = NestedDeferredRouteImport.update({ - id: '/nested-deferred', - path: '/nested-deferred', - getParentRoute: () => rootRouteImport, -} as any) -const QueryHeavyRoute = QueryHeavyRouteImport.update({ - id: '/query-heavy', - path: '/query-heavy', - getParentRoute: () => rootRouteImport, -} as any) -const SlowRenderRoute = SlowRenderRouteImport.update({ - id: '/slow-render', - path: '/slow-render', - getParentRoute: () => rootRouteImport, -} as any) -const StreamRoute = StreamRouteImport.update({ - id: '/stream', - path: '/stream', - getParentRoute: () => rootRouteImport, -} as any) -const SyncOnlyRoute = SyncOnlyRouteImport.update({ - id: '/sync-only', - path: '/sync-only', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/concurrent': typeof ConcurrentRoute - '/deferred': typeof DeferredRoute - '/deferred-rejection': typeof DeferredRejectionRoute - '/fast-serial': typeof FastSerialRoute - '/many-promises': typeof ManyPromisesRoute - '/nested-deferred': typeof NestedDeferredRoute - '/query-heavy': typeof QueryHeavyRoute - '/slow-render': typeof SlowRenderRoute - '/stream': typeof StreamRoute - '/sync-only': typeof SyncOnlyRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/concurrent': typeof ConcurrentRoute - '/deferred': typeof DeferredRoute - '/deferred-rejection': typeof DeferredRejectionRoute - '/fast-serial': typeof FastSerialRoute - '/many-promises': typeof ManyPromisesRoute - '/nested-deferred': typeof NestedDeferredRoute - '/query-heavy': typeof QueryHeavyRoute - '/slow-render': typeof SlowRenderRoute - '/stream': typeof StreamRoute - '/sync-only': typeof SyncOnlyRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/concurrent': typeof ConcurrentRoute - '/deferred': typeof DeferredRoute - '/deferred-rejection': typeof DeferredRejectionRoute - '/fast-serial': typeof FastSerialRoute - '/many-promises': typeof ManyPromisesRoute - '/nested-deferred': typeof NestedDeferredRoute - '/query-heavy': typeof QueryHeavyRoute - '/slow-render': typeof SlowRenderRoute - '/stream': typeof StreamRoute - '/sync-only': typeof SyncOnlyRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - | '/' - | '/concurrent' - | '/deferred' - | '/deferred-rejection' - | '/fast-serial' - | '/many-promises' - | '/nested-deferred' - | '/query-heavy' - | '/slow-render' - | '/stream' - | '/sync-only' - fileRoutesByTo: FileRoutesByTo - to: - | '/' - | '/concurrent' - | '/deferred' - | '/deferred-rejection' - | '/fast-serial' - | '/many-promises' - | '/nested-deferred' - | '/query-heavy' - | '/slow-render' - | '/stream' - | '/sync-only' - id: - | '__root__' - | '/' - | '/concurrent' - | '/deferred' - | '/deferred-rejection' - | '/fast-serial' - | '/many-promises' - | '/nested-deferred' - | '/query-heavy' - | '/slow-render' - | '/stream' - | '/sync-only' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - ConcurrentRoute: typeof ConcurrentRoute - DeferredRoute: typeof DeferredRoute - DeferredRejectionRoute: typeof DeferredRejectionRoute - FastSerialRoute: typeof FastSerialRoute - ManyPromisesRoute: typeof ManyPromisesRoute - NestedDeferredRoute: typeof NestedDeferredRoute - QueryHeavyRoute: typeof QueryHeavyRoute - SlowRenderRoute: typeof SlowRenderRoute - StreamRoute: typeof StreamRoute - SyncOnlyRoute: typeof SyncOnlyRoute -} - -declare module '@tanstack/vue-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/concurrent': { - id: '/concurrent' - path: '/concurrent' - fullPath: '/concurrent' - preLoaderRoute: typeof ConcurrentRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred-rejection': { - id: '/deferred-rejection' - path: '/deferred-rejection' - fullPath: '/deferred-rejection' - preLoaderRoute: typeof DeferredRejectionRouteImport - parentRoute: typeof rootRouteImport - } - '/fast-serial': { - id: '/fast-serial' - path: '/fast-serial' - fullPath: '/fast-serial' - preLoaderRoute: typeof FastSerialRouteImport - parentRoute: typeof rootRouteImport - } - '/many-promises': { - id: '/many-promises' - path: '/many-promises' - fullPath: '/many-promises' - preLoaderRoute: typeof ManyPromisesRouteImport - parentRoute: typeof rootRouteImport - } - '/nested-deferred': { - id: '/nested-deferred' - path: '/nested-deferred' - fullPath: '/nested-deferred' - preLoaderRoute: typeof NestedDeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/query-heavy': { - id: '/query-heavy' - path: '/query-heavy' - fullPath: '/query-heavy' - preLoaderRoute: typeof QueryHeavyRouteImport - parentRoute: typeof rootRouteImport - } - '/slow-render': { - id: '/slow-render' - path: '/slow-render' - fullPath: '/slow-render' - preLoaderRoute: typeof SlowRenderRouteImport - parentRoute: typeof rootRouteImport - } - '/stream': { - id: '/stream' - path: '/stream' - fullPath: '/stream' - preLoaderRoute: typeof StreamRouteImport - parentRoute: typeof rootRouteImport - } - '/sync-only': { - id: '/sync-only' - path: '/sync-only' - fullPath: '/sync-only' - preLoaderRoute: typeof SyncOnlyRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - ConcurrentRoute: ConcurrentRoute, - DeferredRoute: DeferredRoute, - DeferredRejectionRoute: DeferredRejectionRoute, - FastSerialRoute: FastSerialRoute, - ManyPromisesRoute: ManyPromisesRoute, - NestedDeferredRoute: NestedDeferredRoute, - QueryHeavyRoute: QueryHeavyRoute, - SlowRenderRoute: SlowRenderRoute, - StreamRoute: StreamRoute, - SyncOnlyRoute: SyncOnlyRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/vue-start' -declare module '@tanstack/vue-start' { - interface Register { - ssr: true - router: Awaited> - } -} diff --git a/e2e/vue-start/streaming-ssr/src/router.tsx b/e2e/vue-start/streaming-ssr/src/router.tsx deleted file mode 100644 index 257eb8dac9..0000000000 --- a/e2e/vue-start/streaming-ssr/src/router.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { QueryClient } from '@tanstack/vue-query' -import { createRouter } from '@tanstack/vue-router' -import { setupRouterSsrQueryIntegration } from '@tanstack/vue-router-ssr-query' -import { routeTree } from './routeTree.gen' - -export function getRouter() { - const queryClient = new QueryClient() - const router = createRouter({ - routeTree, - context: { queryClient }, - scrollRestoration: true, - }) - setupRouterSsrQueryIntegration({ - router, - queryClient, - }) - return router -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/__root.tsx b/e2e/vue-start/streaming-ssr/src/routes/__root.tsx deleted file mode 100644 index d3b3339720..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/__root.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { - Body, - HeadContent, - Html, - Link, - Outlet, - Scripts, - createRootRouteWithContext, -} from '@tanstack/vue-router' -import { defineComponent, ref } from 'vue' -import type { QueryClient } from '@tanstack/vue-query' - -export const Route = createRootRouteWithContext<{ - queryClient: QueryClient -}>()({ - head: () => ({ - meta: [ - { charSet: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { title: 'Streaming SSR Tests' }, - ], - }), - component: RootComponent, -}) - -function RootComponent() { - return ( - - - - - - - - - - - - ) -} - -const HydrationCheck = defineComponent({ - setup() { - const status = ref<'pending' | 'hydrated'>('pending') - - return () => ( -
    - - - {status.value} - -
    - ) - }, -}) diff --git a/e2e/vue-start/streaming-ssr/src/routes/concurrent.tsx b/e2e/vue-start/streaming-ssr/src/routes/concurrent.tsx deleted file mode 100644 index 5fed8ab517..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/concurrent.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { Suspense } from 'vue' -import { createConcurrentLoaderData } from '../../../../streaming-ssr-fixtures' - -export const Route = createFileRoute('/concurrent')({ - loader: async () => createConcurrentLoaderData(), - component: Concurrent, -}) - -function PromiseItem(props: { promise: Promise; testId: string }) { - return ( - - {{ - default: () => ( - ( -
    {value}
    - )} - /> - ), - fallback: () => ( -
    Loading...
    - ), - }} -
    - ) -} - -function Concurrent() { - const data = Route.useLoaderData() - - return ( -
    -

    Concurrent Resolution Test (15 promises in 3 batches)

    -

    Tests multiple promises resolving at the exact same instant.

    - - - - - - - - - - - - - - - -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/deferred-rejection.tsx b/e2e/vue-start/streaming-ssr/src/routes/deferred-rejection.tsx deleted file mode 100644 index 5018f9e07c..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/deferred-rejection.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { Suspense } from 'vue' -import { - deferredDataDelay, - deferredErrorMessage, -} from '../../../../streaming-ssr-fixtures' - -export const Route = createFileRoute('/deferred-rejection')({ - loader: async () => { - return { - deferredData: new Promise((_resolve, reject) => { - setTimeout(() => { - reject(new Error(deferredErrorMessage)) - }, deferredDataDelay) - }), - } - }, - errorComponent: ({ error }) => ( -
    - {error instanceof Error ? error.message : String(error)} -
    - ), - component: DeferredRejection, -}) - -function DeferredRejection() { - const data = Route.useLoaderData() - - return ( -
    -

    Deferred Rejection Test

    - - {{ - default: () => ( - ( -
    {value}
    - )} - /> - ), - fallback: () => ( -
    Loading deferred...
    - ), - }} -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/deferred.tsx b/e2e/vue-start/streaming-ssr/src/routes/deferred.tsx deleted file mode 100644 index 6a8affe1b4..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/deferred.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { createServerFn } from '@tanstack/vue-start' -import { Suspense } from 'vue' -import { - deferredDataDelay, - deferredDataMessage, - deferredImmediateName, - deferredServerDelay, - deferredSlowName, - delay, - makeDeferredMessage, - makeServerData, - sourceMarker, -} from '../../../../streaming-ssr-fixtures' - -const getImmediateData = createServerFn({ method: 'GET' }) - .validator((data: { name: string }) => data) - .handler(({ data }) => makeServerData(data.name)) - -const getSlowData = createServerFn({ method: 'GET' }) - .validator((data: { name: string; delay: number }) => data) - .handler(async ({ data }) => { - await delay(data.delay) - return makeServerData(data.name) - }) - -export const Route = createFileRoute('/deferred')({ - loader: async () => { - return { - deferredData: makeDeferredMessage(deferredDataMessage, deferredDataDelay), - deferredServerData: getSlowData({ - data: { name: deferredSlowName, delay: deferredServerDelay }, - }), - immediateData: await getImmediateData({ - data: { name: deferredImmediateName }, - }), - loaderSource: sourceMarker(), - } - }, - component: Deferred, -}) - -function Deferred() { - const data = Route.useLoaderData() - - return ( -
    -

    Deferred Data Test

    -
    - Immediate: {data.value.immediateData.name} @{' '} - {data.value.immediateData.timestamp} -
    -
    - Immediate source: {data.value.immediateData.source} -
    -
    - Loader source: {data.value.loaderSource} -
    - - {{ - default: () => ( - ( -
    - {value.message} (source: {value.source}) -
    - )} - /> - ), - fallback: () => ( -
    Loading deferred...
    - ), - }} -
    - - {{ - default: () => ( - ( -
    - Server: {value.name} @ {value.timestamp} (source:{' '} - {value.source}) -
    - )} - /> - ), - fallback: () => ( -
    Loading server data...
    - ), - }} -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/fast-serial.tsx b/e2e/vue-start/streaming-ssr/src/routes/fast-serial.tsx deleted file mode 100644 index ac004b041c..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/fast-serial.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { createFileRoute } from '@tanstack/vue-router' -import { createServerFn } from '@tanstack/vue-start' -import { - fastSerialStaticData, - makeFastSerialSmallData, - sourceMarker, -} from '../../../../streaming-ssr-fixtures' - -const getSmallData = createServerFn({ method: 'GET' }).handler(() => - makeFastSerialSmallData(), -) - -export const Route = createFileRoute('/fast-serial')({ - loader: async () => { - const data = await getSmallData() - return { - serverData: data, - staticData: fastSerialStaticData, - timestamp: Date.now(), - loaderSource: sourceMarker(), - } - }, - component: FastSerial, -}) - -function FastSerial() { - const data = Route.useLoaderData() - - return ( -
    -

    Fast Serialization Test

    -

    This route tests when serialization completes before render.

    -
    - Server: {data.value.serverData.value} @{' '} - {data.value.serverData.timestamp} -
    -
    - Server function source: {data.value.serverData.source} -
    -
    - Loader source: {data.value.loaderSource} -
    -
    Static: {data.value.staticData}
    -
    - Loader timestamp: {data.value.timestamp} -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/index.tsx b/e2e/vue-start/streaming-ssr/src/routes/index.tsx deleted file mode 100644 index 0350eb5d4a..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { Link, createFileRoute } from '@tanstack/vue-router' - -export const Route = createFileRoute('/')({ - component: Index, -}) - -function Index() { - return ( -
    -

    Streaming SSR Test Scenarios

    -

    This e2e project tests various SSR streaming scenarios:

    -
      -
    • - - Sync Only - {' '} - - Tests synchronous serialization with no deferred/streaming data -
    • -
    • - - Deferred Data - {' '} - - Tests deferred promises resolving after initial render -
    • -
    • - - Deferred Rejection - {' '} - - Tests deferred promise rejections render through the error boundary -
    • -
    • - - ReadableStream - {' '} - - Tests streaming data via ReadableStream -
    • -
    • - - Fast Serialization - {' '} - - Tests when serialization completes before render finishes -
    • -
    • - - Slow Render - {' '} - - Tests when render takes longer than serialization -
    • -
    • - - Nested Deferred - {' '} - - Tests nested components with deferred data -
    • -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/many-promises.tsx b/e2e/vue-start/streaming-ssr/src/routes/many-promises.tsx deleted file mode 100644 index 4361696107..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/many-promises.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { Suspense } from 'vue' -import { createManyPromises } from '../../../../streaming-ssr-fixtures' - -export const Route = createFileRoute('/many-promises')({ - loader: async () => createManyPromises(), - component: ManyPromises, -}) - -function PromiseItem(props: { - promise: Promise - testId: string - label: string -}) { - return ( - - {{ - default: () => ( - ( -
    - {props.label}: {value} -
    - )} - /> - ), - fallback: () => ( -
    - Loading {props.label}... -
    - ), - }} -
    - ) -} - -function ManyPromises() { - const data = Route.useLoaderData() - - return ( -
    -

    Many Promises Test (15 deferred)

    -

    Tests streaming with many concurrent deferred promises.

    - - - - - - - - - - - - - - - -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/nested-deferred.tsx b/e2e/vue-start/streaming-ssr/src/routes/nested-deferred.tsx deleted file mode 100644 index b24336ec40..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/nested-deferred.tsx +++ /dev/null @@ -1,143 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { createServerFn } from '@tanstack/vue-start' -import { Suspense } from 'vue' -import { - delay, - makeDeferred, - makeLevelData, - nestedLevelDelays, - nestedPlainDelay, - nestedPlainMessage, -} from '../../../../streaming-ssr-fixtures' - -const getLevel1Data = createServerFn({ method: 'GET' }).handler(async () => { - await delay(nestedLevelDelays[0]) - return makeLevelData(1) -}) - -const getLevel2Data = createServerFn({ method: 'GET' }).handler(async () => { - await delay(nestedLevelDelays[1]) - return makeLevelData(2) -}) - -const getLevel3Data = createServerFn({ method: 'GET' }).handler(async () => { - await delay(nestedLevelDelays[2]) - return makeLevelData(3) -}) - -export const Route = createFileRoute('/nested-deferred')({ - loader: async () => { - return { - level1: getLevel1Data(), - level2: getLevel2Data(), - level3: getLevel3Data(), - plainDeferred: makeDeferred(nestedPlainMessage, nestedPlainDelay), - } - }, - component: NestedDeferred, -}) - -function Level2Content(props: { - level3: Promise<{ level: number; timestamp: number }> -}) { - return ( -
    - - {{ - default: () => ( - ( -
    - Level 3: {value.level} @ {value.timestamp} -
    - )} - /> - ), - fallback: () => ( -
    Loading level 3...
    - ), - }} -
    -
    - ) -} - -function Level1Content(props: { - level2: Promise<{ level: number; timestamp: number }> - level3: Promise<{ level: number; timestamp: number }> -}) { - return ( -
    - - {{ - default: () => ( - ( -
    - Level 2: {value.level} @ {value.timestamp} - -
    - )} - /> - ), - fallback: () => ( -
    Loading level 2...
    - ), - }} -
    -
    - ) -} - -function NestedDeferred() { - const data = Route.useLoaderData() - - return ( -
    -

    Nested Deferred Test

    -

    - Tests multiple nested deferred promises resolving at different times. -

    - - {{ - default: () => ( - ( -
    {value}
    - )} - /> - ), - fallback: () => ( -
    Loading plain...
    - ), - }} -
    -
    - - {{ - default: () => ( - ( -
    - Level 1: {value.level} @ {value.timestamp} - -
    - )} - /> - ), - fallback: () => ( -
    Loading level 1...
    - ), - }} -
    -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/query-heavy.tsx b/e2e/vue-start/streaming-ssr/src/routes/query-heavy.tsx deleted file mode 100644 index b22154b78e..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/query-heavy.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import { queryOptions, useQuery } from '@tanstack/vue-query' -import { createFileRoute } from '@tanstack/vue-router' -import { Suspense, defineComponent } from 'vue' -import type { PropType } from 'vue' - -import { - delay, - makeQueryData, - queryHeavyItems, -} from '../../../../streaming-ssr-fixtures' -import type { QueryData } from '../../../../streaming-ssr-fixtures' - -function makeQueryOptions(item: (typeof queryHeavyItems)[number]) { - return queryOptions({ - queryKey: ['streaming-ssr-query-heavy', item.type, item.id], - queryFn: async (): Promise => { - if (item.delayMs > 0) { - await delay(item.delayMs) - } - - return makeQueryData(item) - }, - staleTime: Infinity, - }) -} - -const syncQuery1 = makeQueryOptions(queryHeavyItems[0]) -const syncQuery2 = makeQueryOptions(queryHeavyItems[1]) -const syncQuery3 = makeQueryOptions(queryHeavyItems[2]) -const fastAsyncQuery1 = makeQueryOptions(queryHeavyItems[3]) -const fastAsyncQuery2 = makeQueryOptions(queryHeavyItems[4]) -const fastAsyncQuery3 = makeQueryOptions(queryHeavyItems[5]) -const slowAsyncQuery1 = makeQueryOptions(queryHeavyItems[6]) -const slowAsyncQuery2 = makeQueryOptions(queryHeavyItems[7]) -const slowAsyncQuery3 = makeQueryOptions(queryHeavyItems[8]) - -type QueryOptions = ReturnType - -const QueryDisplay = defineComponent({ - props: { - queryOpts: { - type: Object as PropType, - required: true, - }, - testId: { - type: String, - required: true, - }, - }, - async setup(props) { - const query = useQuery(props.queryOpts) - await query.suspense() - - return () => { - const data = query.data.value - - return ( -
    - {data?.value} (source: {data?.source}) -
    - ) - } - }, -}) - -function QuerySuspense(props: { - queryOpts: QueryOptions - testId: string - fallback: string -}) { - return ( - - {{ - default: () => ( - - ), - fallback: () => ( -
    {props.fallback}
    - ), - }} -
    - ) -} - -const QueryHeavy = defineComponent({ - setup() { - return () => ( -
    -

    Query Heavy Test (9 useQuery calls)

    -

    Tests multiple useQuery with mixed sync/async queryFn.

    -

    - All queries should show "source: server" if SSR streaming works - correctly. -

    - -
    -
    -

    Sync Queries (immediate)

    - - - -
    - -
    -

    Fast Async Queries (50-100ms)

    - - - -
    - -
    -

    Slow Async Queries (200-400ms)

    - - - -
    -
    -
    - ) - }, -}) - -export const Route = createFileRoute('/query-heavy')({ - component: QueryHeavy, -}) diff --git a/e2e/vue-start/streaming-ssr/src/routes/slow-render.tsx b/e2e/vue-start/streaming-ssr/src/routes/slow-render.tsx deleted file mode 100644 index f897e03ff0..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/slow-render.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/vue-router' -import { createServerFn } from '@tanstack/vue-start' -import { Suspense } from 'vue' -import { - makeDeferredMessage, - makeServerData, - slowRenderComponents, - slowRenderDeferredDelay, - slowRenderDeferredMessage, - slowRenderQuickName, - sourceMarker, -} from '../../../../streaming-ssr-fixtures' - -const getQuickData = createServerFn({ method: 'GET' }).handler(() => - makeServerData(slowRenderQuickName), -) - -function SlowComponent(props: { data: string; index: number }) { - const startTime = Date.now() - while (Date.now() - startTime < 100) { - // Simulate slow render work. - } - return
    {props.data}
    -} - -export const Route = createFileRoute('/slow-render')({ - loader: async () => { - const quickData = await getQuickData() - return { - quickData, - deferredData: makeDeferredMessage( - slowRenderDeferredMessage, - slowRenderDeferredDelay, - ), - loaderSource: sourceMarker(), - } - }, - component: SlowRender, -}) - -function SlowRender() { - const data = Route.useLoaderData() - - return ( -
    -

    Slow Render Test

    -

    Tests when render takes longer than serialization.

    -
    - Quick: {data.value.quickData.name} @ {data.value.quickData.timestamp} -
    -
    - Quick data source: {data.value.quickData.source} -
    -
    - Loader source: {data.value.loaderSource} -
    - - {{ - default: () => ( - ( -
    - {value.message} (source: {value.source}) -
    - )} - /> - ), - fallback: () =>
    Loading...
    , - }} -
    - {slowRenderComponents.map((data, index) => ( - - ))} -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/src/routes/stream.tsx b/e2e/vue-start/streaming-ssr/src/routes/stream.tsx deleted file mode 100644 index 31368bedfc..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/stream.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { Await, createFileRoute, useRouter } from '@tanstack/vue-router' -import { - Suspense, - defineComponent, - onMounted, - onUnmounted, - ref, - watch, -} from 'vue' -import { - createChunkStream, - createStreamPromise, -} from '../../../../streaming-ssr-fixtures' - -export const Route = createFileRoute('/stream')({ - component: () => , - loader() { - return { - promise: createStreamPromise(), - stream: createChunkStream(), - } - }, -}) - -const decoder = new TextDecoder('utf-8') - -const StreamRoute = defineComponent({ - setup() { - const data = Route.useLoaderData() - const router = useRouter() - const streamData = ref>([]) - const streamComplete = ref(false) - const streamReadCount = ref(0) - let reader: ReadableStreamDefaultReader | undefined - let mounted = false - let activeStream: ReadableStream | undefined - let reading = false - let readTimer: ReturnType | undefined - - function clearReadTimer() { - if (readTimer) { - clearTimeout(readTimer) - readTimer = undefined - } - } - - function scheduleRead(delay = 0) { - if (!mounted || reading) { - return - } - - clearReadTimer() - readTimer = setTimeout(() => { - readTimer = undefined - void readStream() - }, delay) - } - - async function readStream() { - const stream = data.value.stream - if (!mounted || reading || activeStream === stream) { - return - } - - if (stream.locked) { - scheduleRead(10) - return - } - - streamData.value = [] - streamComplete.value = false - - let activeReader: ReadableStreamDefaultReader | undefined - - try { - const currentReader = stream.getReader() - activeReader = currentReader - reader = currentReader - activeStream = stream - reading = true - streamReadCount.value++ - - let chunk - while (!(chunk = await currentReader.read()).done) { - let value = chunk.value - if (typeof value !== 'string') { - value = decoder.decode(value, { stream: !chunk.done }) - } - streamData.value = [...streamData.value, value] - } - streamComplete.value = true - } catch (e) { - const message = String(e) - if (e instanceof TypeError && message.includes('locked')) { - activeStream = undefined - scheduleRead(10) - } else if (!(e instanceof TypeError && message.includes('cancelled'))) { - console.error('Stream error:', e) - } - } finally { - activeReader?.releaseLock() - if (reader === activeReader) { - reader = undefined - } - reading = false - if (activeStream !== data.value.stream) { - scheduleRead() - } - } - } - - onMounted(() => { - mounted = true - scheduleRead() - }) - watch( - () => data.value.stream, - () => { - activeStream = undefined - scheduleRead() - }, - ) - onUnmounted(() => { - mounted = false - clearReadTimer() - reader?.cancel().catch(() => {}) - reader = undefined - }) - - return () => ( -
    -

    ReadableStream Test

    - - - {{ - default: () => ( - ( -
    {value}
    - )} - /> - ), - fallback: () => ( -
    Loading promise...
    - ), - }} -
    -
    -

    Stream chunks:

    -
    - {streamData.value.map((chunk, i) => ( -
    {chunk}
    - ))} -
    - {streamComplete.value && ( -
    Stream complete!
    - )} -
    -
    - ) - }, -}) diff --git a/e2e/vue-start/streaming-ssr/src/routes/sync-only.tsx b/e2e/vue-start/streaming-ssr/src/routes/sync-only.tsx deleted file mode 100644 index bbad10839e..0000000000 --- a/e2e/vue-start/streaming-ssr/src/routes/sync-only.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { createFileRoute } from '@tanstack/vue-router' -import { makeSyncOnlyData } from '../../../../streaming-ssr-fixtures' - -export const Route = createFileRoute('/sync-only')({ - loader: async () => makeSyncOnlyData(), - component: SyncOnly, -}) - -function SyncOnly() { - const data = Route.useLoaderData() - - return ( -
    -

    Synchronous Serialization Test

    -

    {data.value.message}

    -

    Loaded at: {data.value.timestamp}

    -

    Source: {data.value.source}

    -
      - {data.value.items.map((item: string) => ( -
    • {item}
    • - ))} -
    -
    - ) -} diff --git a/e2e/vue-start/streaming-ssr/tests/client-navigation.spec.ts b/e2e/vue-start/streaming-ssr/tests/client-navigation.spec.ts deleted file mode 100644 index 8b9b3a8dcc..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/client-navigation.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/client-navigation' diff --git a/e2e/vue-start/streaming-ssr/tests/concurrent.spec.ts b/e2e/vue-start/streaming-ssr/tests/concurrent.spec.ts deleted file mode 100644 index 8625473a58..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/concurrent.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/concurrent' diff --git a/e2e/vue-start/streaming-ssr/tests/deferred-rejection.spec.ts b/e2e/vue-start/streaming-ssr/tests/deferred-rejection.spec.ts deleted file mode 100644 index 355b5019bc..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/deferred-rejection.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/deferred-rejection' diff --git a/e2e/vue-start/streaming-ssr/tests/deferred.spec.ts b/e2e/vue-start/streaming-ssr/tests/deferred.spec.ts deleted file mode 100644 index 3145897d7b..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/deferred.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/deferred' diff --git a/e2e/vue-start/streaming-ssr/tests/fast-serial.spec.ts b/e2e/vue-start/streaming-ssr/tests/fast-serial.spec.ts deleted file mode 100644 index 95df0555e2..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/fast-serial.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/fast-serial' diff --git a/e2e/vue-start/streaming-ssr/tests/home.spec.ts b/e2e/vue-start/streaming-ssr/tests/home.spec.ts deleted file mode 100644 index 5d49d34a56..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/home.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/home' diff --git a/e2e/vue-start/streaming-ssr/tests/many-promises.spec.ts b/e2e/vue-start/streaming-ssr/tests/many-promises.spec.ts deleted file mode 100644 index b747bd7d0a..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/many-promises.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/many-promises' diff --git a/e2e/vue-start/streaming-ssr/tests/nested-deferred.spec.ts b/e2e/vue-start/streaming-ssr/tests/nested-deferred.spec.ts deleted file mode 100644 index 8df20a8a95..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/nested-deferred.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/nested-deferred' diff --git a/e2e/vue-start/streaming-ssr/tests/preview-streaming.spec.ts b/e2e/vue-start/streaming-ssr/tests/preview-streaming.spec.ts deleted file mode 100644 index 34241cfbaa..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/preview-streaming.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/preview-streaming' diff --git a/e2e/vue-start/streaming-ssr/tests/query-heavy.spec.ts b/e2e/vue-start/streaming-ssr/tests/query-heavy.spec.ts deleted file mode 100644 index d15c092f6e..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/query-heavy.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/query-heavy' diff --git a/e2e/vue-start/streaming-ssr/tests/slow-render.spec.ts b/e2e/vue-start/streaming-ssr/tests/slow-render.spec.ts deleted file mode 100644 index 0d5a87363f..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/slow-render.spec.ts +++ /dev/null @@ -1 +0,0 @@ -import '../../../streaming-ssr-specs/slow-render' diff --git a/e2e/vue-start/streaming-ssr/tests/stream.spec.ts b/e2e/vue-start/streaming-ssr/tests/stream.spec.ts deleted file mode 100644 index 9dfc6820ad..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/stream.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { expect, testWithHydration } from '../../../streaming-ssr-assertions' -import '../../../streaming-ssr-specs/stream' - -testWithHydration( - 'reads a replacement stream after an active read', - async ({ page }) => { - await page.goto('/') - await page.waitForLoadState('networkidle') - await page.getByRole('link', { name: 'Stream' }).first().click() - await expect(page.getByTestId('stream-chunk-0')).toHaveText('chunk-0') - await expect(page.getByTestId('stream-complete')).toHaveCount(0) - - await page.getByTestId('refresh-stream').click() - - const streamData = page.getByTestId('stream-data') - await expect(streamData).toHaveAttribute('data-read-count', '2') - await expect(page.getByTestId('stream-complete')).toBeVisible() - await expect( - streamData.locator('[data-testid^="stream-chunk-"]'), - ).toHaveText(['chunk-0', 'chunk-1', 'chunk-2', 'chunk-3', 'chunk-4']) - }, -) diff --git a/e2e/vue-start/streaming-ssr/tests/sync-only.spec.ts b/e2e/vue-start/streaming-ssr/tests/sync-only.spec.ts deleted file mode 100644 index b25572f615..0000000000 --- a/e2e/vue-start/streaming-ssr/tests/sync-only.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -import '../../../streaming-ssr-specs/sync-only' -import { expect, test } from '../../../streaming-ssr-assertions' - -test('Vue renders an unwrapped document root', async ({ request }) => { - const response = await request.get('/sync-only') - expect(await response.text()).toMatch(/^)/) -}) diff --git a/e2e/vue-start/streaming-ssr/tsconfig.json b/e2e/vue-start/streaming-ssr/tsconfig.json deleted file mode 100644 index 390dad84c0..0000000000 --- a/e2e/vue-start/streaming-ssr/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "include": ["**/*.ts", "**/*.tsx"], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "preserve", - "jsxImportSource": "vue", - "module": "ESNext", - "moduleResolution": "Bundler", - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "isolatedModules": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "target": "ES2022", - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "~/*": ["./src/*"] - }, - "noEmit": true - } -} diff --git a/e2e/vue-start/streaming-ssr/vite.config.ts b/e2e/vue-start/streaming-ssr/vite.config.ts deleted file mode 100644 index 6519ec54c8..0000000000 --- a/e2e/vue-start/streaming-ssr/vite.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from 'vite' -import { tanstackStart } from '@tanstack/vue-start/plugin/vite' -import vueJsx from '@vitejs/plugin-vue-jsx' - -export default defineConfig({ - server: { - port: 3000, - }, - plugins: [tanstackStart(), vueJsx()], -}) diff --git a/e2e/vue-start/virtual-routes/package.json b/e2e/vue-start/virtual-routes/package.json index 90f09ce911..41b1355414 100644 --- a/e2e/vue-start/virtual-routes/package.json +++ b/e2e/vue-start/virtual-routes/package.json @@ -9,30 +9,29 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/virtual-file-routes": "workspace:^", "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-start": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "combinate": "^1.1.11", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/virtual-routes/playwright.config.ts b/e2e/vue-start/virtual-routes/playwright.config.ts index 1862174905..b0c365f8bd 100644 --- a/e2e/vue-start/virtual-routes/playwright.config.ts +++ b/e2e/vue-start/virtual-routes/playwright.config.ts @@ -1,7 +1,12 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { + getDummyServerPort, + getTestServerPort, +} from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) +const EXTERNAL_PORT = await getDummyServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -13,19 +18,19 @@ export default defineConfig({ reporter: [['line']], + globalSetup: './tests/setup/global.setup.ts', + globalTeardown: './tests/setup/global.teardown.ts', + use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL, }, webServer: { - command: `pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + command: `VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} pnpm build && VITE_NODE_ENV="test" VITE_EXTERNAL_PORT=${EXTERNAL_PORT} VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', - env: { - NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --import=@tanstack/router-e2e-utils/mock-api`, - }, }, projects: [ diff --git a/e2e/vue-start/virtual-routes/src/posts.tsx b/e2e/vue-start/virtual-routes/src/posts.tsx index f7a1941605..1b4c92b41d 100644 --- a/e2e/vue-start/virtual-routes/src/posts.tsx +++ b/e2e/vue-start/virtual-routes/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/e2e/vue-start/virtual-routes/src/routeTree.gen.ts b/e2e/vue-start/virtual-routes/src/routeTree.gen.ts index 1a1bc2d27b..94664b2e5b 100644 --- a/e2e/vue-start/virtual-routes/src/routeTree.gen.ts +++ b/e2e/vue-start/virtual-routes/src/routeTree.gen.ts @@ -9,27 +9,23 @@ // 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 homeRouteImport } from './routes/home' -import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' -import { Route as postsPostsRouteImport } from './routes/posts/posts' import { Route as pipeRouteImport } from './routes/pipe' -import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' -import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' -import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as postsPostsRouteImport } from './routes/posts/posts' +import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' +import { Route as homeRouteImport } from './routes/home' import { Route as postsPostsDetailRouteImport } from './routes/posts/posts-detail' +import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' +import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' import { Route as ClassicHelloIndexRouteImport } from './routes/file-based-subtree/hello/index' -import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as ClassicHelloWorldRouteImport } from './routes/file-based-subtree/hello/world' -import { Route as aRouteImport } from './routes/a' +import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as bRouteImport } from './routes/b' +import { Route as aRouteImport } from './routes/a' -const homeRoute = homeRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ - id: '/_first', +const pipeRoute = pipeRouteImport.update({ + id: '/special|pipe', + path: '/special|pipe', getParentRoute: () => rootRouteImport, } as any) const postsPostsRoute = postsPostsRouteImport.update({ @@ -37,55 +33,59 @@ const postsPostsRoute = postsPostsRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const pipeRoute = pipeRouteImport.update({ - id: '/special|pipe', - path: '/special|pipe', +const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ + id: '/_first', getParentRoute: () => rootRouteImport, } as any) -const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ - id: '/_second-layout', - getParentRoute: () => layoutFirstLayoutRoute, -} as any) -const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ - id: '/classic/hello', - path: '/classic/hello', - getParentRoute: () => rootRouteImport, -} as any) -const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ +const homeRoute = homeRouteImport.update({ id: '/', path: '/', - getParentRoute: () => postsPostsRoute, + getParentRoute: () => rootRouteImport, } as any) const postsPostsDetailRoute = postsPostsDetailRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => postsPostsRoute, } as any) +const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ + id: '/_second-layout', + getParentRoute: () => layoutFirstLayoutRoute, +} as any) +const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => postsPostsRoute, +} as any) +const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ + id: '/classic/hello', + path: '/classic/hello', + getParentRoute: () => rootRouteImport, +} as any) const ClassicHelloIndexRoute = ClassicHelloIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ - id: '/universe', - path: '/universe', - getParentRoute: () => ClassicHelloRouteRoute, -} as any) const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ id: '/world', path: '/world', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const aRoute = aRouteImport.update({ - id: '/route-without-file/layout-a', - path: '/route-without-file/layout-a', - getParentRoute: () => layoutSecondLayoutRoute, +const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ + id: '/universe', + path: '/universe', + getParentRoute: () => ClassicHelloRouteRoute, } as any) const bRoute = bRouteImport.update({ id: '/route-without-file/layout-b', path: '/route-without-file/layout-b', getParentRoute: () => layoutSecondLayoutRoute, } as any) +const aRoute = aRouteImport.update({ + id: '/route-without-file/layout-a', + path: '/route-without-file/layout-a', + getParentRoute: () => layoutSecondLayoutRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof homeRoute @@ -179,18 +179,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof homeRouteImport - parentRoute: typeof rootRouteImport - } - '/_first': { - id: '/_first' - path: '' - fullPath: '/' - preLoaderRoute: typeof layoutFirstLayoutRouteImport + '/special|pipe': { + id: '/special|pipe' + path: '/special|pipe' + fullPath: '/special|pipe' + preLoaderRoute: typeof pipeRouteImport parentRoute: typeof rootRouteImport } '/posts': { @@ -200,33 +193,19 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof postsPostsRouteImport parentRoute: typeof rootRouteImport } - '/special|pipe': { - id: '/special|pipe' - path: '/special|pipe' - fullPath: '/special|pipe' - preLoaderRoute: typeof pipeRouteImport - parentRoute: typeof rootRouteImport - } - '/_first/_second-layout': { - id: '/_first/_second-layout' + '/_first': { + id: '/_first' path: '' fullPath: '/' - preLoaderRoute: typeof layoutSecondLayoutRouteImport - parentRoute: typeof layoutFirstLayoutRoute - } - '/classic/hello': { - id: '/classic/hello' - path: '/classic/hello' - fullPath: '/classic/hello' - preLoaderRoute: typeof ClassicHelloRouteRouteImport + preLoaderRoute: typeof layoutFirstLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof postsPostsHomeRouteImport - parentRoute: typeof postsPostsRoute + fullPath: '/' + preLoaderRoute: typeof homeRouteImport + parentRoute: typeof rootRouteImport } '/posts/$postId': { id: '/posts/$postId' @@ -235,6 +214,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof postsPostsDetailRouteImport parentRoute: typeof postsPostsRoute } + '/_first/_second-layout': { + id: '/_first/_second-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof layoutSecondLayoutRouteImport + parentRoute: typeof layoutFirstLayoutRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof postsPostsHomeRouteImport + parentRoute: typeof postsPostsRoute + } + '/classic/hello': { + id: '/classic/hello' + path: '/classic/hello' + fullPath: '/classic/hello' + preLoaderRoute: typeof ClassicHelloRouteRouteImport + parentRoute: typeof rootRouteImport + } '/classic/hello/': { id: '/classic/hello/' path: '/' @@ -242,13 +242,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ClassicHelloIndexRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/classic/hello/universe': { - id: '/classic/hello/universe' - path: '/universe' - fullPath: '/classic/hello/universe' - preLoaderRoute: typeof ClassicHelloUniverseRouteImport - parentRoute: typeof ClassicHelloRouteRoute - } '/classic/hello/world': { id: '/classic/hello/world' path: '/world' @@ -256,12 +249,12 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof ClassicHelloWorldRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/_first/_second-layout/route-without-file/layout-a': { - id: '/_first/_second-layout/route-without-file/layout-a' - path: '/route-without-file/layout-a' - fullPath: '/route-without-file/layout-a' - preLoaderRoute: typeof aRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/classic/hello/universe': { + id: '/classic/hello/universe' + path: '/universe' + fullPath: '/classic/hello/universe' + preLoaderRoute: typeof ClassicHelloUniverseRouteImport + parentRoute: typeof ClassicHelloRouteRoute } '/_first/_second-layout/route-without-file/layout-b': { id: '/_first/_second-layout/route-without-file/layout-b' @@ -270,6 +263,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof bRouteImport parentRoute: typeof layoutSecondLayoutRoute } + '/_first/_second-layout/route-without-file/layout-a': { + id: '/_first/_second-layout/route-without-file/layout-a' + path: '/route-without-file/layout-a' + fullPath: '/route-without-file/layout-a' + preLoaderRoute: typeof aRouteImport + parentRoute: typeof layoutSecondLayoutRoute + } } } diff --git a/e2e/vue-start/virtual-routes/src/routes/posts/posts-detail.tsx b/e2e/vue-start/virtual-routes/src/routes/posts/posts-detail.tsx index 4bc3824f62..5086e3ad88 100644 --- a/e2e/vue-start/virtual-routes/src/routes/posts/posts-detail.tsx +++ b/e2e/vue-start/virtual-routes/src/routes/posts/posts-detail.tsx @@ -1,20 +1,7 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import { fetchPost } from '../../posts' import type { ErrorComponentProps } from '@tanstack/vue-router' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    -

    {post.value.title}

    -
    {post.value.body}
    -
    - ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), errorComponent: PostErrorComponent, @@ -27,3 +14,14 @@ export const Route = createFileRoute('/posts/$postId')({ function PostErrorComponent({ error }: ErrorComponentProps) { return } + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
    +

    {post.value.title}

    +
    {post.value.body}
    +
    + ) +} diff --git a/e2e/vue-start/virtual-routes/src/routes/posts/posts.tsx b/e2e/vue-start/virtual-routes/src/routes/posts/posts.tsx index dd380aa353..f56d6550a6 100644 --- a/e2e/vue-start/virtual-routes/src/routes/posts/posts.tsx +++ b/e2e/vue-start/virtual-routes/src/routes/posts/posts.tsx @@ -1,39 +1,37 @@ -import { defineComponent } from 'vue' import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' import { fetchPosts } from '../../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - return () => ( -
    -
      - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ))} -
    -
    - -
    - ) - }, -}) - export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
    +
      + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => ( +
    • + +
      {post.title.substring(0, 20)}
      + +
    • + ))} +
    +
    + +
    + ) +} diff --git a/e2e/vue-start/virtual-routes/src/utils/posts.tsx b/e2e/vue-start/virtual-routes/src/utils/posts.tsx index 11d80d08b5..66cb298f83 100644 --- a/e2e/vue-start/virtual-routes/src/utils/posts.tsx +++ b/e2e/vue-start/virtual-routes/src/utils/posts.tsx @@ -8,7 +8,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = createServerFn({ method: 'GET' }) .validator((postId: string) => postId) diff --git a/e2e/vue-start/virtual-routes/src/utils/users.tsx b/e2e/vue-start/virtual-routes/src/utils/users.tsx index 7ba645b383..46be4b1580 100644 --- a/e2e/vue-start/virtual-routes/src/utils/users.tsx +++ b/e2e/vue-start/virtual-routes/src/utils/users.tsx @@ -3,3 +3,7 @@ export type User = { name: string email: string } + +const PORT = process.env.VITE_SERVER_PORT || 3000 + +export const DEPLOY_URL = `http://localhost:${PORT}` diff --git a/e2e/vue-start/virtual-routes/tests/app.spec.ts b/e2e/vue-start/virtual-routes/tests/app.spec.ts index e9db98e3f3..3182febfa0 100644 --- a/e2e/vue-start/virtual-routes/tests/app.spec.ts +++ b/e2e/vue-start/virtual-routes/tests/app.spec.ts @@ -1,5 +1,4 @@ -import { expect } from '@playwright/test' -import { apiTest as test } from '@tanstack/router-e2e-utils' +import { expect, test } from '@playwright/test' test.beforeEach(async ({ page }) => { await page.goto('/') diff --git a/e2e/vue-start/virtual-routes/tests/setup/global.setup.ts b/e2e/vue-start/virtual-routes/tests/setup/global.setup.ts new file mode 100644 index 0000000000..3593d10ab9 --- /dev/null +++ b/e2e/vue-start/virtual-routes/tests/setup/global.setup.ts @@ -0,0 +1,6 @@ +import { e2eStartDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function setup() { + await e2eStartDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/virtual-routes/tests/setup/global.teardown.ts b/e2e/vue-start/virtual-routes/tests/setup/global.teardown.ts new file mode 100644 index 0000000000..62fd79911c --- /dev/null +++ b/e2e/vue-start/virtual-routes/tests/setup/global.teardown.ts @@ -0,0 +1,6 @@ +import { e2eStopDummyServer } from '@tanstack/router-e2e-utils' +import packageJson from '../../package.json' with { type: 'json' } + +export default async function teardown() { + await e2eStopDummyServer(packageJson.name) +} diff --git a/e2e/vue-start/website/package.json b/e2e/vue-start/website/package.json index 6c30b1500f..8ec13f6dbc 100644 --- a/e2e/vue-start/website/package.json +++ b/e2e/vue-start/website/package.json @@ -9,28 +9,27 @@ "build": "vite build && tsc --noEmit", "preview": "vite preview", "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; playwright test --project=chromium" }, "dependencies": { "@tanstack/vue-router": "workspace:^", "@tanstack/vue-router-devtools": "workspace:^", "@tanstack/vue-start": "workspace:^", - "redaxios": "catalog:", + "redaxios": "^0.5.1", "tailwind-merge": "^3.6.0", "vue": "^3.5.25", "zod": "^4.4.3" }, "devDependencies": { - "@playwright/test": "^1.61.0", + "@playwright/test": "^1.50.1", "@tailwindcss/vite": "^4.2.2", "@tanstack/router-e2e-utils": "workspace:^", "@types/node": "^22.10.2", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/e2e/vue-start/website/playwright.config.ts b/e2e/vue-start/website/playwright.config.ts index e6b92ce385..f6dd61ba6c 100644 --- a/e2e/vue-start/website/playwright.config.ts +++ b/e2e/vue-start/website/playwright.config.ts @@ -1,7 +1,8 @@ import { defineConfig, devices } from '@playwright/test' -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const PORT = Number(process.env.E2E_APP_PORT ?? 0) +const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -20,8 +21,8 @@ export default defineConfig({ webServer: { command: `pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, - wait: appServerReady, - reuseExistingServer: false, + url: baseURL, + reuseExistingServer: !process.env.CI, stdout: 'pipe', }, diff --git a/e2e/vue-start/website/src/components/DefaultCatchBoundary.tsx b/e2e/vue-start/website/src/components/DefaultCatchBoundary.tsx index 77c03c5afa..d06f4a948b 100644 --- a/e2e/vue-start/website/src/components/DefaultCatchBoundary.tsx +++ b/e2e/vue-start/website/src/components/DefaultCatchBoundary.tsx @@ -1,5 +1,3 @@ -import { defineComponent } from 'vue' -import type { PropType } from 'vue' import { ErrorComponent, Link, @@ -8,54 +6,46 @@ import { } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' -export const DefaultCatchBoundary = defineComponent({ - props: { - error: { - type: Object as PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - return () => { - console.error(props.error) - return ( -
    - -
    - - {isRoot.value ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) - } - }, -}) +export function DefaultCatchBoundary({ error }: ErrorComponentProps) { + const router = useRouter() + const isRoot = useLocation({ + select: (location) => location.pathname === '/', + }) + + console.error(error) + + return ( +
    + +
    + + {isRoot.value ? ( + + Home + + ) : ( + { + e.preventDefault() + window.history.back() + }} + > + Go Back + + )} +
    +
    + ) +} diff --git a/e2e/vue-start/website/src/routeTree.gen.ts b/e2e/vue-start/website/src/routeTree.gen.ts index 0909725a4b..e7b58aae2a 100644 --- a/e2e/vue-start/website/src/routeTree.gen.ts +++ b/e2e/vue-start/website/src/routeTree.gen.ts @@ -10,11 +10,11 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as LibraryRouteImport } from './routes/_library' -import { Route as ProjectIndexRouteImport } from './routes/$project.index' import { Route as LibraryIndexRouteImport } from './routes/_library.index' +import { Route as ProjectIndexRouteImport } from './routes/$project.index' import { Route as LibraryProjectRouteImport } from './routes/_library.$project' -import { Route as ProjectVersionDocsIndexRouteImport } from './routes/$project.$version.docs.index' import { Route as LibraryProjectVersionIndexRouteImport } from './routes/_library.$project.$version.index' +import { Route as ProjectVersionDocsIndexRouteImport } from './routes/$project.$version.docs.index' import { Route as ProjectVersionDocsFrameworkFrameworkRouteImport } from './routes/$project.$version.docs.framework.$framework' import { Route as ProjectVersionDocsFrameworkFrameworkIndexRouteImport } from './routes/$project.$version.docs.framework.$framework.index' import { Route as ProjectVersionDocsFrameworkFrameworkSplatRouteImport } from './routes/$project.$version.docs.framework.$framework.$' @@ -24,32 +24,32 @@ const LibraryRoute = LibraryRouteImport.update({ id: '/_library', getParentRoute: () => rootRouteImport, } as any) -const ProjectIndexRoute = ProjectIndexRouteImport.update({ - id: '/$project/', - path: '/$project/', - getParentRoute: () => rootRouteImport, -} as any) const LibraryIndexRoute = LibraryIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => LibraryRoute, } as any) +const ProjectIndexRoute = ProjectIndexRouteImport.update({ + id: '/$project/', + path: '/$project/', + getParentRoute: () => rootRouteImport, +} as any) const LibraryProjectRoute = LibraryProjectRouteImport.update({ id: '/$project', path: '/$project', getParentRoute: () => LibraryRoute, } as any) -const ProjectVersionDocsIndexRoute = ProjectVersionDocsIndexRouteImport.update({ - id: '/$project/$version/docs/', - path: '/$project/$version/docs/', - getParentRoute: () => rootRouteImport, -} as any) const LibraryProjectVersionIndexRoute = LibraryProjectVersionIndexRouteImport.update({ id: '/$version/', path: '/$version/', getParentRoute: () => LibraryProjectRoute, } as any) +const ProjectVersionDocsIndexRoute = ProjectVersionDocsIndexRouteImport.update({ + id: '/$project/$version/docs/', + path: '/$project/$version/docs/', + getParentRoute: () => rootRouteImport, +} as any) const ProjectVersionDocsFrameworkFrameworkRoute = ProjectVersionDocsFrameworkFrameworkRouteImport.update({ id: '/$project/$version/docs/framework/$framework', @@ -159,13 +159,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LibraryRouteImport parentRoute: typeof rootRouteImport } - '/$project/': { - id: '/$project/' - path: '/$project' - fullPath: '/$project/' - preLoaderRoute: typeof ProjectIndexRouteImport - parentRoute: typeof rootRouteImport - } '/_library/': { id: '/_library/' path: '/' @@ -173,6 +166,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LibraryIndexRouteImport parentRoute: typeof LibraryRoute } + '/$project/': { + id: '/$project/' + path: '/$project' + fullPath: '/$project/' + preLoaderRoute: typeof ProjectIndexRouteImport + parentRoute: typeof rootRouteImport + } '/_library/$project': { id: '/_library/$project' path: '/$project' @@ -180,13 +180,6 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LibraryProjectRouteImport parentRoute: typeof LibraryRoute } - '/$project/$version/docs/': { - id: '/$project/$version/docs/' - path: '/$project/$version/docs' - fullPath: '/$project/$version/docs/' - preLoaderRoute: typeof ProjectVersionDocsIndexRouteImport - parentRoute: typeof rootRouteImport - } '/_library/$project/$version/': { id: '/_library/$project/$version/' path: '/$version' @@ -194,6 +187,13 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LibraryProjectVersionIndexRouteImport parentRoute: typeof LibraryProjectRoute } + '/$project/$version/docs/': { + id: '/$project/$version/docs/' + path: '/$project/$version/docs' + fullPath: '/$project/$version/docs/' + preLoaderRoute: typeof ProjectVersionDocsIndexRouteImport + parentRoute: typeof rootRouteImport + } '/$project/$version/docs/framework/$framework': { id: '/$project/$version/docs/framework/$framework' path: '/$project/$version/docs/framework/$framework' diff --git a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.$.tsx b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.$.tsx index 1d9173f200..f56c911b88 100644 --- a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.$.tsx +++ b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.$.tsx @@ -1,27 +1,9 @@ -import { defineComponent } from 'vue' import { ErrorComponent, createFileRoute } from '@tanstack/vue-router' import type { ErrorComponentProps } from '@tanstack/vue-router' import { NotFound } from '~/components/NotFound' import { getDocument } from '~/server/document' import { capitalize, seo } from '~/utils/seo' -const Page = defineComponent({ - setup() { - const post = Route.useLoaderData() - return () => ( -
    -

    - {post.value.title} -

    -
    {post.value.content}
    -
    - ) - }, -}) - export const Route = createFileRoute( '/$project/$version/docs/framework/$framework/$', )({ @@ -44,3 +26,19 @@ export const Route = createFileRoute( function PostErrorComponent({ error }: ErrorComponentProps) { return } + +function Page() { + const post = Route.useLoaderData() + + return ( +
    +

    + {post.value.title} +

    +
    {post.value.content}
    +
    + ) +} diff --git a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.examples.$.tsx b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.examples.$.tsx index 1ca9e97cbe..97f8fdd49a 100644 --- a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.examples.$.tsx +++ b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.examples.$.tsx @@ -1,24 +1,7 @@ -import { defineComponent } from 'vue' import { createFileRoute } from '@tanstack/vue-router' import { NotFound } from '~/components/NotFound' import { capitalize, seo } from '~/utils/seo' -const Page = defineComponent({ - setup() { - const params = Route.useParams() - return () => ( -
    -

    - {params.value._splat} example -

    -
    - ) - }, -}) - export const Route = createFileRoute( '/$project/$version/docs/framework/$framework/examples/$', )({ @@ -32,3 +15,18 @@ export const Route = createFileRoute( return Example not found }, }) + +function Page() { + const params = Route.useParams() + + return ( +
    +

    + {params.value._splat} example +

    +
    + ) +} diff --git a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.tsx b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.tsx index e1c57491aa..1b422b2ea0 100644 --- a/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.tsx +++ b/e2e/vue-start/website/src/routes/$project.$version.docs.framework.$framework.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Link, Outlet, @@ -8,108 +7,6 @@ import { import { getDocumentHeads } from '~/server/document' import { getProject } from '~/server/projects' -const Page = defineComponent({ - setup() { - const project = Route.useLoaderData({ select: (s) => s.library }) - const documents = Route.useLoaderData({ select: (s) => s.documents }) - const pathname = useLocation({ select: (s) => s.pathname }) - return () => ( -
    - -
    -

    - {pathname.value} -

    - -
    -
    - ) - }, -}) - export const Route = createFileRoute( '/$project/$version/docs/framework/$framework', )({ @@ -123,3 +20,104 @@ export const Route = createFileRoute( }, component: Page, }) + +function Page() { + const project = Route.useLoaderData({ select: (s) => s.library }) + const documents = Route.useLoaderData({ select: (s) => s.documents }) + const pathname = useLocation({ select: (s) => s.pathname }) + + return ( +
    + +
    +

    + {pathname.value} +

    + +
    +
    + ) +} diff --git a/e2e/vue-start/website/src/routes/__root.tsx b/e2e/vue-start/website/src/routes/__root.tsx index 744cac4b11..64228c166e 100644 --- a/e2e/vue-start/website/src/routes/__root.tsx +++ b/e2e/vue-start/website/src/routes/__root.tsx @@ -51,11 +51,7 @@ export const Route = createRootRoute({ ], }), errorComponent: (props) => { - return ( -

    - {props.error instanceof Error ? props.error.stack : String(props.error)} -

    - ) + return

    {props.error.stack}

    }, notFoundComponent: () => , component: RootComponent, diff --git a/e2e/vue-start/website/src/routes/_library.$project.$version.index.tsx b/e2e/vue-start/website/src/routes/_library.$project.$version.index.tsx index d6c9b00671..ed8e4d0bb4 100644 --- a/e2e/vue-start/website/src/routes/_library.$project.$version.index.tsx +++ b/e2e/vue-start/website/src/routes/_library.$project.$version.index.tsx @@ -1,31 +1,23 @@ -import { defineComponent } from 'vue' import { Link, createFileRoute } from '@tanstack/vue-router' -const Page = defineComponent({ - setup() { - const params = Route.useParams() - return () => ( -
    -

    - {params.value.project} landing page -

    -

    - version: {params.value.version} -

    -

    - - Get started with our documentation. - -

    -
    - ) - }, -}) - export const Route = createFileRoute('/_library/$project/$version/')({ component: Page, }) + +function Page() { + const params = Route.useParams() + + return ( +
    +

    + {params.value.project} landing page +

    +

    version: {params.value.version}

    +

    + + Get started with our documentation. + +

    +
    + ) +} diff --git a/e2e/vue-start/website/src/routes/_library.tsx b/e2e/vue-start/website/src/routes/_library.tsx index b52198950d..fcbeaa35d0 100644 --- a/e2e/vue-start/website/src/routes/_library.tsx +++ b/e2e/vue-start/website/src/routes/_library.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { Link, Outlet, @@ -7,53 +6,6 @@ import { } from '@tanstack/vue-router' import { getProjects } from '~/server/projects' -const Layout = defineComponent({ - setup() { - const loaderData = Route.useLoaderData() - const pathname = useLocation({ select: (s) => s.pathname }) - return () => ( -
    - -
    -

    - {pathname.value} -

    - -
    -
    - ) - }, -}) - export const Route = createFileRoute('/_library')({ loader: async () => { const projects = await getProjects() @@ -63,3 +15,48 @@ export const Route = createFileRoute('/_library')({ }, component: Layout, }) + +function Layout() { + const loaderData = Route.useLoaderData() + const pathname = useLocation({ select: (s) => s.pathname }) + return ( +
    + +
    +

    + {pathname.value} +

    + +
    +
    + ) +} diff --git a/examples/AGENTS.md b/examples/AGENTS.md deleted file mode 100644 index eb47fbd925..0000000000 --- a/examples/AGENTS.md +++ /dev/null @@ -1,4 +0,0 @@ -# Examples - -- Versioned dependencies on this repository's packages resolve locally through `pnpm-workspace.yaml` overrides. Keep published version ranges in example manifests; do not replace them with `workspace:*` as a linking fix. -- Root `pnpm dev` watches package builds. To run an example app, use its own `dev` script after building its workspace dependencies. diff --git a/examples/react/authenticated-routes-firebase/package.json b/examples/react/authenticated-routes-firebase/package.json index 1efa172047..58c677ed26 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "firebase": "^11.4.0", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -25,8 +25,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/authenticated-routes-firebase/src/routeTree.gen.ts b/examples/react/authenticated-routes-firebase/src/routeTree.gen.ts index bcc454ab03..0e81c27c1c 100644 --- a/examples/react/authenticated-routes-firebase/src/routeTree.gen.ts +++ b/examples/react/authenticated-routes-firebase/src/routeTree.gen.ts @@ -9,38 +9,38 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthInvoicesRouteImport } from './routes/_auth.invoices' +import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' import { Route as AuthInvoicesIndexRouteImport } from './routes/_auth.invoices.index' import { Route as AuthInvoicesInvoiceIdRouteImport } from './routes/_auth.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const AuthRoute = AuthRouteImport.update({ id: '/_auth', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthDashboardRoute = AuthDashboardRouteImport.update({ - id: '/dashboard', - path: '/dashboard', - getParentRoute: () => AuthRoute, -} as any) const AuthInvoicesRoute = AuthInvoicesRouteImport.update({ id: '/invoices', path: '/invoices', getParentRoute: () => AuthRoute, } as any) +const AuthDashboardRoute = AuthDashboardRouteImport.update({ + id: '/dashboard', + path: '/dashboard', + getParentRoute: () => AuthRoute, +} as any) const AuthInvoicesIndexRoute = AuthInvoicesIndexRouteImport.update({ id: '/', path: '/', @@ -107,11 +107,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_auth': { @@ -121,20 +121,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/dashboard': { - id: '/_auth/dashboard' - path: '/dashboard' - fullPath: '/dashboard' - preLoaderRoute: typeof AuthDashboardRouteImport - parentRoute: typeof AuthRoute - } '/_auth/invoices': { id: '/_auth/invoices' path: '/invoices' @@ -142,6 +135,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthInvoicesRouteImport parentRoute: typeof AuthRoute } + '/_auth/dashboard': { + id: '/_auth/dashboard' + path: '/dashboard' + fullPath: '/dashboard' + preLoaderRoute: typeof AuthDashboardRouteImport + parentRoute: typeof AuthRoute + } '/_auth/invoices/': { id: '/_auth/invoices/' path: '/' diff --git a/examples/react/authenticated-routes/package.json b/examples/react/authenticated-routes/package.json index 6af48f1d34..5517800c01 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/authenticated-routes/src/routeTree.gen.ts b/examples/react/authenticated-routes/src/routeTree.gen.ts index bcc454ab03..0e81c27c1c 100644 --- a/examples/react/authenticated-routes/src/routeTree.gen.ts +++ b/examples/react/authenticated-routes/src/routeTree.gen.ts @@ -9,38 +9,38 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthInvoicesRouteImport } from './routes/_auth.invoices' +import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' import { Route as AuthInvoicesIndexRouteImport } from './routes/_auth.invoices.index' import { Route as AuthInvoicesInvoiceIdRouteImport } from './routes/_auth.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const AuthRoute = AuthRouteImport.update({ id: '/_auth', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthDashboardRoute = AuthDashboardRouteImport.update({ - id: '/dashboard', - path: '/dashboard', - getParentRoute: () => AuthRoute, -} as any) const AuthInvoicesRoute = AuthInvoicesRouteImport.update({ id: '/invoices', path: '/invoices', getParentRoute: () => AuthRoute, } as any) +const AuthDashboardRoute = AuthDashboardRouteImport.update({ + id: '/dashboard', + path: '/dashboard', + getParentRoute: () => AuthRoute, +} as any) const AuthInvoicesIndexRoute = AuthInvoicesIndexRouteImport.update({ id: '/', path: '/', @@ -107,11 +107,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_auth': { @@ -121,20 +121,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/dashboard': { - id: '/_auth/dashboard' - path: '/dashboard' - fullPath: '/dashboard' - preLoaderRoute: typeof AuthDashboardRouteImport - parentRoute: typeof AuthRoute - } '/_auth/invoices': { id: '/_auth/invoices' path: '/invoices' @@ -142,6 +135,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthInvoicesRouteImport parentRoute: typeof AuthRoute } + '/_auth/dashboard': { + id: '/_auth/dashboard' + path: '/dashboard' + fullPath: '/dashboard' + preLoaderRoute: typeof AuthDashboardRouteImport + parentRoute: typeof AuthRoute + } '/_auth/invoices/': { id: '/_auth/invoices/' path: '/' diff --git a/examples/react/basic-default-search-params/package.json b/examples/react/basic-default-search-params/package.json index 96c68fecd4..97bfd6d8d4 100644 --- a/examples/react/basic-default-search-params/package.json +++ b/examples/react/basic-default-search-params/package.json @@ -10,9 +10,9 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-devtools-panel/package.json b/examples/react/basic-devtools-panel/package.json index ccae95d73f..9ff1c8fefb 100644 --- a/examples/react/basic-devtools-panel/package.json +++ b/examples/react/basic-devtools-panel/package.json @@ -10,10 +10,9 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", "@tanstack/react-query-devtools": "^5.67.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-file-based/package.json b/examples/react/basic-file-based/package.json index 9c3cacada1..bca55ff7d5 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-file-based/src/routeTree.gen.ts b/examples/react/basic-file-based/src/routeTree.gen.ts index f370ad5d03..9d28e9a236 100644 --- a/examples/react/basic-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-file-based/src/routeTree.gen.ts @@ -9,40 +9,35 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as AnchorRouteImport } from './routes/anchor' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const AnchorRoute = AnchorRouteImport.update({ + id: '/anchor', + path: '/anchor', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) -const AnchorRoute = AnchorRouteImport.update({ - id: '/anchor', - path: '/anchor', - getParentRoute: () => rootRouteImport, -} as any) const PostsRouteRoute = PostsRouteRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -53,11 +48,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -65,6 +59,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -129,11 +129,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/anchor': { + id: '/anchor' + path: '/anchor' + fullPath: '/anchor' + preLoaderRoute: typeof AnchorRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -143,13 +143,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } - '/anchor': { - id: '/anchor' - path: '/anchor' - fullPath: '/anchor' - preLoaderRoute: typeof AnchorRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -157,12 +150,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -178,12 +171,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -192,6 +185,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/examples/react/basic-non-nested-devtools/package.json b/examples/react/basic-non-nested-devtools/package.json index 32e856ebcf..fe6f2a04bd 100644 --- a/examples/react/basic-non-nested-devtools/package.json +++ b/examples/react/basic-non-nested-devtools/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -21,8 +21,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-react-query-file-based/package.json b/examples/react/basic-react-query-file-based/package.json index d01a02872e..501a22dcc3 100644 --- a/examples/react/basic-react-query-file-based/package.json +++ b/examples/react/basic-react-query-file-based/package.json @@ -10,11 +10,11 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -25,8 +25,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-react-query-file-based/src/routeTree.gen.ts b/examples/react/basic-react-query-file-based/src/routeTree.gen.ts index 9676858c7c..28cfbec8ed 100644 --- a/examples/react/basic-react-query-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-react-query-file-based/src/routeTree.gen.ts @@ -9,20 +9,15 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, @@ -32,11 +27,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,13 +117,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_pathlessLayout': { id: '/_pathlessLayout' path: '' @@ -138,12 +131,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/examples/react/basic-react-query/package.json b/examples/react/basic-react-query/package.json index edab96afac..b56851bdac 100644 --- a/examples/react/basic-react-query/package.json +++ b/examples/react/basic-react-query/package.json @@ -10,10 +10,10 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-ssr-file-based/package.json b/examples/react/basic-ssr-file-based/package.json index 3222c33e19..3fa61c784f 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.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "compression": "^1.8.0", "express": "^5.2.1", "get-port": "^7.1.0", @@ -21,13 +21,12 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router-devtools": "^1.167.0", "@types/express": "^5.0.6", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.1", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-ssr-file-based/src/routeTree.gen.ts b/examples/react/basic-ssr-file-based/src/routeTree.gen.ts index 6f9f3f0f5e..4e61620e43 100644 --- a/examples/react/basic-ssr-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-ssr-file-based/src/routeTree.gen.ts @@ -9,17 +9,12 @@ // 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 IndexRouteImport } from './routes/index' import { Route as ErrorRouteImport } from './routes/error' import { Route as PostsRouteRouteImport } from './routes/posts/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts/index' import { Route as PostsPostIdRouteImport } from './routes/posts/$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const ErrorRoute = ErrorRouteImport.update({ id: '/error', path: '/error', @@ -30,6 +25,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -78,13 +78,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/error': { id: '/error' path: '/error' @@ -99,6 +92,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/examples/react/basic-ssr-streaming-file-based/package.json b/examples/react/basic-ssr-streaming-file-based/package.json index c3c87c8d88..b24243e276 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.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "compression": "^1.8.0", "express": "^5.2.1", "get-port": "^7.1.0", @@ -21,13 +21,12 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router-devtools": "^1.167.0", "@types/express": "^5.0.6", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.1", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-ssr-streaming-file-based/src/routeTree.gen.ts b/examples/react/basic-ssr-streaming-file-based/src/routeTree.gen.ts index 6f9f3f0f5e..4e61620e43 100644 --- a/examples/react/basic-ssr-streaming-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-ssr-streaming-file-based/src/routeTree.gen.ts @@ -9,17 +9,12 @@ // 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 IndexRouteImport } from './routes/index' import { Route as ErrorRouteImport } from './routes/error' import { Route as PostsRouteRouteImport } from './routes/posts/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts/index' import { Route as PostsPostIdRouteImport } from './routes/posts/$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const ErrorRoute = ErrorRouteImport.update({ id: '/error', path: '/error', @@ -30,6 +25,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -78,13 +78,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/error': { id: '/error' path: '/error' @@ -99,6 +92,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/examples/react/basic-virtual-file-based/package.json b/examples/react/basic-virtual-file-based/package.json index 84d326435c..922c460906 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "@tanstack/virtual-file-routes": "^1.162.0", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -24,8 +24,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-virtual-file-based/src/routeTree.gen.ts b/examples/react/basic-virtual-file-based/src/routeTree.gen.ts index 6745e373aa..2fe7840f19 100644 --- a/examples/react/basic-virtual-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-virtual-file-based/src/routeTree.gen.ts @@ -9,77 +9,77 @@ // 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 homeRouteImport } from './routes/home' -import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' import { Route as postsPostsRouteImport } from './routes/posts/posts' -import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' -import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' -import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' +import { Route as homeRouteImport } from './routes/home' import { Route as postsPostsDetailRouteImport } from './routes/posts/posts-detail' +import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' +import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' import { Route as ClassicHelloIndexRouteImport } from './routes/file-based-subtree/hello/index' -import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as ClassicHelloWorldRouteImport } from './routes/file-based-subtree/hello/world' -import { Route as aRouteImport } from './routes/a' +import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as bRouteImport } from './routes/b' +import { Route as aRouteImport } from './routes/a' -const homeRoute = homeRouteImport.update({ - id: '/', - path: '/', +const postsPostsRoute = postsPostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ id: '/_first', getParentRoute: () => rootRouteImport, } as any) -const postsPostsRoute = postsPostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ - id: '/_second-layout', - getParentRoute: () => layoutFirstLayoutRoute, -} as any) -const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ - id: '/classic/hello', - path: '/classic/hello', - getParentRoute: () => rootRouteImport, -} as any) -const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ +const homeRoute = homeRouteImport.update({ id: '/', path: '/', - getParentRoute: () => postsPostsRoute, + getParentRoute: () => rootRouteImport, } as any) const postsPostsDetailRoute = postsPostsDetailRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => postsPostsRoute, } as any) +const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ + id: '/_second-layout', + getParentRoute: () => layoutFirstLayoutRoute, +} as any) +const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => postsPostsRoute, +} as any) +const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ + id: '/classic/hello', + path: '/classic/hello', + getParentRoute: () => rootRouteImport, +} as any) const ClassicHelloIndexRoute = ClassicHelloIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ - id: '/universe', - path: '/universe', - getParentRoute: () => ClassicHelloRouteRoute, -} as any) const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ id: '/world', path: '/world', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const aRoute = aRouteImport.update({ - id: '/route-without-file/layout-a', - path: '/route-without-file/layout-a', - getParentRoute: () => layoutSecondLayoutRoute, +const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ + id: '/universe', + path: '/universe', + getParentRoute: () => ClassicHelloRouteRoute, } as any) const bRoute = bRouteImport.update({ id: '/route-without-file/layout-b', path: '/route-without-file/layout-b', getParentRoute: () => layoutSecondLayoutRoute, } as any) +const aRoute = aRouteImport.update({ + id: '/route-without-file/layout-a', + path: '/route-without-file/layout-a', + getParentRoute: () => layoutSecondLayoutRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof homeRoute @@ -166,11 +166,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof homeRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof postsPostsRouteImport parentRoute: typeof rootRouteImport } '/_first': { @@ -180,33 +180,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof layoutFirstLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof postsPostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_first/_second-layout': { - id: '/_first/_second-layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof layoutSecondLayoutRouteImport - parentRoute: typeof layoutFirstLayoutRoute - } - '/classic/hello': { - id: '/classic/hello' - path: '/classic/hello' - fullPath: '/classic/hello' - preLoaderRoute: typeof ClassicHelloRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof postsPostsHomeRouteImport - parentRoute: typeof postsPostsRoute + fullPath: '/' + preLoaderRoute: typeof homeRouteImport + parentRoute: typeof rootRouteImport } '/posts/$postId': { id: '/posts/$postId' @@ -215,6 +194,27 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof postsPostsDetailRouteImport parentRoute: typeof postsPostsRoute } + '/_first/_second-layout': { + id: '/_first/_second-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof layoutSecondLayoutRouteImport + parentRoute: typeof layoutFirstLayoutRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof postsPostsHomeRouteImport + parentRoute: typeof postsPostsRoute + } + '/classic/hello': { + id: '/classic/hello' + path: '/classic/hello' + fullPath: '/classic/hello' + preLoaderRoute: typeof ClassicHelloRouteRouteImport + parentRoute: typeof rootRouteImport + } '/classic/hello/': { id: '/classic/hello/' path: '/' @@ -222,13 +222,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ClassicHelloIndexRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/classic/hello/universe': { - id: '/classic/hello/universe' - path: '/universe' - fullPath: '/classic/hello/universe' - preLoaderRoute: typeof ClassicHelloUniverseRouteImport - parentRoute: typeof ClassicHelloRouteRoute - } '/classic/hello/world': { id: '/classic/hello/world' path: '/world' @@ -236,12 +229,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ClassicHelloWorldRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/_first/_second-layout/route-without-file/layout-a': { - id: '/_first/_second-layout/route-without-file/layout-a' - path: '/route-without-file/layout-a' - fullPath: '/route-without-file/layout-a' - preLoaderRoute: typeof aRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/classic/hello/universe': { + id: '/classic/hello/universe' + path: '/universe' + fullPath: '/classic/hello/universe' + preLoaderRoute: typeof ClassicHelloUniverseRouteImport + parentRoute: typeof ClassicHelloRouteRoute } '/_first/_second-layout/route-without-file/layout-b': { id: '/_first/_second-layout/route-without-file/layout-b' @@ -250,6 +243,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof bRouteImport parentRoute: typeof layoutSecondLayoutRoute } + '/_first/_second-layout/route-without-file/layout-a': { + id: '/_first/_second-layout/route-without-file/layout-a' + path: '/route-without-file/layout-a' + fullPath: '/route-without-file/layout-a' + preLoaderRoute: typeof aRouteImport + parentRoute: typeof layoutSecondLayoutRoute + } } } diff --git a/examples/react/basic-virtual-inside-file-based/package.json b/examples/react/basic-virtual-inside-file-based/package.json index c04cb6012e..a24bf519d9 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "@tanstack/virtual-file-routes": "^1.162.0", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -24,8 +24,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/basic-virtual-inside-file-based/src/routeTree.gen.ts b/examples/react/basic-virtual-inside-file-based/src/routeTree.gen.ts index cda1f85f15..947fd037d9 100644 --- a/examples/react/basic-virtual-inside-file-based/src/routeTree.gen.ts +++ b/examples/react/basic-virtual-inside-file-based/src/routeTree.gen.ts @@ -9,31 +9,36 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' import { Route as PostsRouteImport } from './routes/posts' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' +import { Route as PostsDetailsRouteImport } from './routes/posts/details' import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as PostsHomeRouteImport } from './routes/posts/home' -import { Route as PostsDetailsRouteImport } from './routes/posts/details' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' import { Route as PostsLetsGoIndexRouteImport } from './routes/posts/lets-go/index' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' import { Route as PostsLetsGoDeeperHomeRouteImport } from './routes/posts/lets-go/deeper/home' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const LayoutRoute = LayoutRouteImport.update({ id: '/_layout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) +const PostsDetailsRoute = PostsDetailsRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) const LayoutLayout2Route = LayoutLayout2RouteImport.update({ id: '/_layout-2', getParentRoute: () => LayoutRoute, @@ -43,25 +48,20 @@ const PostsHomeRoute = PostsHomeRouteImport.update({ path: '/', getParentRoute: () => PostsRoute, } as any) -const PostsDetailsRoute = PostsDetailsRouteImport.update({ - id: '/$postId', - path: '/$postId', +const PostsLetsGoIndexRoute = PostsLetsGoIndexRouteImport.update({ + id: '/inception/', + path: '/inception/', getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, -} as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) -const PostsLetsGoIndexRoute = PostsLetsGoIndexRouteImport.update({ - id: '/inception/', - path: '/inception/', - getParentRoute: () => PostsRoute, +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any) const PostsLetsGoDeeperHomeRoute = PostsLetsGoDeeperHomeRouteImport.update({ id: '/inception/deeper/', @@ -143,11 +143,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_layout': { @@ -157,13 +157,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsDetailsRouteImport + parentRoute: typeof PostsRoute + } '/_layout/_layout-2': { id: '/_layout/_layout-2' path: '' @@ -178,20 +185,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsHomeRouteImport parentRoute: typeof PostsRoute } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsDetailsRouteImport + '/posts/inception/': { + id: '/posts/inception/' + path: '/inception' + fullPath: '/posts/inception/' + preLoaderRoute: typeof PostsLetsGoIndexRouteImport parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route - } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' path: '/layout-b' @@ -199,12 +199,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts/inception/': { - id: '/posts/inception/' - path: '/inception' - fullPath: '/posts/inception/' - preLoaderRoute: typeof PostsLetsGoIndexRouteImport - parentRoute: typeof PostsRoute + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route } '/posts/inception/deeper/': { id: '/posts/inception/deeper/' diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 2c09a3dfdf..d245cc9f0e 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -21,8 +21,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/deferred-data/package.json b/examples/react/deferred-data/package.json index 99afb661ee..b55fb41ccc 100644 --- a/examples/react/deferred-data/package.json +++ b/examples/react/deferred-data/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -22,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/i18n-paraglide/package.json b/examples/react/i18n-paraglide/package.json index 88140e8911..d9a9602c02 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.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.1.1", "react-dom": "^19.1.1", "tailwindcss": "^4.2.2" @@ -22,20 +22,8 @@ "@types/react": "^19.1.13", "@types/react-dom": "^19.1.9", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "@inlang/paraglide-js": "^2.4.0" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } } } diff --git a/examples/react/i18n-paraglide/src/routeTree.gen.ts b/examples/react/i18n-paraglide/src/routeTree.gen.ts index 12bc916ae4..59499d9fbf 100644 --- a/examples/react/i18n-paraglide/src/routeTree.gen.ts +++ b/examples/react/i18n-paraglide/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/kitchen-sink-file-based/package.json b/examples/react/kitchen-sink-file-based/package.json index e02defb3ce..2e18eb4358 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "immer": "^10.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -24,8 +24,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/kitchen-sink-file-based/src/routeTree.gen.ts b/examples/react/kitchen-sink-file-based/src/routeTree.gen.ts index 03af4e1e58..1e29ba5794 100644 --- a/examples/react/kitchen-sink-file-based/src/routeTree.gen.ts +++ b/examples/react/kitchen-sink-file-based/src/routeTree.gen.ts @@ -9,71 +9,81 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' import { Route as LoginRouteImport } from './routes/login' -import { Route as thisFolderIsNotInTheUrlRouteGroupRouteImport } from './routes/(this-folder-is-not-in-the-url)/route-group' -import { Route as AuthProfileRouteImport } from './routes/_auth.profile' -import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' -import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' -import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' -import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' -import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as ExpensiveIndexRouteImport } from './routes/expensive/index' -import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' -import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' +import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' +import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' +import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' +import { Route as AuthProfileRouteImport } from './routes/_auth.profile' +import { Route as thisFolderIsNotInTheUrlRouteGroupRouteImport } from './routes/(this-folder-is-not-in-the-url)/route-group' +import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' import { Route as DashboardUsersIndexRouteImport } from './routes/dashboard.users.index' +import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' import { Route as DashboardUsersUserRouteImport } from './routes/dashboard.users.user' +import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthRoute = AuthRouteImport.update({ - id: '/_auth', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) +const AuthRoute = AuthRouteImport.update({ + id: '/_auth', + getParentRoute: () => rootRouteImport, +} as any) const DashboardRouteRoute = DashboardRouteRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) +const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ + id: '/expensive/', + path: '/expensive/', + getParentRoute: () => rootRouteImport, +} as any) +const DashboardIndexRoute = DashboardIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardRouteRoute, +} as any) +const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ + id: '/route-b', + path: '/route-b', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const AuthProfileRoute = AuthProfileRouteImport.update({ + id: '/profile', + path: '/profile', + getParentRoute: () => AuthRoute, +} as any) const thisFolderIsNotInTheUrlRouteGroupRoute = thisFolderIsNotInTheUrlRouteGroupRouteImport.update({ id: '/(this-folder-is-not-in-the-url)/route-group', path: '/route-group', getParentRoute: () => rootRouteImport, } as any) -const AuthProfileRoute = AuthProfileRouteImport.update({ - id: '/profile', - path: '/profile', - getParentRoute: () => AuthRoute, -} as any) -const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutRoute, -} as any) -const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ - id: '/route-b', - path: '/route-b', - getParentRoute: () => PathlessLayoutRoute, -} as any) -const DashboardIndexRoute = DashboardIndexRouteImport.update({ - id: '/', - path: '/', +const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => DashboardRouteRoute, } as any) const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ @@ -81,37 +91,27 @@ const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ path: '/invoices', getParentRoute: () => DashboardRouteRoute, } as any) -const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ - id: '/users', - path: '/users', - getParentRoute: () => DashboardRouteRoute, -} as any) -const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ - id: '/expensive/', - path: '/expensive/', - getParentRoute: () => rootRouteImport, +const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardUsersRouteRoute, } as any) const DashboardInvoicesIndexRoute = DashboardInvoicesIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) +const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ + id: '/user', + path: '/user', + getParentRoute: () => DashboardUsersRouteRoute, +} as any) const DashboardInvoicesInvoiceIdRoute = DashboardInvoicesInvoiceIdRouteImport.update({ id: '/$invoiceId', path: '/$invoiceId', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) -const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) -const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ - id: '/user', - path: '/user', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -229,18 +229,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_auth': { - id: '/_auth' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -250,6 +243,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } + '/_auth': { + id: '/_auth' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -257,33 +257,26 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardRouteRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/(this-folder-is-not-in-the-url)/route-group': { - id: '/(this-folder-is-not-in-the-url)/route-group' - path: '/route-group' - fullPath: '/route-group' - preLoaderRoute: typeof thisFolderIsNotInTheUrlRouteGroupRouteImport + '/expensive/': { + id: '/expensive/' + path: '/expensive' + fullPath: '/expensive/' + preLoaderRoute: typeof ExpensiveIndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/profile': { - id: '/_auth/profile' - path: '/profile' - fullPath: '/profile' - preLoaderRoute: typeof AuthProfileRouteImport - parentRoute: typeof AuthRoute - } - '/_pathlessLayout/route-a': { - id: '/_pathlessLayout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutRoute + '/dashboard/': { + id: '/dashboard/' + path: '/' + fullPath: '/dashboard/' + preLoaderRoute: typeof DashboardIndexRouteImport + parentRoute: typeof DashboardRouteRoute } '/_pathlessLayout/route-b': { id: '/_pathlessLayout/route-b' @@ -292,11 +285,32 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutRoute } - '/dashboard/': { - id: '/dashboard/' - path: '/' - fullPath: '/dashboard/' - preLoaderRoute: typeof DashboardIndexRouteImport + '/_pathlessLayout/route-a': { + id: '/_pathlessLayout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/_auth/profile': { + id: '/_auth/profile' + path: '/profile' + fullPath: '/profile' + preLoaderRoute: typeof AuthProfileRouteImport + parentRoute: typeof AuthRoute + } + '/(this-folder-is-not-in-the-url)/route-group': { + id: '/(this-folder-is-not-in-the-url)/route-group' + path: '/route-group' + fullPath: '/route-group' + preLoaderRoute: typeof thisFolderIsNotInTheUrlRouteGroupRouteImport + parentRoute: typeof rootRouteImport + } + '/dashboard/users': { + id: '/dashboard/users' + path: '/users' + fullPath: '/dashboard/users' + preLoaderRoute: typeof DashboardUsersRouteRouteImport parentRoute: typeof DashboardRouteRoute } '/dashboard/invoices': { @@ -306,19 +320,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardInvoicesRouteRouteImport parentRoute: typeof DashboardRouteRoute } - '/dashboard/users': { - id: '/dashboard/users' - path: '/users' - fullPath: '/dashboard/users' - preLoaderRoute: typeof DashboardUsersRouteRouteImport - parentRoute: typeof DashboardRouteRoute - } - '/expensive/': { - id: '/expensive/' - path: '/expensive' - fullPath: '/expensive/' - preLoaderRoute: typeof ExpensiveIndexRouteImport - parentRoute: typeof rootRouteImport + '/dashboard/users/': { + id: '/dashboard/users/' + path: '/' + fullPath: '/dashboard/users/' + preLoaderRoute: typeof DashboardUsersIndexRouteImport + parentRoute: typeof DashboardUsersRouteRoute } '/dashboard/invoices/': { id: '/dashboard/invoices/' @@ -327,20 +334,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardInvoicesIndexRouteImport parentRoute: typeof DashboardInvoicesRouteRoute } - '/dashboard/invoices/$invoiceId': { - id: '/dashboard/invoices/$invoiceId' - path: '/$invoiceId' - fullPath: '/dashboard/invoices/$invoiceId' - preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport - parentRoute: typeof DashboardInvoicesRouteRoute - } - '/dashboard/users/': { - id: '/dashboard/users/' - path: '/' - fullPath: '/dashboard/users/' - preLoaderRoute: typeof DashboardUsersIndexRouteImport - parentRoute: typeof DashboardUsersRouteRoute - } '/dashboard/users/user': { id: '/dashboard/users/user' path: '/user' @@ -348,6 +341,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardUsersUserRouteImport parentRoute: typeof DashboardUsersRouteRoute } + '/dashboard/invoices/$invoiceId': { + id: '/dashboard/invoices/$invoiceId' + path: '/$invoiceId' + fullPath: '/dashboard/invoices/$invoiceId' + preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport + parentRoute: typeof DashboardInvoicesRouteRoute + } } } 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 e3dd032ac2..f712e86a8f 100644 --- a/examples/react/kitchen-sink-react-query-file-based/package.json +++ b/examples/react/kitchen-sink-react-query-file-based/package.json @@ -10,11 +10,11 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "immer": "^10.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -26,8 +26,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/kitchen-sink-react-query-file-based/src/routeTree.gen.ts b/examples/react/kitchen-sink-react-query-file-based/src/routeTree.gen.ts index dbce8cf604..66180a8554 100644 --- a/examples/react/kitchen-sink-react-query-file-based/src/routeTree.gen.ts +++ b/examples/react/kitchen-sink-react-query-file-based/src/routeTree.gen.ts @@ -9,65 +9,80 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthProfileRouteImport } from './routes/_auth.profile' -import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' -import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' -import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' -import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' -import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as ExpensiveIndexRouteImport } from './routes/expensive/index' +import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' import { Route as FooBarRouteImport } from './routes/foo/bar' -import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' -import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' +import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' +import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' +import { Route as AuthProfileRouteImport } from './routes/_auth.profile' +import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' import { Route as DashboardUsersIndexRouteImport } from './routes/dashboard.users.index' +import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' import { Route as DashboardUsersUserRouteImport } from './routes/dashboard.users.user' +import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthRoute = AuthRouteImport.update({ - id: '/_auth', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) +const AuthRoute = AuthRouteImport.update({ + id: '/_auth', + getParentRoute: () => rootRouteImport, +} as any) const DashboardRouteRoute = DashboardRouteRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthProfileRoute = AuthProfileRouteImport.update({ - id: '/profile', - path: '/profile', - getParentRoute: () => AuthRoute, +const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ + id: '/expensive/', + path: '/expensive/', + getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutRoute, +const DashboardIndexRoute = DashboardIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardRouteRoute, +} as any) +const FooBarRoute = FooBarRouteImport.update({ + id: '/foo/bar', + path: '/foo/bar', + getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutRoute, } as any) -const DashboardIndexRoute = DashboardIndexRouteImport.update({ - id: '/', - path: '/', +const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const AuthProfileRoute = AuthProfileRouteImport.update({ + id: '/profile', + path: '/profile', + getParentRoute: () => AuthRoute, +} as any) +const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => DashboardRouteRoute, } as any) const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ @@ -75,42 +90,27 @@ const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ path: '/invoices', getParentRoute: () => DashboardRouteRoute, } as any) -const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ - id: '/users', - path: '/users', - getParentRoute: () => DashboardRouteRoute, -} as any) -const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ - id: '/expensive/', - path: '/expensive/', - getParentRoute: () => rootRouteImport, -} as any) -const FooBarRoute = FooBarRouteImport.update({ - id: '/foo/bar', - path: '/foo/bar', - getParentRoute: () => rootRouteImport, +const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardUsersRouteRoute, } as any) const DashboardInvoicesIndexRoute = DashboardInvoicesIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) +const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ + id: '/user', + path: '/user', + getParentRoute: () => DashboardUsersRouteRoute, +} as any) const DashboardInvoicesInvoiceIdRoute = DashboardInvoicesInvoiceIdRouteImport.update({ id: '/$invoiceId', path: '/$invoiceId', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) -const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) -const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ - id: '/user', - path: '/user', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -228,18 +228,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_auth': { - id: '/_auth' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -249,6 +242,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } + '/_auth': { + id: '/_auth' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -256,26 +256,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardRouteRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/profile': { - id: '/_auth/profile' - path: '/profile' - fullPath: '/profile' - preLoaderRoute: typeof AuthProfileRouteImport - parentRoute: typeof AuthRoute + '/expensive/': { + id: '/expensive/' + path: '/expensive' + fullPath: '/expensive/' + preLoaderRoute: typeof ExpensiveIndexRouteImport + parentRoute: typeof rootRouteImport } - '/_pathlessLayout/route-a': { - id: '/_pathlessLayout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutRoute + '/dashboard/': { + id: '/dashboard/' + path: '/' + fullPath: '/dashboard/' + preLoaderRoute: typeof DashboardIndexRouteImport + parentRoute: typeof DashboardRouteRoute + } + '/foo/bar': { + id: '/foo/bar' + path: '/foo/bar' + fullPath: '/foo/bar' + preLoaderRoute: typeof FooBarRouteImport + parentRoute: typeof rootRouteImport } '/_pathlessLayout/route-b': { id: '/_pathlessLayout/route-b' @@ -284,11 +291,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutRoute } - '/dashboard/': { - id: '/dashboard/' - path: '/' - fullPath: '/dashboard/' - preLoaderRoute: typeof DashboardIndexRouteImport + '/_pathlessLayout/route-a': { + id: '/_pathlessLayout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/_auth/profile': { + id: '/_auth/profile' + path: '/profile' + fullPath: '/profile' + preLoaderRoute: typeof AuthProfileRouteImport + parentRoute: typeof AuthRoute + } + '/dashboard/users': { + id: '/dashboard/users' + path: '/users' + fullPath: '/dashboard/users' + preLoaderRoute: typeof DashboardUsersRouteRouteImport parentRoute: typeof DashboardRouteRoute } '/dashboard/invoices': { @@ -298,26 +319,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardInvoicesRouteRouteImport parentRoute: typeof DashboardRouteRoute } - '/dashboard/users': { - id: '/dashboard/users' - path: '/users' - fullPath: '/dashboard/users' - preLoaderRoute: typeof DashboardUsersRouteRouteImport - parentRoute: typeof DashboardRouteRoute - } - '/expensive/': { - id: '/expensive/' - path: '/expensive' - fullPath: '/expensive/' - preLoaderRoute: typeof ExpensiveIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/foo/bar': { - id: '/foo/bar' - path: '/foo/bar' - fullPath: '/foo/bar' - preLoaderRoute: typeof FooBarRouteImport - parentRoute: typeof rootRouteImport + '/dashboard/users/': { + id: '/dashboard/users/' + path: '/' + fullPath: '/dashboard/users/' + preLoaderRoute: typeof DashboardUsersIndexRouteImport + parentRoute: typeof DashboardUsersRouteRoute } '/dashboard/invoices/': { id: '/dashboard/invoices/' @@ -326,20 +333,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardInvoicesIndexRouteImport parentRoute: typeof DashboardInvoicesRouteRoute } - '/dashboard/invoices/$invoiceId': { - id: '/dashboard/invoices/$invoiceId' - path: '/$invoiceId' - fullPath: '/dashboard/invoices/$invoiceId' - preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport - parentRoute: typeof DashboardInvoicesRouteRoute - } - '/dashboard/users/': { - id: '/dashboard/users/' - path: '/' - fullPath: '/dashboard/users/' - preLoaderRoute: typeof DashboardUsersIndexRouteImport - parentRoute: typeof DashboardUsersRouteRoute - } '/dashboard/users/user': { id: '/dashboard/users/user' path: '/user' @@ -347,6 +340,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardUsersUserRouteImport parentRoute: typeof DashboardUsersRouteRoute } + '/dashboard/invoices/$invoiceId': { + id: '/dashboard/invoices/$invoiceId' + path: '/$invoiceId' + fullPath: '/dashboard/invoices/$invoiceId' + preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport + parentRoute: typeof DashboardInvoicesRouteRoute + } } } diff --git a/examples/react/kitchen-sink-react-query/package.json b/examples/react/kitchen-sink-react-query/package.json index 14d0dc8e86..3003408f70 100644 --- a/examples/react/kitchen-sink-react-query/package.json +++ b/examples/react/kitchen-sink-react-query/package.json @@ -10,10 +10,10 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "immer": "^10.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -25,8 +25,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/kitchen-sink/package.json b/examples/react/kitchen-sink/package.json index f738efc37e..4414b457f2 100644 --- a/examples/react/kitchen-sink/package.json +++ b/examples/react/kitchen-sink/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "immer": "^10.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/large-file-based/package.json b/examples/react/large-file-based/package.json index 23d469d120..16fd095515 100644 --- a/examples/react/large-file-based/package.json +++ b/examples/react/large-file-based/package.json @@ -12,10 +12,10 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -26,8 +26,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/large-file-based/src/routeTree.gen.ts b/examples/react/large-file-based/src/routeTree.gen.ts index 8494f51d73..93a5be975c 100644 --- a/examples/react/large-file-based/src/routeTree.gen.ts +++ b/examples/react/large-file-based/src/routeTree.gen.ts @@ -9,23 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AbsoluteRouteImport } from './routes/absolute' -import { Route as LinkPropsRouteImport } from './routes/linkProps' -import { Route as ParamsRouteRouteImport } from './routes/params/route' import { Route as RelativeRouteImport } from './routes/relative' +import { Route as LinkPropsRouteImport } from './routes/linkProps' +import { Route as AbsoluteRouteImport } from './routes/absolute' import { Route as SearchRouteRouteImport } from './routes/search/route' -import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' +import { Route as ParamsRouteRouteImport } from './routes/params/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as SearchSearchPlaceholderRouteImport } from './routes/search/searchPlaceholder' +import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AbsoluteRoute = AbsoluteRouteImport.update({ - id: '/absolute', - path: '/absolute', +const RelativeRoute = RelativeRouteImport.update({ + id: '/relative', + path: '/relative', getParentRoute: () => rootRouteImport, } as any) const LinkPropsRoute = LinkPropsRouteImport.update({ @@ -33,14 +28,9 @@ const LinkPropsRoute = LinkPropsRouteImport.update({ path: '/linkProps', getParentRoute: () => rootRouteImport, } as any) -const ParamsRouteRoute = ParamsRouteRouteImport.update({ - id: '/params', - path: '/params', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeRoute = RelativeRouteImport.update({ - id: '/relative', - path: '/relative', +const AbsoluteRoute = AbsoluteRouteImport.update({ + id: '/absolute', + path: '/absolute', getParentRoute: () => rootRouteImport, } as any) const SearchRouteRoute = SearchRouteRouteImport.update({ @@ -48,16 +38,26 @@ const SearchRouteRoute = SearchRouteRouteImport.update({ path: '/search', getParentRoute: () => rootRouteImport, } as any) -const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ - id: '/$paramsPlaceholder', - path: '/$paramsPlaceholder', - getParentRoute: () => ParamsRouteRoute, +const ParamsRouteRoute = ParamsRouteRouteImport.update({ + id: '/params', + path: '/params', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const SearchSearchPlaceholderRoute = SearchSearchPlaceholderRouteImport.update({ id: '/searchPlaceholder', path: '/searchPlaceholder', getParentRoute: () => SearchRouteRoute, } as any) +const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ + id: '/$paramsPlaceholder', + path: '/$paramsPlaceholder', + getParentRoute: () => ParamsRouteRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -134,18 +134,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/absolute': { - id: '/absolute' - path: '/absolute' - fullPath: '/absolute' - preLoaderRoute: typeof AbsoluteRouteImport + '/relative': { + id: '/relative' + path: '/relative' + fullPath: '/relative' + preLoaderRoute: typeof RelativeRouteImport parentRoute: typeof rootRouteImport } '/linkProps': { @@ -155,18 +148,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LinkPropsRouteImport parentRoute: typeof rootRouteImport } - '/params': { - id: '/params' - path: '/params' - fullPath: '/params' - preLoaderRoute: typeof ParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/relative': { - id: '/relative' - path: '/relative' - fullPath: '/relative' - preLoaderRoute: typeof RelativeRouteImport + '/absolute': { + id: '/absolute' + path: '/absolute' + fullPath: '/absolute' + preLoaderRoute: typeof AbsoluteRouteImport parentRoute: typeof rootRouteImport } '/search': { @@ -176,12 +162,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchRouteRouteImport parentRoute: typeof rootRouteImport } - '/params/$paramsPlaceholder': { - id: '/params/$paramsPlaceholder' - path: '/$paramsPlaceholder' - fullPath: '/params/$paramsPlaceholder' - preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport - parentRoute: typeof ParamsRouteRoute + '/params': { + id: '/params' + path: '/params' + fullPath: '/params' + preLoaderRoute: typeof ParamsRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/search/searchPlaceholder': { id: '/search/searchPlaceholder' @@ -190,6 +183,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchSearchPlaceholderRouteImport parentRoute: typeof SearchRouteRoute } + '/params/$paramsPlaceholder': { + id: '/params/$paramsPlaceholder' + path: '/$paramsPlaceholder' + fullPath: '/params/$paramsPlaceholder' + preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport + parentRoute: typeof ParamsRouteRoute + } } } diff --git a/examples/react/location-masking/package.json b/examples/react/location-masking/package.json index fe005c0d2f..76d00658a4 100644 --- a/examples/react/location-masking/package.json +++ b/examples/react/location-masking/package.json @@ -11,9 +11,9 @@ "dependencies": { "@radix-ui/react-dialog": "^1.1.6", "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/navigation-blocking/package.json b/examples/react/navigation-blocking/package.json index a7677dfd51..757ae9f2e6 100644 --- a/examples/react/navigation-blocking/package.json +++ b/examples/react/navigation-blocking/package.json @@ -10,9 +10,9 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -22,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/quickstart-esbuild-file-based/esbuild.config.js b/examples/react/quickstart-esbuild-file-based/esbuild.config.js index 2f83a79984..fb7950d1fa 100644 --- a/examples/react/quickstart-esbuild-file-based/esbuild.config.js +++ b/examples/react/quickstart-esbuild-file-based/esbuild.config.js @@ -7,5 +7,5 @@ export default { bundle: true, format: 'esm', target: ['esnext'], - plugins: [tanstackRouter({ target: 'react' })], + plugins: [tanstackRouter({ target: 'react', autoCodeSplitting: true })], } diff --git a/examples/react/quickstart-esbuild-file-based/package.json b/examples/react/quickstart-esbuild-file-based/package.json index d855694fec..300650c666 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "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 976ec838d1..31a70cf36c 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/quickstart-file-based/src/routeTree.gen.ts b/examples/react/quickstart-file-based/src/routeTree.gen.ts index 12bc916ae4..59499d9fbf 100644 --- a/examples/react/quickstart-file-based/src/routeTree.gen.ts +++ b/examples/react/quickstart-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/quickstart-rspack-file-based/package.json b/examples/react/quickstart-rspack-file-based/package.json index 824998f428..f3525defde 100644 --- a/examples/react/quickstart-rspack-file-based/package.json +++ b/examples/react/quickstart-rspack-file-based/package.json @@ -9,20 +9,19 @@ }, "dependencies": { "@tailwindcss/postcss": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "postcss": "^8.5.1", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@rsbuild/core": "^2.3.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-react": "^2.0.0", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/router-plugin": "^1.168.19", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" + "typescript": "^6.0.2" } } diff --git a/examples/react/quickstart-rspack-file-based/src/routeTree.gen.ts b/examples/react/quickstart-rspack-file-based/src/routeTree.gen.ts index 12bc916ae4..59499d9fbf 100644 --- a/examples/react/quickstart-rspack-file-based/src/routeTree.gen.ts +++ b/examples/react/quickstart-rspack-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/quickstart-webpack-file-based/package.json b/examples/react/quickstart-webpack-file-based/package.json index baa14b89dd..4c778eab28 100644 --- a/examples/react/quickstart-webpack-file-based/package.json +++ b/examples/react/quickstart-webpack-file-based/package.json @@ -7,21 +7,20 @@ "build": "webpack build && tsc --noEmit" }, "dependencies": { - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { "@swc/core": "^1.15.33", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/router-plugin": "^1.168.19", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "html-webpack-plugin": "^5.6.3", "react-refresh": "^0.18.0", "swc-loader": "^0.2.6", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "webpack": "^5.97.1", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.2.4" diff --git a/examples/react/quickstart-webpack-file-based/src/routeTree.gen.ts b/examples/react/quickstart-webpack-file-based/src/routeTree.gen.ts index 12bc916ae4..59499d9fbf 100644 --- a/examples/react/quickstart-webpack-file-based/src/routeTree.gen.ts +++ b/examples/react/quickstart-webpack-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json index b6db476ea8..00269e8524 100644 --- a/examples/react/quickstart/package.json +++ b/examples/react/quickstart/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwindcss": "^4.2.2" @@ -20,8 +20,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/router-monorepo-react-query/package.json b/examples/react/router-monorepo-react-query/package.json index b158eeda56..75532f61b1 100644 --- a/examples/react/router-monorepo-react-query/package.json +++ b/examples/react/router-monorepo-react-query/package.json @@ -10,11 +10,11 @@ "dev": "pnpm post-query build && pnpm router build && pnpm post-feature build && pnpm app dev" }, "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1" @@ -23,8 +23,7 @@ "@types/node": "^22.10.2", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "@vitejs/plugin-react": "^6.0.1", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" diff --git a/examples/react/router-monorepo-react-query/packages/app/package.json b/examples/react/router-monorepo-react-query/packages/app/package.json index f0994165c2..f4d7f184f8 100644 --- a/examples/react/router-monorepo-react-query/packages/app/package.json +++ b/examples/react/router-monorepo-react-query/packages/app/package.json @@ -11,18 +11,17 @@ "dependencies": { "@router-mono-react-query/post-feature": "workspace:*", "@router-mono-react-query/router": "workspace:*", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router-devtools": "^1.167.0", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4", "@tailwindcss/vite": "^4.2.2" @@ -33,12 +32,6 @@ "dependsOn": [ "^build" ] - }, - "build": { - "inputs": [ - "...", - "{workspaceRoot}/examples/react/router-monorepo-react-query/.gitignore" - ] } } } diff --git a/examples/react/router-monorepo-react-query/packages/app/tsconfig.json b/examples/react/router-monorepo-react-query/packages/app/tsconfig.json index 196cb055a9..ce3a7d2339 100644 --- a/examples/react/router-monorepo-react-query/packages/app/tsconfig.json +++ b/examples/react/router-monorepo-react-query/packages/app/tsconfig.json @@ -8,6 +8,5 @@ "module": "ESNext", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true - }, - "exclude": ["node_modules", "dist"] + } } diff --git a/examples/react/router-monorepo-react-query/packages/post-feature/package.json b/examples/react/router-monorepo-react-query/packages/post-feature/package.json index 7f5e186ab0..9618fe3814 100644 --- a/examples/react/router-monorepo-react-query/packages/post-feature/package.json +++ b/examples/react/router-monorepo-react-query/packages/post-feature/package.json @@ -8,7 +8,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@router-mono-react-query/post-query": "workspace:*", "@router-mono-react-query/router": "workspace:*", "react": "^19.0.0", @@ -18,8 +18,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/react/router-monorepo-react-query/packages/post-query/package.json b/examples/react/router-monorepo-react-query/packages/post-query/package.json index 98a06051be..98833ff2dd 100644 --- a/examples/react/router-monorepo-react-query/packages/post-query/package.json +++ b/examples/react/router-monorepo-react-query/packages/post-query/package.json @@ -8,14 +8,13 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "redaxios": "^0.5.1", "zod": "^4.4.3" }, "devDependencies": { "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } 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 1397db14b5..136535b761 100644 --- a/examples/react/router-monorepo-react-query/packages/router/package.json +++ b/examples/react/router-monorepo-react-query/packages/router/package.json @@ -9,10 +9,10 @@ "types": "./dist/index.d.ts", "dependencies": { "@router-mono-react-query/post-query": "workspace:*", - "@tanstack/history": "^1.162.5", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -22,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/react/router-monorepo-react-query/packages/router/src/routeTree.gen.ts b/examples/react/router-monorepo-react-query/packages/router/src/routeTree.gen.ts index a4ed448d2f..0820fc5f30 100644 --- a/examples/react/router-monorepo-react-query/packages/router/src/routeTree.gen.ts +++ b/examples/react/router-monorepo-react-query/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/router-monorepo-simple-lazy/package.json b/examples/react/router-monorepo-simple-lazy/package.json index e044d86681..dd06440bf3 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1" @@ -20,8 +20,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" }, diff --git a/examples/react/router-monorepo-simple-lazy/packages/app/package.json b/examples/react/router-monorepo-simple-lazy/packages/app/package.json index cfc7a94942..a729b79fc9 100644 --- a/examples/react/router-monorepo-simple-lazy/packages/app/package.json +++ b/examples/react/router-monorepo-simple-lazy/packages/app/package.json @@ -15,13 +15,12 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router-devtools": "^1.167.0", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4", "@tailwindcss/vite": "^4.2.2" @@ -32,12 +31,6 @@ "dependsOn": [ "^build" ] - }, - "build": { - "inputs": [ - "...", - "{workspaceRoot}/examples/react/router-monorepo-simple-lazy/.gitignore" - ] } } } diff --git a/examples/react/router-monorepo-simple-lazy/packages/app/tsconfig.json b/examples/react/router-monorepo-simple-lazy/packages/app/tsconfig.json index 196cb055a9..ce3a7d2339 100644 --- a/examples/react/router-monorepo-simple-lazy/packages/app/tsconfig.json +++ b/examples/react/router-monorepo-simple-lazy/packages/app/tsconfig.json @@ -8,6 +8,5 @@ "module": "ESNext", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true - }, - "exclude": ["node_modules", "dist"] + } } diff --git a/examples/react/router-monorepo-simple-lazy/packages/post-feature/package.json b/examples/react/router-monorepo-simple-lazy/packages/post-feature/package.json index 65738d6025..d2bd3c4cdf 100644 --- a/examples/react/router-monorepo-simple-lazy/packages/post-feature/package.json +++ b/examples/react/router-monorepo-simple-lazy/packages/post-feature/package.json @@ -16,7 +16,7 @@ } }, "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@router-mono-simple-lazy/router": "workspace:*", "react": "^19.0.0", "react-dom": "^19.0.0" @@ -25,8 +25,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } 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 afd4702b5d..8b0b87a474 100644 --- a/examples/react/router-monorepo-simple-lazy/packages/router/package.json +++ b/examples/react/router-monorepo-simple-lazy/packages/router/package.json @@ -8,9 +8,9 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/history": "^1.162.5", - "@tanstack/react-router": "^1.170.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -20,8 +20,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/react/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts b/examples/react/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts index a4ed448d2f..0820fc5f30 100644 --- a/examples/react/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts +++ b/examples/react/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/router-monorepo-simple/package.json b/examples/react/router-monorepo-simple/package.json index 800d948c81..77cf9ecdf5 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1" @@ -20,8 +20,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" }, diff --git a/examples/react/router-monorepo-simple/packages/app/package.json b/examples/react/router-monorepo-simple/packages/app/package.json index a06431ef86..3e2b86f6db 100644 --- a/examples/react/router-monorepo-simple/packages/app/package.json +++ b/examples/react/router-monorepo-simple/packages/app/package.json @@ -15,13 +15,12 @@ "react-dom": "^19.0.0" }, "devDependencies": { - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router-devtools": "^1.167.0", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4", "@tailwindcss/vite": "^4.2.2" @@ -32,12 +31,6 @@ "dependsOn": [ "^build" ] - }, - "build": { - "inputs": [ - "...", - "{workspaceRoot}/examples/react/router-monorepo-simple/.gitignore" - ] } } } diff --git a/examples/react/router-monorepo-simple/packages/app/tsconfig.json b/examples/react/router-monorepo-simple/packages/app/tsconfig.json index 196cb055a9..ce3a7d2339 100644 --- a/examples/react/router-monorepo-simple/packages/app/tsconfig.json +++ b/examples/react/router-monorepo-simple/packages/app/tsconfig.json @@ -8,6 +8,5 @@ "module": "ESNext", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true - }, - "exclude": ["node_modules", "dist"] + } } diff --git a/examples/react/router-monorepo-simple/packages/post-feature/package.json b/examples/react/router-monorepo-simple/packages/post-feature/package.json index 885aa6bbed..9bdf4683c2 100644 --- a/examples/react/router-monorepo-simple/packages/post-feature/package.json +++ b/examples/react/router-monorepo-simple/packages/post-feature/package.json @@ -16,8 +16,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/react/router-monorepo-simple/packages/router/package.json b/examples/react/router-monorepo-simple/packages/router/package.json index 391b72e610..6bdb5ec943 100644 --- a/examples/react/router-monorepo-simple/packages/router/package.json +++ b/examples/react/router-monorepo-simple/packages/router/package.json @@ -8,9 +8,9 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/history": "^1.162.5", - "@tanstack/react-router": "^1.170.46", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -20,8 +20,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/react/router-monorepo-simple/packages/router/src/routeTree.gen.ts b/examples/react/router-monorepo-simple/packages/router/src/routeTree.gen.ts index a4ed448d2f..0820fc5f30 100644 --- a/examples/react/router-monorepo-simple/packages/router/src/routeTree.gen.ts +++ b/examples/react/router-monorepo-simple/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/scroll-restoration/package.json b/examples/react/scroll-restoration/package.json index 704ff13838..7a503801e5 100644 --- a/examples/react/scroll-restoration/package.json +++ b/examples/react/scroll-restoration/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "@tanstack/react-virtual": "^3.13.0", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -21,8 +21,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/search-validator-adapters/package.json b/examples/react/search-validator-adapters/package.json index 35e041e825..234abba717 100644 --- a/examples/react/search-validator-adapters/package.json +++ b/examples/react/search-validator-adapters/package.json @@ -12,10 +12,10 @@ "dependencies": { "@tailwindcss/vite": "^4.2.2", "@tanstack/arktype-adapter": "^1.167.0", - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "@tanstack/valibot-adapter": "^1.167.0", "@tanstack/zod-adapter": "^1.167.0", "arktype": "^2.1.7", @@ -26,15 +26,12 @@ "zod": "^3.24.2" }, "devDependencies": { - "@testing-library/jest-dom": "^7.0.1", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "jsdom": "^27.0.0", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14", - "vitest": "^5.0.4" + "typescript": "^6.0.2", + "vite": "^8.0.14" } } diff --git a/examples/react/search-validator-adapters/src/routeTree.gen.ts b/examples/react/search-validator-adapters/src/routeTree.gen.ts index d58c1ddfa1..4a973e1b29 100644 --- a/examples/react/search-validator-adapters/src/routeTree.gen.ts +++ b/examples/react/search-validator-adapters/src/routeTree.gen.ts @@ -10,18 +10,18 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as UsersArktypeIndexRouteImport } from './routes/users/arktype.index' -import { Route as UsersValibotIndexRouteImport } from './routes/users/valibot.index' import { Route as UsersZodIndexRouteImport } from './routes/users/zod.index' +import { Route as UsersValibotIndexRouteImport } from './routes/users/valibot.index' +import { Route as UsersArktypeIndexRouteImport } from './routes/users/arktype.index' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const UsersArktypeIndexRoute = UsersArktypeIndexRouteImport.update({ - id: '/users/arktype/', - path: '/users/arktype/', +const UsersZodIndexRoute = UsersZodIndexRouteImport.update({ + id: '/users/zod/', + path: '/users/zod/', getParentRoute: () => rootRouteImport, } as any) const UsersValibotIndexRoute = UsersValibotIndexRouteImport.update({ @@ -29,9 +29,9 @@ const UsersValibotIndexRoute = UsersValibotIndexRouteImport.update({ path: '/users/valibot/', getParentRoute: () => rootRouteImport, } as any) -const UsersZodIndexRoute = UsersZodIndexRouteImport.update({ - id: '/users/zod/', - path: '/users/zod/', +const UsersArktypeIndexRoute = UsersArktypeIndexRouteImport.update({ + id: '/users/arktype/', + path: '/users/arktype/', getParentRoute: () => rootRouteImport, } as any) @@ -78,11 +78,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/users/arktype/': { - id: '/users/arktype/' - path: '/users/arktype' - fullPath: '/users/arktype/' - preLoaderRoute: typeof UsersArktypeIndexRouteImport + '/users/zod/': { + id: '/users/zod/' + path: '/users/zod' + fullPath: '/users/zod/' + preLoaderRoute: typeof UsersZodIndexRouteImport parentRoute: typeof rootRouteImport } '/users/valibot/': { @@ -92,11 +92,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersValibotIndexRouteImport parentRoute: typeof rootRouteImport } - '/users/zod/': { - id: '/users/zod/' - path: '/users/zod' - fullPath: '/users/zod/' - preLoaderRoute: typeof UsersZodIndexRouteImport + '/users/arktype/': { + id: '/users/arktype/' + path: '/users/arktype' + fullPath: '/users/arktype/' + preLoaderRoute: typeof UsersArktypeIndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/examples/react/search-validator-adapters/tests/arktype.test.tsx b/examples/react/search-validator-adapters/tests/arktype.test.tsx index 776cc8369e..1c3a1baf76 100644 --- a/examples/react/search-validator-adapters/tests/arktype.test.tsx +++ b/examples/react/search-validator-adapters/tests/arktype.test.tsx @@ -8,6 +8,7 @@ import { createRouter, } from '@tanstack/react-router' +import '@testing-library/jest-dom/vitest' import { type } from 'arktype' test('can navigate to the route', async () => { diff --git a/examples/react/search-validator-adapters/tests/jest-dom.setup.ts b/examples/react/search-validator-adapters/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/examples/react/search-validator-adapters/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/examples/react/search-validator-adapters/tests/valibot.test.tsx b/examples/react/search-validator-adapters/tests/valibot.test.tsx index d3e18db414..3680d2302c 100644 --- a/examples/react/search-validator-adapters/tests/valibot.test.tsx +++ b/examples/react/search-validator-adapters/tests/valibot.test.tsx @@ -8,6 +8,7 @@ import { createRouter, } from '@tanstack/react-router' import * as v from 'valibot' +import '@testing-library/jest-dom/vitest' test('can navigate to the route', async () => { const rootRoute = createRootRoute() diff --git a/examples/react/search-validator-adapters/vite.config.ts b/examples/react/search-validator-adapters/vite.config.ts index e4b93f5cc3..5b41e6e26b 100644 --- a/examples/react/search-validator-adapters/vite.config.ts +++ b/examples/react/search-validator-adapters/vite.config.ts @@ -11,7 +11,6 @@ export default defineConfig({ watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts'], }, plugins: [ tailwindcss(), diff --git a/examples/react/start-bare/package.json b/examples/react/start-bare/package.json index 4ab9aff272..5a15546ef6 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "zod": "^4.4.3" @@ -22,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-bare/src/routeTree.gen.ts b/examples/react/start-bare/src/routeTree.gen.ts index d89758e684..421daf2790 100644 --- a/examples/react/start-bare/src/routeTree.gen.ts +++ b/examples/react/start-bare/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/start-bare/src/router.tsx b/examples/react/start-bare/src/router.tsx index 6f82cbf378..a464233af9 100644 --- a/examples/react/start-bare/src/router.tsx +++ b/examples/react/start-bare/src/router.tsx @@ -5,9 +5,7 @@ export function getRouter() { const router = createRouter({ routeTree, defaultPreload: 'intent', - defaultErrorComponent: (err) => ( -

    {err.error instanceof Error ? err.error.stack : String(err.error)}

    - ), + defaultErrorComponent: (err) =>

    {err.error.stack}

    , defaultNotFoundComponent: () =>

    not found

    , scrollRestoration: true, }) diff --git a/examples/react/start-basic-auth/README.md b/examples/react/start-basic-auth/README.md index 7f1b093ba5..4e5ee29b40 100644 --- a/examples/react/start-basic-auth/README.md +++ b/examples/react/start-basic-auth/README.md @@ -39,13 +39,3 @@ This example demonstrates: - Protected routes - Login/logout functionality - Redirect after authentication - -## Session configuration - -This example uses [iron-session](https://github.com/vvo/iron-session) through Start's `getCookie` and `setCookie` helpers. Set `SESSION_PASSWORD` to a random secret of at least 32 characters before starting the app, for example: - -```sh -export SESSION_PASSWORD="$(openssl rand -base64 32)" -``` - -Keep the same secret across instances and deployments that must read the same sessions. The cookie requires HTTPS in production. Each handler reads its own session, then awaits `session.save()` before redirecting or returning. diff --git a/examples/react/start-basic-auth/package.json b/examples/react/start-basic-auth/package.json index 9ab89bdac9..abee47dc52 100644 --- a/examples/react/start-basic-auth/package.json +++ b/examples/react/start-basic-auth/package.json @@ -14,10 +14,9 @@ "@libsql/client": "^0.15.15", "@prisma/adapter-libsql": "^7.0.0", "@prisma/client": "^7.0.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", - "iron-session": "^9.0.1", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -32,8 +31,7 @@ "dotenv": "^17.2.3", "prisma": "^7.0.0", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-basic-auth/src/routeTree.gen.ts b/examples/react/start-basic-auth/src/routeTree.gen.ts index a74e753aec..389f656645 100644 --- a/examples/react/start-basic-auth/src/routeTree.gen.ts +++ b/examples/react/start-basic-auth/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteRouteImport } from './routes/_authed/posts.route' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRouteRoute = AuthedPostsRouteRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/examples/react/start-basic-auth/src/routes/__root.tsx b/examples/react/start-basic-auth/src/routes/__root.tsx index 3367c62f27..5728345fcf 100644 --- a/examples/react/start-basic-auth/src/routes/__root.tsx +++ b/examples/react/start-basic-auth/src/routes/__root.tsx @@ -13,18 +13,18 @@ import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary.js' import { NotFound } from '~/components/NotFound.js' import appCss from '~/styles/app.css?url' import { seo } from '~/utils/seo.js' -import { getAppSession } from '~/utils/session.js' +import { useAppSession } from '~/utils/session.js' const fetchUser = createServerFn({ method: 'GET' }).handler(async () => { // We need to auth on the server so we have access to secure cookies - const session = await getAppSession() + const session = await useAppSession() - if (!session.userEmail) { + if (!session.data.userEmail) { return null } return { - email: session.userEmail, + email: session.data.userEmail, } }) diff --git a/examples/react/start-basic-auth/src/routes/_authed.tsx b/examples/react/start-basic-auth/src/routes/_authed.tsx index 0b5c6f9047..3944e590f9 100644 --- a/examples/react/start-basic-auth/src/routes/_authed.tsx +++ b/examples/react/start-basic-auth/src/routes/_authed.tsx @@ -2,7 +2,7 @@ import { createFileRoute } from '@tanstack/react-router' import { createServerFn } from '@tanstack/react-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { Login } from '~/components/Login' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const loginFn = createServerFn({ method: 'POST' }) .validator((d: { email: string; password: string }) => d) @@ -33,10 +33,13 @@ export const loginFn = createServerFn({ method: 'POST' }) } } + // Create a session + const session = await useAppSession() + // Store the user's email in the session - const session = await getAppSession() - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) }) export const Route = createFileRoute('/_authed')({ @@ -46,7 +49,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return } diff --git a/examples/react/start-basic-auth/src/routes/logout.tsx b/examples/react/start-basic-auth/src/routes/logout.tsx index 73cdaf1600..28f3c9f8fe 100644 --- a/examples/react/start-basic-auth/src/routes/logout.tsx +++ b/examples/react/start-basic-auth/src/routes/logout.tsx @@ -1,10 +1,11 @@ import { redirect, createFileRoute } from '@tanstack/react-router' import { createServerFn } from '@tanstack/react-start' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' const logoutFn = createServerFn().handler(async () => { - const session = await getAppSession() - session.destroy() + const session = await useAppSession() + + session.clear() throw redirect({ href: '/', diff --git a/examples/react/start-basic-auth/src/routes/signup.tsx b/examples/react/start-basic-auth/src/routes/signup.tsx index 4dc8e350ac..247a94c03c 100644 --- a/examples/react/start-basic-auth/src/routes/signup.tsx +++ b/examples/react/start-basic-auth/src/routes/signup.tsx @@ -3,7 +3,7 @@ import { createServerFn, useServerFn } from '@tanstack/react-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { useMutation } from '~/hooks/useMutation' import { Auth } from '~/components/Auth' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const signupFn = createServerFn({ method: 'POST' }) .validator( @@ -20,6 +20,9 @@ export const signupFn = createServerFn({ method: 'POST' }) // Encrypt the password using Sha256 into plaintext const password = await hashPassword(data.password) + // Create a session + const session = await useAppSession() + if (found) { if (found.password !== password) { return { @@ -30,9 +33,9 @@ export const signupFn = createServerFn({ method: 'POST' }) } // Store the user's email in the session - const session = await getAppSession() - session.userEmail = found.email - await session.save() + await session.update({ + userEmail: found.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ @@ -49,9 +52,9 @@ export const signupFn = createServerFn({ method: 'POST' }) }) // Store the user's email in the session - const session = await getAppSession() - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ diff --git a/examples/react/start-basic-auth/src/utils/session.ts b/examples/react/start-basic-auth/src/utils/session.ts index 7df7bc4da2..c38bac1e48 100644 --- a/examples/react/start-basic-auth/src/utils/session.ts +++ b/examples/react/start-basic-auth/src/utils/session.ts @@ -1,29 +1,13 @@ -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/react-start/server' +// src/services/session.server.ts +import { useSession } from '@tanstack/react-start/server' import type { User } from '@prisma/client' type SessionUser = { userEmail: User['email'] } -export function getAppSession() { - const password = process.env.SESSION_PASSWORD - if (!password || password.length < 32) { - throw new Error('Set SESSION_PASSWORD to at least 32 characters') - } - - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'app-session', - password, - ttl: 7 * 24 * 60 * 60, - cookieOptions: { - httpOnly: true, - sameSite: 'lax', - secure: process.env.NODE_ENV === 'production', - path: '/', - }, - }, - ) +export function useAppSession() { + return useSession({ + password: 'ChangeThisBeforeShippingToProdOrYouWillBeFired', + }) } diff --git a/examples/react/start-basic-authjs/package.json b/examples/react/start-basic-authjs/package.json index e9fa789ea6..a28f1c313f 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "start-authjs": "^1.0.0", @@ -26,8 +26,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-basic-authjs/src/routeTree.gen.ts b/examples/react/start-basic-authjs/src/routeTree.gen.ts index 4abcbc8048..2f59e4ba33 100644 --- a/examples/react/start-basic-authjs/src/routeTree.gen.ts +++ b/examples/react/start-basic-authjs/src/routeTree.gen.ts @@ -9,14 +9,14 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LoginRouteImport } from './routes/login' import { Route as ProtectedRouteImport } from './routes/protected' +import { Route as LoginRouteImport } from './routes/login' +import { Route as IndexRouteImport } from './routes/index' import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ProtectedRoute = ProtectedRouteImport.update({ + id: '/protected', + path: '/protected', getParentRoute: () => rootRouteImport, } as any) const LoginRoute = LoginRouteImport.update({ @@ -24,9 +24,9 @@ const LoginRoute = LoginRouteImport.update({ path: '/login', getParentRoute: () => rootRouteImport, } as any) -const ProtectedRoute = ProtectedRouteImport.update({ - id: '/protected', - path: '/protected', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({ @@ -71,11 +71,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/protected': { + id: '/protected' + path: '/protected' + fullPath: '/protected' + preLoaderRoute: typeof ProtectedRouteImport parentRoute: typeof rootRouteImport } '/login': { @@ -85,11 +85,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } - '/protected': { - id: '/protected' - path: '/protected' - fullPath: '/protected' - preLoaderRoute: typeof ProtectedRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/api/auth/$': { diff --git a/examples/react/start-basic-cloudflare/package.json b/examples/react/start-basic-cloudflare/package.json index 2108922446..f74602ab83 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0" }, @@ -26,8 +26,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "wrangler": "^4.74.0" } diff --git a/examples/react/start-basic-cloudflare/src/routeTree.gen.ts b/examples/react/start-basic-cloudflare/src/routeTree.gen.ts index 57b849492d..0bd698a666 100644 --- a/examples/react/start-basic-cloudflare/src/routeTree.gen.ts +++ b/examples/react/start-basic-cloudflare/src/routeTree.gen.ts @@ -9,46 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -56,9 +37,53 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ + id: '/customScript.js', + path: '/customScript.js', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -66,53 +91,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -234,39 +234,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -276,11 +248,74 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/customScript.js': { + id: '/customScript.js' + path: '/customScript.js' + fullPath: '/customScript.js' + preLoaderRoute: typeof CustomScriptDotjsRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -290,55 +325,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -346,12 +339,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/react/start-basic-react-query/README.md b/examples/react/start-basic-react-query/README.md index 70cc728ae4..77c61c2504 100644 --- a/examples/react/start-basic-react-query/README.md +++ b/examples/react/start-basic-react-query/README.md @@ -38,18 +38,5 @@ This example demonstrates how to use TanStack Query with TanStack Start for: - Server-side data fetching - Client-side caching and synchronization -- Confirmed server mutations followed by query invalidation -- Explicit freshness and automatic refetching - -## SSR and mutation checks - -Read the [Start + TanStack Query guide](https://tanstack.com/start/latest/docs/framework/react/guide/tanstack-query). The `/preferences` page stores a harmless display name in a cookie, so its tests need no account or external API. This cookie is not authentication. The other post/user examples use JSONPlaceholder. - -```sh -pnpm exec playwright install chromium -pnpm test:e2e -pnpm build -QUERY_EXAMPLE_PRODUCTION=1 pnpm test:e2e -``` - -The tests check concurrent SSR request isolation, no duplicate hydration read, one refetch after mutation invalidation, and persistence on reload. Query data is fresh for 30 seconds by default in this example; choose a window appropriate for your application. +- Optimistic updates +- Automatic refetching diff --git a/examples/react/start-basic-react-query/package.json b/examples/react/start-basic-react-query/package.json index 9d819d4390..40a18be142 100644 --- a/examples/react/start-basic-react-query/package.json +++ b/examples/react/start-basic-react-query/package.json @@ -7,16 +7,15 @@ "dev": "vite dev", "build": "vite build && tsc --noEmit", "preview": "vite preview", - "start": "pnpx srvx --prod -s ../client dist/server/server.js", - "test:e2e": "playwright test" + "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-router-ssr-query": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-router-ssr-query": "^1.167.1", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -29,9 +28,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14", - "@playwright/test": "^1.61.0" + "typescript": "^6.0.2", + "vite": "^8.0.14" } } diff --git a/examples/react/start-basic-react-query/playwright.config.ts b/examples/react/start-basic-react-query/playwright.config.ts deleted file mode 100644 index 298a1133e9..0000000000 --- a/examples/react/start-basic-react-query/playwright.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from '@playwright/test' - -export default defineConfig({ - testDir: './tests', - use: { baseURL: 'http://localhost:3110', browserName: 'chromium' }, - webServer: { - command: - process.env.QUERY_EXAMPLE_PRODUCTION === '1' - ? 'PORT=3110 pnpm start' - : 'pnpm dev --port 3110', - url: 'http://localhost:3110/preferences', - timeout: 120_000, - }, -}) diff --git a/examples/react/start-basic-react-query/src/routeTree.gen.ts b/examples/react/start-basic-react-query/src/routeTree.gen.ts index 0c7a90d4a1..a3a4ddf49f 100644 --- a/examples/react/start-basic-react-query/src/routeTree.gen.ts +++ b/examples/react/start-basic-react-query/src/routeTree.gen.ts @@ -9,31 +9,26 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteRouteImport } from './routes/posts.route' -import { Route as PreferencesRouteImport } from './routes/preferences' import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as UsersRouteRouteImport } from './routes/users.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as PostsRouteRouteImport } from './routes/posts.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', +const RedirectRoute = RedirectRouteImport.update({ + id: '/redirect', + path: '/redirect', getParentRoute: () => rootRouteImport, } as any) const DeferredRoute = DeferredRouteImport.update({ @@ -41,19 +36,8 @@ const DeferredRoute = DeferredRouteImport.update({ path: '/deferred', getParentRoute: () => rootRouteImport, } as any) -const PostsRouteRoute = PostsRouteRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const PreferencesRoute = PreferencesRouteImport.update({ - id: '/preferences', - path: '/preferences', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) const UsersRouteRoute = UsersRouteRouteImport.update({ @@ -61,65 +45,74 @@ const UsersRouteRoute = UsersRouteRouteImport.update({ path: '/users', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsRouteRoute = PostsRouteRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRouteRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRouteRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRouteRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRouteRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRouteRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', + getParentRoute: () => rootRouteImport, +} as any) +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute '/posts': typeof PostsRouteRouteWithChildren '/users': typeof UsersRouteRouteWithChildren '/deferred': typeof DeferredRoute - '/preferences': typeof PreferencesRoute '/redirect': typeof RedirectRoute '/api/users': typeof ApiUsersRouteWithChildren '/posts/$postId': typeof PostsPostIdRoute @@ -134,7 +127,6 @@ export interface FileRoutesByFullPath { export interface FileRoutesByTo { '/': typeof IndexRoute '/deferred': typeof DeferredRoute - '/preferences': typeof PreferencesRoute '/redirect': typeof RedirectRoute '/api/users': typeof ApiUsersRouteWithChildren '/posts/$postId': typeof PostsPostIdRoute @@ -153,7 +145,6 @@ export interface FileRoutesById { '/users': typeof UsersRouteRouteWithChildren '/_pathlessLayout': typeof PathlessLayoutRouteWithChildren '/deferred': typeof DeferredRoute - '/preferences': typeof PreferencesRoute '/redirect': typeof RedirectRoute '/_pathlessLayout/_nested-layout': typeof PathlessLayoutNestedLayoutRouteWithChildren '/api/users': typeof ApiUsersRouteWithChildren @@ -173,7 +164,6 @@ export interface FileRouteTypes { | '/posts' | '/users' | '/deferred' - | '/preferences' | '/redirect' | '/api/users' | '/posts/$postId' @@ -188,7 +178,6 @@ export interface FileRouteTypes { to: | '/' | '/deferred' - | '/preferences' | '/redirect' | '/api/users' | '/posts/$postId' @@ -206,7 +195,6 @@ export interface FileRouteTypes { | '/users' | '/_pathlessLayout' | '/deferred' - | '/preferences' | '/redirect' | '/_pathlessLayout/_nested-layout' | '/api/users' @@ -226,7 +214,6 @@ export interface RootRouteChildren { UsersRouteRoute: typeof UsersRouteRouteWithChildren PathlessLayoutRoute: typeof PathlessLayoutRouteWithChildren DeferredRoute: typeof DeferredRoute - PreferencesRoute: typeof PreferencesRoute RedirectRoute: typeof RedirectRoute ApiUsersRoute: typeof ApiUsersRouteWithChildren PostsPostIdDeepRoute: typeof PostsPostIdDeepRoute @@ -234,18 +221,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport + '/redirect': { + id: '/redirect' + path: '/redirect' + fullPath: '/redirect' + preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } '/deferred': { @@ -255,25 +235,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DeferredRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/preferences': { - id: '/preferences' - path: '/preferences' - fullPath: '/preferences' - preLoaderRoute: typeof PreferencesRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } '/users': { @@ -283,33 +249,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRouteRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRouteRoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/users/': { id: '/users/' @@ -318,6 +270,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRouteRoute } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRouteRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -325,19 +284,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport } '/api/users/$id': { id: '/api/users/$id' @@ -346,12 +319,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ApiUsersIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } @@ -432,7 +412,6 @@ const rootRouteChildren: RootRouteChildren = { UsersRouteRoute: UsersRouteRouteWithChildren, PathlessLayoutRoute: PathlessLayoutRouteWithChildren, DeferredRoute: DeferredRoute, - PreferencesRoute: PreferencesRoute, RedirectRoute: RedirectRoute, ApiUsersRoute: ApiUsersRouteWithChildren, PostsPostIdDeepRoute: PostsPostIdDeepRoute, @@ -442,11 +421,10 @@ export const routeTree = rootRouteImport ._addFileTypes() import type { getRouter } from './router.tsx' -import type { startInstance } from './start.ts' +import type { createStart } from '@tanstack/react-start' declare module '@tanstack/react-start' { interface Register { ssr: true router: Awaited> - config: Awaited> } } diff --git a/examples/react/start-basic-react-query/src/router.tsx b/examples/react/start-basic-react-query/src/router.tsx index 345055c116..314b29edd0 100644 --- a/examples/react/start-basic-react-query/src/router.tsx +++ b/examples/react/start-basic-react-query/src/router.tsx @@ -6,15 +6,12 @@ import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' import { NotFound } from './components/NotFound' export function getRouter() { - const queryClient = new QueryClient({ - defaultOptions: { queries: { staleTime: 30_000 } }, - }) + const queryClient = new QueryClient() const router = createRouter({ routeTree, context: { queryClient }, defaultPreload: 'intent', - defaultPreloadStaleTime: 0, defaultErrorComponent: DefaultCatchBoundary, defaultNotFoundComponent: () => , }) diff --git a/examples/react/start-basic-react-query/src/routes/__root.tsx b/examples/react/start-basic-react-query/src/routes/__root.tsx index 71c19b2c6f..bc278f8036 100644 --- a/examples/react/start-basic-react-query/src/routes/__root.tsx +++ b/examples/react/start-basic-react-query/src/routes/__root.tsx @@ -83,7 +83,6 @@ function RootDocument({ children }: { children: React.ReactNode }) {
    - Preferences { - await context.queryClient.query(readerNameOptions) - }, - headers: () => ({ 'Cache-Control': 'private, no-store' }), - head: () => ({ meta: [{ title: 'Reader preferences' }] }), - component: Preferences, -}) - -function Preferences() { - const { data: name } = useSuspenseQuery(readerNameOptions) - const queryClient = useQueryClient() - const save = useServerFn(saveReaderName) - const hydrated = useHydrated() - const mutation = useMutation({ - mutationFn: (name: string) => save({ data: name }), - onSuccess: () => - queryClient.invalidateQueries({ queryKey: readerNameOptions.queryKey }), - }) - - return ( -
    -

    Reader preferences

    -

    Hello, {name}

    -
    { - event.preventDefault() - const value = new FormData(event.currentTarget).get('name') - if (typeof value === 'string') { - mutation.mutate(value) - } - }} - > -
    - - -
    - {mutation.isError ? ( -

    Could not save your name. Try again.

    - ) : null} -
    -
    - ) -} diff --git a/examples/react/start-basic-react-query/src/start.ts b/examples/react/start-basic-react-query/src/start.ts deleted file mode 100644 index 5fb1e247fb..0000000000 --- a/examples/react/start-basic-react-query/src/start.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { createCsrfMiddleware, createStart } from '@tanstack/react-start' - -export const startInstance = createStart(() => ({ - requestMiddleware: [ - createCsrfMiddleware({ - filter: (ctx) => ctx.handlerType === 'serverFn', - }), - ], -})) diff --git a/examples/react/start-basic-react-query/src/utils/preferences.ts b/examples/react/start-basic-react-query/src/utils/preferences.ts deleted file mode 100644 index 74c33e5848..0000000000 --- a/examples/react/start-basic-react-query/src/utils/preferences.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { queryOptions } from '@tanstack/react-query' -import { createServerFn } from '@tanstack/react-start' -import { - getCookie, - setCookie, - setResponseHeader, -} from '@tanstack/react-start/server' - -export const getReaderName = createServerFn({ method: 'GET' }).handler(() => { - setResponseHeader('Cache-Control', 'private, no-store') - return getCookie('reader-name') || 'Guest' -}) - -export const saveReaderName = createServerFn({ method: 'POST' }) - .validator((name: string) => { - if (typeof name !== 'string' || !name.trim() || name.length > 40) { - throw new Error('Enter a name between 1 and 40 characters') - } - return name.trim() - }) - .handler(({ data }) => { - setResponseHeader('Cache-Control', 'private, no-store') - setCookie('reader-name', data, { - httpOnly: true, - sameSite: 'lax', - secure: process.env.NODE_ENV === 'production', - path: '/', - }) - }) - -export const readerNameOptions = queryOptions({ - queryKey: ['reader-name'], - queryFn: () => getReaderName(), -}) diff --git a/examples/react/start-basic-react-query/tests/preferences.spec.ts b/examples/react/start-basic-react-query/tests/preferences.spec.ts deleted file mode 100644 index 309c402798..0000000000 --- a/examples/react/start-basic-react-query/tests/preferences.spec.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('concurrent SSR requests keep the same query key isolated by request', async ({ - request, -}) => { - const names = ['Lucia', 'Omar', 'Maya', 'Felix'] - const responses = await Promise.all( - names.map((name) => - request.get('/preferences', { - headers: { Cookie: `reader-name=${name}` }, - }), - ), - ) - for (const [index, response] of responses.entries()) { - expect(response.status()).toBe(200) - expect(response.headers()['cache-control']).toContain('no-store') - const html = await response.text() - expect(html).toContain(names[index]) - for (const other of names.filter((_, otherIndex) => otherIndex !== index)) { - expect(html).not.toContain(other) - } - } -}) - -test('hydration reuses SSR data and mutation invalidation refetches once', async ({ - page, -}) => { - const reads: string[] = [] - page.on('request', (request) => { - if ( - request.method() === 'GET' && - new URL(request.url()).pathname.startsWith('/_serverFn/') - ) { - reads.push(request.url()) - } - }) - await page.goto('/preferences') - await expect(page.getByTestId('reader-name')).toHaveText('Hello, Guest') - await expect(page.getByLabel('Display name')).toBeEnabled() - await page.waitForLoadState('networkidle') - expect(reads).toHaveLength(0) - - await page.getByLabel('Display name').fill('Ada') - const mutation = page.waitForRequest((request) => request.method() === 'POST') - await page.getByRole('button', { name: 'Save name' }).click() - await expect(page.getByTestId('reader-name')).toHaveText('Hello, Ada') - await expect(page.getByRole('button', { name: 'Save name' })).toBeEnabled() - await page.waitForLoadState('networkidle') - expect(reads).toHaveLength(1) - - const savedRequest = await mutation - const headers = await savedRequest.allHeaders() - delete headers['content-length'] - headers.origin = 'https://untrusted.example' - headers['sec-fetch-site'] = 'cross-site' - const denied = await page.request.post(savedRequest.url(), { - headers, - data: savedRequest.postData() ?? '', - }) - expect(denied.status()).toBe(403) - - await page.reload() - await expect(page.getByTestId('reader-name')).toHaveText('Hello, Ada') - await expect(page.getByLabel('Display name')).toBeEnabled() - await page.waitForLoadState('networkidle') - expect(reads).toHaveLength(1) -}) diff --git a/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json b/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json deleted file mode 100644 index e5dafce188..0000000000 --- a/examples/react/start-basic-rsbuild/.devcontainer/devcontainer.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "image": "mcr.microsoft.com/devcontainers/typescript-node:24" -} diff --git a/examples/react/start-basic-rsbuild/.gitignore b/examples/react/start-basic-rsbuild/.gitignore deleted file mode 100644 index 1f189d9bc0..0000000000 --- a/examples/react/start-basic-rsbuild/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -node_modules -package-lock.json -yarn.lock - -.DS_Store -.cache -.env -.vercel -dist -/build/ -/api/ -/server/build -/public/build# Sentry Config File -.env.sentry-build-plugin -/test-results/ -/playwright-report/ -/blob-report/ -/playwright/.cache/ -.tanstack diff --git a/examples/react/start-basic-rsbuild/.prettierignore b/examples/react/start-basic-rsbuild/.prettierignore deleted file mode 100644 index 2be5eaa6ec..0000000000 --- a/examples/react/start-basic-rsbuild/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -**/build -**/public -pnpm-lock.yaml -routeTree.gen.ts \ No newline at end of file diff --git a/examples/react/start-basic-rsbuild/.vscode/settings.json b/examples/react/start-basic-rsbuild/.vscode/settings.json deleted file mode 100644 index 00b5278e58..0000000000 --- a/examples/react/start-basic-rsbuild/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "files.watcherExclude": { - "**/routeTree.gen.ts": true - }, - "search.exclude": { - "**/routeTree.gen.ts": true - }, - "files.readonlyInclude": { - "**/routeTree.gen.ts": true - } -} diff --git a/examples/react/start-basic-rsbuild/README.md b/examples/react/start-basic-rsbuild/README.md deleted file mode 100644 index 64117c915b..0000000000 --- a/examples/react/start-basic-rsbuild/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# TanStack Start - Basic Rsbuild Example - -This is the basic TanStack Start Rsbuild example, demonstrating the fundamentals of building applications with TanStack Router and TanStack Start. - -- [TanStack Router Docs](https://tanstack.com/router) - -It's deployed automagically with Netlify! - -- [Netlify](https://netlify.com/) - -## Start a new project based on this example - -To start a new project based on this example, run: - -```sh -npx gitpick TanStack/router/tree/main/examples/react/start-basic-rsbuild start-basic-rsbuild -``` - -## Getting Started - -From your terminal: - -```sh -pnpm install -pnpm dev -``` - -This starts your app in development mode, rebuilding assets on file changes. - -## Build - -To build the app for production: - -```sh -pnpm build -``` diff --git a/examples/react/start-basic-rsbuild/package.json b/examples/react/start-basic-rsbuild/package.json deleted file mode 100644 index bea4ba26ef..0000000000 --- a/examples/react/start-basic-rsbuild/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "tanstack-start-example-basic-rsbuild", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "dev": "rsbuild dev --port 3000", - "build": "rsbuild build && tsc --noEmit", - "preview": "rsbuild preview", - "start": "srvx --prod -s ../client dist/server/index.js" - }, - "dependencies": { - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", - "react": "^19.2.3", - "react-dom": "^19.2.3", - "tailwind-merge": "^3.6.0", - "zod": "^4.4.3" - }, - "devDependencies": { - "@rsbuild/core": "^2.3.1", - "@rsbuild/plugin-react": "^2.0.0", - "@rsbuild/plugin-tailwindcss": "^2.0.3", - "@types/node": "25.0.9", - "@types/react": "^19.2.8", - "@types/react-dom": "^19.2.3", - "srvx": "^1.0.0", - "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" - } -} diff --git a/examples/react/start-basic-rsbuild/public/android-chrome-192x192.png b/examples/react/start-basic-rsbuild/public/android-chrome-192x192.png deleted file mode 100644 index 09c8324f8c..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/android-chrome-192x192.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/android-chrome-512x512.png b/examples/react/start-basic-rsbuild/public/android-chrome-512x512.png deleted file mode 100644 index 11d626ea3d..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/android-chrome-512x512.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/apple-touch-icon.png b/examples/react/start-basic-rsbuild/public/apple-touch-icon.png deleted file mode 100644 index 5a9423cc02..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/apple-touch-icon.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/favicon-16x16.png b/examples/react/start-basic-rsbuild/public/favicon-16x16.png deleted file mode 100644 index e3389b0044..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/favicon-16x16.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/favicon-32x32.png b/examples/react/start-basic-rsbuild/public/favicon-32x32.png deleted file mode 100644 index 900c77d444..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/favicon-32x32.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/favicon.ico b/examples/react/start-basic-rsbuild/public/favicon.ico deleted file mode 100644 index 1a1751676f..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/favicon.ico and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/favicon.png b/examples/react/start-basic-rsbuild/public/favicon.png deleted file mode 100644 index 1e77bc0609..0000000000 Binary files a/examples/react/start-basic-rsbuild/public/favicon.png and /dev/null differ diff --git a/examples/react/start-basic-rsbuild/public/site.webmanifest b/examples/react/start-basic-rsbuild/public/site.webmanifest deleted file mode 100644 index fa99de77db..0000000000 --- a/examples/react/start-basic-rsbuild/public/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "", - "short_name": "", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/examples/react/start-basic-rsbuild/rsbuild.config.ts b/examples/react/start-basic-rsbuild/rsbuild.config.ts deleted file mode 100644 index 3705696818..0000000000 --- a/examples/react/start-basic-rsbuild/rsbuild.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { tanstackStart } from '@tanstack/react-start/plugin/rsbuild' -import { defineConfig } from '@rsbuild/core' -import { pluginReact } from '@rsbuild/plugin-react' -import { pluginTailwindcss } from '@rsbuild/plugin-tailwindcss' - -export default defineConfig({ - server: { - port: 3000, - }, - plugins: [ - pluginTailwindcss(), - pluginReact(), - tanstackStart({ - srcDirectory: 'src', - }), - ], -}) diff --git a/examples/react/start-basic-rsbuild/src/components/DefaultCatchBoundary.tsx b/examples/react/start-basic-rsbuild/src/components/DefaultCatchBoundary.tsx deleted file mode 100644 index 4a22649ed4..0000000000 --- a/examples/react/start-basic-rsbuild/src/components/DefaultCatchBoundary.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { - ErrorComponent, - Link, - useLocation, - useRouter, -} from '@tanstack/react-router' -import type { ErrorComponentProps } from '@tanstack/react-router' - -export function DefaultCatchBoundary({ error }: ErrorComponentProps) { - const router = useRouter() - const isRoot = useLocation({ - select: (location) => location.pathname === '/', - }) - - console.error('DefaultCatchBoundary Error:', error) - - return ( -
    - -
    - - {isRoot ? ( - - Home - - ) : ( - { - e.preventDefault() - window.history.back() - }} - > - Go Back - - )} -
    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/components/NotFound.tsx b/examples/react/start-basic-rsbuild/src/components/NotFound.tsx deleted file mode 100644 index fd4e75befe..0000000000 --- a/examples/react/start-basic-rsbuild/src/components/NotFound.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Link } from '@tanstack/react-router' - -export function NotFound({ children }: { children?: any }) { - return ( -
    -
    - {children ||

    The page you are looking for does not exist.

    } -
    -

    - - - Start Over - -

    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/components/PostError.tsx b/examples/react/start-basic-rsbuild/src/components/PostError.tsx deleted file mode 100644 index 271f2d1de1..0000000000 --- a/examples/react/start-basic-rsbuild/src/components/PostError.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { ErrorComponent } from '@tanstack/react-router' -import type { ErrorComponentProps } from '@tanstack/react-router' - -export function PostErrorComponent({ error }: ErrorComponentProps) { - return -} diff --git a/examples/react/start-basic-rsbuild/src/components/UserError.tsx b/examples/react/start-basic-rsbuild/src/components/UserError.tsx deleted file mode 100644 index af5d0c6f16..0000000000 --- a/examples/react/start-basic-rsbuild/src/components/UserError.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { ErrorComponent } from '@tanstack/react-router' -import type { ErrorComponentProps } from '@tanstack/react-router' - -export function UserErrorComponent({ error }: ErrorComponentProps) { - return -} diff --git a/examples/react/start-basic-rsbuild/src/env.d.ts b/examples/react/start-basic-rsbuild/src/env.d.ts deleted file mode 100644 index b0ac762b09..0000000000 --- a/examples/react/start-basic-rsbuild/src/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/examples/react/start-basic-rsbuild/src/routeTree.gen.ts b/examples/react/start-basic-rsbuild/src/routeTree.gen.ts deleted file mode 100644 index 57b849492d..0000000000 --- a/examples/react/start-basic-rsbuild/src/routeTree.gen.ts +++ /dev/null @@ -1,447 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' -import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as UsersIndexRouteImport } from './routes/users.index' -import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' -import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', - getParentRoute: () => rootRouteImport, -} as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', - getParentRoute: () => rootRouteImport, -} as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => UsersRoute, -} as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) -const PathlessLayoutNestedLayoutRouteBRoute = - PathlessLayoutNestedLayoutRouteBRouteImport.update({ - id: '/route-b', - path: '/route-b', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/customScript.js': typeof CustomScriptDotjsRoute - '/deferred': typeof DeferredRoute - '/posts': typeof PostsRouteWithChildren - '/redirect': typeof RedirectRoute - '/users': typeof UsersRouteWithChildren - '/api/users': typeof ApiUsersRouteWithChildren - '/posts/$postId': typeof PostsPostIdRoute - '/users/$userId': typeof UsersUserIdRoute - '/posts/': typeof PostsIndexRoute - '/users/': typeof UsersIndexRoute - '/route-a': typeof PathlessLayoutNestedLayoutRouteARoute - '/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute - '/api/users/$userId': typeof ApiUsersUserIdRoute - '/posts/$postId/deep': typeof PostsPostIdDeepRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/customScript.js': typeof CustomScriptDotjsRoute - '/deferred': typeof DeferredRoute - '/redirect': typeof RedirectRoute - '/api/users': typeof ApiUsersRouteWithChildren - '/posts/$postId': typeof PostsPostIdRoute - '/users/$userId': typeof UsersUserIdRoute - '/posts': typeof PostsIndexRoute - '/users': typeof UsersIndexRoute - '/route-a': typeof PathlessLayoutNestedLayoutRouteARoute - '/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute - '/api/users/$userId': typeof ApiUsersUserIdRoute - '/posts/$postId/deep': typeof PostsPostIdDeepRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/_pathlessLayout': typeof PathlessLayoutRouteWithChildren - '/customScript.js': typeof CustomScriptDotjsRoute - '/deferred': typeof DeferredRoute - '/posts': typeof PostsRouteWithChildren - '/redirect': typeof RedirectRoute - '/users': typeof UsersRouteWithChildren - '/_pathlessLayout/_nested-layout': typeof PathlessLayoutNestedLayoutRouteWithChildren - '/api/users': typeof ApiUsersRouteWithChildren - '/posts/$postId': typeof PostsPostIdRoute - '/users/$userId': typeof UsersUserIdRoute - '/posts/': typeof PostsIndexRoute - '/users/': typeof UsersIndexRoute - '/_pathlessLayout/_nested-layout/route-a': typeof PathlessLayoutNestedLayoutRouteARoute - '/_pathlessLayout/_nested-layout/route-b': typeof PathlessLayoutNestedLayoutRouteBRoute - '/api/users/$userId': typeof ApiUsersUserIdRoute - '/posts_/$postId/deep': typeof PostsPostIdDeepRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - | '/' - | '/customScript.js' - | '/deferred' - | '/posts' - | '/redirect' - | '/users' - | '/api/users' - | '/posts/$postId' - | '/users/$userId' - | '/posts/' - | '/users/' - | '/route-a' - | '/route-b' - | '/api/users/$userId' - | '/posts/$postId/deep' - fileRoutesByTo: FileRoutesByTo - to: - | '/' - | '/customScript.js' - | '/deferred' - | '/redirect' - | '/api/users' - | '/posts/$postId' - | '/users/$userId' - | '/posts' - | '/users' - | '/route-a' - | '/route-b' - | '/api/users/$userId' - | '/posts/$postId/deep' - id: - | '__root__' - | '/' - | '/_pathlessLayout' - | '/customScript.js' - | '/deferred' - | '/posts' - | '/redirect' - | '/users' - | '/_pathlessLayout/_nested-layout' - | '/api/users' - | '/posts/$postId' - | '/users/$userId' - | '/posts/' - | '/users/' - | '/_pathlessLayout/_nested-layout/route-a' - | '/_pathlessLayout/_nested-layout/route-b' - | '/api/users/$userId' - | '/posts_/$postId/deep' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - PathlessLayoutRoute: typeof PathlessLayoutRouteWithChildren - CustomScriptDotjsRoute: typeof CustomScriptDotjsRoute - DeferredRoute: typeof DeferredRoute - PostsRoute: typeof PostsRouteWithChildren - RedirectRoute: typeof RedirectRoute - UsersRoute: typeof UsersRouteWithChildren - ApiUsersRoute: typeof ApiUsersRouteWithChildren - PostsPostIdDeepRoute: typeof PostsPostIdDeepRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport - parentRoute: typeof rootRouteImport - } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/api/users/$userId': { - id: '/api/users/$userId' - path: '/$userId' - fullPath: '/api/users/$userId' - preLoaderRoute: typeof ApiUsersUserIdRouteImport - parentRoute: typeof ApiUsersRoute - } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -interface PathlessLayoutNestedLayoutRouteChildren { - PathlessLayoutNestedLayoutRouteARoute: typeof PathlessLayoutNestedLayoutRouteARoute - PathlessLayoutNestedLayoutRouteBRoute: typeof PathlessLayoutNestedLayoutRouteBRoute -} - -const PathlessLayoutNestedLayoutRouteChildren: PathlessLayoutNestedLayoutRouteChildren = - { - PathlessLayoutNestedLayoutRouteARoute: - PathlessLayoutNestedLayoutRouteARoute, - PathlessLayoutNestedLayoutRouteBRoute: - PathlessLayoutNestedLayoutRouteBRoute, - } - -const PathlessLayoutNestedLayoutRouteWithChildren = - PathlessLayoutNestedLayoutRoute._addFileChildren( - PathlessLayoutNestedLayoutRouteChildren, - ) - -interface PathlessLayoutRouteChildren { - PathlessLayoutNestedLayoutRoute: typeof PathlessLayoutNestedLayoutRouteWithChildren -} - -const PathlessLayoutRouteChildren: PathlessLayoutRouteChildren = { - PathlessLayoutNestedLayoutRoute: PathlessLayoutNestedLayoutRouteWithChildren, -} - -const PathlessLayoutRouteWithChildren = PathlessLayoutRoute._addFileChildren( - PathlessLayoutRouteChildren, -) - -interface PostsRouteChildren { - PostsPostIdRoute: typeof PostsPostIdRoute - PostsIndexRoute: typeof PostsIndexRoute -} - -const PostsRouteChildren: PostsRouteChildren = { - PostsPostIdRoute: PostsPostIdRoute, - PostsIndexRoute: PostsIndexRoute, -} - -const PostsRouteWithChildren = PostsRoute._addFileChildren(PostsRouteChildren) - -interface UsersRouteChildren { - UsersUserIdRoute: typeof UsersUserIdRoute - UsersIndexRoute: typeof UsersIndexRoute -} - -const UsersRouteChildren: UsersRouteChildren = { - UsersUserIdRoute: UsersUserIdRoute, - UsersIndexRoute: UsersIndexRoute, -} - -const UsersRouteWithChildren = UsersRoute._addFileChildren(UsersRouteChildren) - -interface ApiUsersRouteChildren { - ApiUsersUserIdRoute: typeof ApiUsersUserIdRoute -} - -const ApiUsersRouteChildren: ApiUsersRouteChildren = { - ApiUsersUserIdRoute: ApiUsersUserIdRoute, -} - -const ApiUsersRouteWithChildren = ApiUsersRoute._addFileChildren( - ApiUsersRouteChildren, -) - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - PathlessLayoutRoute: PathlessLayoutRouteWithChildren, - CustomScriptDotjsRoute: CustomScriptDotjsRoute, - DeferredRoute: DeferredRoute, - PostsRoute: PostsRouteWithChildren, - RedirectRoute: RedirectRoute, - UsersRoute: UsersRouteWithChildren, - ApiUsersRoute: ApiUsersRouteWithChildren, - PostsPostIdDeepRoute: PostsPostIdDeepRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - } -} diff --git a/examples/react/start-basic-rsbuild/src/router.tsx b/examples/react/start-basic-rsbuild/src/router.tsx deleted file mode 100644 index f380f73be7..0000000000 --- a/examples/react/start-basic-rsbuild/src/router.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' -import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' -import { NotFound } from './components/NotFound' - -export function getRouter() { - const router = createRouter({ - routeTree, - defaultPreload: 'intent', - defaultErrorComponent: DefaultCatchBoundary, - defaultNotFoundComponent: () => , - scrollRestoration: true, - }) - return router -} diff --git a/examples/react/start-basic-rsbuild/src/routes/__root.tsx b/examples/react/start-basic-rsbuild/src/routes/__root.tsx deleted file mode 100644 index 6d4aed1fe0..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/__root.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { - HeadContent, - Link, - Scripts, - createRootRoute, -} from '@tanstack/react-router' -import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' -import * as React from 'react' -import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' -import { NotFound } from '~/components/NotFound' -import appCss from '~/styles/app.css?url' -import { seo } from '~/utils/seo' - -export const Route = createRootRoute({ - head: () => ({ - meta: [ - { - charSet: 'utf-8', - }, - { - name: 'viewport', - content: 'width=device-width, initial-scale=1', - }, - ...seo({ - title: - 'TanStack Start | Type-Safe, Client-First, Full-Stack React Framework', - description: `TanStack Start is a type-safe, client-first, full-stack React framework. `, - }), - ], - links: [ - { rel: 'stylesheet', href: appCss }, - { - rel: 'apple-touch-icon', - sizes: '180x180', - href: '/apple-touch-icon.png', - }, - { - rel: 'icon', - type: 'image/png', - sizes: '32x32', - href: '/favicon-32x32.png', - }, - { - rel: 'icon', - type: 'image/png', - sizes: '16x16', - href: '/favicon-16x16.png', - }, - { rel: 'manifest', href: '/site.webmanifest', color: '#fffff' }, - { rel: 'icon', href: '/favicon.ico' }, - ], - scripts: [ - { - src: '/customScript.js', - type: 'text/javascript', - }, - ], - }), - errorComponent: DefaultCatchBoundary, - notFoundComponent: () => , - shellComponent: RootDocument, -}) - -function RootDocument({ children }: { children: React.ReactNode }) { - return ( - - - - - -
    - - Home - {' '} - - Posts - {' '} - - Users - {' '} - - Pathless Layout - {' '} - - Deferred - {' '} - - This Route Does Not Exist - -
    -
    - {children} - - - - - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout.tsx b/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout.tsx deleted file mode 100644 index c3b12442b8..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Outlet, createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/_pathlessLayout')({ - component: LayoutComponent, -}) - -function LayoutComponent() { - return ( -
    -
    I'm a layout
    -
    - -
    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout.tsx b/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout.tsx deleted file mode 100644 index 9a48b73a46..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Link, Outlet, createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/_pathlessLayout/_nested-layout')({ - component: LayoutComponent, -}) - -function LayoutComponent() { - return ( -
    -
    I'm a nested layout
    -
    - - Go to route A - - - Go to route B - -
    -
    - -
    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-a.tsx b/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-a.tsx deleted file mode 100644 index 426a8fe486..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-a.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/_pathlessLayout/_nested-layout/route-a')( - { - component: LayoutAComponent, - }, -) - -function LayoutAComponent() { - return
    I'm A!
    -} diff --git a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-b.tsx b/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-b.tsx deleted file mode 100644 index 20facf2daf..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/_pathlessLayout/_nested-layout/route-b.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/_pathlessLayout/_nested-layout/route-b')( - { - component: LayoutBComponent, - }, -) - -function LayoutBComponent() { - return
    I'm B!
    -} diff --git a/examples/react/start-basic-rsbuild/src/routes/api/users.$userId.ts b/examples/react/start-basic-rsbuild/src/routes/api/users.$userId.ts deleted file mode 100644 index ee34d7a189..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/api/users.$userId.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import type { User } from '~/utils/users' - -export const Route = createFileRoute('/api/users/$userId')({ - server: { - handlers: { - GET: async ({ params, request }) => { - console.info(`Fetching users by id=${params.userId}... @`, request.url) - try { - const res = await fetch( - 'https://jsonplaceholder.typicode.com/users/' + params.userId, - ) - if (!res.ok) { - throw new Error('Failed to fetch user') - } - - const user = (await res.json()) as User - - return Response.json({ - id: user.id, - name: user.name, - email: user.email, - }) - } catch (e) { - console.error(e) - return Response.json({ error: 'User not found' }, { status: 404 }) - } - }, - }, - }, -}) diff --git a/examples/react/start-basic-rsbuild/src/routes/api/users.ts b/examples/react/start-basic-rsbuild/src/routes/api/users.ts deleted file mode 100644 index 4cecd01852..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/api/users.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { getRequestHeaders } from '@tanstack/react-start/server' -import { createMiddleware } from '@tanstack/react-start' -import type { User } from '~/utils/users' - -const userLoggerMiddleware = createMiddleware().server(async ({ next }) => { - console.info('In: /users') - console.info('Request Headers:', getRequestHeaders()) - const result = await next() - result.response.headers.set('x-users', 'true') - console.info('Out: /users') - return result -}) - -const testParentMiddleware = createMiddleware().server(async ({ next }) => { - console.info('In: testParentMiddleware') - const result = await next() - result.response.headers.set('x-test-parent', 'true') - console.info('Out: testParentMiddleware') - return result -}) - -const testMiddleware = createMiddleware() - .middleware([testParentMiddleware]) - .server(async ({ next }) => { - console.info('In: testMiddleware') - const result = await next() - result.response.headers.set('x-test', 'true') - - // if (Math.random() > 0.5) { - // throw new Response(null, { - // status: 302, - // headers: { Location: 'https://www.google.com' }, - // }) - // } - - console.info('Out: testMiddleware') - return result - }) - -export const Route = createFileRoute('/api/users')({ - server: { - middleware: [testMiddleware, userLoggerMiddleware], - handlers: { - GET: async ({ request }) => { - console.info('GET /api/users @', request.url) - console.info('Fetching users... @', request.url) - const res = await fetch('https://jsonplaceholder.typicode.com/users') - if (!res.ok) { - throw new Error('Failed to fetch users') - } - - const data = (await res.json()) as Array - - const list = data.slice(0, 10) - - return Response.json( - list.map((u) => ({ id: u.id, name: u.name, email: u.email })), - ) - }, - }, - }, -}) diff --git a/examples/react/start-basic-rsbuild/src/routes/customScript[.]js.ts b/examples/react/start-basic-rsbuild/src/routes/customScript[.]js.ts deleted file mode 100644 index 811471ac15..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/customScript[.]js.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/customScript.js')({ - server: { - handlers: { - GET: () => { - return new Response('console.log("Hello from customScript.js!")', { - headers: { - 'Content-Type': 'application/javascript', - }, - }) - }, - }, - }, -}) diff --git a/examples/react/start-basic-rsbuild/src/routes/deferred.tsx b/examples/react/start-basic-rsbuild/src/routes/deferred.tsx deleted file mode 100644 index f3e09d1d4e..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/deferred.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { Await, createFileRoute } from '@tanstack/react-router' -import { createServerFn } from '@tanstack/react-start' -import { Suspense, useState } from 'react' - -const personServerFn = createServerFn({ method: 'GET' }) - .validator((d: string) => d) - .handler(({ data: name }) => { - return { name, randomNumber: Math.floor(Math.random() * 100) } - }) - -const slowServerFn = createServerFn({ method: 'GET' }) - .validator((d: string) => d) - .handler(async ({ data: name }) => { - await new Promise((r) => setTimeout(r, 1000)) - return { name, randomNumber: Math.floor(Math.random() * 100) } - }) - -export const Route = createFileRoute('/deferred')({ - loader: async () => { - return { - deferredStuff: new Promise((r) => - setTimeout(() => r('Hello deferred!'), 2000), - ), - deferredPerson: slowServerFn({ data: 'Tanner Linsley' }), - person: await personServerFn({ data: 'John Doe' }), - } - }, - component: Deferred, -}) - -function Deferred() { - const [count, setCount] = useState(0) - const { deferredStuff, deferredPerson, person } = Route.useLoaderData() - - return ( -
    -
    - {person.name} - {person.randomNumber} -
    - Loading person...
    }> - ( -
    - {data.name} - {data.randomNumber} -
    - )} - /> - - Loading stuff...
    }> -

    {data}

    } - /> - -
    Count: {count}
    -
    - -
    -

    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/index.tsx b/examples/react/start-basic-rsbuild/src/routes/index.tsx deleted file mode 100644 index 09a907cb18..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/')({ - component: Home, -}) - -function Home() { - return ( -
    -

    Welcome Home!!!

    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/posts.$postId.tsx b/examples/react/start-basic-rsbuild/src/routes/posts.$postId.tsx deleted file mode 100644 index 65905bf8c4..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/posts.$postId.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Link, createFileRoute } from '@tanstack/react-router' -import { fetchPost } from '../utils/posts' -import { NotFound } from '~/components/NotFound' -import { PostErrorComponent } from '~/components/PostError' - -export const Route = createFileRoute('/posts/$postId')({ - loader: ({ params: { postId } }) => fetchPost({ data: postId }), - errorComponent: PostErrorComponent, - component: PostComponent, - notFoundComponent: () => { - return Post not found - }, -}) - -function PostComponent() { - const post = Route.useLoaderData() - - return ( -
    -

    {post.title}

    -
    {post.body}
    - - Deep View - -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/posts.index.tsx b/examples/react/start-basic-rsbuild/src/routes/posts.index.tsx deleted file mode 100644 index 5b5f08f95b..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/posts.index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/posts/')({ - component: PostsIndexComponent, -}) - -function PostsIndexComponent() { - return
    Select a post.
    -} diff --git a/examples/react/start-basic-rsbuild/src/routes/posts.tsx b/examples/react/start-basic-rsbuild/src/routes/posts.tsx deleted file mode 100644 index 9b9162be7c..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/posts.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { Link, Outlet, createFileRoute } from '@tanstack/react-router' -import { fetchPosts } from '../utils/posts' - -export const Route = createFileRoute('/posts')({ - loader: async () => fetchPosts(), - component: PostsComponent, -}) - -function PostsComponent() { - const posts = Route.useLoaderData() - - return ( -
    -
      - {[...posts, { id: 'i-do-not-exist', title: 'Non-existent Post' }].map( - (post) => { - return ( -
    • - -
      {post.title.substring(0, 20)}
      - -
    • - ) - }, - )} -
    -
    - -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/posts_.$postId.deep.tsx b/examples/react/start-basic-rsbuild/src/routes/posts_.$postId.deep.tsx deleted file mode 100644 index 29e6c39b5a..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/posts_.$postId.deep.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Link, createFileRoute } from '@tanstack/react-router' -import { fetchPost } from '../utils/posts' -import { PostErrorComponent } from '~/components/PostError' - -export const Route = createFileRoute('/posts_/$postId/deep')({ - loader: async ({ params: { postId } }) => - fetchPost({ - data: postId, - }), - errorComponent: PostErrorComponent, - component: PostDeepComponent, -}) - -function PostDeepComponent() { - const post = Route.useLoaderData() - - return ( -
    - - ← All Posts - -

    {post.title}

    -
    {post.body}
    -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/redirect.tsx b/examples/react/start-basic-rsbuild/src/routes/redirect.tsx deleted file mode 100644 index ea34b6e420..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/redirect.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { createFileRoute, redirect } from '@tanstack/react-router' - -export const Route = createFileRoute('/redirect')({ - beforeLoad: () => { - throw redirect({ - to: '/posts', - }) - }, -}) diff --git a/examples/react/start-basic-rsbuild/src/routes/users.$userId.tsx b/examples/react/start-basic-rsbuild/src/routes/users.$userId.tsx deleted file mode 100644 index 4e4d470075..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/users.$userId.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { NotFound } from '../components/NotFound' -import { UserErrorComponent } from '../components/UserError' -import type { User } from '../utils/users' - -export const Route = createFileRoute('/users/$userId')({ - loader: async ({ params: { userId } }) => { - try { - const res = await fetch('/api/users/' + userId) - if (!res.ok) { - throw new Error('Unexpected status code') - } - - const data = await res.json() - - return data as User - } catch { - throw new Error('Failed to fetch user') - } - }, - errorComponent: UserErrorComponent, - component: UserComponent, - notFoundComponent: () => { - return User not found - }, -}) - -function UserComponent() { - const user = Route.useLoaderData() - - return ( -
    -

    {user.name}

    -
    {user.email}
    - -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/users.index.tsx b/examples/react/start-basic-rsbuild/src/routes/users.index.tsx deleted file mode 100644 index 27d136987e..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/users.index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' - -export const Route = createFileRoute('/users/')({ - component: UsersIndexComponent, -}) - -function UsersIndexComponent() { - return ( -
    - Select a user or{' '} - - view as JSON - -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/routes/users.tsx b/examples/react/start-basic-rsbuild/src/routes/users.tsx deleted file mode 100644 index 64ca3ce156..0000000000 --- a/examples/react/start-basic-rsbuild/src/routes/users.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { Link, Outlet, createFileRoute } from '@tanstack/react-router' -import type { User } from '../utils/users' - -export const Route = createFileRoute('/users')({ - loader: async () => { - const res = await fetch('/api/users') - - if (!res.ok) { - throw new Error('Unexpected status code') - } - - const data = await res.json() - - return data as Array - }, - component: UsersComponent, -}) - -function UsersComponent() { - const users = Route.useLoaderData() - - return ( -
    -
      - {[ - ...users, - { id: 'i-do-not-exist', name: 'Non-existent User', email: '' }, - ].map((user) => { - return ( -
    • - -
      {user.name}
      - -
    • - ) - })} -
    -
    - -
    - ) -} diff --git a/examples/react/start-basic-rsbuild/src/styles/app.css b/examples/react/start-basic-rsbuild/src/styles/app.css deleted file mode 100644 index 37c1f5a6e2..0000000000 --- a/examples/react/start-basic-rsbuild/src/styles/app.css +++ /dev/null @@ -1,30 +0,0 @@ -@import 'tailwindcss' source('../'); - -@layer base { - *, - ::after, - ::before, - ::backdrop, - ::file-selector-button { - border-color: var(--color-gray-200, currentcolor); - } -} - -@layer base { - html { - color-scheme: light dark; - } - - * { - @apply border-gray-200 dark:border-gray-800; - } - - html, - body { - @apply text-gray-900 bg-gray-50 dark:bg-gray-950 dark:text-gray-200; - } - - .using-mouse * { - outline: none !important; - } -} diff --git a/examples/react/start-basic-rsbuild/src/utils/loggingMiddleware.tsx b/examples/react/start-basic-rsbuild/src/utils/loggingMiddleware.tsx deleted file mode 100644 index 3ea9a06439..0000000000 --- a/examples/react/start-basic-rsbuild/src/utils/loggingMiddleware.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { createMiddleware } from '@tanstack/react-start' - -const preLogMiddleware = createMiddleware({ type: 'function' }) - .client(async (ctx) => { - const clientTime = new Date() - - return ctx.next({ - context: { - clientTime, - }, - sendContext: { - clientTime, - }, - }) - }) - .server(async (ctx) => { - const serverTime = new Date() - - return ctx.next({ - sendContext: { - serverTime, - durationToServer: - serverTime.getTime() - ctx.context.clientTime.getTime(), - }, - }) - }) - -export const logMiddleware = createMiddleware({ type: 'function' }) - .middleware([preLogMiddleware]) - .client(async (ctx) => { - const res = await ctx.next() - - const now = new Date() - console.log('Client Req/Res:', { - duration: now.getTime() - res.context.clientTime.getTime(), - durationToServer: res.context.durationToServer, - durationFromServer: now.getTime() - res.context.serverTime.getTime(), - }) - - return res - }) diff --git a/examples/react/start-basic-rsbuild/src/utils/posts.tsx b/examples/react/start-basic-rsbuild/src/utils/posts.tsx deleted file mode 100644 index ea7dd0a721..0000000000 --- a/examples/react/start-basic-rsbuild/src/utils/posts.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { notFound } from '@tanstack/react-router' -import { createServerFn } from '@tanstack/react-start' - -export type PostType = { - id: number - title: string - body: string -} - -export const fetchPost = createServerFn({ method: 'POST' }) - .validator((d: string) => d) - .handler(async ({ data }) => { - console.info(`Fetching post with id ${data}...`) - const res = await fetch( - `https://jsonplaceholder.typicode.com/posts/${data}`, - ) - if (!res.ok) { - if (res.status === 404) { - throw notFound() - } - - throw new Error('Failed to fetch post') - } - - const post = await res.json() - - return post as PostType - }) - -export const fetchPosts = createServerFn().handler(async () => { - console.info('Fetching posts...') - const res = await fetch('https://jsonplaceholder.typicode.com/posts') - if (!res.ok) { - throw new Error('Failed to fetch posts') - } - - const posts = await res.json() - - return (posts as Array).slice(0, 10) -}) diff --git a/examples/react/start-basic-rsbuild/src/utils/seo.ts b/examples/react/start-basic-rsbuild/src/utils/seo.ts deleted file mode 100644 index d18ad84b74..0000000000 --- a/examples/react/start-basic-rsbuild/src/utils/seo.ts +++ /dev/null @@ -1,33 +0,0 @@ -export const seo = ({ - title, - description, - keywords, - image, -}: { - title: string - description?: string - image?: string - keywords?: string -}) => { - const tags = [ - { title }, - { name: 'description', content: description }, - { name: 'keywords', content: keywords }, - { name: 'twitter:title', content: title }, - { name: 'twitter:description', content: description }, - { name: 'twitter:creator', content: '@tannerlinsley' }, - { name: 'twitter:site', content: '@tannerlinsley' }, - { name: 'og:type', content: 'website' }, - { name: 'og:title', content: title }, - { name: 'og:description', content: description }, - ...(image - ? [ - { name: 'twitter:image', content: image }, - { name: 'twitter:card', content: 'summary_large_image' }, - { name: 'og:image', content: image }, - ] - : []), - ] - - return tags -} diff --git a/examples/react/start-basic-rsbuild/src/utils/users.tsx b/examples/react/start-basic-rsbuild/src/utils/users.tsx deleted file mode 100644 index 7ba645b383..0000000000 --- a/examples/react/start-basic-rsbuild/src/utils/users.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export type User = { - id: number - name: string - email: string -} diff --git a/examples/react/start-basic-rsbuild/tsconfig.json b/examples/react/start-basic-rsbuild/tsconfig.json deleted file mode 100644 index cc479423a1..0000000000 --- a/examples/react/start-basic-rsbuild/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include": ["**/*.ts", "**/*.tsx", "**/*.d.ts"], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "module": "ESNext", - "moduleResolution": "Bundler", - "lib": ["DOM", "DOM.Iterable", "ES2024"], - "isolatedModules": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "target": "ES2024", - "allowJs": true, - "forceConsistentCasingInFileNames": true, - "paths": { - "~/*": ["./src/*"] - }, - "noEmit": true - } -} diff --git a/examples/react/start-basic-static/package.json b/examples/react/start-basic-static/package.json index 58d573ca36..8ea4c54edc 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", - "@tanstack/start-static-server-functions": "^1.167.44", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", + "@tanstack/start-static-server-functions": "^1.167.18", "@vitejs/plugin-react": "^6.0.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -26,8 +26,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-basic-static/src/routeTree.gen.ts b/examples/react/start-basic-static/src/routeTree.gen.ts index d4a8e72343..ddc8fc320a 100644 --- a/examples/react/start-basic-static/src/routeTree.gen.ts +++ b/examples/react/start-basic-static/src/routeTree.gen.ts @@ -9,38 +9,24 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -48,53 +34,67 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) -const PathlessLayoutNestedLayoutRouteBRoute = - PathlessLayoutNestedLayoutRouteBRouteImport.update({ - id: '/route-b', - path: '/route-b', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) +const PathlessLayoutNestedLayoutRouteBRoute = + PathlessLayoutNestedLayoutRouteBRouteImport.update({ + id: '/route-b', + path: '/route-b', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -196,32 +196,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -231,33 +210,33 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' path: '' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/users/': { id: '/users/' @@ -266,6 +245,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRoute } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -273,12 +259,26 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -287,12 +287,12 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json index 46df8e4650..931df2a45d 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.6.0", @@ -24,10 +24,9 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "nitro": "^3.0.260903-beta", + "nitro": "^3.0.260311-beta", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-basic/src/routeTree.gen.ts b/examples/react/start-basic/src/routeTree.gen.ts index 57b849492d..0bd698a666 100644 --- a/examples/react/start-basic/src/routeTree.gen.ts +++ b/examples/react/start-basic/src/routeTree.gen.ts @@ -9,46 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -56,9 +37,53 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ + id: '/customScript.js', + path: '/customScript.js', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -66,53 +91,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -234,39 +234,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -276,11 +248,74 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/customScript.js': { + id: '/customScript.js' + path: '/customScript.js' + fullPath: '/customScript.js' + preLoaderRoute: typeof CustomScriptDotjsRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -290,55 +325,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -346,12 +339,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/react/start-bun/package.json b/examples/react/start-bun/package.json index 24f7113912..a4ab34310f 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-router-ssr-query": "^1.167.3", - "@tanstack/react-start": "^1.169.6", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-router-ssr-query": "^1.167.1", + "@tanstack/react-start": "^1.168.27", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.1.1", "react-dom": "^19.1.1", "tailwindcss": "^4.2.2" @@ -35,10 +35,9 @@ "@vitejs/plugin-react": "^6.0.1", "jsdom": "^27.0.0", "prettier": "^3.6.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vitest": "^5.0.4", + "vitest": "^4.1.4", "web-vitals": "^5.1.0" } } diff --git a/examples/react/start-bun/src/routeTree.gen.ts b/examples/react/start-bun/src/routeTree.gen.ts index 77415f9088..18fbc9b60e 100644 --- a/examples/react/start-bun/src/routeTree.gen.ts +++ b/examples/react/start-bun/src/routeTree.gen.ts @@ -11,8 +11,8 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' import { Route as ApiDemoNamesRouteImport } from './routes/api.demo-names' -import { Route as DemoStartApiRequestRouteImport } from './routes/demo.start.api-request' import { Route as DemoStartServerFuncsRouteImport } from './routes/demo.start.server-funcs' +import { Route as DemoStartApiRequestRouteImport } from './routes/demo.start.api-request' const IndexRoute = IndexRouteImport.update({ id: '/', @@ -24,16 +24,16 @@ const ApiDemoNamesRoute = ApiDemoNamesRouteImport.update({ path: '/api/demo-names', getParentRoute: () => rootRouteImport, } as any) -const DemoStartApiRequestRoute = DemoStartApiRequestRouteImport.update({ - id: '/demo/start/api-request', - path: '/demo/start/api-request', - getParentRoute: () => rootRouteImport, -} as any) const DemoStartServerFuncsRoute = DemoStartServerFuncsRouteImport.update({ id: '/demo/start/server-funcs', path: '/demo/start/server-funcs', getParentRoute: () => rootRouteImport, } as any) +const DemoStartApiRequestRoute = DemoStartApiRequestRouteImport.update({ + id: '/demo/start/api-request', + path: '/demo/start/api-request', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -98,13 +98,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ApiDemoNamesRouteImport parentRoute: typeof rootRouteImport } - '/demo/start/api-request': { - id: '/demo/start/api-request' - path: '/demo/start/api-request' - fullPath: '/demo/start/api-request' - preLoaderRoute: typeof DemoStartApiRequestRouteImport - parentRoute: typeof rootRouteImport - } '/demo/start/server-funcs': { id: '/demo/start/server-funcs' path: '/demo/start/server-funcs' @@ -112,6 +105,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DemoStartServerFuncsRouteImport parentRoute: typeof rootRouteImport } + '/demo/start/api-request': { + id: '/demo/start/api-request' + path: '/demo/start/api-request' + fullPath: '/demo/start/api-request' + preLoaderRoute: typeof DemoStartApiRequestRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/start-bun/src/routes/__root.tsx b/examples/react/start-bun/src/routes/__root.tsx index cf53f185c5..781d3914ef 100644 --- a/examples/react/start-bun/src/routes/__root.tsx +++ b/examples/react/start-bun/src/routes/__root.tsx @@ -1,6 +1,5 @@ -import { TanStackDevtools } from '@tanstack/react-devtools' import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router' -import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' import Header from '../components/Header' @@ -40,17 +39,7 @@ function RootDocument({ children }: { children: React.ReactNode }) {
    {children} - , - }, - ]} - /> + diff --git a/examples/react/start-clerk-basic/package.json b/examples/react/start-clerk-basic/package.json index 022300e159..7e15b08073 100644 --- a/examples/react/start-clerk-basic/package.json +++ b/examples/react/start-clerk-basic/package.json @@ -11,14 +11,14 @@ }, "dependencies": { "@clerk/tanstack-react-start": "^0.27.14", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "@vitejs/plugin-react": "^6.0.1", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", - "srvx": "^1.0.0", + "srvx": "^0.11.9", "tailwind-merge": "^3.6.0" }, "devDependencies": { @@ -27,8 +27,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-clerk-basic/src/routeTree.gen.ts b/examples/react/start-clerk-basic/src/routeTree.gen.ts index 87269f2faf..04f57442e2 100644 --- a/examples/react/start-clerk-basic/src/routeTree.gen.ts +++ b/examples/react/start-clerk-basic/src/routeTree.gen.ts @@ -9,22 +9,22 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' -import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' import { Route as AuthedProfileSplatRouteImport } from './routes/_authed/profile.$' +import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ id: '/posts', path: '/posts', @@ -35,16 +35,16 @@ const AuthedPostsIndexRoute = AuthedPostsIndexRouteImport.update({ path: '/', getParentRoute: () => AuthedPostsRoute, } as any) -const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => AuthedPostsRoute, -} as any) const AuthedProfileSplatRoute = AuthedProfileSplatRouteImport.update({ id: '/profile/$', path: '/profile/$', getParentRoute: () => AuthedRoute, } as any) +const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => AuthedPostsRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -90,13 +90,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/_authed': { id: '/_authed' path: '' @@ -104,6 +97,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/_authed/posts': { id: '/_authed/posts' path: '/posts' @@ -118,13 +118,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedPostsIndexRouteImport parentRoute: typeof AuthedPostsRoute } - '/_authed/posts/$postId': { - id: '/_authed/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof AuthedPostsPostIdRouteImport - parentRoute: typeof AuthedPostsRoute - } '/_authed/profile/$': { id: '/_authed/profile/$' path: '/profile/$' @@ -132,6 +125,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthedProfileSplatRouteImport parentRoute: typeof AuthedRoute } + '/_authed/posts/$postId': { + id: '/_authed/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof AuthedPostsPostIdRouteImport + parentRoute: typeof AuthedPostsRoute + } } } diff --git a/examples/react/start-clerk-basic/src/routes/_authed.tsx b/examples/react/start-clerk-basic/src/routes/_authed.tsx index 04f8196894..1a97917c12 100644 --- a/examples/react/start-clerk-basic/src/routes/_authed.tsx +++ b/examples/react/start-clerk-basic/src/routes/_authed.tsx @@ -8,7 +8,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return (
    diff --git a/examples/react/start-convex-trellaux/package.json b/examples/react/start-convex-trellaux/package.json index 3452f910d0..f2ec73bfe8 100644 --- a/examples/react/start-convex-trellaux/package.json +++ b/examples/react/start-convex-trellaux/package.json @@ -13,12 +13,12 @@ }, "dependencies": { "@convex-dev/react-query": "0.0.0-alpha.8", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-router-ssr-query": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-router-ssr-query": "^1.167.1", + "@tanstack/react-start": "^1.168.27", "concurrently": "^8.2.2", "convex": "^1.19.0", "ky": "^1.7.4", @@ -37,8 +37,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-counter/package.json b/examples/react/start-counter/package.json index 8f4673143e..a7a8397b74 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0" }, @@ -21,8 +21,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-i18n-paraglide/package.json b/examples/react/start-i18n-paraglide/package.json index 074f714d5c..936f5e040d 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.1.1", "react-dom": "^19.1.1" }, @@ -21,22 +21,10 @@ "@types/react": "^19.1.13", "@types/react-dom": "^19.1.9", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", "@tailwindcss/vite": "^4.2.2", "tailwindcss": "^4.2.2", "@inlang/paraglide-js": "^2.4.0" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } } } diff --git a/examples/react/start-i18n-paraglide/src/routeTree.gen.ts b/examples/react/start-i18n-paraglide/src/routeTree.gen.ts index d89758e684..421daf2790 100644 --- a/examples/react/start-i18n-paraglide/src/routeTree.gen.ts +++ b/examples/react/start-i18n-paraglide/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/start-i18n-paraglide/src/routes/__root.tsx b/examples/react/start-i18n-paraglide/src/routes/__root.tsx index f1a83836a0..422dcee893 100644 --- a/examples/react/start-i18n-paraglide/src/routes/__root.tsx +++ b/examples/react/start-i18n-paraglide/src/routes/__root.tsx @@ -4,8 +4,7 @@ import { Scripts, createRootRoute, } from '@tanstack/react-router' -import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools' -import { TanStackDevtools } from '@tanstack/react-devtools' +import { TanStackRouterDevtools } from '@tanstack/react-router-devtools' import styles from '../styles.css?url' import { getLocale, locales, setLocale } from '@/paraglide/runtime' import { m } from '@/paraglide/messages' @@ -77,17 +76,7 @@ function RootDocument({ children }: { children: React.ReactNode }) {
    {children}
    - , - }, - ]} - /> + diff --git a/examples/react/start-large/package.json b/examples/react/start-large/package.json index f9f86b81d1..d7300fc815 100644 --- a/examples/react/start-large/package.json +++ b/examples/react/start-large/package.json @@ -12,10 +12,10 @@ "test:types": "tsc --extendedDiagnostics" }, "dependencies": { - "@tanstack/react-query": "^5.102.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-query": "^5.90.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -29,8 +29,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" }, "keywords": [], diff --git a/examples/react/start-large/src/routeTree.gen.ts b/examples/react/start-large/src/routeTree.gen.ts index 4f1551f71d..03cc2b9080 100644 --- a/examples/react/start-large/src/routeTree.gen.ts +++ b/examples/react/start-large/src/routeTree.gen.ts @@ -9,23 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AbsoluteRouteImport } from './routes/absolute' -import { Route as LinkPropsRouteImport } from './routes/linkProps' -import { Route as ParamsRouteRouteImport } from './routes/params/route' import { Route as RelativeRouteImport } from './routes/relative' +import { Route as LinkPropsRouteImport } from './routes/linkProps' +import { Route as AbsoluteRouteImport } from './routes/absolute' import { Route as SearchRouteRouteImport } from './routes/search/route' -import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' +import { Route as ParamsRouteRouteImport } from './routes/params/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as SearchSearchPlaceholderRouteImport } from './routes/search/searchPlaceholder' +import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AbsoluteRoute = AbsoluteRouteImport.update({ - id: '/absolute', - path: '/absolute', +const RelativeRoute = RelativeRouteImport.update({ + id: '/relative', + path: '/relative', getParentRoute: () => rootRouteImport, } as any) const LinkPropsRoute = LinkPropsRouteImport.update({ @@ -33,14 +28,9 @@ const LinkPropsRoute = LinkPropsRouteImport.update({ path: '/linkProps', getParentRoute: () => rootRouteImport, } as any) -const ParamsRouteRoute = ParamsRouteRouteImport.update({ - id: '/params', - path: '/params', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeRoute = RelativeRouteImport.update({ - id: '/relative', - path: '/relative', +const AbsoluteRoute = AbsoluteRouteImport.update({ + id: '/absolute', + path: '/absolute', getParentRoute: () => rootRouteImport, } as any) const SearchRouteRoute = SearchRouteRouteImport.update({ @@ -48,16 +38,26 @@ const SearchRouteRoute = SearchRouteRouteImport.update({ path: '/search', getParentRoute: () => rootRouteImport, } as any) -const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ - id: '/$paramsPlaceholder', - path: '/$paramsPlaceholder', - getParentRoute: () => ParamsRouteRoute, +const ParamsRouteRoute = ParamsRouteRouteImport.update({ + id: '/params', + path: '/params', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const SearchSearchPlaceholderRoute = SearchSearchPlaceholderRouteImport.update({ id: '/searchPlaceholder', path: '/searchPlaceholder', getParentRoute: () => SearchRouteRoute, } as any) +const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ + id: '/$paramsPlaceholder', + path: '/$paramsPlaceholder', + getParentRoute: () => ParamsRouteRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -134,18 +134,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/absolute': { - id: '/absolute' - path: '/absolute' - fullPath: '/absolute' - preLoaderRoute: typeof AbsoluteRouteImport + '/relative': { + id: '/relative' + path: '/relative' + fullPath: '/relative' + preLoaderRoute: typeof RelativeRouteImport parentRoute: typeof rootRouteImport } '/linkProps': { @@ -155,18 +148,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LinkPropsRouteImport parentRoute: typeof rootRouteImport } - '/params': { - id: '/params' - path: '/params' - fullPath: '/params' - preLoaderRoute: typeof ParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/relative': { - id: '/relative' - path: '/relative' - fullPath: '/relative' - preLoaderRoute: typeof RelativeRouteImport + '/absolute': { + id: '/absolute' + path: '/absolute' + fullPath: '/absolute' + preLoaderRoute: typeof AbsoluteRouteImport parentRoute: typeof rootRouteImport } '/search': { @@ -176,12 +162,19 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchRouteRouteImport parentRoute: typeof rootRouteImport } - '/params/$paramsPlaceholder': { - id: '/params/$paramsPlaceholder' - path: '/$paramsPlaceholder' - fullPath: '/params/$paramsPlaceholder' - preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport - parentRoute: typeof ParamsRouteRoute + '/params': { + id: '/params' + path: '/params' + fullPath: '/params' + preLoaderRoute: typeof ParamsRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/search/searchPlaceholder': { id: '/search/searchPlaceholder' @@ -190,6 +183,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SearchSearchPlaceholderRouteImport parentRoute: typeof SearchRouteRoute } + '/params/$paramsPlaceholder': { + id: '/params/$paramsPlaceholder' + path: '/$paramsPlaceholder' + fullPath: '/params/$paramsPlaceholder' + preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport + parentRoute: typeof ParamsRouteRoute + } } } diff --git a/examples/react/start-material-ui/package.json b/examples/react/start-material-ui/package.json index 1647e95f20..a7623d10f0 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "zod": "^4.4.3" @@ -27,8 +27,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-material-ui/src/routeTree.gen.ts b/examples/react/start-material-ui/src/routeTree.gen.ts index d89758e684..421daf2790 100644 --- a/examples/react/start-material-ui/src/routeTree.gen.ts +++ b/examples/react/start-material-ui/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/react/start-material-ui/src/router.tsx b/examples/react/start-material-ui/src/router.tsx index 6f82cbf378..a464233af9 100644 --- a/examples/react/start-material-ui/src/router.tsx +++ b/examples/react/start-material-ui/src/router.tsx @@ -5,9 +5,7 @@ export function getRouter() { const router = createRouter({ routeTree, defaultPreload: 'intent', - defaultErrorComponent: (err) => ( -

    {err.error instanceof Error ? err.error.stack : String(err.error)}

    - ), + defaultErrorComponent: (err) =>

    {err.error.stack}

    , defaultNotFoundComponent: () =>

    not found

    , scrollRestoration: true, }) diff --git a/examples/react/start-next-migration/.gitignore b/examples/react/start-next-migration/.gitignore deleted file mode 100644 index 24e8148a7d..0000000000 --- a/examples/react/start-next-migration/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -node_modules -.next -.output -.nitro -.tanstack -test-results -playwright-report -.env -.env.local -*.tsbuildinfo -next-env.d.ts -next-app/AGENTS.md -next-app/CLAUDE.md diff --git a/examples/react/start-next-migration/README.md b/examples/react/start-next-migration/README.md deleted file mode 100644 index 03bb53244e..0000000000 --- a/examples/react/start-next-migration/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Next.js to TanStack Start - -Two versions of the same small article site. `next-app/` uses the Next.js App Router; `src/` uses TanStack Start. They keep the public paths, article content, titles, descriptions, canonical URLs, search parameter, and permanent redirect. - -The private page saves one article in an encrypted session cookie. This keeps the example runnable without a database or an auth-provider account. It is a migration reference, not an authentication starter: the single demo account has no registration, password recovery, rate limiting, or account database. Do not deploy it as a public sign-in service. - -## Run - -Use Node 24 or newer and pnpm 12. From the repository root: - -```sh -pnpm install -pnpm nx run @tanstack/react-start:build -cd examples/react/start-next-migration -``` - -In each terminal that starts a server, set these variables. Generate your own secret and choose a demo password: - -```sh -export SESSION_PASSWORD="$(node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))")" -export DEMO_PASSWORD='choose-a-local-demo-password' -``` - -Run `pnpm dev:next` for Next.js at and `pnpm dev` in another terminal for Start at . Sign in as `reader@example.com` using the password you set. - -Both apps use iron-session, with different cookie names. Signing in to one does not sign you in to the other. Changing `SESSION_PASSWORD` invalidates that app's session. Saved state is tied to that session, not durable account storage. - -## Check the migration - -From this directory, with those ports free: - -```sh -pnpm exec playwright install chromium -pnpm test:e2e -pnpm build:next -pnpm build -MIGRATION_PRODUCTION=1 pnpm test:e2e -``` - -Playwright starts both dev servers with test-only credentials. The same tests run against each app and check server-rendered metadata, public paths, search, a 308 redirect, a missing article, sitemap membership, login errors, session persistence, private cache headers, saved-state mutation, and rejection of a captured mutation after sign-out. - -For a production-mode smoke check, keep the environment variables set and run `pnpm start:next` or `PORT=3101 pnpm start` after building. The cookie settings assume HTTPS in production. Deployment infrastructure, a shared database, real account security, and CDN behavior are outside this local fixture. - -## Compare - -| Next.js | TanStack Start | -| --------------------------------------------- | ------------------------------------------------------- | -| `next-app/app/page.tsx`, async `searchParams` | `src/routes/index.tsx`, `validateSearch` | -| `next-app/app/posts/[slug]/page.tsx` | `src/routes/posts.$slug.tsx` | -| `generateMetadata` | Route `head` using `loaderData` | -| `next-app/app/actions.ts` | `src/server/account.ts` | -| Server Action form and `revalidatePath` | `useServerFn`, local pending state, `router.invalidate` | -| `cookies()` with `iron-session` | `iron-session` with `getCookie` / `setCookie` | -| `next-app/next.config.ts` redirect | `src/routes/old-notes.tsx` redirect | -| `next-app/app/sitemap.ts` | `src/routes/sitemap[.]xml.ts` server route | - -The Next.js forms use Server Actions. The Start forms in this example handle client submit events and require JavaScript. For a no-JavaScript form, use a FormData-compatible server function URL or an explicit server-route POST implementation, including validation and CSRF protection. Replacing an Action with `createServerFn` does not preserve progressive enhancement automatically. - -The canonical origin is intentionally `https://field-notes.example` in both content modules, so local ports do not change the comparison. Replace it with your real public origin before adapting the example. - -The Start app enables `createCsrfMiddleware` for server-function requests in `src/start.ts`. The paired browser tests replay a mutation with an authenticated cookie jar and cross-site request metadata, then verify that it was rejected and the saved value did not change. Endpoint authorization is still checked independently after sign-out. diff --git a/examples/react/start-next-migration/next-app/account.ts b/examples/react/start-next-migration/next-app/account.ts deleted file mode 100644 index 7073518994..0000000000 --- a/examples/react/start-next-migration/next-app/account.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { cookies } from 'next/headers' -import { getIronSession } from 'iron-session' -export async function getSession() { - const cookieStore = await cookies() - const password = process.env.SESSION_PASSWORD - if (!password || password.length < 32) { - throw new Error('Set SESSION_PASSWORD to at least 32 characters') - } - return getIronSession<{ email: string; saved: boolean }>(cookieStore, { - cookieName: 'next-migration-session', - password, - cookieOptions: { secure: process.env.NODE_ENV === 'production' }, - }) -} diff --git a/examples/react/start-next-migration/next-app/app/actions.ts b/examples/react/start-next-migration/next-app/app/actions.ts deleted file mode 100644 index 325a4de176..0000000000 --- a/examples/react/start-next-migration/next-app/app/actions.ts +++ /dev/null @@ -1,36 +0,0 @@ -'use server' -import { redirect } from 'next/navigation' -import { revalidatePath } from 'next/cache' -import { getSession } from '../account' -export async function signIn(_state: { error: string }, form: FormData) { - if (!process.env.DEMO_PASSWORD) { - throw new Error('Set DEMO_PASSWORD before running the example') - } - const email = form.get('email'), - password = form.get('password') - if ( - email !== 'reader@example.com' || - password !== process.env.DEMO_PASSWORD - ) { - return { error: 'Invalid credentials' } - } - const session = await getSession() - session.email = email - session.saved = false - await session.save() - redirect('/saved') -} -export async function toggleSaved() { - const session = await getSession() - if (!session.email) { - throw new Error('Unauthorized') - } - session.saved = !session.saved - await session.save() - revalidatePath('/saved') -} -export async function signOut() { - const session = await getSession() - session.destroy() - redirect('/login') -} diff --git a/examples/react/start-next-migration/next-app/app/layout.tsx b/examples/react/start-next-migration/next-app/app/layout.tsx deleted file mode 100644 index 2aafe653dd..0000000000 --- a/examples/react/start-next-migration/next-app/app/layout.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import Link from 'next/link' -import type { ReactNode } from 'react' -export default function Layout({ children }: { children: ReactNode }) { - return ( - - - - {children} - - - ) -} diff --git a/examples/react/start-next-migration/next-app/app/login/form.tsx b/examples/react/start-next-migration/next-app/app/login/form.tsx deleted file mode 100644 index 41347eb65b..0000000000 --- a/examples/react/start-next-migration/next-app/app/login/form.tsx +++ /dev/null @@ -1,25 +0,0 @@ -'use client' -import { useActionState } from 'react' -import { signIn } from '../actions' -export function LoginForm() { - const [state, action, pending] = useActionState(signIn, { error: '' }) - return ( -
    - - - -

    {state.error}

    -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/login/page.tsx b/examples/react/start-next-migration/next-app/app/login/page.tsx deleted file mode 100644 index 9cbb900629..0000000000 --- a/examples/react/start-next-migration/next-app/app/login/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { LoginForm } from './form' -export const metadata = { - title: 'Sign in | Field notes', - robots: { index: false }, -} -export default function Login() { - return ( -
    -

    Sign in

    - -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/not-found.tsx b/examples/react/start-next-migration/next-app/app/not-found.tsx deleted file mode 100644 index 5da341bf43..0000000000 --- a/examples/react/start-next-migration/next-app/app/not-found.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Link from 'next/link' -export default function NotFound() { - return ( -
    -

    Article not found

    - All articles -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/page.tsx b/examples/react/start-next-migration/next-app/app/page.tsx deleted file mode 100644 index 75653b8344..0000000000 --- a/examples/react/start-next-migration/next-app/app/page.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import Link from 'next/link' -import { articles, siteUrl } from '../content' -export const metadata = { - title: 'Field notes', - description: - 'Notes on moving a web application without losing its public URLs.', - alternates: { canonical: siteUrl }, -} -export default async function Page({ - searchParams, -}: { - searchParams: Promise<{ q?: string | string[] }> -}) { - const search = await searchParams - const q = typeof search.q === 'string' ? search.q : '' - const visible = articles.filter((article) => - article.title.toLowerCase().includes(q.toLowerCase()), - ) - return ( -
    -

    Field notes

    -
    - - -
    -
      - {visible.map((article) => ( -
    • - {article.title} -
    • - ))} -
    -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/posts/[slug]/page.tsx b/examples/react/start-next-migration/next-app/app/posts/[slug]/page.tsx deleted file mode 100644 index 36ed5b62da..0000000000 --- a/examples/react/start-next-migration/next-app/app/posts/[slug]/page.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { notFound } from 'next/navigation' -import { articles, siteUrl } from '../../../content' -async function getArticle(params: Promise<{ slug: string }>) { - const { slug } = await params - const article = articles.find((item) => item.slug === slug) - if (!article) { - notFound() - } - return article -} -export async function generateMetadata({ - params, -}: { - params: Promise<{ slug: string }> -}) { - const article = await getArticle(params) - return { - title: article.title, - description: article.description, - openGraph: { title: article.title }, - alternates: { canonical: `${siteUrl}/posts/${article.slug}` }, - } -} -export default async function Page({ - params, -}: { - params: Promise<{ slug: string }> -}) { - const article = await getArticle(params) - return ( -
    -

    {article.title}

    -

    {article.body}

    -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/saved/page.tsx b/examples/react/start-next-migration/next-app/app/saved/page.tsx deleted file mode 100644 index 5310dbc37e..0000000000 --- a/examples/react/start-next-migration/next-app/app/saved/page.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { redirect } from 'next/navigation' -import { getSession } from '../../account' -import { signOut, toggleSaved } from '../actions' -export const metadata = { - title: 'Saved articles | Field notes', - robots: { index: false }, -} -export default async function Saved() { - const session = await getSession() - if (!session.email) { - redirect('/login') - } - return ( -
    -

    Saved articles

    -

    {session.email}

    -

    - {session.saved ? 'Keeping your URLs is saved' : 'No saved articles'} -

    -
    - -
    -
    - -
    -
    - ) -} diff --git a/examples/react/start-next-migration/next-app/app/sitemap.ts b/examples/react/start-next-migration/next-app/app/sitemap.ts deleted file mode 100644 index 9859cffa17..0000000000 --- a/examples/react/start-next-migration/next-app/app/sitemap.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { articles, siteUrl } from '../content' -export default function sitemap() { - return [ - { url: siteUrl }, - ...articles.map((article) => ({ url: `${siteUrl}/posts/${article.slug}` })), - ] -} diff --git a/examples/react/start-next-migration/next-app/content.ts b/examples/react/start-next-migration/next-app/content.ts deleted file mode 100644 index 2a9d15c1c0..0000000000 --- a/examples/react/start-next-migration/next-app/content.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const articles = [ - { - slug: 'keeping-your-urls', - title: 'Keeping your URLs', - description: 'Preserve public URLs when changing frameworks.', - body: 'A framework migration can keep the URLs your readers already use.', - }, - { - slug: 'checking-your-metadata', - title: 'Checking your metadata', - description: 'Compare rendered titles and canonical URLs before launch.', - body: 'Check the server response as well as the page after client navigation.', - }, -] -export const siteUrl = 'https://field-notes.example' diff --git a/examples/react/start-next-migration/next-app/next.config.ts b/examples/react/start-next-migration/next-app/next.config.ts deleted file mode 100644 index dc72c3ae72..0000000000 --- a/examples/react/start-next-migration/next-app/next.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { NextConfig } from 'next' -const config: NextConfig = { - async redirects() { - return [ - { - source: '/old-notes', - destination: '/posts/keeping-your-urls', - permanent: true, - }, - ] - }, -} -export default config diff --git a/examples/react/start-next-migration/next-app/tsconfig.json b/examples/react/start-next-migration/next-app/tsconfig.json deleted file mode 100644 index 8786ab9834..0000000000 --- a/examples/react/start-next-migration/next-app/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2024", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "react-jsx", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ] - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts", - ".next/dev/types/**/*.ts" - ], - "exclude": ["node_modules"] -} diff --git a/examples/react/start-next-migration/package.json b/examples/react/start-next-migration/package.json deleted file mode 100644 index 0c2a2a9563..0000000000 --- a/examples/react/start-next-migration/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "tanstack-start-example-next-migration", - "private": true, - "type": "module", - "scripts": { - "dev": "vite dev --port 3101", - "dev:next": "next dev next-app --port 3100", - "build": "vite build && tsc --noEmit", - "build:next": "next build next-app", - "start": "node .output/server/index.mjs", - "start:next": "next start next-app --port 3100", - "test:e2e": "playwright test" - }, - "dependencies": { - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-start": "^1.169.6", - "iron-session": "^9.0.1", - "next": "16.3.4", - "react": "^19.2.3", - "react-dom": "^19.2.3" - }, - "devDependencies": { - "@playwright/test": "^1.61.0", - "@types/node": "^22.10.2", - "@types/react": "^19.2.8", - "@types/react-dom": "^19.2.3", - "@vitejs/plugin-react": "^6.0.1", - "nitro": "^3.0.260903-beta", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" - }, - "nx": { - "targets": { - "test:e2e": { - "outputs": [ - "...", - "{projectRoot}/next-app/.next", - "{projectRoot}/next-app/next-env.d.ts" - ] - } - } - } -} diff --git a/examples/react/start-next-migration/playwright.config.ts b/examples/react/start-next-migration/playwright.config.ts deleted file mode 100644 index ce48715df4..0000000000 --- a/examples/react/start-next-migration/playwright.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { defineConfig } from '@playwright/test' - -const production = process.env.MIGRATION_PRODUCTION === '1' -const env = { - SESSION_PASSWORD: 'migration-reference-test-secret-at-least-32-characters', - DEMO_PASSWORD: 'migration-test-password', -} - -export default defineConfig({ - testDir: './tests', - use: { browserName: 'chromium' }, - projects: [ - { name: 'next', use: { baseURL: 'http://localhost:3100' } }, - { name: 'start', use: { baseURL: 'http://localhost:3101' } }, - ], - webServer: [ - { - command: production ? 'pnpm start:next' : 'pnpm dev:next', - url: 'http://localhost:3100', - env, - timeout: 120_000, - }, - { - command: production ? 'PORT=3101 pnpm start' : 'pnpm dev', - url: 'http://localhost:3101', - env, - timeout: 120_000, - }, - ], -}) diff --git a/examples/react/start-next-migration/src/content.ts b/examples/react/start-next-migration/src/content.ts deleted file mode 100644 index 2a9d15c1c0..0000000000 --- a/examples/react/start-next-migration/src/content.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const articles = [ - { - slug: 'keeping-your-urls', - title: 'Keeping your URLs', - description: 'Preserve public URLs when changing frameworks.', - body: 'A framework migration can keep the URLs your readers already use.', - }, - { - slug: 'checking-your-metadata', - title: 'Checking your metadata', - description: 'Compare rendered titles and canonical URLs before launch.', - body: 'Check the server response as well as the page after client navigation.', - }, -] -export const siteUrl = 'https://field-notes.example' diff --git a/examples/react/start-next-migration/src/routeTree.gen.ts b/examples/react/start-next-migration/src/routeTree.gen.ts deleted file mode 100644 index 15eeafce02..0000000000 --- a/examples/react/start-next-migration/src/routeTree.gen.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* 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 IndexRouteImport } from './routes/index' -import { Route as LoginRouteImport } from './routes/login' -import { Route as OldNotesRouteImport } from './routes/old-notes' -import { Route as SavedRouteImport } from './routes/saved' -import { Route as SitemapDotxmlRouteImport } from './routes/sitemap[.]xml' -import { Route as PostsSlugRouteImport } from './routes/posts.$slug' - -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', - getParentRoute: () => rootRouteImport, -} as any) -const OldNotesRoute = OldNotesRouteImport.update({ - id: '/old-notes', - path: '/old-notes', - getParentRoute: () => rootRouteImport, -} as any) -const SavedRoute = SavedRouteImport.update({ - id: '/saved', - path: '/saved', - getParentRoute: () => rootRouteImport, -} as any) -const SitemapDotxmlRoute = SitemapDotxmlRouteImport.update({ - id: '/sitemap.xml', - path: '/sitemap.xml', - getParentRoute: () => rootRouteImport, -} as any) -const PostsSlugRoute = PostsSlugRouteImport.update({ - id: '/posts/$slug', - path: '/posts/$slug', - getParentRoute: () => rootRouteImport, -} as any) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/login': typeof LoginRoute - '/old-notes': typeof OldNotesRoute - '/saved': typeof SavedRoute - '/sitemap.xml': typeof SitemapDotxmlRoute - '/posts/$slug': typeof PostsSlugRoute -} -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/login': typeof LoginRoute - '/old-notes': typeof OldNotesRoute - '/saved': typeof SavedRoute - '/sitemap.xml': typeof SitemapDotxmlRoute - '/posts/$slug': typeof PostsSlugRoute -} -export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/login': typeof LoginRoute - '/old-notes': typeof OldNotesRoute - '/saved': typeof SavedRoute - '/sitemap.xml': typeof SitemapDotxmlRoute - '/posts/$slug': typeof PostsSlugRoute -} -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - '/' | '/login' | '/old-notes' | '/saved' | '/sitemap.xml' | '/posts/$slug' - fileRoutesByTo: FileRoutesByTo - to: '/' | '/login' | '/old-notes' | '/saved' | '/sitemap.xml' | '/posts/$slug' - id: - | '__root__' - | '/' - | '/login' - | '/old-notes' - | '/saved' - | '/sitemap.xml' - | '/posts/$slug' - fileRoutesById: FileRoutesById -} -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - LoginRoute: typeof LoginRoute - OldNotesRoute: typeof OldNotesRoute - SavedRoute: typeof SavedRoute - SitemapDotxmlRoute: typeof SitemapDotxmlRoute - PostsSlugRoute: typeof PostsSlugRoute -} - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport - parentRoute: typeof rootRouteImport - } - '/old-notes': { - id: '/old-notes' - path: '/old-notes' - fullPath: '/old-notes' - preLoaderRoute: typeof OldNotesRouteImport - parentRoute: typeof rootRouteImport - } - '/saved': { - id: '/saved' - path: '/saved' - fullPath: '/saved' - preLoaderRoute: typeof SavedRouteImport - parentRoute: typeof rootRouteImport - } - '/sitemap.xml': { - id: '/sitemap.xml' - path: '/sitemap.xml' - fullPath: '/sitemap.xml' - preLoaderRoute: typeof SitemapDotxmlRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/$slug': { - id: '/posts/$slug' - path: '/posts/$slug' - fullPath: '/posts/$slug' - preLoaderRoute: typeof PostsSlugRouteImport - parentRoute: typeof rootRouteImport - } - } -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - LoginRoute: LoginRoute, - OldNotesRoute: OldNotesRoute, - SavedRoute: SavedRoute, - SitemapDotxmlRoute: SitemapDotxmlRoute, - PostsSlugRoute: PostsSlugRoute, -} -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -import type { getRouter } from './router.tsx' -import type { startInstance } from './start.ts' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - config: Awaited> - } -} diff --git a/examples/react/start-next-migration/src/router.tsx b/examples/react/start-next-migration/src/router.tsx deleted file mode 100644 index 9711e610bf..0000000000 --- a/examples/react/start-next-migration/src/router.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { createRouter } from '@tanstack/react-router' -import { routeTree } from './routeTree.gen' -export function getRouter() { - return createRouter({ routeTree, scrollRestoration: true }) -} diff --git a/examples/react/start-next-migration/src/routes/__root.tsx b/examples/react/start-next-migration/src/routes/__root.tsx deleted file mode 100644 index a7eaa0168f..0000000000 --- a/examples/react/start-next-migration/src/routes/__root.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { - createRootRoute, - HeadContent, - Link, - Outlet, - Scripts, -} from '@tanstack/react-router' -import type { ReactNode } from 'react' -export const Route = createRootRoute({ - head: () => ({ - meta: [ - { charSet: 'utf-8' }, - { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - ], - }), - component: Outlet, - shellComponent: Document, - notFoundComponent: () => ( -
    -

    Article not found

    - - All articles - -
    - ), -}) -function Document({ children }: { children: ReactNode }) { - return ( - - - - - - - {children} - - - - ) -} diff --git a/examples/react/start-next-migration/src/routes/index.tsx b/examples/react/start-next-migration/src/routes/index.tsx deleted file mode 100644 index 8778d9d01f..0000000000 --- a/examples/react/start-next-migration/src/routes/index.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { createFileRoute, Link } from '@tanstack/react-router' -import { articles, siteUrl } from '../content' -export const Route = createFileRoute('/')({ - validateSearch: (search) => ({ - q: typeof search.q === 'string' ? search.q : '', - }), - head: () => ({ - meta: [ - { title: 'Field notes' }, - { - name: 'description', - content: - 'Notes on moving a web application without losing its public URLs.', - }, - ], - links: [{ rel: 'canonical', href: siteUrl }], - }), - component: Articles, -}) -function Articles() { - const { q } = Route.useSearch() - const visible = articles.filter((article) => - article.title.toLowerCase().includes(q.toLowerCase()), - ) - return ( -
    -

    Field notes

    -
    - - -
    -
      - {visible.map((article) => ( -
    • - - {article.title} - -
    • - ))} -
    -
    - ) -} diff --git a/examples/react/start-next-migration/src/routes/login.tsx b/examples/react/start-next-migration/src/routes/login.tsx deleted file mode 100644 index 628261cc8e..0000000000 --- a/examples/react/start-next-migration/src/routes/login.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { createFileRoute, useHydrated, useRouter } from '@tanstack/react-router' -import { useServerFn } from '@tanstack/react-start' -import { useState } from 'react' -import { signIn } from '../server/account' -export const Route = createFileRoute('/login')({ - head: () => ({ - meta: [ - { title: 'Sign in | Field notes' }, - { name: 'robots', content: 'noindex' }, - ], - }), - component: Login, -}) -function Login() { - const hydrated = useHydrated() - const login = useServerFn(signIn) - const router = useRouter() - const [error, setError] = useState('') - const [pending, setPending] = useState(false) - return ( -
    -

    Sign in

    -
    { - event.preventDefault() - const form = new FormData(event.currentTarget) - const email = form.get('email'), - password = form.get('password') - if (typeof email !== 'string' || typeof password !== 'string') { - return - } - setPending(true) - setError('') - try { - const result = await login({ data: { email, password } }) - if (result.error) { - setError(result.error) - return - } - await router.invalidate() - await router.navigate({ to: '/saved' }) - } catch { - setError('Sign-in failed. Try again.') - } finally { - setPending(false) - } - }} - > -
    - - - -
    -

    {error}

    -
    -
    - ) -} diff --git a/examples/react/start-next-migration/src/routes/old-notes.tsx b/examples/react/start-next-migration/src/routes/old-notes.tsx deleted file mode 100644 index 1fb5ce846b..0000000000 --- a/examples/react/start-next-migration/src/routes/old-notes.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { createFileRoute, redirect } from '@tanstack/react-router' -export const Route = createFileRoute('/old-notes')({ - beforeLoad: () => { - throw redirect({ - to: '/posts/$slug', - params: { slug: 'keeping-your-urls' }, - statusCode: 308, - }) - }, -}) diff --git a/examples/react/start-next-migration/src/routes/posts.$slug.tsx b/examples/react/start-next-migration/src/routes/posts.$slug.tsx deleted file mode 100644 index 1998717393..0000000000 --- a/examples/react/start-next-migration/src/routes/posts.$slug.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { createFileRoute, notFound } from '@tanstack/react-router' -import { articles, siteUrl } from '../content' -export const Route = createFileRoute('/posts/$slug')({ - loader: ({ params }) => { - const article = articles.find((item) => item.slug === params.slug) - if (!article) { - throw notFound() - } - return article - }, - head: ({ loaderData }) => - loaderData - ? { - meta: [ - { title: loaderData.title }, - { name: 'description', content: loaderData.description }, - { property: 'og:title', content: loaderData.title }, - ], - links: [ - { rel: 'canonical', href: `${siteUrl}/posts/${loaderData.slug}` }, - ], - } - : {}, - component: Article, -}) -function Article() { - const article = Route.useLoaderData() - return ( -
    -

    {article.title}

    -

    {article.body}

    -
    - ) -} diff --git a/examples/react/start-next-migration/src/routes/saved.tsx b/examples/react/start-next-migration/src/routes/saved.tsx deleted file mode 100644 index 2f526eb7b5..0000000000 --- a/examples/react/start-next-migration/src/routes/saved.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { - createFileRoute, - redirect, - useHydrated, - useRouter, -} from '@tanstack/react-router' -import { useServerFn } from '@tanstack/react-start' -import { useState } from 'react' -import { getAccount, signOut, toggleSaved } from '../server/account' -export const Route = createFileRoute('/saved')({ - loader: async () => { - const account = await getAccount() - if (!account) { - throw redirect({ to: '/login' }) - } - return account - }, - headers: () => ({ 'Cache-Control': 'private, no-store' }), - head: () => ({ - meta: [ - { title: 'Saved articles | Field notes' }, - { name: 'robots', content: 'noindex' }, - ], - }), - component: Saved, -}) -function Saved() { - const hydrated = useHydrated() - const account = Route.useLoaderData() - const toggle = useServerFn(toggleSaved), - logout = useServerFn(signOut) - const router = useRouter() - const [pending, setPending] = useState(false), - [error, setError] = useState('') - return ( -
    -

    Saved articles

    -

    {account.email}

    -

    - {account.saved ? 'Keeping your URLs is saved' : 'No saved articles'} -

    - - -

    {error}

    -
    - ) -} diff --git a/examples/react/start-next-migration/src/routes/sitemap[.]xml.ts b/examples/react/start-next-migration/src/routes/sitemap[.]xml.ts deleted file mode 100644 index a7dfcaa594..0000000000 --- a/examples/react/start-next-migration/src/routes/sitemap[.]xml.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createFileRoute } from '@tanstack/react-router' -import { articles, siteUrl } from '../content' -export const Route = createFileRoute('/sitemap.xml')({ - server: { - handlers: { - GET: () => - new Response( - `${siteUrl}${articles.map((article) => `${siteUrl}/posts/${article.slug}`).join('')}`, - { headers: { 'Content-Type': 'application/xml' } }, - ), - }, - }, -}) diff --git a/examples/react/start-next-migration/src/server/account.ts b/examples/react/start-next-migration/src/server/account.ts deleted file mode 100644 index 85e921c74b..0000000000 --- a/examples/react/start-next-migration/src/server/account.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { getIronSession } from 'iron-session' -import { createServerFn } from '@tanstack/react-start' -import { - getCookie, - setCookie, - setResponseStatus, - setResponseHeader, -} from '@tanstack/react-start/server' -import { redirect } from '@tanstack/react-router' -async function session() { - setResponseHeader('Cache-Control', 'private, no-store') - const password = process.env.SESSION_PASSWORD - if (!password || password.length < 32) { - throw new Error('Set SESSION_PASSWORD to at least 32 characters') - } - return getIronSession<{ email: string; saved: boolean }>( - { read: getCookie, write: setCookie }, - { - cookieName: 'start-migration-session', - password, - ttl: 7 * 24 * 60 * 60, - cookieOptions: { - httpOnly: true, - secure: process.env.NODE_ENV === 'production', - sameSite: 'lax', - path: '/', - }, - }, - ) -} -export const getAccount = createServerFn({ method: 'GET' }).handler( - async () => { - const current = await session() - return current.email - ? { email: current.email, saved: current.saved ?? false } - : null - }, -) -export const signIn = createServerFn({ method: 'POST' }) - .validator((input: { email: string; password: string }) => { - if (typeof input.email !== 'string' || typeof input.password !== 'string') { - throw new Error('Invalid credentials') - } - return input - }) - .handler(async ({ data }) => { - if (!process.env.DEMO_PASSWORD) { - throw new Error('Set DEMO_PASSWORD before running the example') - } - if ( - data.email !== 'reader@example.com' || - data.password !== process.env.DEMO_PASSWORD - ) { - return { error: 'Invalid credentials' } - } - const current = await session() - current.email = data.email - current.saved = false - await current.save() - return { error: '' } - }) -export const toggleSaved = createServerFn({ method: 'POST' }).handler( - async () => { - const current = await session() - if (!current.email) { - setResponseStatus(401) - throw new Error('Unauthorized') - } - current.saved = !current.saved - await current.save() - }, -) -export const signOut = createServerFn({ method: 'POST' }).handler(async () => { - const current = await session() - current.destroy() - throw redirect({ to: '/login' }) -}) diff --git a/examples/react/start-next-migration/src/start.ts b/examples/react/start-next-migration/src/start.ts deleted file mode 100644 index 5fb1e247fb..0000000000 --- a/examples/react/start-next-migration/src/start.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { createCsrfMiddleware, createStart } from '@tanstack/react-start' - -export const startInstance = createStart(() => ({ - requestMiddleware: [ - createCsrfMiddleware({ - filter: (ctx) => ctx.handlerType === 'serverFn', - }), - ], -})) diff --git a/examples/react/start-next-migration/tests/migration.spec.ts b/examples/react/start-next-migration/tests/migration.spec.ts deleted file mode 100644 index 7009095977..0000000000 --- a/examples/react/start-next-migration/tests/migration.spec.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { expect, test } from '@playwright/test' - -test('public URLs, server metadata, search, redirects, and missing pages survive migration', async ({ - page, - request, -}) => { - const response = await request.get('/posts/keeping-your-urls') - expect(response.status()).toBe(200) - const html = await response.text() - expect(html).toContain('Keeping your URLs') - expect(html).toMatch( - /]+name="description"[^>]+content="Preserve public URLs when changing frameworks\."/, - ) - expect(html).toMatch( - /]+rel="canonical"[^>]+href="https:\/\/field-notes\.example\/posts\/keeping-your-urls"/, - ) - expect(html).toMatch( - /]+property="og:title"[^>]+content="Keeping your URLs"/, - ) - expect(html).toContain( - 'A framework migration can keep the URLs your readers already use.', - ) - - const old = await request.get('/old-notes', { maxRedirects: 0 }) - expect(old.status()).toBe(308) - expect(new URL(old.headers().location, old.url()).pathname).toBe( - '/posts/keeping-your-urls', - ) - expect((await request.get('/posts/missing')).status()).toBe(404) - const sitemap = await (await request.get('/sitemap.xml')).text() - expect(sitemap).toContain( - 'https://field-notes.example/posts/keeping-your-urls', - ) - expect(sitemap).not.toContain('/saved') - - await page.goto('/?q=metadata') - await expect( - page.getByRole('link', { name: 'Checking your metadata' }), - ).toBeVisible() - await expect( - page.getByRole('link', { name: 'Keeping your URLs' }), - ).toHaveCount(0) - await page.getByRole('link', { name: 'Checking your metadata' }).click() - await expect(page).toHaveURL(/\/posts\/checking-your-metadata$/) - await expect(page).toHaveTitle('Checking your metadata') - await expect(page.locator('link[rel="canonical"]')).toHaveAttribute( - 'href', - 'https://field-notes.example/posts/checking-your-metadata', - ) -}) - -test('sessions and protected mutations survive reload but cannot run after sign-out', async ({ - page, -}, testInfo) => { - await page.goto('/saved') - await expect(page).toHaveURL(/\/login$/) - await page.getByLabel('Email', { exact: true }).fill('reader@example.com') - await page.getByLabel('Password', { exact: true }).fill('wrong-password') - await page.getByRole('button', { name: 'Sign in', exact: true }).click() - await expect(page.getByRole('main').getByRole('alert')).toHaveText( - 'Invalid credentials', - ) - await page.getByLabel('Email', { exact: true }).fill('reader@example.com') - await page - .getByLabel('Password', { exact: true }) - .fill('migration-test-password') - await page.getByRole('button', { name: 'Sign in', exact: true }).click() - await expect(page).toHaveURL(/\/saved$/) - await expect(page.getByTestId('saved-state')).toHaveText('No saved articles') - const mutation = page.waitForRequest((request) => request.method() === 'POST') - await page.getByRole('button', { name: 'Save article', exact: true }).click() - const savedRequest = await mutation - await expect(page.getByTestId('saved-state')).toHaveText( - 'Keeping your URLs is saved', - ) - // Keep the authenticated cookie jar while replaying a cross-site request. - const crossSiteHeaders = await savedRequest.allHeaders() - delete crossSiteHeaders.cookie - delete crossSiteHeaders['content-length'] - crossSiteHeaders.origin = 'https://untrusted.example' - crossSiteHeaders['sec-fetch-site'] = 'cross-site' - const crossSite = await page.request.post(savedRequest.url(), { - headers: crossSiteHeaders, - data: savedRequest.postData() ?? '', - }) - if (testInfo.project.name === 'start') { - expect(crossSite.status()).toBe(403) - } else { - expect(crossSite.status()).toBeGreaterThanOrEqual(400) - } - - const response = await page.reload() - expect(response?.headers()['cache-control']).toMatch( - process.env.MIGRATION_PRODUCTION ? /no-store/ : /no-store|no-cache/, - ) - await expect(page.getByTestId('saved-state')).toHaveText( - 'Keeping your URLs is saved', - ) - await page.getByRole('button', { name: 'Sign out', exact: true }).click() - await expect(page).toHaveURL(/\/login$/) - - // Replay the real mutation with the now-signed-out browser cookie jar. - const headers = await savedRequest.allHeaders() - delete headers.cookie - delete headers['content-length'] - const denied = await page.request.post(savedRequest.url(), { - headers, - data: savedRequest.postData() ?? '', - }) - expect(denied.status()).toBeGreaterThanOrEqual(400) - await page.goto('/saved') - await expect(page).toHaveURL(/\/login$/) -}) - -test('Start serializes saving and signing out so their responses cannot arrive out of order', async ({ - page, -}, testInfo) => { - test.skip(testInfo.project.name !== 'start', 'Start event-handler regression') - await page.goto('/login') - await page.getByLabel('Email', { exact: true }).fill('reader@example.com') - await page - .getByLabel('Password', { exact: true }) - .fill('migration-test-password') - await page.getByRole('button', { name: 'Sign in', exact: true }).click() - await expect(page).toHaveURL(/\/saved$/) - - for (const action of ['Save article', 'Sign out']) { - let release = () => {} - const held = new Promise((resolve) => { - release = resolve - }) - await page.route('**/_serverFn/**', async (route) => { - if (route.request().method() === 'POST') { - await held - } - await route.continue() - }) - await page.getByRole('button', { name: action, exact: true }).click() - try { - await expect( - page.getByRole('button', { name: /^(Save|Remove) article$/ }), - ).toBeDisabled() - await expect( - page.getByRole('button', { name: 'Sign out', exact: true }), - ).toBeDisabled() - } finally { - release() - } - if (action === 'Save article') { - await expect(page.getByTestId('saved-state')).toHaveText( - 'Keeping your URLs is saved', - ) - await expect( - page.getByRole('button', { name: 'Sign out', exact: true }), - ).toBeEnabled() - } else { - await expect(page).toHaveURL(/\/login$/) - } - await page.unrouteAll({ behavior: 'wait' }) - } - await page.goto('/saved') - await expect(page).toHaveURL(/\/login$/) -}) diff --git a/examples/react/start-next-migration/tsconfig.json b/examples/react/start-next-migration/tsconfig.json deleted file mode 100644 index a41553b9a1..0000000000 --- a/examples/react/start-next-migration/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "include": [ - "src/**/*.ts", - "src/**/*.tsx", - "vite.config.ts", - "playwright.config.ts", - "tests/**/*.ts" - ], - "compilerOptions": { - "strict": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "module": "ESNext", - "moduleResolution": "Bundler", - "lib": ["DOM", "DOM.Iterable", "ES2024"], - "skipLibCheck": true, - "target": "ES2024", - "noEmit": true, - "types": ["vite/client"] - } -} diff --git a/examples/react/start-next-migration/vite.config.ts b/examples/react/start-next-migration/vite.config.ts deleted file mode 100644 index 26d0e455d5..0000000000 --- a/examples/react/start-next-migration/vite.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import { tanstackStart } from '@tanstack/react-start/plugin/vite' -import { nitro } from 'nitro/vite' -export default defineConfig({ plugins: [tanstackStart(), react(), nitro()] }) diff --git a/examples/react/start-rscs/package.json b/examples/react/start-rscs/package.json index 00c88681d7..4e6da2d402 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "dexie": "^4.0.10", "react": "^19.2.0", "react-dom": "^19.2.0", @@ -26,8 +26,8 @@ "@types/react": "^19.2.2", "@types/react-dom": "^19.2.2", "@vitejs/plugin-react": "^6.0.1", - "@vitejs/plugin-rsc": "^0.5.39", - "nitro": "^3.0.260903-beta", + "@vitejs/plugin-rsc": "^0.5.20", + "nitro": "^3.0.260311-beta", "tailwindcss": "^4.1.18", "typescript": "^5.7.2", "vite": "^8.0.14" diff --git a/examples/react/start-rscs/src/routeTree.gen.ts b/examples/react/start-rscs/src/routeTree.gen.ts index d89ab3d3e7..ca4cef3864 100644 --- a/examples/react/start-rscs/src/routeTree.gen.ts +++ b/examples/react/start-rscs/src/routeTree.gen.ts @@ -9,26 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ECommerceRouteImport } from './routes/e-commerce' -import { Route as LowLevelApiRouteImport } from './routes/low-level-api' -import { Route as PokemonRouteImport } from './routes/pokemon' import { Route as PokemonRscRouteImport } from './routes/pokemon-rsc' +import { Route as PokemonRouteImport } from './routes/pokemon' +import { Route as LowLevelApiRouteImport } from './routes/low-level-api' +import { Route as ECommerceRouteImport } from './routes/e-commerce' +import { Route as IndexRouteImport } from './routes/index' import { Route as ApiRscRouteImport } from './routes/api/rsc' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const ECommerceRoute = ECommerceRouteImport.update({ - id: '/e-commerce', - path: '/e-commerce', - getParentRoute: () => rootRouteImport, -} as any) -const LowLevelApiRoute = LowLevelApiRouteImport.update({ - id: '/low-level-api', - path: '/low-level-api', +const PokemonRscRoute = PokemonRscRouteImport.update({ + id: '/pokemon-rsc', + path: '/pokemon-rsc', getParentRoute: () => rootRouteImport, } as any) const PokemonRoute = PokemonRouteImport.update({ @@ -36,9 +26,19 @@ const PokemonRoute = PokemonRouteImport.update({ path: '/pokemon', getParentRoute: () => rootRouteImport, } as any) -const PokemonRscRoute = PokemonRscRouteImport.update({ - id: '/pokemon-rsc', - path: '/pokemon-rsc', +const LowLevelApiRoute = LowLevelApiRouteImport.update({ + id: '/low-level-api', + path: '/low-level-api', + getParentRoute: () => rootRouteImport, +} as any) +const ECommerceRoute = ECommerceRouteImport.update({ + id: '/e-commerce', + path: '/e-commerce', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const ApiRscRoute = ApiRscRouteImport.update({ @@ -110,25 +110,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/e-commerce': { - id: '/e-commerce' - path: '/e-commerce' - fullPath: '/e-commerce' - preLoaderRoute: typeof ECommerceRouteImport - parentRoute: typeof rootRouteImport - } - '/low-level-api': { - id: '/low-level-api' - path: '/low-level-api' - fullPath: '/low-level-api' - preLoaderRoute: typeof LowLevelApiRouteImport + '/pokemon-rsc': { + id: '/pokemon-rsc' + path: '/pokemon-rsc' + fullPath: '/pokemon-rsc' + preLoaderRoute: typeof PokemonRscRouteImport parentRoute: typeof rootRouteImport } '/pokemon': { @@ -138,11 +124,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PokemonRouteImport parentRoute: typeof rootRouteImport } - '/pokemon-rsc': { - id: '/pokemon-rsc' - path: '/pokemon-rsc' - fullPath: '/pokemon-rsc' - preLoaderRoute: typeof PokemonRscRouteImport + '/low-level-api': { + id: '/low-level-api' + path: '/low-level-api' + fullPath: '/low-level-api' + preLoaderRoute: typeof LowLevelApiRouteImport + parentRoute: typeof rootRouteImport + } + '/e-commerce': { + id: '/e-commerce' + path: '/e-commerce' + fullPath: '/e-commerce' + preLoaderRoute: typeof ECommerceRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/api/rsc': { 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 762bbff733..e5d50b902f 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "zod": "^4.4.3" @@ -22,8 +22,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-streaming-data-from-server-functions/src/router.tsx b/examples/react/start-streaming-data-from-server-functions/src/router.tsx index 6f82cbf378..a464233af9 100644 --- a/examples/react/start-streaming-data-from-server-functions/src/router.tsx +++ b/examples/react/start-streaming-data-from-server-functions/src/router.tsx @@ -5,9 +5,7 @@ export function getRouter() { const router = createRouter({ routeTree, defaultPreload: 'intent', - defaultErrorComponent: (err) => ( -

    {err.error instanceof Error ? err.error.stack : String(err.error)}

    - ), + defaultErrorComponent: (err) =>

    {err.error.stack}

    , defaultNotFoundComponent: () =>

    not found

    , scrollRestoration: true, }) diff --git a/examples/react/start-supabase-basic/.gitignore b/examples/react/start-supabase-basic/.gitignore index 372dc30373..8293849e8d 100644 --- a/examples/react/start-supabase-basic/.gitignore +++ b/examples/react/start-supabase-basic/.gitignore @@ -1,11 +1,12 @@ node_modules +# Keep environment variables out of version control +!.env package-lock.json yarn.lock .DS_Store .cache -# The checked-in .env contains public demo values used by the build. -!.env +.env .vercel .output /build/ diff --git a/examples/react/start-supabase-basic/package.json b/examples/react/start-supabase-basic/package.json index 0bf4b2c246..30083cbe1d 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1" @@ -28,8 +28,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-supabase-basic/src/routeTree.gen.ts b/examples/react/start-supabase-basic/src/routeTree.gen.ts index 998d34a709..6be84444eb 100644 --- a/examples/react/start-supabase-basic/src/routeTree.gen.ts +++ b/examples/react/start-supabase-basic/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/examples/react/start-supabase-basic/src/routes/_authed.tsx b/examples/react/start-supabase-basic/src/routes/_authed.tsx index 697e35e427..ed97848e6a 100644 --- a/examples/react/start-supabase-basic/src/routes/_authed.tsx +++ b/examples/react/start-supabase-basic/src/routes/_authed.tsx @@ -27,7 +27,7 @@ export const Route = createFileRoute('/_authed')({ } }, errorComponent: ({ error }) => { - if (error instanceof Error && error.message === 'Not authenticated') { + if (error.message === 'Not authenticated') { return } diff --git a/examples/react/start-tailwind-v4/package.json b/examples/react/start-tailwind-v4/package.json index b58fbe4ff0..f8e537c9b4 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "react": "^19.0.0", "react-dom": "^19.0.0", "tailwind-merge": "^3.6.0", @@ -25,8 +25,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-trellaux/package.json b/examples/react/start-trellaux/package.json index 7755d227fc..29bf8bba30 100644 --- a/examples/react/start-trellaux/package.json +++ b/examples/react/start-trellaux/package.json @@ -10,12 +10,12 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-router-ssr-query": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-router-ssr-query": "^1.167.1", + "@tanstack/react-start": "^1.168.27", "ky": "^1.7.4", "msw": "^2.7.0", "react": "^19.0.0", @@ -32,8 +32,7 @@ "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-workos/README.md b/examples/react/start-workos/README.md index 52dde9410a..d6e222c7ba 100644 --- a/examples/react/start-workos/README.md +++ b/examples/react/start-workos/README.md @@ -30,7 +30,7 @@ You will need a [WorkOS account](https://dashboard.workos.com/signup). WORKOS_CLIENT_ID= WORKOS_API_KEY= WORKOS_COOKIE_PASSWORD= - WORKOS_REDIRECT_URI=http://localhost:3000/api/auth/callback + WORKOS_REDIRECT_URI=http://localhost:3000/callback ``` `WORKOS_COOKIE_PASSWORD` is the private key used to encrypt the session cookie. It has to be at least 32 characters long. You can use the [1Password generator](https://1password.com/password-generator/) or the `openssl` library to generate a strong password via the command line: ```bash diff --git a/examples/react/start-workos/package.json b/examples/react/start-workos/package.json index 0ab7e89c2d..935c7a0a5f 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/react-start": "^1.169.6", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/react-start": "^1.168.27", "@workos/authkit-tanstack-react-start": "^0.5.0", "react": "^19.0.0", "react-dom": "^19.0.0" @@ -25,8 +25,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/start-workos/src/routeTree.gen.ts b/examples/react/start-workos/src/routeTree.gen.ts index 559db280de..49009fc848 100644 --- a/examples/react/start-workos/src/routeTree.gen.ts +++ b/examples/react/start-workos/src/routeTree.gen.ts @@ -9,20 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthenticatedRouteImport } from './routes/_authenticated' -import { Route as ClientRouteImport } from './routes/client' import { Route as LogoutRouteImport } from './routes/logout' +import { Route as ClientRouteImport } from './routes/client' +import { Route as AuthenticatedRouteImport } from './routes/_authenticated' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthenticatedAccountRouteImport } from './routes/_authenticated/account' import { Route as ApiAuthCallbackRouteImport } from './routes/api/auth/callback' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthenticatedRoute = AuthenticatedRouteImport.update({ - id: '/_authenticated', +const LogoutRoute = LogoutRouteImport.update({ + id: '/logout', + path: '/logout', getParentRoute: () => rootRouteImport, } as any) const ClientRoute = ClientRouteImport.update({ @@ -30,9 +26,13 @@ const ClientRoute = ClientRouteImport.update({ path: '/client', getParentRoute: () => rootRouteImport, } as any) -const LogoutRoute = LogoutRouteImport.update({ - id: '/logout', - path: '/logout', +const AuthenticatedRoute = AuthenticatedRouteImport.update({ + id: '/_authenticated', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthenticatedAccountRoute = AuthenticatedAccountRouteImport.update({ @@ -94,18 +94,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authenticated': { - id: '/_authenticated' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthenticatedRouteImport + '/logout': { + id: '/logout' + path: '/logout' + fullPath: '/logout' + preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } '/client': { @@ -115,11 +108,18 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ClientRouteImport parentRoute: typeof rootRouteImport } - '/logout': { - id: '/logout' - path: '/logout' - fullPath: '/logout' - preLoaderRoute: typeof LogoutRouteImport + '/_authenticated': { + id: '/_authenticated' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthenticatedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authenticated/account': { diff --git a/examples/react/view-transitions/package.json b/examples/react/view-transitions/package.json index 0be3c60e8f..a5cc8bc839 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "react": "^19.0.0", "react-dom": "^19.0.0", "redaxios": "^0.5.1", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/view-transitions/src/routeTree.gen.ts b/examples/react/view-transitions/src/routeTree.gen.ts index 8982fca68f..20ee76a1a5 100644 --- a/examples/react/view-transitions/src/routeTree.gen.ts +++ b/examples/react/view-transitions/src/routeTree.gen.ts @@ -9,16 +9,16 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as ExploreRouteImport } from './routes/explore' import { Route as HowItWorksRouteImport } from './routes/how-it-works' +import { Route as ExploreRouteImport } from './routes/explore' import { Route as PostsRouteRouteImport } from './routes/posts.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const HowItWorksRoute = HowItWorksRouteImport.update({ + id: '/how-it-works', + path: '/how-it-works', getParentRoute: () => rootRouteImport, } as any) const ExploreRoute = ExploreRouteImport.update({ @@ -26,16 +26,16 @@ const ExploreRoute = ExploreRouteImport.update({ path: '/explore', getParentRoute: () => rootRouteImport, } as any) -const HowItWorksRoute = HowItWorksRouteImport.update({ - id: '/how-it-works', - path: '/how-it-works', - getParentRoute: () => rootRouteImport, -} as any) const PostsRouteRoute = PostsRouteRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -101,11 +101,11 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/how-it-works': { + id: '/how-it-works' + path: '/how-it-works' + fullPath: '/how-it-works' + preLoaderRoute: typeof HowItWorksRouteImport parentRoute: typeof rootRouteImport } '/explore': { @@ -115,13 +115,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ExploreRouteImport parentRoute: typeof rootRouteImport } - '/how-it-works': { - id: '/how-it-works' - path: '/how-it-works' - fullPath: '/how-it-works' - preLoaderRoute: typeof HowItWorksRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -129,6 +122,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/examples/react/view-transitions/src/routes/posts.route.tsx b/examples/react/view-transitions/src/routes/posts.route.tsx index 4612ed3d5d..c63dc78ff2 100644 --- a/examples/react/view-transitions/src/routes/posts.route.tsx +++ b/examples/react/view-transitions/src/routes/posts.route.tsx @@ -1,10 +1,5 @@ import * as React from 'react' -import { - Link, - Outlet, - createFileRoute, - useRouter, -} from '@tanstack/react-router' +import { Link, Outlet, createFileRoute } from '@tanstack/react-router' import { fetchPosts } from '../posts' export const Route = createFileRoute('/posts')({ @@ -14,7 +9,6 @@ export const Route = createFileRoute('/posts')({ function PostsLayoutComponent() { const posts = Route.useLoaderData() - const router = useRouter() return (
    @@ -30,30 +24,8 @@ function PostsLayoutComponent() { }} className="block py-1 text-blue-600 hover:opacity-75" activeProps={{ className: 'font-bold underline' }} - // see styles.css for 'warp' and 'warp-backwards' transition - viewTransition={{ - types: ({ fromLocation, toLocation }) => { - const fromRoute = router - .matchRoutes(fromLocation?.pathname ?? '/') - .find((entry) => entry.routeId === '/posts/$postId') - const toRoute = router - .matchRoutes(toLocation?.pathname ?? '/') - .find((entry) => entry.routeId === '/posts/$postId') - - const fromIndex = Number(fromRoute?.params.postId) - const toIndex = Number(toRoute?.params.postId) - - if ( - Number.isNaN(fromIndex) || - Number.isNaN(toIndex) || - fromIndex === toIndex - ) { - return false // no transition - } - - return fromIndex > toIndex ? ['warp-backwards'] : ['warp'] - }, - }} + // see styles.css for 'warp' transition + viewTransition={{ types: ['warp'] }} >
    {post.title.substring(0, 20)}
    diff --git a/examples/react/view-transitions/src/styles.css b/examples/react/view-transitions/src/styles.css index 502642b383..b51e6e1244 100644 --- a/examples/react/view-transitions/src/styles.css +++ b/examples/react/view-transitions/src/styles.css @@ -87,16 +87,6 @@ html:active-view-transition-type(warp) { } } -html:active-view-transition-type(warp-backwards) { - &::view-transition-old(post) { - animation: 400ms ease-out both warp-out-backwards; - } - - &::view-transition-new(post) { - animation: 400ms ease-out both warp-in-backwards; - } -} - @keyframes warp-out { from { opacity: 1; @@ -122,29 +112,3 @@ html:active-view-transition-type(warp-backwards) { transform: scale(1) rotate(0deg); } } - -@keyframes warp-in-backwards { - from { - opacity: 0; - filter: blur(15px) brightness(1.8); - transform: scale(0.9) rotate(45deg); - } - to { - opacity: 1; - filter: blur(0) brightness(1); - transform: scale(1) rotate(0deg); - } -} - -@keyframes warp-out-backwards { - from { - opacity: 1; - filter: blur(0) brightness(1); - transform: scale(1) rotate(0deg); - } - to { - opacity: 0; - filter: blur(15px) brightness(1.8); - transform: scale(1.1) rotate(-90deg); - } -} diff --git a/examples/react/with-framer-motion/package.json b/examples/react/with-framer-motion/package.json index c606070dfb..c4d861b689 100644 --- a/examples/react/with-framer-motion/package.json +++ b/examples/react/with-framer-motion/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", "framer-motion": "^11.18.2", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -23,8 +23,7 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json index 11df7bf03b..48e7eaa6cb 100644 --- a/examples/react/with-trpc-react-query/package.json +++ b/examples/react/with-trpc-react-query/package.json @@ -11,11 +11,11 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/react-query": "^5.102.0", + "@tanstack/react-query": "^5.90.0", "@tanstack/react-query-devtools": "^5.90.0", - "@tanstack/react-router": "^1.170.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "@trpc/client": "^11.4.3", "@trpc/server": "^11.4.3", "@trpc/tanstack-react-query": "^11.4.3", diff --git a/examples/react/with-trpc-react-query/src/routeTree.gen.ts b/examples/react/with-trpc-react-query/src/routeTree.gen.ts index 548a4b9e88..b407b58e4c 100644 --- a/examples/react/with-trpc-react-query/src/routeTree.gen.ts +++ b/examples/react/with-trpc-react-query/src/routeTree.gen.ts @@ -9,23 +9,23 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DashboardRouteImport } from './routes/dashboard' +import { Route as IndexRouteImport } from './routes/index' import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' import { Route as DashboardPostsRouteImport } from './routes/dashboard.posts' import { Route as DashboardPostsIndexRouteImport } from './routes/dashboard.posts.index' import { Route as DashboardPostsPostIdRouteImport } from './routes/dashboard.posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DashboardRoute = DashboardRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const DashboardIndexRoute = DashboardIndexRouteImport.update({ id: '/', path: '/', @@ -98,13 +98,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -112,6 +105,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard/': { id: '/dashboard/' path: '/' diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json index 5612419cae..3474e12a6b 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.46", - "@tanstack/react-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/react-router": "^1.170.17", + "@tanstack/react-router-devtools": "^1.167.0", + "@tanstack/router-plugin": "^1.168.19", "@trpc/client": "^11.4.3", "@trpc/server": "^11.4.3", "express": "^5.2.1", diff --git a/examples/react/with-trpc/src/routeTree.gen.ts b/examples/react/with-trpc/src/routeTree.gen.ts index 548a4b9e88..b407b58e4c 100644 --- a/examples/react/with-trpc/src/routeTree.gen.ts +++ b/examples/react/with-trpc/src/routeTree.gen.ts @@ -9,23 +9,23 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DashboardRouteImport } from './routes/dashboard' +import { Route as IndexRouteImport } from './routes/index' import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' import { Route as DashboardPostsRouteImport } from './routes/dashboard.posts' import { Route as DashboardPostsIndexRouteImport } from './routes/dashboard.posts.index' import { Route as DashboardPostsPostIdRouteImport } from './routes/dashboard.posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DashboardRoute = DashboardRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const DashboardIndexRoute = DashboardIndexRouteImport.update({ id: '/', path: '/', @@ -98,13 +98,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -112,6 +105,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DashboardRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard/': { id: '/dashboard/' path: '/' diff --git a/examples/solid/authenticated-routes-firebase/package.json b/examples/solid/authenticated-routes-firebase/package.json index 110b4d2621..0235d9b58a 100644 --- a/examples/solid/authenticated-routes-firebase/package.json +++ b/examples/solid/authenticated-routes-firebase/package.json @@ -9,21 +9,21 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "firebase": "^11.4.0", "redaxios": "^0.5.1", "simple-icons": "^14.9.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/authenticated-routes-firebase/src/auth.tsx b/examples/solid/authenticated-routes-firebase/src/auth.tsx index 97337889b7..c86b252802 100644 --- a/examples/solid/authenticated-routes-firebase/src/auth.tsx +++ b/examples/solid/authenticated-routes-firebase/src/auth.tsx @@ -3,6 +3,7 @@ import * as Solid from 'solid-js' import { onAuthStateChanged, signInWithPopup, signOut } from 'firebase/auth' import { auth } from './firebase/config' import type { AuthProvider, User } from 'firebase/auth' +import type { JSX } from '@solidjs/web' export type AuthContextType = { isAuthenticated: () => boolean @@ -14,20 +15,21 @@ export type AuthContextType = { const AuthContext = Solid.createContext(null) -export function AuthContextProvider(props: { children: Solid.JSX.Element }) { +export function AuthContextProvider(props: { children: JSX.Element }) { const [user, setUser] = Solid.createSignal(auth.currentUser) const [isInitialLoading, setIsInitialLoading] = Solid.createSignal(true) const isAuthenticated = () => !!user() - Solid.createEffect(() => { - const unsubscribe = onAuthStateChanged(auth, (user) => { - Solid.batch(() => { + Solid.createEffect( + () => undefined, + () => { + const unsubscribe = onAuthStateChanged(auth, (user) => { setUser(user) setIsInitialLoading(false) }) - }) - return () => unsubscribe() - }) + return () => unsubscribe() + }, + ) const logout = async () => { console.log('Logging out...') @@ -38,18 +40,16 @@ export function AuthContextProvider(props: { children: Solid.JSX.Element }) { const login = async (provider: AuthProvider) => { const result = await signInWithPopup(auth, provider) - Solid.batch(() => { - setUser(result.user) - setIsInitialLoading(false) - }) + setUser(result.user) + setIsInitialLoading(false) } return ( - {props.children} - + ) } diff --git a/examples/solid/authenticated-routes-firebase/src/main.tsx b/examples/solid/authenticated-routes-firebase/src/main.tsx index d8758ea388..7e750f491c 100644 --- a/examples/solid/authenticated-routes-firebase/src/main.tsx +++ b/examples/solid/authenticated-routes-firebase/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' diff --git a/examples/solid/authenticated-routes-firebase/src/routeTree.gen.ts b/examples/solid/authenticated-routes-firebase/src/routeTree.gen.ts index 4b98258aea..ff0ae58ad7 100644 --- a/examples/solid/authenticated-routes-firebase/src/routeTree.gen.ts +++ b/examples/solid/authenticated-routes-firebase/src/routeTree.gen.ts @@ -9,38 +9,38 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthInvoicesRouteImport } from './routes/_auth.invoices' +import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' import { Route as AuthInvoicesIndexRouteImport } from './routes/_auth.invoices.index' import { Route as AuthInvoicesInvoiceIdRouteImport } from './routes/_auth.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const AuthRoute = AuthRouteImport.update({ id: '/_auth', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthDashboardRoute = AuthDashboardRouteImport.update({ - id: '/dashboard', - path: '/dashboard', - getParentRoute: () => AuthRoute, -} as any) const AuthInvoicesRoute = AuthInvoicesRouteImport.update({ id: '/invoices', path: '/invoices', getParentRoute: () => AuthRoute, } as any) +const AuthDashboardRoute = AuthDashboardRouteImport.update({ + id: '/dashboard', + path: '/dashboard', + getParentRoute: () => AuthRoute, +} as any) const AuthInvoicesIndexRoute = AuthInvoicesIndexRouteImport.update({ id: '/', path: '/', @@ -107,11 +107,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_auth': { @@ -121,20 +121,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AuthRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/dashboard': { - id: '/_auth/dashboard' - path: '/dashboard' - fullPath: '/dashboard' - preLoaderRoute: typeof AuthDashboardRouteImport - parentRoute: typeof AuthRoute - } '/_auth/invoices': { id: '/_auth/invoices' path: '/invoices' @@ -142,6 +135,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AuthInvoicesRouteImport parentRoute: typeof AuthRoute } + '/_auth/dashboard': { + id: '/_auth/dashboard' + path: '/dashboard' + fullPath: '/dashboard' + preLoaderRoute: typeof AuthDashboardRouteImport + parentRoute: typeof AuthRoute + } '/_auth/invoices/': { id: '/_auth/invoices/' path: '/' diff --git a/examples/solid/authenticated-routes-firebase/tsconfig.json b/examples/solid/authenticated-routes-firebase/tsconfig.json index 483944f5da..08e43cf4f3 100644 --- a/examples/solid/authenticated-routes-firebase/tsconfig.json +++ b/examples/solid/authenticated-routes-firebase/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "module": "ESNext", "moduleResolution": "Bundler", diff --git a/examples/solid/authenticated-routes/package.json b/examples/solid/authenticated-routes/package.json index ea7d05c902..e9fd660581 100644 --- a/examples/solid/authenticated-routes/package.json +++ b/examples/solid/authenticated-routes/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/authenticated-routes/src/auth.tsx b/examples/solid/authenticated-routes/src/auth.tsx index 292835fc1e..588845ebed 100644 --- a/examples/solid/authenticated-routes/src/auth.tsx +++ b/examples/solid/authenticated-routes/src/auth.tsx @@ -1,4 +1,5 @@ import * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { sleep } from './utils' @@ -25,7 +26,7 @@ function setStoredUser(user: string | null) { } } -export function AuthProvider(props: { children: Solid.JSX.Element }) { +export function AuthProvider(props: { children: JSX.Element }) { const [user, setUser] = Solid.createSignal(getStoredUser()) const isAuthenticated = () => !!user() @@ -43,14 +44,17 @@ export function AuthProvider(props: { children: Solid.JSX.Element }) { setUser(username) } - Solid.createEffect(() => { - setUser(getStoredUser()) - }) + Solid.createEffect( + () => getStoredUser(), + (storedUser) => { + setUser(storedUser) + }, + ) return ( - + {props.children} - + ) } diff --git a/examples/solid/authenticated-routes/src/main.tsx b/examples/solid/authenticated-routes/src/main.tsx index b708360887..7b63807bba 100644 --- a/examples/solid/authenticated-routes/src/main.tsx +++ b/examples/solid/authenticated-routes/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' diff --git a/examples/solid/authenticated-routes/src/routeTree.gen.ts b/examples/solid/authenticated-routes/src/routeTree.gen.ts index 4b98258aea..ff0ae58ad7 100644 --- a/examples/solid/authenticated-routes/src/routeTree.gen.ts +++ b/examples/solid/authenticated-routes/src/routeTree.gen.ts @@ -9,38 +9,38 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthInvoicesRouteImport } from './routes/_auth.invoices' +import { Route as AuthDashboardRouteImport } from './routes/_auth.dashboard' import { Route as AuthInvoicesIndexRouteImport } from './routes/_auth.invoices.index' import { Route as AuthInvoicesInvoiceIdRouteImport } from './routes/_auth.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const AuthRoute = AuthRouteImport.update({ id: '/_auth', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthDashboardRoute = AuthDashboardRouteImport.update({ - id: '/dashboard', - path: '/dashboard', - getParentRoute: () => AuthRoute, -} as any) const AuthInvoicesRoute = AuthInvoicesRouteImport.update({ id: '/invoices', path: '/invoices', getParentRoute: () => AuthRoute, } as any) +const AuthDashboardRoute = AuthDashboardRouteImport.update({ + id: '/dashboard', + path: '/dashboard', + getParentRoute: () => AuthRoute, +} as any) const AuthInvoicesIndexRoute = AuthInvoicesIndexRouteImport.update({ id: '/', path: '/', @@ -107,11 +107,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_auth': { @@ -121,20 +121,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AuthRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/dashboard': { - id: '/_auth/dashboard' - path: '/dashboard' - fullPath: '/dashboard' - preLoaderRoute: typeof AuthDashboardRouteImport - parentRoute: typeof AuthRoute - } '/_auth/invoices': { id: '/_auth/invoices' path: '/invoices' @@ -142,6 +135,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AuthInvoicesRouteImport parentRoute: typeof AuthRoute } + '/_auth/dashboard': { + id: '/_auth/dashboard' + path: '/dashboard' + fullPath: '/dashboard' + preLoaderRoute: typeof AuthDashboardRouteImport + parentRoute: typeof AuthRoute + } '/_auth/invoices/': { id: '/_auth/invoices/' path: '/' diff --git a/examples/solid/authenticated-routes/tsconfig.json b/examples/solid/authenticated-routes/tsconfig.json index b5fd6ba97c..c7b2326b12 100644 --- a/examples/solid/authenticated-routes/tsconfig.json +++ b/examples/solid/authenticated-routes/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/basic-default-search-params/package.json b/examples/solid/basic-default-search-params/package.json index 830df7b9cf..5dc4aa5f4a 100644 --- a/examples/solid/basic-default-search-params/package.json +++ b/examples/solid/basic-default-search-params/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-default-search-params/src/main.tsx b/examples/solid/basic-default-search-params/src/main.tsx index 01d37c57d0..46db430097 100644 --- a/examples/solid/basic-default-search-params/src/main.tsx +++ b/examples/solid/basic-default-search-params/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, diff --git a/examples/solid/basic-default-search-params/tsconfig.json b/examples/solid/basic-default-search-params/tsconfig.json index b5fd6ba97c..c7b2326b12 100644 --- a/examples/solid/basic-default-search-params/tsconfig.json +++ b/examples/solid/basic-default-search-params/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/basic-devtools-panel/package.json b/examples/solid/basic-devtools-panel/package.json index e7d608f5fe..845dd0c7f3 100644 --- a/examples/solid/basic-devtools-panel/package.json +++ b/examples/solid/basic-devtools-panel/package.json @@ -9,17 +9,17 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-devtools-panel/src/main.tsx b/examples/solid/basic-devtools-panel/src/main.tsx index 48d0840660..21b9650396 100644 --- a/examples/solid/basic-devtools-panel/src/main.tsx +++ b/examples/solid/basic-devtools-panel/src/main.tsx @@ -8,7 +8,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' const rootRoute = createRootRoute({ component: () => ( diff --git a/examples/solid/basic-devtools-panel/tsconfig.json b/examples/solid/basic-devtools-panel/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/basic-devtools-panel/tsconfig.json +++ b/examples/solid/basic-devtools-panel/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-file-based/package.json b/examples/solid/basic-file-based/package.json index 867118382e..2d79a95cdf 100644 --- a/examples/solid/basic-file-based/package.json +++ b/examples/solid/basic-file-based/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-file-based/src/main.tsx b/examples/solid/basic-file-based/src/main.tsx index 8128384193..4bd8c56ef3 100644 --- a/examples/solid/basic-file-based/src/main.tsx +++ b/examples/solid/basic-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import './styles.css' diff --git a/examples/solid/basic-file-based/src/routeTree.gen.ts b/examples/solid/basic-file-based/src/routeTree.gen.ts index 5942acc907..bde5d68567 100644 --- a/examples/solid/basic-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-file-based/src/routeTree.gen.ts @@ -9,34 +9,29 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteImport } from './routes/posts' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,11 +117,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -131,19 +131,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/examples/solid/basic-file-based/tsconfig.json b/examples/solid/basic-file-based/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/basic-file-based/tsconfig.json +++ b/examples/solid/basic-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-non-nested-devtools/package.json b/examples/solid/basic-non-nested-devtools/package.json index c8e00ee43e..6631d87401 100644 --- a/examples/solid/basic-non-nested-devtools/package.json +++ b/examples/solid/basic-non-nested-devtools/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-non-nested-devtools/src/main.tsx b/examples/solid/basic-non-nested-devtools/src/main.tsx index 1ee0345cc9..bc9b56cd90 100644 --- a/examples/solid/basic-non-nested-devtools/src/main.tsx +++ b/examples/solid/basic-non-nested-devtools/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, diff --git a/examples/solid/basic-non-nested-devtools/tsconfig.json b/examples/solid/basic-non-nested-devtools/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/basic-non-nested-devtools/tsconfig.json +++ b/examples/solid/basic-non-nested-devtools/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-solid-query-file-based/package.json b/examples/solid/basic-solid-query-file-based/package.json index fdb5f05f52..3db1a7b357 100644 --- a/examples/solid/basic-solid-query-file-based/package.json +++ b/examples/solid/basic-solid-query-file-based/package.json @@ -10,21 +10,21 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-solid-query-file-based/src/main.tsx b/examples/solid/basic-solid-query-file-based/src/main.tsx index 7f1d2165f1..6f64a152de 100644 --- a/examples/solid/basic-solid-query-file-based/src/main.tsx +++ b/examples/solid/basic-solid-query-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { QueryClient, QueryClientProvider } from '@tanstack/solid-query' import { routeTree } from './routeTree.gen' diff --git a/examples/solid/basic-solid-query-file-based/src/routeTree.gen.ts b/examples/solid/basic-solid-query-file-based/src/routeTree.gen.ts index 5942acc907..bde5d68567 100644 --- a/examples/solid/basic-solid-query-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-solid-query-file-based/src/routeTree.gen.ts @@ -9,34 +9,29 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as PostsRouteImport } from './routes/posts' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -47,11 +42,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -59,6 +53,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -117,11 +117,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -131,19 +131,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -159,12 +152,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -173,6 +166,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/examples/solid/basic-solid-query-file-based/tsconfig.json b/examples/solid/basic-solid-query-file-based/tsconfig.json index 98f8016075..56f26182a0 100644 --- a/examples/solid/basic-solid-query-file-based/tsconfig.json +++ b/examples/solid/basic-solid-query-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-solid-query/package.json b/examples/solid/basic-solid-query/package.json index 7b132b11a1..bb6f890655 100644 --- a/examples/solid/basic-solid-query/package.json +++ b/examples/solid/basic-solid-query/package.json @@ -9,20 +9,20 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-solid-query/src/main.tsx b/examples/solid/basic-solid-query/src/main.tsx index 73a4a672b5..0b51d60c01 100644 --- a/examples/solid/basic-solid-query/src/main.tsx +++ b/examples/solid/basic-solid-query/src/main.tsx @@ -15,7 +15,7 @@ import { useQuery, } from '@tanstack/solid-query' import './styles.css' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { createEffect, createMemo } from 'solid-js' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' diff --git a/examples/solid/basic-solid-query/tsconfig.json b/examples/solid/basic-solid-query/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/basic-solid-query/tsconfig.json +++ b/examples/solid/basic-solid-query/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-ssr-file-based/package.json b/examples/solid/basic-ssr-file-based/package.json index e3699970a9..45d9a2a61d 100644 --- a/examples/solid/basic-ssr-file-based/package.json +++ b/examples/solid/basic-ssr-file-based/package.json @@ -11,20 +11,20 @@ "debug": "node --inspect-brk server" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/router-plugin": "^1.169.0", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", "compression": "^1.8.0", "express": "^5.2.1", "get-port": "^7.1.0", "node-fetch": "^3.3.2", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25" }, "devDependencies": { - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@types/express": "^5.0.6", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-ssr-file-based/src/entry-client.tsx b/examples/solid/basic-ssr-file-based/src/entry-client.tsx index 8cbc879670..c7dae8d650 100644 --- a/examples/solid/basic-ssr-file-based/src/entry-client.tsx +++ b/examples/solid/basic-ssr-file-based/src/entry-client.tsx @@ -1,5 +1,5 @@ import { RouterClient } from '@tanstack/solid-router/ssr/client' -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' import { createRouter } from './router' const router = createRouter() diff --git a/examples/solid/basic-ssr-file-based/src/routeTree.gen.ts b/examples/solid/basic-ssr-file-based/src/routeTree.gen.ts index fc6a3e4377..26eb09e67f 100644 --- a/examples/solid/basic-ssr-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-ssr-file-based/src/routeTree.gen.ts @@ -9,17 +9,12 @@ // 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 IndexRouteImport } from './routes/index' import { Route as ErrorRouteImport } from './routes/error' import { Route as PostsRouteRouteImport } from './routes/posts/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts/index' import { Route as PostsPostIdRouteImport } from './routes/posts/$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const ErrorRoute = ErrorRouteImport.update({ id: '/error', path: '/error', @@ -30,6 +25,11 @@ const PostsRouteRoute = PostsRouteRouteImport.update({ path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -78,13 +78,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/error': { id: '/error' path: '/error' @@ -99,6 +92,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/examples/solid/basic-ssr-file-based/tsconfig.json b/examples/solid/basic-ssr-file-based/tsconfig.json index 824a3ac003..cf145e9f57 100644 --- a/examples/solid/basic-ssr-file-based/tsconfig.json +++ b/examples/solid/basic-ssr-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "esnext", "types": ["vite/client"], "moduleResolution": "Bundler", diff --git a/examples/solid/basic-ssr-streaming-file-based/package.json b/examples/solid/basic-ssr-streaming-file-based/package.json index 92367442fc..e1102394d2 100644 --- a/examples/solid/basic-ssr-streaming-file-based/package.json +++ b/examples/solid/basic-ssr-streaming-file-based/package.json @@ -11,24 +11,24 @@ "debug": "node --inspect-brk server" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "compression": "^1.8.0", "express": "^5.2.1", "get-port": "^7.1.0", "node-fetch": "^3.3.2", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/router-plugin": "^1.168.19", "@types/express": "^5.0.6", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-ssr-streaming-file-based/src/entry-client.tsx b/examples/solid/basic-ssr-streaming-file-based/src/entry-client.tsx index 8cbc879670..c7dae8d650 100644 --- a/examples/solid/basic-ssr-streaming-file-based/src/entry-client.tsx +++ b/examples/solid/basic-ssr-streaming-file-based/src/entry-client.tsx @@ -1,5 +1,5 @@ import { RouterClient } from '@tanstack/solid-router/ssr/client' -import { hydrate } from 'solid-js/web' +import { hydrate } from '@solidjs/web' import { createRouter } from './router' const router = createRouter() diff --git a/examples/solid/basic-ssr-streaming-file-based/src/routeTree.gen.ts b/examples/solid/basic-ssr-streaming-file-based/src/routeTree.gen.ts index 0161f550f0..be2ed5b18d 100644 --- a/examples/solid/basic-ssr-streaming-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-ssr-streaming-file-based/src/routeTree.gen.ts @@ -9,23 +9,19 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CounterRouteImport } from './routes/counter' import { Route as PostsRouteImport } from './routes/posts' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' +import { Route as CounterRouteImport } from './routes/counter' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const CounterRoute = CounterRouteImport.update({ @@ -33,16 +29,15 @@ const CounterRoute = CounterRouteImport.update({ path: '/counter', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -53,11 +48,10 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ @@ -65,6 +59,12 @@ const PathlessLayoutNestedLayoutRouteBRoute = path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -129,18 +129,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/counter': { @@ -150,19 +143,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof CounterRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' + '/_pathlessLayout': { + id: '/_pathlessLayout' path: '' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -178,12 +171,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -192,6 +185,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } } } diff --git a/examples/solid/basic-ssr-streaming-file-based/src/routes/index.tsx b/examples/solid/basic-ssr-streaming-file-based/src/routes/index.tsx index e0bddc5969..d4ef02bc24 100644 --- a/examples/solid/basic-ssr-streaming-file-based/src/routes/index.tsx +++ b/examples/solid/basic-ssr-streaming-file-based/src/routes/index.tsx @@ -1,5 +1,5 @@ import { Await, createFileRoute } from '@tanstack/solid-router' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' export const Route = createFileRoute('/')({ loader: () => ({ @@ -18,11 +18,11 @@ function Home() {

    Welcome Home!

    Data: {data().date.getDate()}

    - Loading...
    }> + Loading...
    }> {(data) =>

    Deferred: {new Date(data.date).getDate()}

    }
    - +
    ) } diff --git a/examples/solid/basic-ssr-streaming-file-based/tsconfig.json b/examples/solid/basic-ssr-streaming-file-based/tsconfig.json index dbeff9c9e6..0b76441f5e 100644 --- a/examples/solid/basic-ssr-streaming-file-based/tsconfig.json +++ b/examples/solid/basic-ssr-streaming-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/basic-virtual-file-based/package.json b/examples/solid/basic-virtual-file-based/package.json index 801b452192..d721e9c1ab 100644 --- a/examples/solid/basic-virtual-file-based/package.json +++ b/examples/solid/basic-virtual-file-based/package.json @@ -9,20 +9,20 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@tanstack/virtual-file-routes": "^1.162.0", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-virtual-file-based/src/main.tsx b/examples/solid/basic-virtual-file-based/src/main.tsx index 8128384193..4bd8c56ef3 100644 --- a/examples/solid/basic-virtual-file-based/src/main.tsx +++ b/examples/solid/basic-virtual-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import './styles.css' diff --git a/examples/solid/basic-virtual-file-based/src/routeTree.gen.ts b/examples/solid/basic-virtual-file-based/src/routeTree.gen.ts index c41eda86bf..cb96aee7ba 100644 --- a/examples/solid/basic-virtual-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-virtual-file-based/src/routeTree.gen.ts @@ -9,77 +9,77 @@ // 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 homeRouteImport } from './routes/home' -import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' import { Route as postsPostsRouteImport } from './routes/posts/posts' -import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' -import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' -import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as layoutFirstLayoutRouteImport } from './routes/layout/first-layout' +import { Route as homeRouteImport } from './routes/home' import { Route as postsPostsDetailRouteImport } from './routes/posts/posts-detail' +import { Route as layoutSecondLayoutRouteImport } from './routes/layout/second-layout' +import { Route as postsPostsHomeRouteImport } from './routes/posts/posts-home' +import { Route as ClassicHelloRouteRouteImport } from './routes/file-based-subtree/hello/route' import { Route as ClassicHelloIndexRouteImport } from './routes/file-based-subtree/hello/index' -import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as ClassicHelloWorldRouteImport } from './routes/file-based-subtree/hello/world' -import { Route as aRouteImport } from './routes/a' +import { Route as ClassicHelloUniverseRouteImport } from './routes/file-based-subtree/hello/universe' import { Route as bRouteImport } from './routes/b' +import { Route as aRouteImport } from './routes/a' -const homeRoute = homeRouteImport.update({ - id: '/', - path: '/', +const postsPostsRoute = postsPostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const layoutFirstLayoutRoute = layoutFirstLayoutRouteImport.update({ id: '/_first', getParentRoute: () => rootRouteImport, } as any) -const postsPostsRoute = postsPostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ - id: '/_second-layout', - getParentRoute: () => layoutFirstLayoutRoute, -} as any) -const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ - id: '/classic/hello', - path: '/classic/hello', - getParentRoute: () => rootRouteImport, -} as any) -const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ +const homeRoute = homeRouteImport.update({ id: '/', path: '/', - getParentRoute: () => postsPostsRoute, + getParentRoute: () => rootRouteImport, } as any) const postsPostsDetailRoute = postsPostsDetailRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => postsPostsRoute, } as any) +const layoutSecondLayoutRoute = layoutSecondLayoutRouteImport.update({ + id: '/_second-layout', + getParentRoute: () => layoutFirstLayoutRoute, +} as any) +const postsPostsHomeRoute = postsPostsHomeRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => postsPostsRoute, +} as any) +const ClassicHelloRouteRoute = ClassicHelloRouteRouteImport.update({ + id: '/classic/hello', + path: '/classic/hello', + getParentRoute: () => rootRouteImport, +} as any) const ClassicHelloIndexRoute = ClassicHelloIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ - id: '/universe', - path: '/universe', - getParentRoute: () => ClassicHelloRouteRoute, -} as any) const ClassicHelloWorldRoute = ClassicHelloWorldRouteImport.update({ id: '/world', path: '/world', getParentRoute: () => ClassicHelloRouteRoute, } as any) -const aRoute = aRouteImport.update({ - id: '/route-without-file/layout-a', - path: '/route-without-file/layout-a', - getParentRoute: () => layoutSecondLayoutRoute, +const ClassicHelloUniverseRoute = ClassicHelloUniverseRouteImport.update({ + id: '/universe', + path: '/universe', + getParentRoute: () => ClassicHelloRouteRoute, } as any) const bRoute = bRouteImport.update({ id: '/route-without-file/layout-b', path: '/route-without-file/layout-b', getParentRoute: () => layoutSecondLayoutRoute, } as any) +const aRoute = aRouteImport.update({ + id: '/route-without-file/layout-a', + path: '/route-without-file/layout-a', + getParentRoute: () => layoutSecondLayoutRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof homeRoute @@ -166,11 +166,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof homeRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof postsPostsRouteImport parentRoute: typeof rootRouteImport } '/_first': { @@ -180,33 +180,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof layoutFirstLayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof postsPostsRouteImport - parentRoute: typeof rootRouteImport - } - '/_first/_second-layout': { - id: '/_first/_second-layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof layoutSecondLayoutRouteImport - parentRoute: typeof layoutFirstLayoutRoute - } - '/classic/hello': { - id: '/classic/hello' - path: '/classic/hello' - fullPath: '/classic/hello' - preLoaderRoute: typeof ClassicHelloRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof postsPostsHomeRouteImport - parentRoute: typeof postsPostsRoute + fullPath: '/' + preLoaderRoute: typeof homeRouteImport + parentRoute: typeof rootRouteImport } '/posts/$postId': { id: '/posts/$postId' @@ -215,6 +194,27 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof postsPostsDetailRouteImport parentRoute: typeof postsPostsRoute } + '/_first/_second-layout': { + id: '/_first/_second-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof layoutSecondLayoutRouteImport + parentRoute: typeof layoutFirstLayoutRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof postsPostsHomeRouteImport + parentRoute: typeof postsPostsRoute + } + '/classic/hello': { + id: '/classic/hello' + path: '/classic/hello' + fullPath: '/classic/hello' + preLoaderRoute: typeof ClassicHelloRouteRouteImport + parentRoute: typeof rootRouteImport + } '/classic/hello/': { id: '/classic/hello/' path: '/' @@ -222,13 +222,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ClassicHelloIndexRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/classic/hello/universe': { - id: '/classic/hello/universe' - path: '/universe' - fullPath: '/classic/hello/universe' - preLoaderRoute: typeof ClassicHelloUniverseRouteImport - parentRoute: typeof ClassicHelloRouteRoute - } '/classic/hello/world': { id: '/classic/hello/world' path: '/world' @@ -236,12 +229,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ClassicHelloWorldRouteImport parentRoute: typeof ClassicHelloRouteRoute } - '/_first/_second-layout/route-without-file/layout-a': { - id: '/_first/_second-layout/route-without-file/layout-a' - path: '/route-without-file/layout-a' - fullPath: '/route-without-file/layout-a' - preLoaderRoute: typeof aRouteImport - parentRoute: typeof layoutSecondLayoutRoute + '/classic/hello/universe': { + id: '/classic/hello/universe' + path: '/universe' + fullPath: '/classic/hello/universe' + preLoaderRoute: typeof ClassicHelloUniverseRouteImport + parentRoute: typeof ClassicHelloRouteRoute } '/_first/_second-layout/route-without-file/layout-b': { id: '/_first/_second-layout/route-without-file/layout-b' @@ -250,6 +243,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof bRouteImport parentRoute: typeof layoutSecondLayoutRoute } + '/_first/_second-layout/route-without-file/layout-a': { + id: '/_first/_second-layout/route-without-file/layout-a' + path: '/route-without-file/layout-a' + fullPath: '/route-without-file/layout-a' + preLoaderRoute: typeof aRouteImport + parentRoute: typeof layoutSecondLayoutRoute + } } } diff --git a/examples/solid/basic-virtual-file-based/tsconfig.json b/examples/solid/basic-virtual-file-based/tsconfig.json index 9cc8b90554..2f317aa831 100644 --- a/examples/solid/basic-virtual-file-based/tsconfig.json +++ b/examples/solid/basic-virtual-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "Preserve", "moduleResolution": "Bundler", "target": "ESNext", diff --git a/examples/solid/basic-virtual-inside-file-based/package.json b/examples/solid/basic-virtual-inside-file-based/package.json index a9cc6360a5..b7ad24bd2c 100644 --- a/examples/solid/basic-virtual-inside-file-based/package.json +++ b/examples/solid/basic-virtual-inside-file-based/package.json @@ -9,20 +9,20 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@tanstack/virtual-file-routes": "^1.162.0", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic-virtual-inside-file-based/src/main.tsx b/examples/solid/basic-virtual-inside-file-based/src/main.tsx index 8128384193..4bd8c56ef3 100644 --- a/examples/solid/basic-virtual-inside-file-based/src/main.tsx +++ b/examples/solid/basic-virtual-inside-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import './styles.css' diff --git a/examples/solid/basic-virtual-inside-file-based/src/routeTree.gen.ts b/examples/solid/basic-virtual-inside-file-based/src/routeTree.gen.ts index 6117330aa3..037dac78a3 100644 --- a/examples/solid/basic-virtual-inside-file-based/src/routeTree.gen.ts +++ b/examples/solid/basic-virtual-inside-file-based/src/routeTree.gen.ts @@ -9,31 +9,36 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' import { Route as PostsRouteImport } from './routes/posts' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' +import { Route as PostsDetailsRouteImport } from './routes/posts/details' import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' import { Route as PostsHomeRouteImport } from './routes/posts/home' -import { Route as PostsDetailsRouteImport } from './routes/posts/details' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' import { Route as PostsLetsGoIndexRouteImport } from './routes/posts/lets-go/index' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' import { Route as PostsLetsGoDeeperHomeRouteImport } from './routes/posts/lets-go/deeper/home' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) const LayoutRoute = LayoutRouteImport.update({ id: '/_layout', getParentRoute: () => rootRouteImport, } as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) +const PostsDetailsRoute = PostsDetailsRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) const LayoutLayout2Route = LayoutLayout2RouteImport.update({ id: '/_layout-2', getParentRoute: () => LayoutRoute, @@ -43,25 +48,20 @@ const PostsHomeRoute = PostsHomeRouteImport.update({ path: '/', getParentRoute: () => PostsRoute, } as any) -const PostsDetailsRoute = PostsDetailsRouteImport.update({ - id: '/$postId', - path: '/$postId', +const PostsLetsGoIndexRoute = PostsLetsGoIndexRouteImport.update({ + id: '/inception/', + path: '/inception/', getParentRoute: () => PostsRoute, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, -} as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) -const PostsLetsGoIndexRoute = PostsLetsGoIndexRouteImport.update({ - id: '/inception/', - path: '/inception/', - getParentRoute: () => PostsRoute, +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any) const PostsLetsGoDeeperHomeRoute = PostsLetsGoDeeperHomeRouteImport.update({ id: '/inception/deeper/', @@ -143,11 +143,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } '/_layout': { @@ -157,13 +157,20 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsDetailsRouteImport + parentRoute: typeof PostsRoute + } '/_layout/_layout-2': { id: '/_layout/_layout-2' path: '' @@ -178,20 +185,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsHomeRouteImport parentRoute: typeof PostsRoute } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsDetailsRouteImport + '/posts/inception/': { + id: '/posts/inception/' + path: '/inception' + fullPath: '/posts/inception/' + preLoaderRoute: typeof PostsLetsGoIndexRouteImport parentRoute: typeof PostsRoute } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route - } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' path: '/layout-b' @@ -199,12 +199,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts/inception/': { - id: '/posts/inception/' - path: '/inception' - fullPath: '/posts/inception/' - preLoaderRoute: typeof PostsLetsGoIndexRouteImport - parentRoute: typeof PostsRoute + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route } '/posts/inception/deeper/': { id: '/posts/inception/deeper/' diff --git a/examples/solid/basic-virtual-inside-file-based/tsconfig.json b/examples/solid/basic-virtual-inside-file-based/tsconfig.json index ac860bc51d..1ad36970bd 100644 --- a/examples/solid/basic-virtual-inside-file-based/tsconfig.json +++ b/examples/solid/basic-virtual-inside-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "module": "Preserve", "moduleResolution": "Bundler", diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 95ec804011..f27df108aa 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/basic/src/main.tsx b/examples/solid/basic/src/main.tsx index 53d9959cc3..b02b0f2206 100644 --- a/examples/solid/basic/src/main.tsx +++ b/examples/solid/basic/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, diff --git a/examples/solid/basic/tsconfig.json b/examples/solid/basic/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/basic/tsconfig.json +++ b/examples/solid/basic/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/deferred-data/package.json b/examples/solid/deferred-data/package.json index 56114afd04..b536401f7c 100644 --- a/examples/solid/deferred-data/package.json +++ b/examples/solid/deferred-data/package.json @@ -9,18 +9,18 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/deferred-data/src/main.tsx b/examples/solid/deferred-data/src/main.tsx index 4dd43fd97b..64dce976bb 100644 --- a/examples/solid/deferred-data/src/main.tsx +++ b/examples/solid/deferred-data/src/main.tsx @@ -1,5 +1,5 @@ -import { render } from 'solid-js/web' -import { Suspense } from 'solid-js' +import { render } from '@solidjs/web' +import { Loading } from 'solid-js' import { Await, ErrorComponent, @@ -207,7 +207,7 @@ function PostComponent() {

    {loaderData().post.title}

    {loaderData().post.body}
    - @@ -235,7 +235,7 @@ function PostComponent() { ) }} - +
    ) } diff --git a/examples/solid/deferred-data/tsconfig.json b/examples/solid/deferred-data/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/deferred-data/tsconfig.json +++ b/examples/solid/deferred-data/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/i18n-paraglide/package.json b/examples/solid/i18n-paraglide/package.json index 6493a3c7c8..e3f54cba45 100644 --- a/examples/solid/i18n-paraglide/package.json +++ b/examples/solid/i18n-paraglide/package.json @@ -10,29 +10,18 @@ "test": "vitest run" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/router-plugin": "^1.169.0", - "solid-js": "^1.9.10", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { + "@inlang/paraglide-js": "^2.4.0", "@types/node": "^22.18.6", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "@inlang/paraglide-js": "^2.4.0" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/i18n-paraglide/src/main.tsx b/examples/solid/i18n-paraglide/src/main.tsx index 6847c9cbdc..6f2e51f69e 100644 --- a/examples/solid/i18n-paraglide/src/main.tsx +++ b/examples/solid/i18n-paraglide/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import './styles.css' // Import the generated route tree diff --git a/examples/solid/i18n-paraglide/src/routeTree.gen.ts b/examples/solid/i18n-paraglide/src/routeTree.gen.ts index 98df1e83d8..333a815c38 100644 --- a/examples/solid/i18n-paraglide/src/routeTree.gen.ts +++ b/examples/solid/i18n-paraglide/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/i18n-paraglide/tsconfig.json b/examples/solid/i18n-paraglide/tsconfig.json index 9dcde39a0f..4063986744 100644 --- a/examples/solid/i18n-paraglide/tsconfig.json +++ b/examples/solid/i18n-paraglide/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "target": "ES2022", "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "lib": ["ES2022", "DOM", "DOM.Iterable"], "types": ["vite/client"], diff --git a/examples/solid/kitchen-sink-file-based/package.json b/examples/solid/kitchen-sink-file-based/package.json index 8cd73e38ff..ac889f0155 100644 --- a/examples/solid/kitchen-sink-file-based/package.json +++ b/examples/solid/kitchen-sink-file-based/package.json @@ -9,20 +9,20 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "immer": "^10.1.1", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/kitchen-sink-file-based/src/main.tsx b/examples/solid/kitchen-sink-file-based/src/main.tsx index 2ebe009eed..8742a88300 100644 --- a/examples/solid/kitchen-sink-file-based/src/main.tsx +++ b/examples/solid/kitchen-sink-file-based/src/main.tsx @@ -9,7 +9,7 @@ import { Spinner } from './components/Spinner' import { routeTree } from './routeTree.gen' import { useSessionStorage } from './hooks/useSessionStorage' import './styles.css' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' // diff --git a/examples/solid/kitchen-sink-file-based/src/routeTree.gen.ts b/examples/solid/kitchen-sink-file-based/src/routeTree.gen.ts index 76bb314a71..0c6e04f63d 100644 --- a/examples/solid/kitchen-sink-file-based/src/routeTree.gen.ts +++ b/examples/solid/kitchen-sink-file-based/src/routeTree.gen.ts @@ -9,71 +9,81 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' import { Route as LoginRouteImport } from './routes/login' -import { Route as thisFolderIsNotInTheUrlRouteGroupRouteImport } from './routes/(this-folder-is-not-in-the-url)/route-group' -import { Route as AuthProfileRouteImport } from './routes/_auth.profile' -import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' -import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' -import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' -import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' -import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as ExpensiveIndexRouteImport } from './routes/expensive/index' -import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' -import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' +import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' +import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' +import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' +import { Route as AuthProfileRouteImport } from './routes/_auth.profile' +import { Route as thisFolderIsNotInTheUrlRouteGroupRouteImport } from './routes/(this-folder-is-not-in-the-url)/route-group' +import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' import { Route as DashboardUsersIndexRouteImport } from './routes/dashboard.users.index' +import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' import { Route as DashboardUsersUserRouteImport } from './routes/dashboard.users.user' +import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthRoute = AuthRouteImport.update({ - id: '/_auth', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) +const AuthRoute = AuthRouteImport.update({ + id: '/_auth', + getParentRoute: () => rootRouteImport, +} as any) const DashboardRouteRoute = DashboardRouteRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) +const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ + id: '/expensive/', + path: '/expensive/', + getParentRoute: () => rootRouteImport, +} as any) +const DashboardIndexRoute = DashboardIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardRouteRoute, +} as any) +const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ + id: '/route-b', + path: '/route-b', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const AuthProfileRoute = AuthProfileRouteImport.update({ + id: '/profile', + path: '/profile', + getParentRoute: () => AuthRoute, +} as any) const thisFolderIsNotInTheUrlRouteGroupRoute = thisFolderIsNotInTheUrlRouteGroupRouteImport.update({ id: '/(this-folder-is-not-in-the-url)/route-group', path: '/route-group', getParentRoute: () => rootRouteImport, } as any) -const AuthProfileRoute = AuthProfileRouteImport.update({ - id: '/profile', - path: '/profile', - getParentRoute: () => AuthRoute, -} as any) -const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutRoute, -} as any) -const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ - id: '/route-b', - path: '/route-b', - getParentRoute: () => PathlessLayoutRoute, -} as any) -const DashboardIndexRoute = DashboardIndexRouteImport.update({ - id: '/', - path: '/', +const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => DashboardRouteRoute, } as any) const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ @@ -81,37 +91,27 @@ const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ path: '/invoices', getParentRoute: () => DashboardRouteRoute, } as any) -const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ - id: '/users', - path: '/users', - getParentRoute: () => DashboardRouteRoute, -} as any) -const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ - id: '/expensive/', - path: '/expensive/', - getParentRoute: () => rootRouteImport, +const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardUsersRouteRoute, } as any) const DashboardInvoicesIndexRoute = DashboardInvoicesIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) +const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ + id: '/user', + path: '/user', + getParentRoute: () => DashboardUsersRouteRoute, +} as any) const DashboardInvoicesInvoiceIdRoute = DashboardInvoicesInvoiceIdRouteImport.update({ id: '/$invoiceId', path: '/$invoiceId', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) -const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) -const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ - id: '/user', - path: '/user', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -229,18 +229,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_auth': { - id: '/_auth' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -250,6 +243,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } + '/_auth': { + id: '/_auth' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -257,33 +257,26 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardRouteRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/(this-folder-is-not-in-the-url)/route-group': { - id: '/(this-folder-is-not-in-the-url)/route-group' - path: '/route-group' - fullPath: '/route-group' - preLoaderRoute: typeof thisFolderIsNotInTheUrlRouteGroupRouteImport + '/expensive/': { + id: '/expensive/' + path: '/expensive' + fullPath: '/expensive/' + preLoaderRoute: typeof ExpensiveIndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/profile': { - id: '/_auth/profile' - path: '/profile' - fullPath: '/profile' - preLoaderRoute: typeof AuthProfileRouteImport - parentRoute: typeof AuthRoute - } - '/_pathlessLayout/route-a': { - id: '/_pathlessLayout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutRoute + '/dashboard/': { + id: '/dashboard/' + path: '/' + fullPath: '/dashboard/' + preLoaderRoute: typeof DashboardIndexRouteImport + parentRoute: typeof DashboardRouteRoute } '/_pathlessLayout/route-b': { id: '/_pathlessLayout/route-b' @@ -292,11 +285,32 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutRoute } - '/dashboard/': { - id: '/dashboard/' - path: '/' - fullPath: '/dashboard/' - preLoaderRoute: typeof DashboardIndexRouteImport + '/_pathlessLayout/route-a': { + id: '/_pathlessLayout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/_auth/profile': { + id: '/_auth/profile' + path: '/profile' + fullPath: '/profile' + preLoaderRoute: typeof AuthProfileRouteImport + parentRoute: typeof AuthRoute + } + '/(this-folder-is-not-in-the-url)/route-group': { + id: '/(this-folder-is-not-in-the-url)/route-group' + path: '/route-group' + fullPath: '/route-group' + preLoaderRoute: typeof thisFolderIsNotInTheUrlRouteGroupRouteImport + parentRoute: typeof rootRouteImport + } + '/dashboard/users': { + id: '/dashboard/users' + path: '/users' + fullPath: '/dashboard/users' + preLoaderRoute: typeof DashboardUsersRouteRouteImport parentRoute: typeof DashboardRouteRoute } '/dashboard/invoices': { @@ -306,19 +320,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardInvoicesRouteRouteImport parentRoute: typeof DashboardRouteRoute } - '/dashboard/users': { - id: '/dashboard/users' - path: '/users' - fullPath: '/dashboard/users' - preLoaderRoute: typeof DashboardUsersRouteRouteImport - parentRoute: typeof DashboardRouteRoute - } - '/expensive/': { - id: '/expensive/' - path: '/expensive' - fullPath: '/expensive/' - preLoaderRoute: typeof ExpensiveIndexRouteImport - parentRoute: typeof rootRouteImport + '/dashboard/users/': { + id: '/dashboard/users/' + path: '/' + fullPath: '/dashboard/users/' + preLoaderRoute: typeof DashboardUsersIndexRouteImport + parentRoute: typeof DashboardUsersRouteRoute } '/dashboard/invoices/': { id: '/dashboard/invoices/' @@ -327,20 +334,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardInvoicesIndexRouteImport parentRoute: typeof DashboardInvoicesRouteRoute } - '/dashboard/invoices/$invoiceId': { - id: '/dashboard/invoices/$invoiceId' - path: '/$invoiceId' - fullPath: '/dashboard/invoices/$invoiceId' - preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport - parentRoute: typeof DashboardInvoicesRouteRoute - } - '/dashboard/users/': { - id: '/dashboard/users/' - path: '/' - fullPath: '/dashboard/users/' - preLoaderRoute: typeof DashboardUsersIndexRouteImport - parentRoute: typeof DashboardUsersRouteRoute - } '/dashboard/users/user': { id: '/dashboard/users/user' path: '/user' @@ -348,6 +341,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardUsersUserRouteImport parentRoute: typeof DashboardUsersRouteRoute } + '/dashboard/invoices/$invoiceId': { + id: '/dashboard/invoices/$invoiceId' + path: '/$invoiceId' + fullPath: '/dashboard/invoices/$invoiceId' + preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport + parentRoute: typeof DashboardInvoicesRouteRoute + } } } diff --git a/examples/solid/kitchen-sink-file-based/src/utils/auth.tsx b/examples/solid/kitchen-sink-file-based/src/utils/auth.tsx index b46954c565..53bd5ea810 100644 --- a/examples/solid/kitchen-sink-file-based/src/utils/auth.tsx +++ b/examples/solid/kitchen-sink-file-based/src/utils/auth.tsx @@ -1,18 +1,18 @@ -import { createStore } from 'solid-js/store' +import { createStore } from 'solid-js' export const [auth, setAuth] = createStore({ status: 'loggedOut', username: undefined, login: (username: string) => { - setAuth({ - status: 'loggedIn', - username, + setAuth((state) => { + state.status = 'loggedIn' + state.username = username }) }, logout: () => { - setAuth({ - status: 'loggedOut', - username: undefined, + setAuth((state) => { + state.status = 'loggedOut' + state.username = undefined }) }, }) diff --git a/examples/solid/kitchen-sink-file-based/tsconfig.json b/examples/solid/kitchen-sink-file-based/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/kitchen-sink-file-based/tsconfig.json +++ b/examples/solid/kitchen-sink-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", 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 25a1c29953..3003b24c8c 100644 --- a/examples/solid/kitchen-sink-solid-query-file-based/package.json +++ b/examples/solid/kitchen-sink-solid-query-file-based/package.json @@ -9,22 +9,22 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "immer": "^10.1.1", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/kitchen-sink-solid-query-file-based/src/main.tsx b/examples/solid/kitchen-sink-solid-query-file-based/src/main.tsx index b7b0c1d5d0..5f27f1b774 100644 --- a/examples/solid/kitchen-sink-solid-query-file-based/src/main.tsx +++ b/examples/solid/kitchen-sink-solid-query-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, RouterProvider, diff --git a/examples/solid/kitchen-sink-solid-query-file-based/src/routeTree.gen.ts b/examples/solid/kitchen-sink-solid-query-file-based/src/routeTree.gen.ts index 8235344782..e296846127 100644 --- a/examples/solid/kitchen-sink-solid-query-file-based/src/routeTree.gen.ts +++ b/examples/solid/kitchen-sink-solid-query-file-based/src/routeTree.gen.ts @@ -9,65 +9,80 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthRouteImport } from './routes/_auth' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' import { Route as LoginRouteImport } from './routes/login' -import { Route as AuthProfileRouteImport } from './routes/_auth.profile' -import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' -import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' -import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' -import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' -import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as AuthRouteImport } from './routes/_auth' +import { Route as DashboardRouteRouteImport } from './routes/dashboard.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as ExpensiveIndexRouteImport } from './routes/expensive/index' +import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' import { Route as FooBarRouteImport } from './routes/foo/bar' -import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' -import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' +import { Route as PathlessLayoutRouteBRouteImport } from './routes/_pathlessLayout.route-b' +import { Route as PathlessLayoutRouteARouteImport } from './routes/_pathlessLayout.route-a' +import { Route as AuthProfileRouteImport } from './routes/_auth.profile' +import { Route as DashboardUsersRouteRouteImport } from './routes/dashboard.users.route' +import { Route as DashboardInvoicesRouteRouteImport } from './routes/dashboard.invoices.route' import { Route as DashboardUsersIndexRouteImport } from './routes/dashboard.users.index' +import { Route as DashboardInvoicesIndexRouteImport } from './routes/dashboard.invoices.index' import { Route as DashboardUsersUserRouteImport } from './routes/dashboard.users.user' +import { Route as DashboardInvoicesInvoiceIdRouteImport } from './routes/dashboard.invoices.$invoiceId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthRoute = AuthRouteImport.update({ - id: '/_auth', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) +const AuthRoute = AuthRouteImport.update({ + id: '/_auth', + getParentRoute: () => rootRouteImport, +} as any) const DashboardRouteRoute = DashboardRouteRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) -const AuthProfileRoute = AuthProfileRouteImport.update({ - id: '/profile', - path: '/profile', - getParentRoute: () => AuthRoute, +const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ + id: '/expensive/', + path: '/expensive/', + getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutRoute, +const DashboardIndexRoute = DashboardIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardRouteRoute, +} as any) +const FooBarRoute = FooBarRouteImport.update({ + id: '/foo/bar', + path: '/foo/bar', + getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutRouteBRoute = PathlessLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutRoute, } as any) -const DashboardIndexRoute = DashboardIndexRouteImport.update({ - id: '/', - path: '/', +const PathlessLayoutRouteARoute = PathlessLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutRoute, +} as any) +const AuthProfileRoute = AuthProfileRouteImport.update({ + id: '/profile', + path: '/profile', + getParentRoute: () => AuthRoute, +} as any) +const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => DashboardRouteRoute, } as any) const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ @@ -75,42 +90,27 @@ const DashboardInvoicesRouteRoute = DashboardInvoicesRouteRouteImport.update({ path: '/invoices', getParentRoute: () => DashboardRouteRoute, } as any) -const DashboardUsersRouteRoute = DashboardUsersRouteRouteImport.update({ - id: '/users', - path: '/users', - getParentRoute: () => DashboardRouteRoute, -} as any) -const ExpensiveIndexRoute = ExpensiveIndexRouteImport.update({ - id: '/expensive/', - path: '/expensive/', - getParentRoute: () => rootRouteImport, -} as any) -const FooBarRoute = FooBarRouteImport.update({ - id: '/foo/bar', - path: '/foo/bar', - getParentRoute: () => rootRouteImport, +const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => DashboardUsersRouteRoute, } as any) const DashboardInvoicesIndexRoute = DashboardInvoicesIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) +const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ + id: '/user', + path: '/user', + getParentRoute: () => DashboardUsersRouteRoute, +} as any) const DashboardInvoicesInvoiceIdRoute = DashboardInvoicesInvoiceIdRouteImport.update({ id: '/$invoiceId', path: '/$invoiceId', getParentRoute: () => DashboardInvoicesRouteRoute, } as any) -const DashboardUsersIndexRoute = DashboardUsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) -const DashboardUsersUserRoute = DashboardUsersUserRouteImport.update({ - id: '/user', - path: '/user', - getParentRoute: () => DashboardUsersRouteRoute, -} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -228,18 +228,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_auth': { - id: '/_auth' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout': { @@ -249,6 +242,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } + '/_auth': { + id: '/_auth' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -256,26 +256,33 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardRouteRouteImport parentRoute: typeof rootRouteImport } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/_auth/profile': { - id: '/_auth/profile' - path: '/profile' - fullPath: '/profile' - preLoaderRoute: typeof AuthProfileRouteImport - parentRoute: typeof AuthRoute + '/expensive/': { + id: '/expensive/' + path: '/expensive' + fullPath: '/expensive/' + preLoaderRoute: typeof ExpensiveIndexRouteImport + parentRoute: typeof rootRouteImport } - '/_pathlessLayout/route-a': { - id: '/_pathlessLayout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutRoute + '/dashboard/': { + id: '/dashboard/' + path: '/' + fullPath: '/dashboard/' + preLoaderRoute: typeof DashboardIndexRouteImport + parentRoute: typeof DashboardRouteRoute + } + '/foo/bar': { + id: '/foo/bar' + path: '/foo/bar' + fullPath: '/foo/bar' + preLoaderRoute: typeof FooBarRouteImport + parentRoute: typeof rootRouteImport } '/_pathlessLayout/route-b': { id: '/_pathlessLayout/route-b' @@ -284,11 +291,25 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutRoute } - '/dashboard/': { - id: '/dashboard/' - path: '/' - fullPath: '/dashboard/' - preLoaderRoute: typeof DashboardIndexRouteImport + '/_pathlessLayout/route-a': { + id: '/_pathlessLayout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/_auth/profile': { + id: '/_auth/profile' + path: '/profile' + fullPath: '/profile' + preLoaderRoute: typeof AuthProfileRouteImport + parentRoute: typeof AuthRoute + } + '/dashboard/users': { + id: '/dashboard/users' + path: '/users' + fullPath: '/dashboard/users' + preLoaderRoute: typeof DashboardUsersRouteRouteImport parentRoute: typeof DashboardRouteRoute } '/dashboard/invoices': { @@ -298,26 +319,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardInvoicesRouteRouteImport parentRoute: typeof DashboardRouteRoute } - '/dashboard/users': { - id: '/dashboard/users' - path: '/users' - fullPath: '/dashboard/users' - preLoaderRoute: typeof DashboardUsersRouteRouteImport - parentRoute: typeof DashboardRouteRoute - } - '/expensive/': { - id: '/expensive/' - path: '/expensive' - fullPath: '/expensive/' - preLoaderRoute: typeof ExpensiveIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/foo/bar': { - id: '/foo/bar' - path: '/foo/bar' - fullPath: '/foo/bar' - preLoaderRoute: typeof FooBarRouteImport - parentRoute: typeof rootRouteImport + '/dashboard/users/': { + id: '/dashboard/users/' + path: '/' + fullPath: '/dashboard/users/' + preLoaderRoute: typeof DashboardUsersIndexRouteImport + parentRoute: typeof DashboardUsersRouteRoute } '/dashboard/invoices/': { id: '/dashboard/invoices/' @@ -326,20 +333,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardInvoicesIndexRouteImport parentRoute: typeof DashboardInvoicesRouteRoute } - '/dashboard/invoices/$invoiceId': { - id: '/dashboard/invoices/$invoiceId' - path: '/$invoiceId' - fullPath: '/dashboard/invoices/$invoiceId' - preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport - parentRoute: typeof DashboardInvoicesRouteRoute - } - '/dashboard/users/': { - id: '/dashboard/users/' - path: '/' - fullPath: '/dashboard/users/' - preLoaderRoute: typeof DashboardUsersIndexRouteImport - parentRoute: typeof DashboardUsersRouteRoute - } '/dashboard/users/user': { id: '/dashboard/users/user' path: '/user' @@ -347,6 +340,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardUsersUserRouteImport parentRoute: typeof DashboardUsersRouteRoute } + '/dashboard/invoices/$invoiceId': { + id: '/dashboard/invoices/$invoiceId' + path: '/$invoiceId' + fullPath: '/dashboard/invoices/$invoiceId' + preLoaderRoute: typeof DashboardInvoicesInvoiceIdRouteImport + parentRoute: typeof DashboardInvoicesRouteRoute + } } } diff --git a/examples/solid/kitchen-sink-solid-query-file-based/src/routes/dashboard.users.route.tsx b/examples/solid/kitchen-sink-solid-query-file-based/src/routes/dashboard.users.route.tsx index c163792c08..387f899afb 100644 --- a/examples/solid/kitchen-sink-solid-query-file-based/src/routes/dashboard.users.route.tsx +++ b/examples/solid/kitchen-sink-solid-query-file-based/src/routes/dashboard.users.route.tsx @@ -44,10 +44,6 @@ function UsersComponent() { const [filterDraft, setFilterDraft] = Solid.createSignal(filterBy ?? '') - Solid.createEffect(() => { - setFilterDraft(filterBy ?? '') - }, [filterBy]) - const sortedUsers = Solid.createMemo(() => { if (!users) return [] @@ -56,7 +52,7 @@ function UsersComponent() { : [...users].sort((a, b) => { return a[sortBy] > b[sortBy] ? 1 : -1 }) - }, [users, sortBy]) + }) const filteredUsers = Solid.createMemo(() => { if (!filterBy) return sortedUsers() @@ -64,7 +60,7 @@ function UsersComponent() { return sortedUsers().filter((user) => user.name.toLowerCase().includes(filterBy.toLowerCase()), ) - }, [sortedUsers, filterBy]) + }) const setSortBy = (sortBy: UsersViewSortBy) => navigate({ @@ -80,7 +76,7 @@ function UsersComponent() { replace: true, }) - Solid.createEffect(() => { + Solid.createEffect(filterDraft, () => { navigate({ search: (old) => { return { @@ -93,7 +89,7 @@ function UsersComponent() { }, replace: true, }) - }, [filterDraft]) + }) return (
    @@ -139,7 +135,9 @@ function UsersComponent() { }} pending > - {(match) => } + {(match) => ( + !!match} wait="delay-50" /> + )} diff --git a/examples/solid/kitchen-sink-solid-query-file-based/tsconfig.json b/examples/solid/kitchen-sink-solid-query-file-based/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/kitchen-sink-solid-query-file-based/tsconfig.json +++ b/examples/solid/kitchen-sink-solid-query-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/kitchen-sink-solid-query/package.json b/examples/solid/kitchen-sink-solid-query/package.json index 7a7dc81025..f941f9dd90 100644 --- a/examples/solid/kitchen-sink-solid-query/package.json +++ b/examples/solid/kitchen-sink-solid-query/package.json @@ -9,21 +9,21 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "immer": "^10.1.1", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/kitchen-sink-solid-query/src/main.tsx b/examples/solid/kitchen-sink-solid-query/src/main.tsx index f8790b4a22..97cdb1d73d 100644 --- a/examples/solid/kitchen-sink-solid-query/src/main.tsx +++ b/examples/solid/kitchen-sink-solid-query/src/main.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ import * as Solid from 'solid-js' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, @@ -552,7 +552,6 @@ function UsersComponent() { const usersQuery = useQuery(() => usersQueryOptions(usersLayoutRoute.useLoaderDeps()()), ) - const users = usersQuery.data const sortBy = Solid.createMemo(() => search().usersView?.sortBy ?? 'name') const filterBy = Solid.createMemo(() => search().usersView?.filterBy) @@ -563,13 +562,12 @@ function UsersComponent() { }) const sortedUsers = Solid.createMemo(() => { - if (!users) return [] + const list = usersQuery.data + if (!list) return [] - return !sortBy - ? users - : [...users].sort((a: any, b: any) => { - return a[sortBy()] > b[sortBy()] ? 1 : -1 - }) + return [...list].sort((a: any, b: any) => { + return a[sortBy()] > b[sortBy()] ? 1 : -1 + }) }) const filteredUsers = Solid.createMemo(() => { @@ -607,7 +605,7 @@ function UsersComponent() { }, replace: true, }) - }, [filterDraft]) + }) return (
    @@ -805,11 +803,14 @@ function LoginComponent() { } // Ah, the subtle nuances of client side auth. 🙄 - Solid.createRenderEffect(() => { - if (routeContext().status === 'loggedIn' && search().redirect) { - router.history.push(search().redirect!) - } - }, [routeContext().status, search().redirect]) + Solid.createRenderEffect( + () => [routeContext().status, search().redirect] as const, + ([status, redirect]) => { + if (status === 'loggedIn' && redirect) { + router.history.push(redirect) + } + }, + ) return status === 'loggedIn' ? (
    diff --git a/examples/solid/kitchen-sink-solid-query/tsconfig.json b/examples/solid/kitchen-sink-solid-query/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/kitchen-sink-solid-query/tsconfig.json +++ b/examples/solid/kitchen-sink-solid-query/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/kitchen-sink/package.json b/examples/solid/kitchen-sink/package.json index 08ad918a60..75a2fc65e0 100644 --- a/examples/solid/kitchen-sink/package.json +++ b/examples/solid/kitchen-sink/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "immer": "^10.1.1", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/kitchen-sink/src/main.tsx b/examples/solid/kitchen-sink/src/main.tsx index 03e8379e40..b0ffba7d79 100644 --- a/examples/solid/kitchen-sink/src/main.tsx +++ b/examples/solid/kitchen-sink/src/main.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, @@ -23,7 +23,6 @@ import { createMemo, createRenderEffect, createSignal, - on, } from 'solid-js' import { z } from 'zod' import { @@ -346,18 +345,16 @@ function InvoiceComponent() { onSuccess: () => router.invalidate(), }) const [notes, setNotes] = createSignal(search().notes ?? '') - createEffect( - on(notes, () => { - navigate({ - search: (old) => ({ - ...old, - notes: notes() ? notes() : undefined, - }), - params: true, - replace: true, - }) - }), - ) + createEffect(notes, () => { + navigate({ + search: (old) => ({ + ...old, + notes: notes() ? notes() : undefined, + }), + params: true, + replace: true, + }) + }) return (
    filterBy, - () => { - setFilterDraft(filterBy ?? '') - }, - ), + () => filterBy, + () => { + setFilterDraft(filterBy ?? '') + }, ) const sortedUsers = createMemo(() => { @@ -484,7 +479,7 @@ function UsersLayoutComponent() { : [...users()].sort((a, b) => { return a[sortBy] > b[sortBy] ? 1 : -1 }) - }, [users, sortBy]) + }) const filteredUsers = createMemo(() => { if (!filterBy) return sortedUsers() @@ -492,7 +487,7 @@ function UsersLayoutComponent() { return sortedUsers().filter((user) => user.name.toLowerCase().includes(filterBy.toLowerCase()), ) - }, [sortedUsers, filterBy]) + }) const setSortBy = (sortBy: UsersViewSortBy) => navigate({ @@ -508,22 +503,20 @@ function UsersLayoutComponent() { replace: true, }) - createEffect( - on(filterDraft, () => { - navigate({ - search: (old) => { - return { - ...old, - usersView: { - ...old.usersView, - filterBy: filterDraft() || undefined, - }, - } - }, - replace: true, - }) - }), - ) + createEffect(filterDraft, () => { + navigate({ + search: (old) => { + return { + ...old, + usersView: { + ...old.usersView, + filterBy: filterDraft() || undefined, + }, + } + }, + replace: true, + }) + }) return (
    @@ -727,12 +720,13 @@ function LoginComponent() { // Ah, the subtle nuances of client side auth. 🙄 createRenderEffect( - on([() => routeContext().status, () => search().redirect], () => { + () => [routeContext().status, search().redirect], + () => { const redirect = search().redirect if (routeContext().status === 'loggedIn' && redirect) { router.history.push(redirect) } - }), + }, ) return routeContext().status === 'loggedIn' ? ( @@ -1021,11 +1015,9 @@ function useSessionStorage(key: string, initialValue: T) { })(), ) - createEffect( - on(state, () => { - sessionStorage.setItem(key, JSON.stringify(state())) - }), - ) + createEffect(state, () => { + sessionStorage.setItem(key, JSON.stringify(state())) + }) return [state, setState] as const } diff --git a/examples/solid/kitchen-sink/tsconfig.json b/examples/solid/kitchen-sink/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/kitchen-sink/tsconfig.json +++ b/examples/solid/kitchen-sink/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/large-file-based/package.json b/examples/solid/large-file-based/package.json index cd758ab704..e63d101323 100644 --- a/examples/solid/large-file-based/package.json +++ b/examples/solid/large-file-based/package.json @@ -11,20 +11,20 @@ "test:types": "tsc --extendedDiagnostics" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/large-file-based/src/main.tsx b/examples/solid/large-file-based/src/main.tsx index 07b1d8be85..c93206359d 100644 --- a/examples/solid/large-file-based/src/main.tsx +++ b/examples/solid/large-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { QueryClient } from '@tanstack/solid-query' import { routeTree } from './routeTree.gen' diff --git a/examples/solid/large-file-based/src/routeTree.gen.ts b/examples/solid/large-file-based/src/routeTree.gen.ts index ea7329778c..d345b69acf 100644 --- a/examples/solid/large-file-based/src/routeTree.gen.ts +++ b/examples/solid/large-file-based/src/routeTree.gen.ts @@ -9,23 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AbsoluteRouteImport } from './routes/absolute' -import { Route as LinkPropsRouteImport } from './routes/linkProps' -import { Route as ParamsRouteRouteImport } from './routes/params/route' import { Route as RelativeRouteImport } from './routes/relative' +import { Route as LinkPropsRouteImport } from './routes/linkProps' +import { Route as AbsoluteRouteImport } from './routes/absolute' import { Route as SearchRouteRouteImport } from './routes/search/route' -import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' +import { Route as ParamsRouteRouteImport } from './routes/params/route' +import { Route as IndexRouteImport } from './routes/index' import { Route as SearchSearchPlaceholderRouteImport } from './routes/search/searchPlaceholder' +import { Route as ParamsParamsPlaceholderRouteImport } from './routes/params/$paramsPlaceholder' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AbsoluteRoute = AbsoluteRouteImport.update({ - id: '/absolute', - path: '/absolute', +const RelativeRoute = RelativeRouteImport.update({ + id: '/relative', + path: '/relative', getParentRoute: () => rootRouteImport, } as any) const LinkPropsRoute = LinkPropsRouteImport.update({ @@ -33,14 +28,9 @@ const LinkPropsRoute = LinkPropsRouteImport.update({ path: '/linkProps', getParentRoute: () => rootRouteImport, } as any) -const ParamsRouteRoute = ParamsRouteRouteImport.update({ - id: '/params', - path: '/params', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeRoute = RelativeRouteImport.update({ - id: '/relative', - path: '/relative', +const AbsoluteRoute = AbsoluteRouteImport.update({ + id: '/absolute', + path: '/absolute', getParentRoute: () => rootRouteImport, } as any) const SearchRouteRoute = SearchRouteRouteImport.update({ @@ -48,16 +38,26 @@ const SearchRouteRoute = SearchRouteRouteImport.update({ path: '/search', getParentRoute: () => rootRouteImport, } as any) -const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ - id: '/$paramsPlaceholder', - path: '/$paramsPlaceholder', - getParentRoute: () => ParamsRouteRoute, +const ParamsRouteRoute = ParamsRouteRouteImport.update({ + id: '/params', + path: '/params', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const SearchSearchPlaceholderRoute = SearchSearchPlaceholderRouteImport.update({ id: '/searchPlaceholder', path: '/searchPlaceholder', getParentRoute: () => SearchRouteRoute, } as any) +const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ + id: '/$paramsPlaceholder', + path: '/$paramsPlaceholder', + getParentRoute: () => ParamsRouteRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -134,18 +134,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/absolute': { - id: '/absolute' - path: '/absolute' - fullPath: '/absolute' - preLoaderRoute: typeof AbsoluteRouteImport + '/relative': { + id: '/relative' + path: '/relative' + fullPath: '/relative' + preLoaderRoute: typeof RelativeRouteImport parentRoute: typeof rootRouteImport } '/linkProps': { @@ -155,18 +148,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LinkPropsRouteImport parentRoute: typeof rootRouteImport } - '/params': { - id: '/params' - path: '/params' - fullPath: '/params' - preLoaderRoute: typeof ParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/relative': { - id: '/relative' - path: '/relative' - fullPath: '/relative' - preLoaderRoute: typeof RelativeRouteImport + '/absolute': { + id: '/absolute' + path: '/absolute' + fullPath: '/absolute' + preLoaderRoute: typeof AbsoluteRouteImport parentRoute: typeof rootRouteImport } '/search': { @@ -176,12 +162,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SearchRouteRouteImport parentRoute: typeof rootRouteImport } - '/params/$paramsPlaceholder': { - id: '/params/$paramsPlaceholder' - path: '/$paramsPlaceholder' - fullPath: '/params/$paramsPlaceholder' - preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport - parentRoute: typeof ParamsRouteRoute + '/params': { + id: '/params' + path: '/params' + fullPath: '/params' + preLoaderRoute: typeof ParamsRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/search/searchPlaceholder': { id: '/search/searchPlaceholder' @@ -190,6 +183,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SearchSearchPlaceholderRouteImport parentRoute: typeof SearchRouteRoute } + '/params/$paramsPlaceholder': { + id: '/params/$paramsPlaceholder' + path: '/$paramsPlaceholder' + fullPath: '/params/$paramsPlaceholder' + preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport + parentRoute: typeof ParamsRouteRoute + } } } diff --git a/examples/solid/large-file-based/tsconfig.json b/examples/solid/large-file-based/tsconfig.json index 1fb6d3e91c..e3758876b2 100644 --- a/examples/solid/large-file-based/tsconfig.json +++ b/examples/solid/large-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "noEmit": true, diff --git a/examples/solid/location-masking/package.json b/examples/solid/location-masking/package.json index 7d2fbb6756..00767dbbc9 100644 --- a/examples/solid/location-masking/package.json +++ b/examples/solid/location-masking/package.json @@ -9,18 +9,18 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "solid-js": "^1.9.10", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/location-masking/src/main.tsx b/examples/solid/location-masking/src/main.tsx index ed090265b9..4d8a0fddbb 100644 --- a/examples/solid/location-masking/src/main.tsx +++ b/examples/solid/location-masking/src/main.tsx @@ -1,5 +1,5 @@ -import type { JSX } from 'solid-js' -import { render } from 'solid-js/web' +import type { JSX } from '@solidjs/web' +import { render } from '@solidjs/web' import { ErrorComponent, Link, diff --git a/examples/solid/location-masking/tsconfig.json b/examples/solid/location-masking/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/location-masking/tsconfig.json +++ b/examples/solid/location-masking/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/navigation-blocking/package.json b/examples/solid/navigation-blocking/package.json index 2338d32305..40c8ef4221 100644 --- a/examples/solid/navigation-blocking/package.json +++ b/examples/solid/navigation-blocking/package.json @@ -9,18 +9,18 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "solid-js": "^1.9.10", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/navigation-blocking/src/main.tsx b/examples/solid/navigation-blocking/src/main.tsx index 81a4028604..3b8c3031b3 100644 --- a/examples/solid/navigation-blocking/src/main.tsx +++ b/examples/solid/navigation-blocking/src/main.tsx @@ -1,5 +1,5 @@ import { createSignal } from 'solid-js' -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Link, Outlet, diff --git a/examples/solid/navigation-blocking/tsconfig.json b/examples/solid/navigation-blocking/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/navigation-blocking/tsconfig.json +++ b/examples/solid/navigation-blocking/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/quickstart-esbuild-file-based/build.js b/examples/solid/quickstart-esbuild-file-based/build.js index af5e01b4cd..7952dc5d4e 100644 --- a/examples/solid/quickstart-esbuild-file-based/build.js +++ b/examples/solid/quickstart-esbuild-file-based/build.js @@ -14,7 +14,10 @@ const ctx = await esbuild.context({ target: ['esnext'], sourcemap: true, conditions: ['style'], - plugins: [solidPlugin(), tanstackRouter({ target: 'solid' })], + plugins: [ + solidPlugin({ solid: { moduleName: '@solidjs/web' } }), + tanstackRouter({ target: 'solid', autoCodeSplitting: true }), + ], }) if (isDev) { diff --git a/examples/solid/quickstart-esbuild-file-based/package.json b/examples/solid/quickstart-esbuild-file-based/package.json index 9bcc9a08d0..d2a49bdbc6 100644 --- a/examples/solid/quickstart-esbuild-file-based/package.json +++ b/examples/solid/quickstart-esbuild-file-based/package.json @@ -9,11 +9,12 @@ "start": "dev" }, "dependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, diff --git a/examples/solid/quickstart-esbuild-file-based/src/main.tsx b/examples/solid/quickstart-esbuild-file-based/src/main.tsx index 58c2fcf308..45eeb1f759 100644 --- a/examples/solid/quickstart-esbuild-file-based/src/main.tsx +++ b/examples/solid/quickstart-esbuild-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import './styles.css' diff --git a/examples/solid/quickstart-esbuild-file-based/tsconfig.json b/examples/solid/quickstart-esbuild-file-based/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/quickstart-esbuild-file-based/tsconfig.json +++ b/examples/solid/quickstart-esbuild-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/quickstart-file-based/package.json b/examples/solid/quickstart-file-based/package.json index 920154566d..6b5fd29920 100644 --- a/examples/solid/quickstart-file-based/package.json +++ b/examples/solid/quickstart-file-based/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/quickstart-file-based/src/main.tsx b/examples/solid/quickstart-file-based/src/main.tsx index 8128384193..4bd8c56ef3 100644 --- a/examples/solid/quickstart-file-based/src/main.tsx +++ b/examples/solid/quickstart-file-based/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { routeTree } from './routeTree.gen' import './styles.css' diff --git a/examples/solid/quickstart-file-based/src/routeTree.gen.ts b/examples/solid/quickstart-file-based/src/routeTree.gen.ts index 98df1e83d8..333a815c38 100644 --- a/examples/solid/quickstart-file-based/src/routeTree.gen.ts +++ b/examples/solid/quickstart-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/quickstart-file-based/tsconfig.json b/examples/solid/quickstart-file-based/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/quickstart-file-based/tsconfig.json +++ b/examples/solid/quickstart-file-based/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/quickstart-rspack-file-based/package.json b/examples/solid/quickstart-rspack-file-based/package.json index 2d9c886ac3..bf29cc4b48 100644 --- a/examples/solid/quickstart-rspack-file-based/package.json +++ b/examples/solid/quickstart-rspack-file-based/package.json @@ -8,19 +8,19 @@ "preview": "rsbuild preview" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/postcss": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "postcss": "^8.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "@rsbuild/core": "^2.3.1", + "@rsbuild/core": "^2.0.11", "@rsbuild/plugin-babel": "^1.1.2", - "@rsbuild/plugin-solid": "^1.1.1", - "@tanstack/router-plugin": "^1.169.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2" + "@rsbuild/plugin-solid": "^2.0.0-beta.0", + "@tanstack/router-plugin": "^1.168.19", + "typescript": "^6.0.2" } } diff --git a/examples/solid/quickstart-rspack-file-based/rsbuild.config.ts b/examples/solid/quickstart-rspack-file-based/rsbuild.config.ts index 6cf2622e65..57dfa42e0b 100644 --- a/examples/solid/quickstart-rspack-file-based/rsbuild.config.ts +++ b/examples/solid/quickstart-rspack-file-based/rsbuild.config.ts @@ -8,11 +8,20 @@ export default defineConfig({ pluginBabel({ include: /\.(?:jsx|tsx)$/, }), - pluginSolid(), + pluginSolid({ + solidPresetOptions: { + moduleName: '@solidjs/web', + }, + }), ], tools: { rspack: { plugins: [tanstackRouter({ target: 'solid', autoCodeSplitting: true })], + resolve: { + alias: { + 'solid-js/web': '@solidjs/web', + }, + }, }, }, }) diff --git a/examples/solid/quickstart-rspack-file-based/src/index.tsx b/examples/solid/quickstart-rspack-file-based/src/index.tsx index 782382dcfd..c29380ee41 100644 --- a/examples/solid/quickstart-rspack-file-based/src/index.tsx +++ b/examples/solid/quickstart-rspack-file-based/src/index.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import App from './app' const rootElement = document.getElementById('root')! diff --git a/examples/solid/quickstart-rspack-file-based/src/routeTree.gen.ts b/examples/solid/quickstart-rspack-file-based/src/routeTree.gen.ts index 98df1e83d8..333a815c38 100644 --- a/examples/solid/quickstart-rspack-file-based/src/routeTree.gen.ts +++ b/examples/solid/quickstart-rspack-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/quickstart-rspack-file-based/tsconfig.json b/examples/solid/quickstart-rspack-file-based/tsconfig.json index e89df5bdee..c3621a5c25 100644 --- a/examples/solid/quickstart-rspack-file-based/tsconfig.json +++ b/examples/solid/quickstart-rspack-file-based/tsconfig.json @@ -4,7 +4,7 @@ "lib": ["DOM", "DOM.Iterable", "ES2022"], "module": "ESNext", "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "strict": true, "skipLibCheck": true, "isolatedModules": true, diff --git a/examples/solid/quickstart-webpack-file-based/package.json b/examples/solid/quickstart-webpack-file-based/package.json index 16167be207..2b130bb766 100644 --- a/examples/solid/quickstart-webpack-file-based/package.json +++ b/examples/solid/quickstart-webpack-file-based/package.json @@ -7,24 +7,24 @@ "build": "webpack build && tsc --noEmit" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "solid-js": "^1.9.10", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { "@babel/core": "^7.28.5", "@babel/preset-typescript": "^7.27.1", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/router-plugin": "^1.168.19", "babel-loader": "^10.0.0", - "babel-preset-solid": "^1.9.10", + "babel-preset-solid": "2.0.0-beta.25", "css-loader": "^7.1.2", "html-webpack-plugin": "^5.6.3", "postcss": "^8.5.6", "postcss-loader": "^8.2.0", "style-loader": "^4.0.0", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "webpack": "^5.97.1", "webpack-cli": "^5.1.4", "webpack-dev-server": "^5.2.4" diff --git a/examples/solid/quickstart-webpack-file-based/src/index.tsx b/examples/solid/quickstart-webpack-file-based/src/index.tsx index 545d22a618..8e142a714d 100644 --- a/examples/solid/quickstart-webpack-file-based/src/index.tsx +++ b/examples/solid/quickstart-webpack-file-based/src/index.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import App from './app' import './styles.css' diff --git a/examples/solid/quickstart-webpack-file-based/src/routeTree.gen.ts b/examples/solid/quickstart-webpack-file-based/src/routeTree.gen.ts index 98df1e83d8..333a815c38 100644 --- a/examples/solid/quickstart-webpack-file-based/src/routeTree.gen.ts +++ b/examples/solid/quickstart-webpack-file-based/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/quickstart-webpack-file-based/tsconfig.json b/examples/solid/quickstart-webpack-file-based/tsconfig.json index e89df5bdee..c3621a5c25 100644 --- a/examples/solid/quickstart-webpack-file-based/tsconfig.json +++ b/examples/solid/quickstart-webpack-file-based/tsconfig.json @@ -4,7 +4,7 @@ "lib": ["DOM", "DOM.Iterable", "ES2022"], "module": "ESNext", "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "strict": true, "skipLibCheck": true, "isolatedModules": true, diff --git a/examples/solid/quickstart/package.json b/examples/solid/quickstart/package.json index 454382e8cc..78797dbc6f 100644 --- a/examples/solid/quickstart/package.json +++ b/examples/solid/quickstart/package.json @@ -9,16 +9,16 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "solid-js": "^1.9.10", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/quickstart/src/main.tsx b/examples/solid/quickstart/src/main.tsx index 79daf132e3..3ed73749d2 100644 --- a/examples/solid/quickstart/src/main.tsx +++ b/examples/solid/quickstart/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Link, Outlet, diff --git a/examples/solid/quickstart/tsconfig.json b/examples/solid/quickstart/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/quickstart/tsconfig.json +++ b/examples/solid/quickstart/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/router-monorepo-simple-lazy/package.json b/examples/solid/router-monorepo-simple-lazy/package.json index 1d60ab2765..0c2d587680 100644 --- a/examples/solid/router-monorepo-simple-lazy/package.json +++ b/examples/solid/router-monorepo-simple-lazy/package.json @@ -8,19 +8,19 @@ "dev": "pnpm router build && pnpm post-feature build && pnpm app dev" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", - "solid-js": "^1.9.10", - "redaxios": "^0.5.1" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@types/node": "^22.7.4", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-dts": "^4.5.4" + "vite-plugin-dts": "^4.5.4", + "vite-plugin-solid": "^3.0.0-next.16" }, "keywords": [], "author": "", diff --git a/examples/solid/router-monorepo-simple-lazy/packages/app/package.json b/examples/solid/router-monorepo-simple-lazy/packages/app/package.json index a2e018fa96..8e8dc0b890 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/app/package.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/app/package.json @@ -18,9 +18,8 @@ "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "@vitejs/plugin-react": "^6.0.1", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "@tanstack/solid-router-devtools": "^1.167.3", + "typescript": "^6.0.2", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "tailwindcss": "^4.2.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4", diff --git a/examples/solid/router-monorepo-simple-lazy/packages/app/src/main.tsx b/examples/solid/router-monorepo-simple-lazy/packages/app/src/main.tsx index 91ee95bd38..46aebbe69f 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/app/src/main.tsx +++ b/examples/solid/router-monorepo-simple-lazy/packages/app/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider } from '@tanstack/solid-router' import { router } from '@router-solid-mono-simple-lazy/router' import { RootComponent } from './rootComponent' diff --git a/examples/solid/router-monorepo-simple-lazy/packages/app/tsconfig.json b/examples/solid/router-monorepo-simple-lazy/packages/app/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/app/tsconfig.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/app/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-simple-lazy/packages/post-feature/package.json b/examples/solid/router-monorepo-simple-lazy/packages/post-feature/package.json index 849be06ce6..d95b17e70a 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/post-feature/package.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/post-feature/package.json @@ -16,14 +16,14 @@ } }, "dependencies": { - "@tanstack/solid-query": "^5.90.9", + "@tanstack/solid-query": "^6.0.0-beta.5", "@router-solid-mono-simple-lazy/router": "workspace:*", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-simple-lazy/packages/post-feature/tsconfig.json b/examples/solid/router-monorepo-simple-lazy/packages/post-feature/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/post-feature/tsconfig.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/post-feature/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", 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 0672c42931..43e6b14015 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/router/package.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/router/package.json @@ -8,17 +8,17 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/history": "^1.162.5", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/router-plugin": "^1.168.19", "redaxios": "^0.5.1", "zod": "^4.4.3", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts b/examples/solid/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts index 8760312d24..e8f1a5370b 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts +++ b/examples/solid/router-monorepo-simple-lazy/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/tsconfig.json b/examples/solid/router-monorepo-simple-lazy/packages/router/tsconfig.json index b986b1be62..d21ca529ac 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/router/tsconfig.json +++ b/examples/solid/router-monorepo-simple-lazy/packages/router/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-simple-lazy/packages/router/vite.config.ts b/examples/solid/router-monorepo-simple-lazy/packages/router/vite.config.ts index 018ebfd3d5..fd99b4b7de 100644 --- a/examples/solid/router-monorepo-simple-lazy/packages/router/vite.config.ts +++ b/examples/solid/router-monorepo-simple-lazy/packages/router/vite.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ }, rolldownOptions: { // External packages that should not be bundled into your library. - external: ['solid-js', 'solid-js/web', '@tanstack/solid-router'], + external: ['solid-js', '@solidjs/web', '@tanstack/solid-router'], }, }, }) diff --git a/examples/solid/router-monorepo-simple/package.json b/examples/solid/router-monorepo-simple/package.json index 3770256692..d7c3bcf9e9 100644 --- a/examples/solid/router-monorepo-simple/package.json +++ b/examples/solid/router-monorepo-simple/package.json @@ -8,19 +8,19 @@ "dev": "pnpm router build && pnpm post-feature build && pnpm app dev" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", - "solid-js": "^1.9.10", - "redaxios": "^0.5.1" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@types/node": "^22.7.4", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-dts": "^4.5.4" + "vite-plugin-dts": "^4.5.4", + "vite-plugin-solid": "^3.0.0-next.16" }, "keywords": [], "author": "", diff --git a/examples/solid/router-monorepo-simple/packages/app/package.json b/examples/solid/router-monorepo-simple/packages/app/package.json index 61234ac455..a2e1ce0426 100644 --- a/examples/solid/router-monorepo-simple/packages/app/package.json +++ b/examples/solid/router-monorepo-simple/packages/app/package.json @@ -11,13 +11,13 @@ "dependencies": { "@router-solid-mono-simple/post-feature": "workspace:*", "@router-solid-mono-simple/router": "workspace:*", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "@tanstack/solid-router-devtools": "^1.167.3", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "vite": "^8.0.14", "tailwindcss": "^4.2.2", "vite-plugin-dts": "^4.5.4", diff --git a/examples/solid/router-monorepo-simple/packages/app/src/main.tsx b/examples/solid/router-monorepo-simple/packages/app/src/main.tsx index d50c77774f..69cdd2f06c 100644 --- a/examples/solid/router-monorepo-simple/packages/app/src/main.tsx +++ b/examples/solid/router-monorepo-simple/packages/app/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider } from '@tanstack/solid-router' import { Outlet, router } from '@router-solid-mono-simple/router' import { @@ -8,7 +8,7 @@ import { } from '@router-solid-mono-simple/post-feature' import { RootComponent } from './rootComponent' import type { RouterIds } from '@router-solid-mono-simple/router' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' import './style.css' // Not lazy loaded for simplicity, but you could expose from your library component // individually, and enforce here to use solid lazy components via typings diff --git a/examples/solid/router-monorepo-simple/packages/app/tsconfig.json b/examples/solid/router-monorepo-simple/packages/app/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-simple/packages/app/tsconfig.json +++ b/examples/solid/router-monorepo-simple/packages/app/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-simple/packages/post-feature/package.json b/examples/solid/router-monorepo-simple/packages/post-feature/package.json index eb8005b953..17643752d5 100644 --- a/examples/solid/router-monorepo-simple/packages/post-feature/package.json +++ b/examples/solid/router-monorepo-simple/packages/post-feature/package.json @@ -9,12 +9,12 @@ "types": "./dist/index.d.ts", "dependencies": { "@router-solid-mono-simple/router": "workspace:*", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json b/examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json +++ b/examples/solid/router-monorepo-simple/packages/post-feature/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts b/examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts index 6593e68056..fec43f1332 100644 --- a/examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts +++ b/examples/solid/router-monorepo-simple/packages/post-feature/vite.config.ts @@ -33,7 +33,7 @@ export default defineConfig({ // External packages that should not be bundled into your library. external: [ 'solid-js', - 'solid-js/web', + '@solidjs/web', '@tanstack/solid-router', '@router-solid-mono-simple/post-feature', '@router-solid-mono-simple/router', diff --git a/examples/solid/router-monorepo-simple/packages/router/package.json b/examples/solid/router-monorepo-simple/packages/router/package.json index ca08511d3e..c9af64ab14 100644 --- a/examples/solid/router-monorepo-simple/packages/router/package.json +++ b/examples/solid/router-monorepo-simple/packages/router/package.json @@ -8,17 +8,17 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/history": "^1.162.5", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/router-plugin": "^1.168.19", "redaxios": "^0.5.1", "zod": "^4.4.3", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts b/examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts index 8760312d24..e8f1a5370b 100644 --- a/examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts +++ b/examples/solid/router-monorepo-simple/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/router-monorepo-simple/packages/router/tsconfig.json b/examples/solid/router-monorepo-simple/packages/router/tsconfig.json index b986b1be62..d21ca529ac 100644 --- a/examples/solid/router-monorepo-simple/packages/router/tsconfig.json +++ b/examples/solid/router-monorepo-simple/packages/router/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-simple/packages/router/vite.config.ts b/examples/solid/router-monorepo-simple/packages/router/vite.config.ts index 018ebfd3d5..fd99b4b7de 100644 --- a/examples/solid/router-monorepo-simple/packages/router/vite.config.ts +++ b/examples/solid/router-monorepo-simple/packages/router/vite.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ }, rolldownOptions: { // External packages that should not be bundled into your library. - external: ['solid-js', 'solid-js/web', '@tanstack/solid-router'], + external: ['solid-js', '@solidjs/web', '@tanstack/solid-router'], }, }, }) diff --git a/examples/solid/router-monorepo-solid-query/package.json b/examples/solid/router-monorepo-solid-query/package.json index 3d9fd2e2d0..3cbba0a0aa 100644 --- a/examples/solid/router-monorepo-solid-query/package.json +++ b/examples/solid/router-monorepo-solid-query/package.json @@ -10,21 +10,21 @@ "dev": "pnpm post-query build && pnpm router build && pnpm post-feature build && pnpm app dev" }, "dependencies": { - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", - "solid-js": "^1.9.10", - "redaxios": "^0.5.1" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@types/node": "^22.10.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite-plugin-solid": "^2.11.11", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-dts": "^4.5.4" + "vite-plugin-dts": "^4.5.4", + "vite-plugin-solid": "^3.0.0-next.16" }, "keywords": [], "author": "", diff --git a/examples/solid/router-monorepo-solid-query/packages/app/package.json b/examples/solid/router-monorepo-solid-query/packages/app/package.json index 76bb059de5..18a4e440fa 100644 --- a/examples/solid/router-monorepo-solid-query/packages/app/package.json +++ b/examples/solid/router-monorepo-solid-query/packages/app/package.json @@ -9,16 +9,16 @@ "start": "vite" }, "dependencies": { - "@tanstack/solid-query": "^5.90.9", + "@tanstack/solid-query": "^6.0.0-beta.5", "@router-solid-mono-solid-query/post-feature": "workspace:*", "@router-solid-mono-solid-query/router": "workspace:*", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "@tanstack/solid-router-devtools": "^1.167.3", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "tailwindcss": "^4.2.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4", diff --git a/examples/solid/router-monorepo-solid-query/packages/app/src/main.tsx b/examples/solid/router-monorepo-solid-query/packages/app/src/main.tsx index 8740ce06a7..e930662e28 100644 --- a/examples/solid/router-monorepo-solid-query/packages/app/src/main.tsx +++ b/examples/solid/router-monorepo-solid-query/packages/app/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider } from '@tanstack/solid-router' import { QueryClientProvider } from '@tanstack/solid-query' import { queryClient, router } from '@router-solid-mono-solid-query/router' @@ -10,7 +10,7 @@ import { import { RootComponent } from './rootComponent' import type { RouterIds } from '@router-solid-mono-solid-query/router' import './style.css' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' // Not lazy loaded for simplicity, but you could expose from your library component // individually, and enforce here to use react lazy components via typings // so that you have code splitting diff --git a/examples/solid/router-monorepo-solid-query/packages/app/tsconfig.json b/examples/solid/router-monorepo-solid-query/packages/app/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-solid-query/packages/app/tsconfig.json +++ b/examples/solid/router-monorepo-solid-query/packages/app/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-solid-query/packages/post-feature/package.json b/examples/solid/router-monorepo-solid-query/packages/post-feature/package.json index 39b57c7dfa..b73342b97a 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-feature/package.json +++ b/examples/solid/router-monorepo-solid-query/packages/post-feature/package.json @@ -8,15 +8,15 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/solid-query": "^5.90.9", + "@tanstack/solid-query": "^6.0.0-beta.5", "@router-solid-mono-solid-query/post-query": "workspace:*", "@router-solid-mono-solid-query/router": "workspace:*", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-solid-query/packages/post-feature/tsconfig.json b/examples/solid/router-monorepo-solid-query/packages/post-feature/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-feature/tsconfig.json +++ b/examples/solid/router-monorepo-solid-query/packages/post-feature/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-solid-query/packages/post-feature/vite.config.ts b/examples/solid/router-monorepo-solid-query/packages/post-feature/vite.config.ts index 28a231eb39..58bcbd81a0 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-feature/vite.config.ts +++ b/examples/solid/router-monorepo-solid-query/packages/post-feature/vite.config.ts @@ -33,7 +33,7 @@ export default defineConfig({ // External packages that should not be bundled into your library. external: [ 'solid-js', - 'solid-js/web', + '@solidjs/web', '@tanstack/solid-query', '@tanstack/solid-router', '@router-solid-mono-solid-query/post-query', diff --git a/examples/solid/router-monorepo-solid-query/packages/post-query/package.json b/examples/solid/router-monorepo-solid-query/packages/post-query/package.json index 8e3a4b0e71..6dbe9bebc5 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-query/package.json +++ b/examples/solid/router-monorepo-solid-query/packages/post-query/package.json @@ -8,14 +8,13 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/solid-query": "^5.90.9", + "@tanstack/solid-query": "^6.0.0-beta.5", "redaxios": "^0.5.1", "zod": "^4.4.3" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14" } } diff --git a/examples/solid/router-monorepo-solid-query/packages/post-query/tsconfig.json b/examples/solid/router-monorepo-solid-query/packages/post-query/tsconfig.json index a972899814..53497aa9cf 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-query/tsconfig.json +++ b/examples/solid/router-monorepo-solid-query/packages/post-query/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-solid-query/packages/post-query/vite.config.ts b/examples/solid/router-monorepo-solid-query/packages/post-query/vite.config.ts index 0176645332..c05653db7d 100644 --- a/examples/solid/router-monorepo-solid-query/packages/post-query/vite.config.ts +++ b/examples/solid/router-monorepo-solid-query/packages/post-query/vite.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ // External packages that should not be bundled into your library. external: [ 'solid-js', - 'solid-js/web', + '@solidjs/web', '@tanstack/solid-query', 'redaxios', ], 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 93943a1df8..15300cdefa 100644 --- a/examples/solid/router-monorepo-solid-query/packages/router/package.json +++ b/examples/solid/router-monorepo-solid-query/packages/router/package.json @@ -8,19 +8,19 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@tanstack/history": "^1.162.5", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/history": "^1.162.0", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/router-plugin": "^1.168.19", "@router-solid-mono-solid-query/post-query": "workspace:*", "redaxios": "^0.5.1", "zod": "^4.4.3", - "solid-js": "^1.9.10" + "solid-js": "2.0.0-beta.25", + "@solidjs/web": "2.0.0-beta.25" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "vite-plugin-solid": "^3.0.0-next.16", + "typescript": "^6.0.2", "vite": "^8.0.14", "vite-plugin-dts": "^4.5.4" } diff --git a/examples/solid/router-monorepo-solid-query/packages/router/src/routeTree.gen.ts b/examples/solid/router-monorepo-solid-query/packages/router/src/routeTree.gen.ts index 8760312d24..e8f1a5370b 100644 --- a/examples/solid/router-monorepo-solid-query/packages/router/src/routeTree.gen.ts +++ b/examples/solid/router-monorepo-solid-query/packages/router/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as PostIdRouteImport } from './routes/$postId' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const PostIdRoute = PostIdRouteImport.update({ id: '/$postId', path: '/$postId', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/$postId': { id: '/$postId' path: '/$postId' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostIdRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/router-monorepo-solid-query/packages/router/src/router.tsx b/examples/solid/router-monorepo-solid-query/packages/router/src/router.tsx index 99874f49e5..6153a54a8b 100644 --- a/examples/solid/router-monorepo-solid-query/packages/router/src/router.tsx +++ b/examples/solid/router-monorepo-solid-query/packages/router/src/router.tsx @@ -1,3 +1,4 @@ +import React from 'react' import { createRouter } from '@tanstack/solid-router' // Import the generated route tree diff --git a/examples/solid/router-monorepo-solid-query/packages/router/tsconfig.json b/examples/solid/router-monorepo-solid-query/packages/router/tsconfig.json index b986b1be62..d21ca529ac 100644 --- a/examples/solid/router-monorepo-solid-query/packages/router/tsconfig.json +++ b/examples/solid/router-monorepo-solid-query/packages/router/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/router-monorepo-solid-query/packages/router/vite.config.ts b/examples/solid/router-monorepo-solid-query/packages/router/vite.config.ts index 7d65f1b5f5..49d522530d 100644 --- a/examples/solid/router-monorepo-solid-query/packages/router/vite.config.ts +++ b/examples/solid/router-monorepo-solid-query/packages/router/vite.config.ts @@ -35,7 +35,7 @@ export default defineConfig({ // External packages that should not be bundled into your library. external: [ 'solid-js', - 'solid-js/web', + '@solidjs/web', '@tanstack/solid-query', '@tanstack/solid-router', '@router-solid-mono-solid-query/post-query', diff --git a/examples/solid/scroll-restoration/package.json b/examples/solid/scroll-restoration/package.json index eaa5a5aaea..e7750d6b89 100644 --- a/examples/solid/scroll-restoration/package.json +++ b/examples/solid/scroll-restoration/package.json @@ -9,17 +9,17 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@tanstack/solid-virtual": "^3.13.0", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14" + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/scroll-restoration/src/main.tsx b/examples/solid/scroll-restoration/src/main.tsx index c33017ca7e..b514a45228 100644 --- a/examples/solid/scroll-restoration/src/main.tsx +++ b/examples/solid/scroll-restoration/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Link, Outlet, diff --git a/examples/solid/scroll-restoration/tsconfig.json b/examples/solid/scroll-restoration/tsconfig.json index b5fd6ba97c..c7b2326b12 100644 --- a/examples/solid/scroll-restoration/tsconfig.json +++ b/examples/solid/scroll-restoration/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/search-validator-adapters/package.json b/examples/solid/search-validator-adapters/package.json index 59991edb36..dbc258cab0 100644 --- a/examples/solid/search-validator-adapters/package.json +++ b/examples/solid/search-validator-adapters/package.json @@ -10,28 +10,26 @@ "test:unit": "vitest" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", "@tanstack/arktype-adapter": "^1.167.0", - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/router-plugin": "^1.169.0", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@tanstack/valibot-adapter": "^1.167.0", "@tanstack/zod-adapter": "^1.167.0", "arktype": "^2.1.7", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "valibot": "1.0.0-beta.15", "zod": "^3.24.2" }, "devDependencies": { - "@testing-library/jest-dom": "^7.0.1", "@solidjs/testing-library": "^0.8.10", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "jsdom": "^27.0.0", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@testing-library/jest-dom": "^6.6.3", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vitest": "^5.0.4" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/search-validator-adapters/src/components/Content.tsx b/examples/solid/search-validator-adapters/src/components/Content.tsx index dbfa7ecff8..c8c379af07 100644 --- a/examples/solid/search-validator-adapters/src/components/Content.tsx +++ b/examples/solid/search-validator-adapters/src/components/Content.tsx @@ -1,4 +1,4 @@ -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' export interface ContentProps { readonly children: JSX.Element diff --git a/examples/solid/search-validator-adapters/src/main.tsx b/examples/solid/search-validator-adapters/src/main.tsx index 0d3d2e1b42..be9e28bcb0 100644 --- a/examples/solid/search-validator-adapters/src/main.tsx +++ b/examples/solid/search-validator-adapters/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { QueryClient, QueryClientProvider } from '@tanstack/solid-query' import { routeTree } from './routeTree.gen' diff --git a/examples/solid/search-validator-adapters/src/routeTree.gen.ts b/examples/solid/search-validator-adapters/src/routeTree.gen.ts index 4cb97b08e9..24089ece84 100644 --- a/examples/solid/search-validator-adapters/src/routeTree.gen.ts +++ b/examples/solid/search-validator-adapters/src/routeTree.gen.ts @@ -10,18 +10,18 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' -import { Route as UsersArktypeIndexRouteImport } from './routes/users/arktype.index' -import { Route as UsersValibotIndexRouteImport } from './routes/users/valibot.index' import { Route as UsersZodIndexRouteImport } from './routes/users/zod.index' +import { Route as UsersValibotIndexRouteImport } from './routes/users/valibot.index' +import { Route as UsersArktypeIndexRouteImport } from './routes/users/arktype.index' const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => rootRouteImport, } as any) -const UsersArktypeIndexRoute = UsersArktypeIndexRouteImport.update({ - id: '/users/arktype/', - path: '/users/arktype/', +const UsersZodIndexRoute = UsersZodIndexRouteImport.update({ + id: '/users/zod/', + path: '/users/zod/', getParentRoute: () => rootRouteImport, } as any) const UsersValibotIndexRoute = UsersValibotIndexRouteImport.update({ @@ -29,9 +29,9 @@ const UsersValibotIndexRoute = UsersValibotIndexRouteImport.update({ path: '/users/valibot/', getParentRoute: () => rootRouteImport, } as any) -const UsersZodIndexRoute = UsersZodIndexRouteImport.update({ - id: '/users/zod/', - path: '/users/zod/', +const UsersArktypeIndexRoute = UsersArktypeIndexRouteImport.update({ + id: '/users/arktype/', + path: '/users/arktype/', getParentRoute: () => rootRouteImport, } as any) @@ -78,11 +78,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } - '/users/arktype/': { - id: '/users/arktype/' - path: '/users/arktype' - fullPath: '/users/arktype/' - preLoaderRoute: typeof UsersArktypeIndexRouteImport + '/users/zod/': { + id: '/users/zod/' + path: '/users/zod' + fullPath: '/users/zod/' + preLoaderRoute: typeof UsersZodIndexRouteImport parentRoute: typeof rootRouteImport } '/users/valibot/': { @@ -92,11 +92,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersValibotIndexRouteImport parentRoute: typeof rootRouteImport } - '/users/zod/': { - id: '/users/zod/' - path: '/users/zod' - fullPath: '/users/zod/' - preLoaderRoute: typeof UsersZodIndexRouteImport + '/users/arktype/': { + id: '/users/arktype/' + path: '/users/arktype' + fullPath: '/users/arktype/' + preLoaderRoute: typeof UsersArktypeIndexRouteImport parentRoute: typeof rootRouteImport } } diff --git a/examples/solid/search-validator-adapters/src/routes/users/arktype.index.tsx b/examples/solid/search-validator-adapters/src/routes/users/arktype.index.tsx index 560354627c..0c8e94c3d8 100644 --- a/examples/solid/search-validator-adapters/src/routes/users/arktype.index.tsx +++ b/examples/solid/search-validator-adapters/src/routes/users/arktype.index.tsx @@ -1,6 +1,6 @@ import { useNavigate, createFileRoute } from '@tanstack/solid-router' import { type } from 'arktype' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' import { Header } from '../../components/Header' import { Users, usersQueryOptions } from '../../components/Users' import { Content } from '../../components/Content' @@ -18,9 +18,9 @@ const ArkType = () => { search={search().search} onChange={(search) => navigate({ search: { search }, replace: true })} /> - + - + ) diff --git a/examples/solid/search-validator-adapters/src/routes/users/valibot.index.tsx b/examples/solid/search-validator-adapters/src/routes/users/valibot.index.tsx index f9041c6126..89d0455bcc 100644 --- a/examples/solid/search-validator-adapters/src/routes/users/valibot.index.tsx +++ b/examples/solid/search-validator-adapters/src/routes/users/valibot.index.tsx @@ -1,6 +1,6 @@ import { useNavigate, createFileRoute } from '@tanstack/solid-router' import * as v from 'valibot' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' import { Header } from '../../components/Header' import { Users, usersQueryOptions } from '../../components/Users' import { Content } from '../../components/Content' @@ -18,9 +18,9 @@ const Valibot = () => { search={search().search} onChange={(search) => navigate({ search: { search }, replace: true })} /> - + - + ) diff --git a/examples/solid/search-validator-adapters/src/routes/users/zod.index.tsx b/examples/solid/search-validator-adapters/src/routes/users/zod.index.tsx index 8568476756..43754c541d 100644 --- a/examples/solid/search-validator-adapters/src/routes/users/zod.index.tsx +++ b/examples/solid/search-validator-adapters/src/routes/users/zod.index.tsx @@ -1,7 +1,7 @@ import { useNavigate, createFileRoute } from '@tanstack/solid-router' import { fallback, zodValidator } from '@tanstack/zod-adapter' import { z } from 'zod' -import { Suspense } from 'solid-js' +import { Loading } from 'solid-js' import { Header } from '../../components/Header' import { Users, usersQueryOptions } from '../../components/Users' import { Content } from '../../components/Content' @@ -26,9 +26,9 @@ const Zod = () => { search={search()} onChange={(search) => navigate({ search: { search }, replace: true })} /> - + - + ) diff --git a/examples/solid/search-validator-adapters/tests/arktype.test.tsx b/examples/solid/search-validator-adapters/tests/arktype.test.tsx index f22a359995..4ec555fc7b 100644 --- a/examples/solid/search-validator-adapters/tests/arktype.test.tsx +++ b/examples/solid/search-validator-adapters/tests/arktype.test.tsx @@ -8,6 +8,7 @@ import { createRouter, } from '@tanstack/solid-router' +import '@testing-library/jest-dom/vitest' import { type } from 'arktype' test('can navigate to the route', async () => { diff --git a/examples/solid/search-validator-adapters/tests/jest-dom.setup.ts b/examples/solid/search-validator-adapters/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/examples/solid/search-validator-adapters/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/examples/solid/search-validator-adapters/tests/valibot.test.tsx b/examples/solid/search-validator-adapters/tests/valibot.test.tsx index 8594c1cb29..cd4545397c 100644 --- a/examples/solid/search-validator-adapters/tests/valibot.test.tsx +++ b/examples/solid/search-validator-adapters/tests/valibot.test.tsx @@ -8,6 +8,7 @@ import { createRouter, } from '@tanstack/solid-router' import * as v from 'valibot' +import '@testing-library/jest-dom/vitest' test('can navigate to the route', async () => { const rootRoute = createRootRoute() diff --git a/examples/solid/search-validator-adapters/tsconfig.json b/examples/solid/search-validator-adapters/tsconfig.json index ee3ff22c17..dd6baf9d62 100644 --- a/examples/solid/search-validator-adapters/tsconfig.json +++ b/examples/solid/search-validator-adapters/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ESNext", "moduleResolution": "Bundler", "module": "ESNext", diff --git a/examples/solid/search-validator-adapters/vite.config.ts b/examples/solid/search-validator-adapters/vite.config.ts index 4e05d81e75..abb9d36cdf 100644 --- a/examples/solid/search-validator-adapters/vite.config.ts +++ b/examples/solid/search-validator-adapters/vite.config.ts @@ -5,13 +5,21 @@ import packageJson from './package.json' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ + ...(process.env.VITEST && { + resolve: { + conditions: ['development'], + alias: { + 'solid-js/web': '@solidjs/web', + '@solidjs/signals': 'solid-js', + }, + }, + }), test: { name: packageJson.name, dir: './tests', watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts'], server: { deps: { inline: [/@solidjs/, /@tanstack\/solid-store/], diff --git a/examples/solid/start-basic-auth/README.md b/examples/solid/start-basic-auth/README.md index 313c930051..90cba4aac1 100644 --- a/examples/solid/start-basic-auth/README.md +++ b/examples/solid/start-basic-auth/README.md @@ -70,13 +70,3 @@ pnpm dev > [!WARNING] > You will need to update the `docs/config.json` file (in the project's repo) if you add a new doc page! - -## Session configuration - -This example uses [iron-session](https://github.com/vvo/iron-session) through Start's `getCookie` and `setCookie` helpers. Set `SESSION_PASSWORD` to a random secret of at least 32 characters before starting the app, for example: - -```sh -export SESSION_PASSWORD="$(openssl rand -base64 32)" -``` - -Keep the same secret across instances and deployments that must read the same sessions. The cookie requires HTTPS in production. Each handler reads its own session, then awaits `session.save()` before redirecting or returning. diff --git a/examples/solid/start-basic-auth/package.json b/examples/solid/start-basic-auth/package.json index d686fdf616..347eb444f3 100644 --- a/examples/solid/start-basic-auth/package.json +++ b/examples/solid/start-basic-auth/package.json @@ -14,12 +14,12 @@ "@libsql/client": "^0.15.15", "@prisma/adapter-libsql": "^7.0.0", "@prisma/client": "^7.0.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "iron-session": "^9.0.1", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwind-merge": "^3.6.0" }, "devDependencies": { @@ -28,9 +28,9 @@ "dotenv": "^17.2.3", "prisma": "^7.0.0", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic-auth/src/components/Auth.tsx b/examples/solid/start-basic-auth/src/components/Auth.tsx index de9d9e76f6..9803054a4a 100644 --- a/examples/solid/start-basic-auth/src/components/Auth.tsx +++ b/examples/solid/start-basic-auth/src/components/Auth.tsx @@ -1,4 +1,4 @@ -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' export function Auth({ actionText, diff --git a/examples/solid/start-basic-auth/src/routeTree.gen.ts b/examples/solid/start-basic-auth/src/routeTree.gen.ts index 07924d102a..bad0f1b074 100644 --- a/examples/solid/start-basic-auth/src/routeTree.gen.ts +++ b/examples/solid/start-basic-auth/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteRouteImport } from './routes/_authed/posts.route' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRouteRoute = AuthedPostsRouteRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/examples/solid/start-basic-auth/src/routes/__root.tsx b/examples/solid/start-basic-auth/src/routes/__root.tsx index 05ad0d298a..71dd29bd06 100644 --- a/examples/solid/start-basic-auth/src/routes/__root.tsx +++ b/examples/solid/start-basic-auth/src/routes/__root.tsx @@ -8,24 +8,23 @@ import { } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' import { createServerFn } from '@tanstack/solid-start' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary.js' import { NotFound } from '~/components/NotFound.js' import appCss from '~/styles/app.css?url' import { seo } from '~/utils/seo.js' -import { getAppSession } from '~/utils/session.js' +import { useAppSession } from '~/utils/session.js' const fetchUser = createServerFn({ method: 'GET' }).handler(async () => { // We need to auth on the server so we have access to secure cookies - const session = await getAppSession() + const session = await useAppSession() - if (!session.userEmail) { + if (!session.data.userEmail) { return null } return { - email: session.userEmail, + email: session.data.userEmail, } }) @@ -94,16 +93,15 @@ function RootComponent() { ) } -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { const routeContext = Route.useRouteContext() return ( - + -
    d) @@ -33,10 +33,13 @@ export const loginFn = createServerFn({ method: 'POST' }) } } + // Create a session + const session = await useAppSession() + // Store the user's email in the session - const session = await getAppSession() - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) }) export const Route = createFileRoute('/_authed')({ diff --git a/examples/solid/start-basic-auth/src/routes/logout.tsx b/examples/solid/start-basic-auth/src/routes/logout.tsx index 56cd70cbc2..f7d624ff15 100644 --- a/examples/solid/start-basic-auth/src/routes/logout.tsx +++ b/examples/solid/start-basic-auth/src/routes/logout.tsx @@ -1,10 +1,11 @@ import { createFileRoute, redirect } from '@tanstack/solid-router' import { createServerFn } from '@tanstack/solid-start' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' const logoutFn = createServerFn().handler(async () => { - const session = await getAppSession() - session.destroy() + const session = await useAppSession() + + session.clear() throw redirect({ href: '/', diff --git a/examples/solid/start-basic-auth/src/routes/signup.tsx b/examples/solid/start-basic-auth/src/routes/signup.tsx index b8d6bf89fa..7cb9ae7161 100644 --- a/examples/solid/start-basic-auth/src/routes/signup.tsx +++ b/examples/solid/start-basic-auth/src/routes/signup.tsx @@ -3,7 +3,7 @@ import { createServerFn, useServerFn } from '@tanstack/solid-start' import { hashPassword, prismaClient } from '~/utils/prisma' import { useMutation } from '~/hooks/useMutation' import { Auth } from '~/components/Auth' -import { getAppSession } from '~/utils/session' +import { useAppSession } from '~/utils/session' export const signupFn = createServerFn({ method: 'POST' }) .validator( @@ -20,6 +20,9 @@ export const signupFn = createServerFn({ method: 'POST' }) // Encrypt the password using Sha256 into plaintext const password = await hashPassword(data.password) + // Create a session + const session = await useAppSession() + if (found) { if (found.password !== password) { return { @@ -30,9 +33,9 @@ export const signupFn = createServerFn({ method: 'POST' }) } // Store the user's email in the session - const session = await getAppSession() - session.userEmail = found.email - await session.save() + await session.update({ + userEmail: found.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ @@ -49,9 +52,9 @@ export const signupFn = createServerFn({ method: 'POST' }) }) // Store the user's email in the session - const session = await getAppSession() - session.userEmail = user.email - await session.save() + await session.update({ + userEmail: user.email, + }) // Redirect to the prev page stored in the "redirect" search param throw redirect({ diff --git a/examples/solid/start-basic-auth/src/utils/session.ts b/examples/solid/start-basic-auth/src/utils/session.ts index 4577764d28..120a410b60 100644 --- a/examples/solid/start-basic-auth/src/utils/session.ts +++ b/examples/solid/start-basic-auth/src/utils/session.ts @@ -1,29 +1,13 @@ -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/solid-start/server' +// src/services/session.server.ts +import { useSession } from '@tanstack/solid-start/server' import type { User } from '@prisma/client' type SessionUser = { userEmail: User['email'] } -export function getAppSession() { - const password = process.env.SESSION_PASSWORD - if (!password || password.length < 32) { - throw new Error('Set SESSION_PASSWORD to at least 32 characters') - } - - return getIronSession( - { read: getCookie, write: setCookie }, - { - cookieName: 'app-session', - password, - ttl: 7 * 24 * 60 * 60, - cookieOptions: { - httpOnly: true, - sameSite: 'lax', - secure: process.env.NODE_ENV === 'production', - path: '/', - }, - }, - ) +export function useAppSession() { + return useSession({ + password: 'ChangeThisBeforeShippingToProdOrYouWillBeFired', + }) } diff --git a/examples/solid/start-basic-auth/tsconfig.json b/examples/solid/start-basic-auth/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-auth/tsconfig.json +++ b/examples/solid/start-basic-auth/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic-authjs/package.json b/examples/solid/start-basic-authjs/package.json index 2c910663bd..47de086976 100644 --- a/examples/solid/start-basic-authjs/package.json +++ b/examples/solid/start-basic-authjs/package.json @@ -11,10 +11,11 @@ }, "dependencies": { "@auth/core": "^0.41.1", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25", "start-authjs": "^1.0.0", "tailwind-merge": "^3.6.0" }, @@ -22,9 +23,9 @@ "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic-authjs/src/routeTree.gen.ts b/examples/solid/start-basic-authjs/src/routeTree.gen.ts index 7cc6d28cf7..e772ba9c3e 100644 --- a/examples/solid/start-basic-authjs/src/routeTree.gen.ts +++ b/examples/solid/start-basic-authjs/src/routeTree.gen.ts @@ -9,14 +9,14 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as LoginRouteImport } from './routes/login' import { Route as ProtectedRouteImport } from './routes/protected' +import { Route as LoginRouteImport } from './routes/login' +import { Route as IndexRouteImport } from './routes/index' import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const ProtectedRoute = ProtectedRouteImport.update({ + id: '/protected', + path: '/protected', getParentRoute: () => rootRouteImport, } as any) const LoginRoute = LoginRouteImport.update({ @@ -24,9 +24,9 @@ const LoginRoute = LoginRouteImport.update({ path: '/login', getParentRoute: () => rootRouteImport, } as any) -const ProtectedRoute = ProtectedRouteImport.update({ - id: '/protected', - path: '/protected', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({ @@ -71,11 +71,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/protected': { + id: '/protected' + path: '/protected' + fullPath: '/protected' + preLoaderRoute: typeof ProtectedRouteImport parentRoute: typeof rootRouteImport } '/login': { @@ -85,11 +85,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LoginRouteImport parentRoute: typeof rootRouteImport } - '/protected': { - id: '/protected' - path: '/protected' - fullPath: '/protected' - preLoaderRoute: typeof ProtectedRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/api/auth/$': { diff --git a/examples/solid/start-basic-authjs/src/routes/__root.tsx b/examples/solid/start-basic-authjs/src/routes/__root.tsx index 29167dea72..d53b9d010a 100644 --- a/examples/solid/start-basic-authjs/src/routes/__root.tsx +++ b/examples/solid/start-basic-authjs/src/routes/__root.tsx @@ -10,10 +10,9 @@ import { import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' import { createServerFn } from '@tanstack/solid-start' import { getRequest } from '@tanstack/solid-start/server' -import { HydrationScript } from 'solid-js/web' import { Show } from 'solid-js' import { getSession } from 'start-authjs' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' import { authConfig } from '~/utils/auth' import appCss from '~/styles/app.css?url' @@ -64,10 +63,9 @@ function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
    {children}
    diff --git a/examples/solid/start-basic-authjs/src/routes/login.tsx b/examples/solid/start-basic-authjs/src/routes/login.tsx index 6669e1b5b7..119783ece2 100644 --- a/examples/solid/start-basic-authjs/src/routes/login.tsx +++ b/examples/solid/start-basic-authjs/src/routes/login.tsx @@ -1,5 +1,5 @@ import { createFileRoute, redirect } from '@tanstack/solid-router' -import { createResource, Suspense } from 'solid-js' +import { createMemo, Loading } from 'solid-js' export const Route = createFileRoute('/login')({ beforeLoad: ({ context }) => { @@ -18,14 +18,14 @@ async function getCsrfToken(): Promise { } function Login() { - const [csrfToken] = createResource(getCsrfToken) + const csrfToken = createMemo(getCsrfToken) return (

    Sign In

    - Loading...
    }> + Loading...
    }> @@ -39,7 +39,7 @@ function Login() { Continue with Auth0 - +

    You'll be redirected to Auth0 to complete the sign-in process. diff --git a/examples/solid/start-basic-authjs/tsconfig.json b/examples/solid/start-basic-authjs/tsconfig.json index 726f20245f..e84bfc7806 100644 --- a/examples/solid/start-basic-authjs/tsconfig.json +++ b/examples/solid/start-basic-authjs/tsconfig.json @@ -10,7 +10,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/examples/solid/start-basic-cloudflare/package.json b/examples/solid/start-basic-cloudflare/package.json index 7ece143f61..aacbd961b2 100644 --- a/examples/solid/start-basic-cloudflare/package.json +++ b/examples/solid/start-basic-cloudflare/package.json @@ -9,23 +9,24 @@ "preview": "vite preview", "deploy": "npm run build && wrangler deploy", "cf-typegen": "wrangler types", - "postinstall": "WRANGLER_LOG=warn npm run --silent cf-typegen" + "postinstall": "npm run cf-typegen" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@cloudflare/vite-plugin": "^1.29.0", "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11", + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4", "wrangler": "^4.74.0" } } diff --git a/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts b/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts index 7cba7e8958..c3f6976d03 100644 --- a/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts +++ b/examples/solid/start-basic-cloudflare/src/routeTree.gen.ts @@ -9,46 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -56,9 +37,53 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ + id: '/customScript.js', + path: '/customScript.js', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -66,53 +91,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -234,39 +234,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -276,11 +248,74 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/customScript.js': { + id: '/customScript.js' + path: '/customScript.js' + fullPath: '/customScript.js' + preLoaderRoute: typeof CustomScriptDotjsRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -290,55 +325,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -346,12 +339,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic-cloudflare/src/routes/__root.tsx b/examples/solid/start-basic-cloudflare/src/routes/__root.tsx index a8b324f1b3..a3da9c6130 100644 --- a/examples/solid/start-basic-cloudflare/src/routes/__root.tsx +++ b/examples/solid/start-basic-cloudflare/src/routes/__root.tsx @@ -6,8 +6,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' import appCss from '~/styles/app.css?url' @@ -63,14 +62,13 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { return ( - + -

    d) @@ -37,7 +37,7 @@ function Deferred() {
    {loaderData().person.name} - {loaderData().person.randomNumber}
    - Loading person...
    }> + Loading person...
    }> ( @@ -46,13 +46,13 @@ function Deferred() {
    )} /> - - Loading stuff...
    }> + + Loading stuff...
    }>

    {data}

    } /> - +
    Count: {count()}
    diff --git a/examples/solid/start-basic-cloudflare/tsconfig.json b/examples/solid/start-basic-cloudflare/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-cloudflare/tsconfig.json +++ b/examples/solid/start-basic-cloudflare/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic-netlify/package.json b/examples/solid/start-basic-netlify/package.json index 69299cdb79..f4af10775f 100644 --- a/examples/solid/start-basic-netlify/package.json +++ b/examples/solid/start-basic-netlify/package.json @@ -9,19 +9,20 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { - "@netlify/vite-plugin-tanstack-start": "^1.3.19", + "@netlify/vite-plugin-tanstack-start": "^1.1.4", "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic-netlify/src/routeTree.gen.ts b/examples/solid/start-basic-netlify/src/routeTree.gen.ts index 7cba7e8958..c3f6976d03 100644 --- a/examples/solid/start-basic-netlify/src/routeTree.gen.ts +++ b/examples/solid/start-basic-netlify/src/routeTree.gen.ts @@ -9,46 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -56,9 +37,53 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ + id: '/customScript.js', + path: '/customScript.js', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -66,53 +91,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -234,39 +234,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -276,11 +248,74 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/customScript.js': { + id: '/customScript.js' + path: '/customScript.js' + fullPath: '/customScript.js' + preLoaderRoute: typeof CustomScriptDotjsRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -290,55 +325,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -346,12 +339,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic-netlify/src/routes/__root.tsx b/examples/solid/start-basic-netlify/src/routes/__root.tsx index a8b324f1b3..a3da9c6130 100644 --- a/examples/solid/start-basic-netlify/src/routes/__root.tsx +++ b/examples/solid/start-basic-netlify/src/routes/__root.tsx @@ -6,8 +6,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' import appCss from '~/styles/app.css?url' @@ -63,14 +62,13 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
    d) @@ -37,7 +37,7 @@ function Deferred() {
    {loaderData().person.name} - {loaderData().person.randomNumber}
    - Loading person...
    }> + Loading person...
    }> ( @@ -46,13 +46,13 @@ function Deferred() {
    )} /> - - Loading stuff...
    }> + + Loading stuff...
    }>

    {data}

    } /> - +
    Count: {count()}
    diff --git a/examples/solid/start-basic-netlify/tsconfig.json b/examples/solid/start-basic-netlify/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-netlify/tsconfig.json +++ b/examples/solid/start-basic-netlify/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic-nitro/package.json b/examples/solid/start-basic-nitro/package.json index 2c0dc7dad6..bc00d71259 100644 --- a/examples/solid/start-basic-nitro/package.json +++ b/examples/solid/start-basic-nitro/package.json @@ -9,19 +9,20 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10" + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", - "nitro": "^3.0.260903-beta", + "nitro": "^3.0.260311-beta", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic-nitro/src/routeTree.gen.ts b/examples/solid/start-basic-nitro/src/routeTree.gen.ts index 7cba7e8958..c3f6976d03 100644 --- a/examples/solid/start-basic-nitro/src/routeTree.gen.ts +++ b/examples/solid/start-basic-nitro/src/routeTree.gen.ts @@ -9,46 +9,27 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as CustomScriptDotjsRouteImport } from './routes/customScript[.]js' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ - id: '/customScript.js', - path: '/customScript.js', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -56,9 +37,53 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const CustomScriptDotjsRoute = CustomScriptDotjsRouteImport.update({ + id: '/customScript.js', + path: '/customScript.js', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -66,53 +91,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -234,39 +234,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/customScript.js': { - id: '/customScript.js' - path: '/customScript.js' - fullPath: '/customScript.js' - preLoaderRoute: typeof CustomScriptDotjsRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -276,11 +248,74 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/customScript.js': { + id: '/customScript.js' + path: '/customScript.js' + fullPath: '/customScript.js' + preLoaderRoute: typeof CustomScriptDotjsRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -290,55 +325,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -346,12 +339,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic-nitro/src/routes/__root.tsx b/examples/solid/start-basic-nitro/src/routes/__root.tsx index a8b324f1b3..a3da9c6130 100644 --- a/examples/solid/start-basic-nitro/src/routes/__root.tsx +++ b/examples/solid/start-basic-nitro/src/routes/__root.tsx @@ -6,8 +6,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' import appCss from '~/styles/app.css?url' @@ -63,14 +62,13 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
    d) @@ -37,7 +37,7 @@ function Deferred() {
    {loaderData().person.name} - {loaderData().person.randomNumber}
    - Loading person...
    }> + Loading person...
    }> ( @@ -46,13 +46,13 @@ function Deferred() {
    )} /> - - Loading stuff...
    }> + + Loading stuff...
    }>

    {data}

    } /> - +
    Count: {count()}
    diff --git a/examples/solid/start-basic-nitro/tsconfig.json b/examples/solid/start-basic-nitro/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-nitro/tsconfig.json +++ b/examples/solid/start-basic-nitro/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic-solid-query/package.json b/examples/solid/start-basic-solid-query/package.json index ddbb7d8764..99173a6ba7 100644 --- a/examples/solid/start-basic-solid-query/package.json +++ b/examples/solid/start-basic-solid-query/package.json @@ -10,23 +10,24 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/solid-query": "^5.90.9", - "@tanstack/solid-query-devtools": "^5.90.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-router-ssr-query": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-query": "^6.0.0-beta.5", + "@tanstack/solid-query-devtools": "^6.0.0-beta.5", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-router-ssr-query": "^2.0.0-beta.27", + "@tanstack/solid-start": "^2.0.0-beta.27", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwind-merge": "^3.6.0" }, "devDependencies": { "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic-solid-query/src/routeTree.gen.ts b/examples/solid/start-basic-solid-query/src/routeTree.gen.ts index 4a1747ae36..226b599b8c 100644 --- a/examples/solid/start-basic-solid-query/src/routeTree.gen.ts +++ b/examples/solid/start-basic-solid-query/src/routeTree.gen.ts @@ -9,30 +9,26 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteRouteImport } from './routes/posts.route' import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' import { Route as UsersRouteRouteImport } from './routes/users.route' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as PostsRouteRouteImport } from './routes/posts.route' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersIdRouteImport } from './routes/api/users.$id' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', +const RedirectRoute = RedirectRouteImport.update({ + id: '/redirect', + path: '/redirect', getParentRoute: () => rootRouteImport, } as any) const DeferredRoute = DeferredRouteImport.update({ @@ -40,14 +36,8 @@ const DeferredRoute = DeferredRouteImport.update({ path: '/deferred', getParentRoute: () => rootRouteImport, } as any) -const PostsRouteRoute = PostsRouteRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RedirectRoute = RedirectRouteImport.update({ - id: '/redirect', - path: '/redirect', +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', getParentRoute: () => rootRouteImport, } as any) const UsersRouteRoute = UsersRouteRouteImport.update({ @@ -55,58 +45,68 @@ const UsersRouteRoute = UsersRouteRouteImport.update({ path: '/users', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsRouteRoute = PostsRouteRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRouteRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRouteRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRouteRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRouteRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRouteRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRouteRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', + getParentRoute: () => rootRouteImport, +} as any) +const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ + id: '/$id', + path: '/$id', + getParentRoute: () => ApiUsersRoute, +} as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersIdRoute = ApiUsersIdRouteImport.update({ - id: '/$id', - path: '/$id', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -221,18 +221,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport + '/redirect': { + id: '/redirect' + path: '/redirect' + fullPath: '/redirect' + preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } '/deferred': { @@ -242,18 +235,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DeferredRouteImport parentRoute: typeof rootRouteImport } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/redirect': { - id: '/redirect' - path: '/redirect' - fullPath: '/redirect' - preLoaderRoute: typeof RedirectRouteImport + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport parentRoute: typeof rootRouteImport } '/users': { @@ -263,33 +249,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersRouteRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute - } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRouteRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRouteRoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/users/': { id: '/users/' @@ -298,6 +270,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRouteRoute } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRouteRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -305,19 +284,33 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRouteRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRouteRoute } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport } '/api/users/$id': { id: '/api/users/$id' @@ -326,12 +319,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiUsersIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic-solid-query/src/routes/__root.tsx b/examples/solid/start-basic-solid-query/src/routes/__root.tsx index 584d35be30..f2dba5f57b 100644 --- a/examples/solid/start-basic-solid-query/src/routes/__root.tsx +++ b/examples/solid/start-basic-solid-query/src/routes/__root.tsx @@ -8,8 +8,8 @@ import { } from '@tanstack/solid-router' import { SolidQueryDevtools } from '@tanstack/solid-query-devtools' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import { isServer } from '@solidjs/web' +import type { JSX } from '@solidjs/web' import type { QueryClient } from '@tanstack/solid-query' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' @@ -76,14 +76,13 @@ function RootComponent() { ) } -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
    {children} - + {!isServer && } diff --git a/examples/solid/start-basic-solid-query/src/routes/deferred.tsx b/examples/solid/start-basic-solid-query/src/routes/deferred.tsx index 782d49bf43..1c7a5b5379 100644 --- a/examples/solid/start-basic-solid-query/src/routes/deferred.tsx +++ b/examples/solid/start-basic-solid-query/src/routes/deferred.tsx @@ -1,6 +1,6 @@ import { createFileRoute } from '@tanstack/solid-router' import { queryOptions, useQuery } from '@tanstack/solid-query' -import { Suspense, createSignal } from 'solid-js' +import { Loading, createSignal } from 'solid-js' const deferredQueryOptions = () => queryOptions({ @@ -28,9 +28,9 @@ function Deferred() { return (
    - + - +
    Count: {count()}
    @@ -41,13 +41,17 @@ function Deferred() { function DeferredQuery() { const deferredQuery = useQuery(() => deferredQueryOptions()) - return (

    Deferred Query

    -
    Status: {deferredQuery.data?.status}
    -
    Message: {deferredQuery.data?.message}
    -
    Time: {deferredQuery.data?.time.toISOString()}
    +
    Status: {deferredQuery.data?.status ?? 'loading...'}
    +
    Message: {deferredQuery.data?.message ?? ''}
    +
    + Time:{' '} + {deferredQuery.data + ? new Date(deferredQuery.data.time).toISOString() + : ''} +
    ) } diff --git a/examples/solid/start-basic-solid-query/tsconfig.json b/examples/solid/start-basic-solid-query/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-solid-query/tsconfig.json +++ b/examples/solid/start-basic-solid-query/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic-static/package.json b/examples/solid/start-basic-static/package.json index 8b639da68a..e543e4ebb4 100644 --- a/examples/solid/start-basic-static/package.json +++ b/examples/solid/start-basic-static/package.json @@ -10,21 +10,22 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "@tanstack/start-static-server-functions": "^1.167.44", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "@tanstack/start-static-server-functions": "^1.167.18", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwind-merge": "^3.6.0" }, "devDependencies": { "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.3" } } diff --git a/examples/solid/start-basic-static/src/routeTree.gen.ts b/examples/solid/start-basic-static/src/routeTree.gen.ts index a94e0fcf2e..7cad5523aa 100644 --- a/examples/solid/start-basic-static/src/routeTree.gen.ts +++ b/examples/solid/start-basic-static/src/routeTree.gen.ts @@ -9,38 +9,24 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -48,53 +34,67 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const PathlessLayoutNestedLayoutRoute = - PathlessLayoutNestedLayoutRouteImport.update({ - id: '/_nested-layout', - getParentRoute: () => PathlessLayoutRoute, - } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ id: '/', path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, + getParentRoute: () => rootRouteImport, } as any) const UsersIndexRoute = UsersIndexRouteImport.update({ id: '/', path: '/', getParentRoute: () => UsersRoute, } as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) const UsersUserIdRoute = UsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', getParentRoute: () => UsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) -const PathlessLayoutNestedLayoutRouteBRoute = - PathlessLayoutNestedLayoutRouteBRouteImport.update({ - id: '/route-b', - path: '/route-b', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const PathlessLayoutNestedLayoutRoute = + PathlessLayoutNestedLayoutRouteImport.update({ + id: '/_nested-layout', + getParentRoute: () => PathlessLayoutRoute, } as any) const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ id: '/posts_/$postId/deep', path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) +const PathlessLayoutNestedLayoutRouteBRoute = + PathlessLayoutNestedLayoutRouteBRouteImport.update({ + id: '/route-b', + path: '/route-b', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -196,32 +196,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -231,33 +210,33 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/_pathlessLayout/_nested-layout': { - id: '/_pathlessLayout/_nested-layout' + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' path: '' fullPath: '/' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport - parentRoute: typeof PathlessLayoutRoute + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' + '/': { + id: '/' path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/users/': { id: '/users/' @@ -266,6 +245,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersIndexRouteImport parentRoute: typeof UsersRoute } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } '/users/$userId': { id: '/users/$userId' path: '/$userId' @@ -273,12 +259,26 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof UsersUserIdRouteImport parentRoute: typeof UsersRoute } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/_pathlessLayout/_nested-layout': { + id: '/_pathlessLayout/_nested-layout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport + parentRoute: typeof PathlessLayoutRoute + } + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport + parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout/route-b': { id: '/_pathlessLayout/_nested-layout/route-b' @@ -287,12 +287,12 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport parentRoute: typeof PathlessLayoutNestedLayoutRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic-static/src/routes/__root.tsx b/examples/solid/start-basic-static/src/routes/__root.tsx index fd827e635a..fdd42093d5 100644 --- a/examples/solid/start-basic-static/src/routes/__root.tsx +++ b/examples/solid/start-basic-static/src/routes/__root.tsx @@ -7,8 +7,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' import appCss from '~/styles/app.css?url' @@ -72,14 +71,13 @@ function RootComponent() { ) } -function RootLayout({ children }: { children: Solid.JSX.Element }) { +function RootLayout({ children }: { children: JSX.Element }) { return ( - + -
    {loaderData().person.name} - {loaderData().person.randomNumber}
    - Loading person...
    }> + Loading person...
    }> ( @@ -49,13 +49,13 @@ function Deferred() {
    )} /> - - Loading stuff...
    }> + + Loading stuff...
}>

{data}

} /> - +
Count: {count()}
diff --git a/examples/solid/start-basic-static/tsconfig.json b/examples/solid/start-basic-static/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic-static/tsconfig.json +++ b/examples/solid/start-basic-static/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-basic/package.json b/examples/solid/start-basic/package.json index 758815b669..f1c3656a3b 100644 --- a/examples/solid/start-basic/package.json +++ b/examples/solid/start-basic/package.json @@ -10,21 +10,22 @@ "start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwind-merge": "^3.6.0" }, "devDependencies": { "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", - "nitro": "^3.0.260903-beta", + "nitro": "^3.0.260311-beta", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-basic/src/routeTree.gen.ts b/examples/solid/start-basic/src/routeTree.gen.ts index 8d6c8ffc2b..722133b41e 100644 --- a/examples/solid/start-basic/src/routeTree.gen.ts +++ b/examples/solid/start-basic/src/routeTree.gen.ts @@ -9,40 +9,26 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' -import { Route as DeferredRouteImport } from './routes/deferred' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RedirectRouteImport } from './routes/redirect' import { Route as UsersRouteImport } from './routes/users' -import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' -import { Route as ApiUsersRouteImport } from './routes/api/users' -import { Route as PostsIndexRouteImport } from './routes/posts.index' -import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as RedirectRouteImport } from './routes/redirect' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as DeferredRouteImport } from './routes/deferred' +import { Route as PathlessLayoutRouteImport } from './routes/_pathlessLayout' +import { Route as IndexRouteImport } from './routes/index' import { Route as UsersIndexRouteImport } from './routes/users.index' +import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as UsersUserIdRouteImport } from './routes/users.$userId' -import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' -import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' +import { Route as ApiUsersRouteImport } from './routes/api/users' +import { Route as PathlessLayoutNestedLayoutRouteImport } from './routes/_pathlessLayout/_nested-layout' import { Route as PostsPostIdDeepRouteImport } from './routes/posts_.$postId.deep' +import { Route as ApiUsersUserIdRouteImport } from './routes/api/users.$userId' +import { Route as PathlessLayoutNestedLayoutRouteBRouteImport } from './routes/_pathlessLayout/_nested-layout/route-b' +import { Route as PathlessLayoutNestedLayoutRouteARouteImport } from './routes/_pathlessLayout/_nested-layout/route-a' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ - id: '/_pathlessLayout', - getParentRoute: () => rootRouteImport, -} as any) -const DeferredRoute = DeferredRouteImport.update({ - id: '/deferred', - path: '/deferred', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', +const UsersRoute = UsersRouteImport.update({ + id: '/users', + path: '/users', getParentRoute: () => rootRouteImport, } as any) const RedirectRoute = RedirectRouteImport.update({ @@ -50,9 +36,48 @@ const RedirectRoute = RedirectRouteImport.update({ path: '/redirect', getParentRoute: () => rootRouteImport, } as any) -const UsersRoute = UsersRouteImport.update({ - id: '/users', - path: '/users', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', + getParentRoute: () => rootRouteImport, +} as any) +const DeferredRoute = DeferredRouteImport.update({ + id: '/deferred', + path: '/deferred', + getParentRoute: () => rootRouteImport, +} as any) +const PathlessLayoutRoute = PathlessLayoutRouteImport.update({ + id: '/_pathlessLayout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const UsersIndexRoute = UsersIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => UsersRoute, +} as any) +const PostsIndexRoute = PostsIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => PostsRoute, +} as any) +const UsersUserIdRoute = UsersUserIdRouteImport.update({ + id: '/$userId', + path: '/$userId', + getParentRoute: () => UsersRoute, +} as any) +const PostsPostIdRoute = PostsPostIdRouteImport.update({ + id: '/$postId', + path: '/$postId', + getParentRoute: () => PostsRoute, +} as any) +const ApiUsersRoute = ApiUsersRouteImport.update({ + id: '/api/users', + path: '/api/users', getParentRoute: () => rootRouteImport, } as any) const PathlessLayoutNestedLayoutRoute = @@ -60,53 +85,28 @@ const PathlessLayoutNestedLayoutRoute = id: '/_nested-layout', getParentRoute: () => PathlessLayoutRoute, } as any) -const ApiUsersRoute = ApiUsersRouteImport.update({ - id: '/api/users', - path: '/api/users', +const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ + id: '/posts_/$postId/deep', + path: '/posts/$postId/deep', getParentRoute: () => rootRouteImport, } as any) -const PostsIndexRoute = PostsIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => PostsRoute, -} as any) -const PostsPostIdRoute = PostsPostIdRouteImport.update({ - id: '/$postId', - path: '/$postId', - getParentRoute: () => PostsRoute, -} as any) -const UsersIndexRoute = UsersIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => UsersRoute, -} as any) -const UsersUserIdRoute = UsersUserIdRouteImport.update({ +const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ id: '/$userId', path: '/$userId', - getParentRoute: () => UsersRoute, + getParentRoute: () => ApiUsersRoute, } as any) -const PathlessLayoutNestedLayoutRouteARoute = - PathlessLayoutNestedLayoutRouteARouteImport.update({ - id: '/route-a', - path: '/route-a', - getParentRoute: () => PathlessLayoutNestedLayoutRoute, - } as any) const PathlessLayoutNestedLayoutRouteBRoute = PathlessLayoutNestedLayoutRouteBRouteImport.update({ id: '/route-b', path: '/route-b', getParentRoute: () => PathlessLayoutNestedLayoutRoute, } as any) -const ApiUsersUserIdRoute = ApiUsersUserIdRouteImport.update({ - id: '/$userId', - path: '/$userId', - getParentRoute: () => ApiUsersRoute, -} as any) -const PostsPostIdDeepRoute = PostsPostIdDeepRouteImport.update({ - id: '/posts_/$postId/deep', - path: '/posts/$postId/deep', - getParentRoute: () => rootRouteImport, -} as any) +const PathlessLayoutNestedLayoutRouteARoute = + PathlessLayoutNestedLayoutRouteARouteImport.update({ + id: '/route-a', + path: '/route-a', + getParentRoute: () => PathlessLayoutNestedLayoutRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -221,32 +221,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_pathlessLayout': { - id: '/_pathlessLayout' - path: '' - fullPath: '/' - preLoaderRoute: typeof PathlessLayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/deferred': { - id: '/deferred' - path: '/deferred' - fullPath: '/deferred' - preLoaderRoute: typeof DeferredRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/users': { + id: '/users' + path: '/users' + fullPath: '/users' + preLoaderRoute: typeof UsersRouteImport parentRoute: typeof rootRouteImport } '/redirect': { @@ -256,11 +235,67 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof RedirectRouteImport parentRoute: typeof rootRouteImport } - '/users': { - id: '/users' - path: '/users' - fullPath: '/users' - preLoaderRoute: typeof UsersRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport + parentRoute: typeof rootRouteImport + } + '/deferred': { + id: '/deferred' + path: '/deferred' + fullPath: '/deferred' + preLoaderRoute: typeof DeferredRouteImport + parentRoute: typeof rootRouteImport + } + '/_pathlessLayout': { + id: '/_pathlessLayout' + path: '' + fullPath: '/' + preLoaderRoute: typeof PathlessLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/users/': { + id: '/users/' + path: '/' + fullPath: '/users/' + preLoaderRoute: typeof UsersIndexRouteImport + parentRoute: typeof UsersRoute + } + '/posts/': { + id: '/posts/' + path: '/' + fullPath: '/posts/' + preLoaderRoute: typeof PostsIndexRouteImport + parentRoute: typeof PostsRoute + } + '/users/$userId': { + id: '/users/$userId' + path: '/$userId' + fullPath: '/users/$userId' + preLoaderRoute: typeof UsersUserIdRouteImport + parentRoute: typeof UsersRoute + } + '/posts/$postId': { + id: '/posts/$postId' + path: '/$postId' + fullPath: '/posts/$postId' + preLoaderRoute: typeof PostsPostIdRouteImport + parentRoute: typeof PostsRoute + } + '/api/users': { + id: '/api/users' + path: '/api/users' + fullPath: '/api/users' + preLoaderRoute: typeof ApiUsersRouteImport parentRoute: typeof rootRouteImport } '/_pathlessLayout/_nested-layout': { @@ -270,55 +305,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteImport parentRoute: typeof PathlessLayoutRoute } - '/api/users': { - id: '/api/users' - path: '/api/users' - fullPath: '/api/users' - preLoaderRoute: typeof ApiUsersRouteImport + '/posts_/$postId/deep': { + id: '/posts_/$postId/deep' + path: '/posts/$postId/deep' + fullPath: '/posts/$postId/deep' + preLoaderRoute: typeof PostsPostIdDeepRouteImport parentRoute: typeof rootRouteImport } - '/posts/': { - id: '/posts/' - path: '/' - fullPath: '/posts/' - preLoaderRoute: typeof PostsIndexRouteImport - parentRoute: typeof PostsRoute - } - '/posts/$postId': { - id: '/posts/$postId' - path: '/$postId' - fullPath: '/posts/$postId' - preLoaderRoute: typeof PostsPostIdRouteImport - parentRoute: typeof PostsRoute - } - '/users/': { - id: '/users/' - path: '/' - fullPath: '/users/' - preLoaderRoute: typeof UsersIndexRouteImport - parentRoute: typeof UsersRoute - } - '/users/$userId': { - id: '/users/$userId' - path: '/$userId' - fullPath: '/users/$userId' - preLoaderRoute: typeof UsersUserIdRouteImport - parentRoute: typeof UsersRoute - } - '/_pathlessLayout/_nested-layout/route-a': { - id: '/_pathlessLayout/_nested-layout/route-a' - path: '/route-a' - fullPath: '/route-a' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } - '/_pathlessLayout/_nested-layout/route-b': { - id: '/_pathlessLayout/_nested-layout/route-b' - path: '/route-b' - fullPath: '/route-b' - preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport - parentRoute: typeof PathlessLayoutNestedLayoutRoute - } '/api/users/$userId': { id: '/api/users/$userId' path: '/$userId' @@ -326,12 +319,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiUsersUserIdRouteImport parentRoute: typeof ApiUsersRoute } - '/posts_/$postId/deep': { - id: '/posts_/$postId/deep' - path: '/posts/$postId/deep' - fullPath: '/posts/$postId/deep' - preLoaderRoute: typeof PostsPostIdDeepRouteImport - parentRoute: typeof rootRouteImport + '/_pathlessLayout/_nested-layout/route-b': { + id: '/_pathlessLayout/_nested-layout/route-b' + path: '/route-b' + fullPath: '/route-b' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteBRouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute + } + '/_pathlessLayout/_nested-layout/route-a': { + id: '/_pathlessLayout/_nested-layout/route-a' + path: '/route-a' + fullPath: '/route-a' + preLoaderRoute: typeof PathlessLayoutNestedLayoutRouteARouteImport + parentRoute: typeof PathlessLayoutNestedLayoutRoute } } } diff --git a/examples/solid/start-basic/src/routes/__root.tsx b/examples/solid/start-basic/src/routes/__root.tsx index cec570e7a4..c56eae02d3 100644 --- a/examples/solid/start-basic/src/routes/__root.tsx +++ b/examples/solid/start-basic/src/routes/__root.tsx @@ -6,8 +6,7 @@ import { createRootRoute, } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' import { NotFound } from '~/components/NotFound' import appCss from '~/styles/app.css?url' @@ -57,14 +56,13 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
d) @@ -37,7 +37,7 @@ function Deferred() {
{loaderData().person.name} - {loaderData().person.randomNumber}
- Loading person...
}> + Loading person...
}> ( @@ -46,13 +46,13 @@ function Deferred() {
)} /> - - Loading stuff...
}> + + Loading stuff...}>

{data}

} /> - +
Count: {count()}
diff --git a/examples/solid/start-basic/tsconfig.json b/examples/solid/start-basic/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-basic/tsconfig.json +++ b/examples/solid/start-basic/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-bun/package.json b/examples/solid/start-bun/package.json index d1ad9a9563..503bf48f24 100644 --- a/examples/solid/start-bun/package.json +++ b/examples/solid/start-bun/package.json @@ -13,29 +13,29 @@ "check": "prettier --write . && eslint --fix" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", + "@tanstack/router-plugin": "^1.168.19", "@tanstack/solid-devtools": "^0.7.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-router-ssr-query": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "@tanstack/router-plugin": "^1.169.0", - "solid-js": "^1.9.10", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-router-ssr-query": "^2.0.0-beta.27", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2" }, "devDependencies": { + "@solidjs/testing-library": "^0.8.10", "@tanstack/eslint-config": "^0.3.2", "@testing-library/dom": "^10.4.1", - "@solidjs/testing-library": "^0.8.10", "@types/bun": "^1.2.22", "@types/node": "22.10.2", - "vite-plugin-solid": "^2.11.11", "jsdom": "^27.0.0", "prettier": "^3.6.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vitest": "^5.0.4", + "vite-plugin-solid": "^3.0.0-next.16", + "vitest": "^4.1.4", "web-vitals": "^5.1.0" } } diff --git a/examples/solid/start-bun/src/routeTree.gen.ts b/examples/solid/start-bun/src/routeTree.gen.ts index 353db2cd02..19009b2f5b 100644 --- a/examples/solid/start-bun/src/routeTree.gen.ts +++ b/examples/solid/start-bun/src/routeTree.gen.ts @@ -11,8 +11,8 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' import { Route as ApiDemoNamesRouteImport } from './routes/api.demo-names' -import { Route as DemoStartApiRequestRouteImport } from './routes/demo.start.api-request' import { Route as DemoStartServerFuncsRouteImport } from './routes/demo.start.server-funcs' +import { Route as DemoStartApiRequestRouteImport } from './routes/demo.start.api-request' const IndexRoute = IndexRouteImport.update({ id: '/', @@ -24,16 +24,16 @@ const ApiDemoNamesRoute = ApiDemoNamesRouteImport.update({ path: '/api/demo-names', getParentRoute: () => rootRouteImport, } as any) -const DemoStartApiRequestRoute = DemoStartApiRequestRouteImport.update({ - id: '/demo/start/api-request', - path: '/demo/start/api-request', - getParentRoute: () => rootRouteImport, -} as any) const DemoStartServerFuncsRoute = DemoStartServerFuncsRouteImport.update({ id: '/demo/start/server-funcs', path: '/demo/start/server-funcs', getParentRoute: () => rootRouteImport, } as any) +const DemoStartApiRequestRoute = DemoStartApiRequestRouteImport.update({ + id: '/demo/start/api-request', + path: '/demo/start/api-request', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -98,13 +98,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ApiDemoNamesRouteImport parentRoute: typeof rootRouteImport } - '/demo/start/api-request': { - id: '/demo/start/api-request' - path: '/demo/start/api-request' - fullPath: '/demo/start/api-request' - preLoaderRoute: typeof DemoStartApiRequestRouteImport - parentRoute: typeof rootRouteImport - } '/demo/start/server-funcs': { id: '/demo/start/server-funcs' path: '/demo/start/server-funcs' @@ -112,6 +105,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DemoStartServerFuncsRouteImport parentRoute: typeof rootRouteImport } + '/demo/start/api-request': { + id: '/demo/start/api-request' + path: '/demo/start/api-request' + fullPath: '/demo/start/api-request' + preLoaderRoute: typeof DemoStartApiRequestRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/start-bun/src/routes/__root.tsx b/examples/solid/start-bun/src/routes/__root.tsx index 99c515ded4..e77f04026c 100644 --- a/examples/solid/start-bun/src/routes/__root.tsx +++ b/examples/solid/start-bun/src/routes/__root.tsx @@ -2,11 +2,10 @@ import { TanStackDevtools } from '@tanstack/solid-devtools' import { HeadContent, Scripts, createRootRoute } from '@tanstack/solid-router' import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools' -import { HydrationScript } from 'solid-js/web' import Header from '../components/Header' import appCss from '../styles.css?url' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' export const Route = createRootRoute({ head: () => ({ @@ -37,10 +36,9 @@ function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
{children} {props.children} } diff --git a/examples/solid/start-convex-better-auth/src/routeTree.gen.ts b/examples/solid/start-convex-better-auth/src/routeTree.gen.ts index d2307d1277..27dc0ca88c 100644 --- a/examples/solid/start-convex-better-auth/src/routeTree.gen.ts +++ b/examples/solid/start-convex-better-auth/src/routeTree.gen.ts @@ -9,24 +9,24 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' import { Route as AboutRouteImport } from './routes/about' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedDashboardRouteImport } from './routes/_authed/dashboard' import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', getParentRoute: () => rootRouteImport, } as any) const AuthedRoute = AuthedRouteImport.update({ id: '/_authed', getParentRoute: () => rootRouteImport, } as any) -const AboutRoute = AboutRouteImport.update({ - id: '/about', - path: '/about', +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedDashboardRoute = AuthedDashboardRouteImport.update({ @@ -83,11 +83,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } '/_authed': { @@ -97,11 +97,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AuthedRouteImport parentRoute: typeof rootRouteImport } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutRouteImport + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/dashboard': { diff --git a/examples/solid/start-convex-better-auth/src/routes/__root.tsx b/examples/solid/start-convex-better-auth/src/routes/__root.tsx index 34e24068d3..a76b70120c 100644 --- a/examples/solid/start-convex-better-auth/src/routes/__root.tsx +++ b/examples/solid/start-convex-better-auth/src/routes/__root.tsx @@ -1,8 +1,8 @@ /// import { HeadContent, Scripts, createRootRoute } from '@tanstack/solid-router' -import { HydrationScript, Suspense } from 'solid-js/web' +import { Loading } from '@solidjs/web' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import appCss from '~/styles/app.css?url' import AppConvexProvider from '~/providers/convex' import { fetchAuth } from '~/library/server' @@ -18,17 +18,16 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument(props: { children: Solid.JSX.Element }) { +function RootDocument(props: { children: JSX.Element }) { return ( - + - - + {props.children} - + diff --git a/examples/solid/start-convex-better-auth/tsconfig.json b/examples/solid/start-convex-better-auth/tsconfig.json index 4b77b70bcf..b95d6afa47 100644 --- a/examples/solid/start-convex-better-auth/tsconfig.json +++ b/examples/solid/start-convex-better-auth/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-counter/package.json b/examples/solid/start-counter/package.json index 8b49c516bd..36f959ac1f 100644 --- a/examples/solid/start-counter/package.json +++ b/examples/solid/start-counter/package.json @@ -10,20 +10,20 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwind-merge": "^3.6.0", "zod": "^4.4.3" }, "devDependencies": { "@types/node": "^22.10.2", "combinate": "^1.1.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/start-counter/src/routeTree.gen.ts b/examples/solid/start-counter/src/routeTree.gen.ts index 7495244535..3cc45c071e 100644 --- a/examples/solid/start-counter/src/routeTree.gen.ts +++ b/examples/solid/start-counter/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/start-counter/src/routes/__root.tsx b/examples/solid/start-counter/src/routes/__root.tsx index 7b340ba2ce..e0dd8778ca 100644 --- a/examples/solid/start-counter/src/routes/__root.tsx +++ b/examples/solid/start-counter/src/routes/__root.tsx @@ -5,9 +5,8 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' import appCss from '~/styles/app.css?url' export const Route = createRootRoute({ @@ -17,14 +16,13 @@ export const Route = createRootRoute({ shellComponent: RootDocument, }) -function RootDocument(props: { children: Solid.JSX.Element }) { +function RootDocument(props: { children: JSX.Element }) { return ( - + -
Index About diff --git a/examples/solid/start-counter/tsconfig.json b/examples/solid/start-counter/tsconfig.json index 508ace2e17..34389c9e0b 100644 --- a/examples/solid/start-counter/tsconfig.json +++ b/examples/solid/start-counter/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-i18n-paraglide/package.json b/examples/solid/start-i18n-paraglide/package.json index 076c9b41dc..bffbc90df9 100644 --- a/examples/solid/start-i18n-paraglide/package.json +++ b/examples/solid/start-i18n-paraglide/package.json @@ -9,31 +9,20 @@ "preview": "vite preview" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tanstack/solid-devtools": "^0.7.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10" + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { - "@types/node": "^22.18.6", - "vite-plugin-solid": "^2.11.11", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "^8.0.14", + "@inlang/paraglide-js": "^2.4.0", "@tailwindcss/vite": "^4.2.2", + "@types/node": "^22.18.6", "tailwindcss": "^4.2.2", - "@inlang/paraglide-js": "^2.4.0" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "...", - "{projectRoot}/src/paraglide", - "{projectRoot}/project.inlang/cache" - ] - } - } + "typescript": "^6.0.2", + "vite": "^8.0.14", + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts b/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts index 7495244535..3cc45c071e 100644 --- a/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts +++ b/examples/solid/start-i18n-paraglide/src/routeTree.gen.ts @@ -9,19 +9,19 @@ // 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 IndexRouteImport } from './routes/index' import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const AboutRoute = AboutRouteImport.update({ id: '/about', path: '/about', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -51,13 +51,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/about': { id: '/about' path: '/about' @@ -65,6 +58,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof AboutRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } } } diff --git a/examples/solid/start-i18n-paraglide/src/routes/__root.tsx b/examples/solid/start-i18n-paraglide/src/routes/__root.tsx index 39875ee9fe..f957898ae4 100644 --- a/examples/solid/start-i18n-paraglide/src/routes/__root.tsx +++ b/examples/solid/start-i18n-paraglide/src/routes/__root.tsx @@ -6,9 +6,8 @@ import { } from '@tanstack/solid-router' import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools' import { TanStackDevtools } from '@tanstack/solid-devtools' -import { HydrationScript } from 'solid-js/web' import styles from '../styles.css?url' -import type { JSX } from 'solid-js/jsx-runtime' +import type { JSX } from '@solidjs/web' import { getLocale, locales, setLocale } from '@/paraglide/runtime' import { m } from '@/paraglide/messages' @@ -36,10 +35,9 @@ function RootDocument({ children }: { children: JSX.Element }) { return ( - + -
rootRouteImport, -} as any) -const AbsoluteRoute = AbsoluteRouteImport.update({ - id: '/absolute', - path: '/absolute', +const RelativeRoute = RelativeRouteImport.update({ + id: '/relative', + path: '/relative', getParentRoute: () => rootRouteImport, } as any) const LinkPropsRoute = LinkPropsRouteImport.update({ @@ -33,14 +28,9 @@ const LinkPropsRoute = LinkPropsRouteImport.update({ path: '/linkProps', getParentRoute: () => rootRouteImport, } as any) -const ParamsRouteRoute = ParamsRouteRouteImport.update({ - id: '/params', - path: '/params', - getParentRoute: () => rootRouteImport, -} as any) -const RelativeRoute = RelativeRouteImport.update({ - id: '/relative', - path: '/relative', +const AbsoluteRoute = AbsoluteRouteImport.update({ + id: '/absolute', + path: '/absolute', getParentRoute: () => rootRouteImport, } as any) const SearchRouteRoute = SearchRouteRouteImport.update({ @@ -48,16 +38,26 @@ const SearchRouteRoute = SearchRouteRouteImport.update({ path: '/search', getParentRoute: () => rootRouteImport, } as any) -const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ - id: '/$paramsPlaceholder', - path: '/$paramsPlaceholder', - getParentRoute: () => ParamsRouteRoute, +const ParamsRouteRoute = ParamsRouteRouteImport.update({ + id: '/params', + path: '/params', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const SearchSearchPlaceholderRoute = SearchSearchPlaceholderRouteImport.update({ id: '/searchPlaceholder', path: '/searchPlaceholder', getParentRoute: () => SearchRouteRoute, } as any) +const ParamsParamsPlaceholderRoute = ParamsParamsPlaceholderRouteImport.update({ + id: '/$paramsPlaceholder', + path: '/$paramsPlaceholder', + getParentRoute: () => ParamsRouteRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -134,18 +134,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/absolute': { - id: '/absolute' - path: '/absolute' - fullPath: '/absolute' - preLoaderRoute: typeof AbsoluteRouteImport + '/relative': { + id: '/relative' + path: '/relative' + fullPath: '/relative' + preLoaderRoute: typeof RelativeRouteImport parentRoute: typeof rootRouteImport } '/linkProps': { @@ -155,18 +148,11 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LinkPropsRouteImport parentRoute: typeof rootRouteImport } - '/params': { - id: '/params' - path: '/params' - fullPath: '/params' - preLoaderRoute: typeof ParamsRouteRouteImport - parentRoute: typeof rootRouteImport - } - '/relative': { - id: '/relative' - path: '/relative' - fullPath: '/relative' - preLoaderRoute: typeof RelativeRouteImport + '/absolute': { + id: '/absolute' + path: '/absolute' + fullPath: '/absolute' + preLoaderRoute: typeof AbsoluteRouteImport parentRoute: typeof rootRouteImport } '/search': { @@ -176,12 +162,19 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SearchRouteRouteImport parentRoute: typeof rootRouteImport } - '/params/$paramsPlaceholder': { - id: '/params/$paramsPlaceholder' - path: '/$paramsPlaceholder' - fullPath: '/params/$paramsPlaceholder' - preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport - parentRoute: typeof ParamsRouteRoute + '/params': { + id: '/params' + path: '/params' + fullPath: '/params' + preLoaderRoute: typeof ParamsRouteRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/search/searchPlaceholder': { id: '/search/searchPlaceholder' @@ -190,6 +183,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof SearchSearchPlaceholderRouteImport parentRoute: typeof SearchRouteRoute } + '/params/$paramsPlaceholder': { + id: '/params/$paramsPlaceholder' + path: '/$paramsPlaceholder' + fullPath: '/params/$paramsPlaceholder' + preLoaderRoute: typeof ParamsParamsPlaceholderRouteImport + parentRoute: typeof ParamsRouteRoute + } } } diff --git a/examples/solid/start-large/src/routes/__root.tsx b/examples/solid/start-large/src/routes/__root.tsx index d934db5cf1..6c38523837 100644 --- a/examples/solid/start-large/src/routes/__root.tsx +++ b/examples/solid/start-large/src/routes/__root.tsx @@ -7,7 +7,7 @@ import { } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' import type { QueryClient } from '@tanstack/solid-query' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' export interface Context { queryClient: QueryClient diff --git a/examples/solid/start-large/src/typePrimitives.tsx b/examples/solid/start-large/src/typePrimitives.tsx index 2a127d522e..f23208c629 100644 --- a/examples/solid/start-large/src/typePrimitives.tsx +++ b/examples/solid/start-large/src/typePrimitives.tsx @@ -1,5 +1,5 @@ import { Link, redirect, useNavigate } from '@tanstack/solid-router' -import { onMount } from 'solid-js' +import { onSettled } from 'solid-js' import type { RegisteredRouter, ValidateFromPath, @@ -8,7 +8,7 @@ import type { ValidateNavigateOptions, ValidateRedirectOptions, } from '@tanstack/solid-router' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' export function customRedirect( options: ValidateRedirectOptions, @@ -23,7 +23,7 @@ export function useCustomNavigate( export function useCustomNavigate(options: ValidateNavigateOptions): void { const navigate = useNavigate() - onMount(() => { + onSettled(() => { navigate(options) }) } diff --git a/examples/solid/start-large/tsconfig.json b/examples/solid/start-large/tsconfig.json index ff0556e7a8..20848fb19d 100644 --- a/examples/solid/start-large/tsconfig.json +++ b/examples/solid/start-large/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], 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 83e0719b39..acb73562a2 100644 --- a/examples/solid/start-streaming-data-from-server-functions/package.json +++ b/examples/solid/start-streaming-data-from-server-functions/package.json @@ -10,17 +10,17 @@ "start": "pnpx srvx --prod -s ../client dist/server/server.js" }, "dependencies": { - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.10", + "@solidjs/web": "2.0.0-beta.25", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "solid-js": "2.0.0-beta.25", "zod": "^4.4.3" }, "devDependencies": { "@types/node": "^22.5.4", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx b/examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx index 389b99c143..3fc9eb8ae8 100644 --- a/examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx +++ b/examples/solid/start-streaming-data-from-server-functions/src/routes/__root.tsx @@ -6,8 +6,7 @@ import { Scripts, createRootRoute, } from '@tanstack/solid-router' -import { HydrationScript } from 'solid-js/web' -import type { JSX } from 'solid-js' +import type { JSX } from '@solidjs/web' import appCss from '~/styles/app.css?url' export const Route = createRootRoute({ @@ -29,10 +28,9 @@ function RootDocument({ children }: { children: JSX.Element }) { return ( - + - {children} diff --git a/examples/solid/start-streaming-data-from-server-functions/tsconfig.json b/examples/solid/start-streaming-data-from-server-functions/tsconfig.json index 508ace2e17..34389c9e0b 100644 --- a/examples/solid/start-streaming-data-from-server-functions/tsconfig.json +++ b/examples/solid/start-streaming-data-from-server-functions/tsconfig.json @@ -4,7 +4,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "ESNext", "moduleResolution": "Bundler", "lib": ["DOM", "DOM.Iterable", "ES2022"], diff --git a/examples/solid/start-supabase-basic/package.json b/examples/solid/start-supabase-basic/package.json index 81ab5cd63c..20de7cb08b 100644 --- a/examples/solid/start-supabase-basic/package.json +++ b/examples/solid/start-supabase-basic/package.json @@ -12,21 +12,22 @@ "author": "", "license": "ISC", "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@supabase/ssr": "^0.5.2", "@supabase/supabase-js": "^2.48.1", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", - "@tanstack/solid-start": "^1.169.6", - "solid-js": "^1.9.9", - "redaxios": "^0.5.1" + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", + "@tanstack/solid-start": "^2.0.0-beta.27", + "redaxios": "^0.5.1", + "solid-js": "2.0.0-beta.25" }, "devDependencies": { "@tailwindcss/vite": "^4.2.2", "@types/node": "^22.5.4", "tailwindcss": "^4.2.2", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16", + "vite-tsconfig-paths": "^5.1.4" } } diff --git a/examples/solid/start-supabase-basic/src/components/Auth.tsx b/examples/solid/start-supabase-basic/src/components/Auth.tsx index 1d43d38815..44192eaf3b 100644 --- a/examples/solid/start-supabase-basic/src/components/Auth.tsx +++ b/examples/solid/start-supabase-basic/src/components/Auth.tsx @@ -1,10 +1,10 @@ -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' export function Auth(props: { actionText: string onSubmit: (e: Event) => void status: 'pending' | 'idle' | 'success' | 'error' - afterSubmit?: Solid.JSX.Element + afterSubmit?: JSX.Element }) { return (
diff --git a/examples/solid/start-supabase-basic/src/components/NotFound.tsx b/examples/solid/start-supabase-basic/src/components/NotFound.tsx index 438ef52a9a..061564a154 100644 --- a/examples/solid/start-supabase-basic/src/components/NotFound.tsx +++ b/examples/solid/start-supabase-basic/src/components/NotFound.tsx @@ -1,7 +1,7 @@ import { Link } from '@tanstack/solid-router' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' -export function NotFound({ children }: { children?: Solid.JSX.Element }) { +export function NotFound({ children }: { children?: JSX.Element }) { return (
diff --git a/examples/solid/start-supabase-basic/src/routeTree.gen.ts b/examples/solid/start-supabase-basic/src/routeTree.gen.ts index bbebb19df3..7019a6c21a 100644 --- a/examples/solid/start-supabase-basic/src/routeTree.gen.ts +++ b/examples/solid/start-supabase-basic/src/routeTree.gen.ts @@ -9,27 +9,18 @@ // 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 IndexRouteImport } from './routes/index' -import { Route as AuthedRouteImport } from './routes/_authed' -import { Route as LoginRouteImport } from './routes/login' -import { Route as LogoutRouteImport } from './routes/logout' import { Route as SignupRouteImport } from './routes/signup' +import { Route as LogoutRouteImport } from './routes/logout' +import { Route as LoginRouteImport } from './routes/login' +import { Route as AuthedRouteImport } from './routes/_authed' +import { Route as IndexRouteImport } from './routes/index' import { Route as AuthedPostsRouteImport } from './routes/_authed/posts' import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index' import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const AuthedRoute = AuthedRouteImport.update({ - id: '/_authed', - getParentRoute: () => rootRouteImport, -} as any) -const LoginRoute = LoginRouteImport.update({ - id: '/login', - path: '/login', +const SignupRoute = SignupRouteImport.update({ + id: '/signup', + path: '/signup', getParentRoute: () => rootRouteImport, } as any) const LogoutRoute = LogoutRouteImport.update({ @@ -37,9 +28,18 @@ const LogoutRoute = LogoutRouteImport.update({ path: '/logout', getParentRoute: () => rootRouteImport, } as any) -const SignupRoute = SignupRouteImport.update({ - id: '/signup', - path: '/signup', +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const AuthedRoute = AuthedRouteImport.update({ + id: '/_authed', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', getParentRoute: () => rootRouteImport, } as any) const AuthedPostsRoute = AuthedPostsRouteImport.update({ @@ -120,25 +120,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_authed': { - id: '/_authed' - path: '' - fullPath: '/' - preLoaderRoute: typeof AuthedRouteImport - parentRoute: typeof rootRouteImport - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport + '/signup': { + id: '/signup' + path: '/signup' + fullPath: '/signup' + preLoaderRoute: typeof SignupRouteImport parentRoute: typeof rootRouteImport } '/logout': { @@ -148,11 +134,25 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof LogoutRouteImport parentRoute: typeof rootRouteImport } - '/signup': { - id: '/signup' - path: '/signup' - fullPath: '/signup' - preLoaderRoute: typeof SignupRouteImport + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/_authed': { + id: '/_authed' + path: '' + fullPath: '/' + preLoaderRoute: typeof AuthedRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } '/_authed/posts': { diff --git a/examples/solid/start-supabase-basic/src/routes/__root.tsx b/examples/solid/start-supabase-basic/src/routes/__root.tsx index 1eb986feee..deb8f2370e 100644 --- a/examples/solid/start-supabase-basic/src/routes/__root.tsx +++ b/examples/solid/start-supabase-basic/src/routes/__root.tsx @@ -8,13 +8,12 @@ import { } from '@tanstack/solid-router' import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools' import { createServerFn } from '@tanstack/solid-start' -import { HydrationScript } from 'solid-js/web' import { DefaultCatchBoundary } from '../components/DefaultCatchBoundary' import { NotFound } from '../components/NotFound' import appCss from '../styles/app.css?url' import { seo } from '../utils/seo' import { getSupabaseServerClient } from '../utils/supabase' -import type * as Solid from 'solid-js' +import type { JSX } from '@solidjs/web' const fetchUser = createServerFn({ method: 'GET' }).handler(async () => { const supabase = getSupabaseServerClient() @@ -94,16 +93,15 @@ function RootComponent() { ) } -function RootDocument({ children }: { children: Solid.JSX.Element }) { +function RootDocument({ children }: { children: JSX.Element }) { const { user } = Route.useRouteContext()() return ( - + -
- + -
rootRouteImport, } as any) const ExploreRoute = ExploreRouteImport.update({ @@ -26,16 +26,16 @@ const ExploreRoute = ExploreRouteImport.update({ path: '/explore', getParentRoute: () => rootRouteImport, } as any) -const HowItWorksRoute = HowItWorksRouteImport.update({ - id: '/how-it-works', - path: '/how-it-works', - getParentRoute: () => rootRouteImport, -} as any) const PostsRouteRoute = PostsRouteRouteImport.update({ id: '/posts', path: '/posts', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', path: '/', @@ -101,11 +101,11 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport + '/how-it-works': { + id: '/how-it-works' + path: '/how-it-works' + fullPath: '/how-it-works' + preLoaderRoute: typeof HowItWorksRouteImport parentRoute: typeof rootRouteImport } '/explore': { @@ -115,13 +115,6 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof ExploreRouteImport parentRoute: typeof rootRouteImport } - '/how-it-works': { - id: '/how-it-works' - path: '/how-it-works' - fullPath: '/how-it-works' - preLoaderRoute: typeof HowItWorksRouteImport - parentRoute: typeof rootRouteImport - } '/posts': { id: '/posts' path: '/posts' @@ -129,6 +122,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof PostsRouteRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/posts/': { id: '/posts/' path: '/' diff --git a/examples/solid/view-transitions/tsconfig.json b/examples/solid/view-transitions/tsconfig.json index 6e3ba6f110..d493571031 100644 --- a/examples/solid/view-transitions/tsconfig.json +++ b/examples/solid/view-transitions/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "lib": ["DOM", "DOM.Iterable", "ES2022"], "skipLibCheck": true } diff --git a/examples/solid/with-framer-motion/package.json b/examples/solid/with-framer-motion/package.json index 449d8a3927..ab891b27db 100644 --- a/examples/solid/with-framer-motion/package.json +++ b/examples/solid/with-framer-motion/package.json @@ -9,19 +9,19 @@ "start": "vite" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "solid-motionone": "^1.0.4", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/with-framer-motion/src/main.tsx b/examples/solid/with-framer-motion/src/main.tsx index 3015606710..e2f8302305 100644 --- a/examples/solid/with-framer-motion/src/main.tsx +++ b/examples/solid/with-framer-motion/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { Motion, Presence } from 'solid-motionone' import { ErrorComponent, diff --git a/examples/solid/with-framer-motion/tsconfig.json b/examples/solid/with-framer-motion/tsconfig.json index c4df806b40..8a676599fb 100644 --- a/examples/solid/with-framer-motion/tsconfig.json +++ b/examples/solid/with-framer-motion/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "skipLibCheck": true, "lib": ["DOM", "DOM.Iterable", "ES2022"] } diff --git a/examples/solid/with-trpc/package.json b/examples/solid/with-trpc/package.json index 46d33436db..d832fbe4bf 100644 --- a/examples/solid/with-trpc/package.json +++ b/examples/solid/with-trpc/package.json @@ -10,15 +10,16 @@ "start": "NODE_ENV=production node dist/server/server.js" }, "dependencies": { + "@solidjs/web": "2.0.0-beta.25", "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/solid-router": "^1.170.43", - "@tanstack/solid-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/solid-router": "^2.0.0-beta.26", + "@tanstack/solid-router-devtools": "^2.0.0-beta.21", "@trpc/client": "^11.4.3", "@trpc/server": "^11.4.3", "express": "^5.2.1", "redaxios": "^0.5.1", - "solid-js": "^1.9.10", + "solid-js": "2.0.0-beta.25", "tailwindcss": "^4.2.2", "zod": "^4.4.3" }, @@ -26,6 +27,6 @@ "@types/express": "^5.0.6", "tsx": "^4.20.3", "vite": "^8.0.14", - "vite-plugin-solid": "^2.11.11" + "vite-plugin-solid": "^3.0.0-next.16" } } diff --git a/examples/solid/with-trpc/src/main.tsx b/examples/solid/with-trpc/src/main.tsx index d99d3054d7..04e801986c 100644 --- a/examples/solid/with-trpc/src/main.tsx +++ b/examples/solid/with-trpc/src/main.tsx @@ -1,4 +1,4 @@ -import { render } from 'solid-js/web' +import { render } from '@solidjs/web' import { RouterProvider, createRouter } from '@tanstack/solid-router' import { trpc } from './trpc' diff --git a/examples/solid/with-trpc/src/routeTree.gen.ts b/examples/solid/with-trpc/src/routeTree.gen.ts index aa08570aca..fd93507694 100644 --- a/examples/solid/with-trpc/src/routeTree.gen.ts +++ b/examples/solid/with-trpc/src/routeTree.gen.ts @@ -9,23 +9,23 @@ // 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 IndexRouteImport } from './routes/index' import { Route as DashboardRouteImport } from './routes/dashboard' +import { Route as IndexRouteImport } from './routes/index' import { Route as DashboardIndexRouteImport } from './routes/dashboard.index' import { Route as DashboardPostsRouteImport } from './routes/dashboard.posts' import { Route as DashboardPostsIndexRouteImport } from './routes/dashboard.posts.index' import { Route as DashboardPostsPostIdRouteImport } from './routes/dashboard.posts.$postId' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) const DashboardRoute = DashboardRouteImport.update({ id: '/dashboard', path: '/dashboard', getParentRoute: () => rootRouteImport, } as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) const DashboardIndexRoute = DashboardIndexRouteImport.update({ id: '/', path: '/', @@ -98,13 +98,6 @@ export interface RootRouteChildren { declare module '@tanstack/solid-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } '/dashboard': { id: '/dashboard' path: '/dashboard' @@ -112,6 +105,13 @@ declare module '@tanstack/solid-router' { preLoaderRoute: typeof DashboardRouteImport parentRoute: typeof rootRouteImport } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } '/dashboard/': { id: '/dashboard/' path: '/' diff --git a/examples/solid/with-trpc/src/routes/dashboard.posts.$postId.tsx b/examples/solid/with-trpc/src/routes/dashboard.posts.$postId.tsx index cc967b0b76..f6055d70d3 100644 --- a/examples/solid/with-trpc/src/routes/dashboard.posts.$postId.tsx +++ b/examples/solid/with-trpc/src/routes/dashboard.posts.$postId.tsx @@ -22,15 +22,13 @@ function DashboardPostsPostIdComponent() { const [notes, setNotes] = Solid.createSignal(search().notes ?? ``) - Solid.createEffect( - Solid.on(notes, () => { - navigate({ - search: (old) => ({ ...old, notes: notes() ? notes() : undefined }), - replace: true, - params: true, - }) - }), - ) + Solid.createEffect(notes, () => { + navigate({ + search: (old) => ({ ...old, notes: notes() ? notes() : undefined }), + replace: true, + params: true, + }) + }) if (!post()) { return
Post not found
diff --git a/examples/solid/with-trpc/tsconfig.json b/examples/solid/with-trpc/tsconfig.json index 8455216992..3dc3006f4b 100644 --- a/examples/solid/with-trpc/tsconfig.json +++ b/examples/solid/with-trpc/tsconfig.json @@ -3,7 +3,7 @@ "strict": true, "esModuleInterop": true, "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "target": "ES2022", "module": "ES2022", "moduleResolution": "bundler", diff --git a/examples/vue/basic-file-based-jsx/package.json b/examples/vue/basic-file-based-jsx/package.json index 9cc36a6991..7573628b17 100644 --- a/examples/vue/basic-file-based-jsx/package.json +++ b/examples/vue/basic-file-based-jsx/package.json @@ -10,9 +10,9 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/vue-router": "^1.170.42", - "@tanstack/vue-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/vue-router": "^1.170.16", + "@tanstack/vue-router-devtools": "^1.167.0", "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", @@ -28,6 +28,6 @@ "typescript": "~5.8.3", "vite": "^8.0.14", "vue-eslint-parser": "^9.4.3", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/examples/vue/basic-file-based-jsx/src/posts.tsx b/examples/vue/basic-file-based-jsx/src/posts.tsx index f7a1941605..1b4c92b41d 100644 --- a/examples/vue/basic-file-based-jsx/src/posts.tsx +++ b/examples/vue/basic-file-based-jsx/src/posts.tsx @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/examples/vue/basic-file-based-jsx/src/routeTree.gen.ts b/examples/vue/basic-file-based-jsx/src/routeTree.gen.ts index 5922c5f7b1..f5cd519d7f 100644 --- a/examples/vue/basic-file-based-jsx/src/routeTree.gen.ts +++ b/examples/vue/basic-file-based-jsx/src/routeTree.gen.ts @@ -11,62 +11,34 @@ import { lazyRouteComponent } from '@tanstack/vue-router' import { Route as rootRouteImport } from './routes/__root' -import { Route as IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as EditingARouteImport } from './routes/editing-a' -import { Route as EditingBRouteImport } from './routes/editing-b' -import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RemountDepsRouteImport } from './routes/remountDeps' -import { Route as SfcComponentRouteImport } from './routes/sfcComponent' import { Route as Char45824Char54620Char48124Char44397RouteImport } from './routes/대한민국' -import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' -import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' -import { Route as groupInsideRouteImport } from './routes/(group)/inside' -import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as SfcComponentRouteImport } from './routes/sfcComponent' +import { Route as RemountDepsRouteImport } from './routes/remountDeps' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' +import { Route as EditingBRouteImport } from './routes/editing-b' +import { Route as EditingARouteImport } from './routes/editing-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' +import { Route as groupInsideRouteImport } from './routes/(group)/inside' +import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' +import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' +import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, -} as any) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any) -const EditingARoute = EditingARouteImport.update({ - id: '/editing-a', - path: '/editing-a', - getParentRoute: () => rootRouteImport, -} as any) -const EditingBRoute = EditingBRouteImport.update({ - id: '/editing-b', - path: '/editing-b', - getParentRoute: () => rootRouteImport, -} as any) -const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ - id: '/notRemountDeps', - path: '/notRemountDeps', - getParentRoute: () => rootRouteImport, -} as any) -const PostsRoute = PostsRouteImport.update({ - id: '/posts', - path: '/posts', - getParentRoute: () => rootRouteImport, -} as any) -const RemountDepsRoute = RemountDepsRouteImport.update({ - id: '/remountDeps', - path: '/remountDeps', - getParentRoute: () => rootRouteImport, -} as any) +const Char45824Char54620Char48124Char44397Route = + Char45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => rootRouteImport, + } as any) const SfcComponentRoute = SfcComponentRouteImport.update({ id: '/sfcComponent', path: '/sfcComponent', @@ -77,35 +49,39 @@ const SfcComponentRoute = SfcComponentRouteImport.update({ 'default', ), }) -const Char45824Char54620Char48124Char44397Route = - Char45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => rootRouteImport, - } as any) -const anotherGroupOnlyrouteinsideRoute = - anotherGroupOnlyrouteinsideRouteImport.update({ - id: '/(another-group)/onlyrouteinside', - path: '/onlyrouteinside', - getParentRoute: () => rootRouteImport, - } as any) -const groupLayoutRoute = groupLayoutRouteImport.update({ - id: '/(group)/_layout', +const RemountDepsRoute = RemountDepsRouteImport.update({ + id: '/remountDeps', + path: '/remountDeps', getParentRoute: () => rootRouteImport, } as any) -const groupInsideRoute = groupInsideRouteImport.update({ - id: '/(group)/inside', - path: '/inside', +const PostsRoute = PostsRouteImport.update({ + id: '/posts', + path: '/posts', getParentRoute: () => rootRouteImport, } as any) -const groupLazyinsideRoute = groupLazyinsideRouteImport.update({ - id: '/(group)/lazyinside', - path: '/lazyinside', +const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ + id: '/notRemountDeps', + path: '/notRemountDeps', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const EditingBRoute = EditingBRouteImport.update({ + id: '/editing-b', + path: '/editing-b', + getParentRoute: () => rootRouteImport, +} as any) +const EditingARoute = EditingARouteImport.update({ + id: '/editing-a', + path: '/editing-a', + getParentRoute: () => rootRouteImport, +} as any) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, } as any) const PostsIndexRoute = PostsIndexRouteImport.update({ id: '/', @@ -117,31 +93,55 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ path: '/$postId', getParentRoute: () => PostsRoute, } as any) -const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ - id: '/insidelayout', - path: '/insidelayout', - getParentRoute: () => groupLayoutRoute, +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, } as any) -const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ - id: '/(group)/subfolder/inside', - path: '/subfolder/inside', +const groupLazyinsideRoute = groupLazyinsideRouteImport.update({ + id: '/(group)/lazyinside', + path: '/lazyinside', getParentRoute: () => rootRouteImport, } as any) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const groupInsideRoute = groupInsideRouteImport.update({ + id: '/(group)/inside', + path: '/inside', + getParentRoute: () => rootRouteImport, +} as any) +const groupLayoutRoute = groupLayoutRouteImport.update({ + id: '/(group)/_layout', + getParentRoute: () => rootRouteImport, +} as any) +const anotherGroupOnlyrouteinsideRoute = + anotherGroupOnlyrouteinsideRouteImport.update({ + id: '/(another-group)/onlyrouteinside', + path: '/onlyrouteinside', + getParentRoute: () => rootRouteImport, + } as any) +const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ + id: '/posts_/$postId/edit', + path: '/posts/$postId/edit', + getParentRoute: () => rootRouteImport, } as any) const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ id: '/layout-b', path: '/layout-b', getParentRoute: () => LayoutLayout2Route, } as any) -const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ - id: '/posts_/$postId/edit', - path: '/posts/$postId/edit', +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, +} as any) +const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport.update({ + id: '/(group)/subfolder/inside', + path: '/subfolder/inside', getParentRoute: () => rootRouteImport, } as any) +const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport.update({ + id: '/insidelayout', + path: '/insidelayout', + getParentRoute: () => groupLayoutRoute, +} as any) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -291,53 +291,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/editing-a': { - id: '/editing-a' - path: '/editing-a' - fullPath: '/editing-a' - preLoaderRoute: typeof EditingARouteImport - parentRoute: typeof rootRouteImport - } - '/editing-b': { - id: '/editing-b' - path: '/editing-b' - fullPath: '/editing-b' - preLoaderRoute: typeof EditingBRouteImport - parentRoute: typeof rootRouteImport - } - '/notRemountDeps': { - id: '/notRemountDeps' - path: '/notRemountDeps' - fullPath: '/notRemountDeps' - preLoaderRoute: typeof NotRemountDepsRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport - parentRoute: typeof rootRouteImport - } - '/remountDeps': { - id: '/remountDeps' - path: '/remountDeps' - fullPath: '/remountDeps' - preLoaderRoute: typeof RemountDepsRouteImport + '/대한민국': { + id: '/대한민국' + path: '/대한민국' + fullPath: '/대한민국' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport parentRoute: typeof rootRouteImport } '/sfcComponent': { @@ -347,47 +305,54 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof SfcComponentRouteImport parentRoute: typeof rootRouteImport } - '/대한민국': { - id: '/대한민국' - path: '/대한민국' - fullPath: '/대한민국' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport + '/remountDeps': { + id: '/remountDeps' + path: '/remountDeps' + fullPath: '/remountDeps' + preLoaderRoute: typeof RemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/(another-group)/onlyrouteinside': { - id: '/(another-group)/onlyrouteinside' - path: '/onlyrouteinside' - fullPath: '/onlyrouteinside' - preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout': { - id: '/(group)/_layout' + '/notRemountDeps': { + id: '/notRemountDeps' + path: '/notRemountDeps' + fullPath: '/notRemountDeps' + preLoaderRoute: typeof NotRemountDepsRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-b': { + id: '/editing-b' + path: '/editing-b' + fullPath: '/editing-b' + preLoaderRoute: typeof EditingBRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-a': { + id: '/editing-a' + path: '/editing-a' + fullPath: '/editing-a' + preLoaderRoute: typeof EditingARouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof groupLayoutRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/(group)/inside': { - id: '/(group)/inside' - path: '/inside' - fullPath: '/inside' - preLoaderRoute: typeof groupInsideRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/lazyinside': { - id: '/(group)/lazyinside' - path: '/lazyinside' - fullPath: '/lazyinside' - preLoaderRoute: typeof groupLazyinsideRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -403,26 +368,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/(group)/_layout/insidelayout': { - id: '/(group)/_layout/insidelayout' - path: '/insidelayout' - fullPath: '/insidelayout' - preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport - parentRoute: typeof groupLayoutRoute + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } - '/(group)/subfolder/inside': { - id: '/(group)/subfolder/inside' - path: '/subfolder/inside' - fullPath: '/subfolder/inside' - preLoaderRoute: typeof groupSubfolderInsideRouteImport + '/(group)/lazyinside': { + id: '/(group)/lazyinside' + path: '/lazyinside' + fullPath: '/lazyinside' + preLoaderRoute: typeof groupLazyinsideRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/(group)/inside': { + id: '/(group)/inside' + path: '/inside' + fullPath: '/inside' + preLoaderRoute: typeof groupInsideRouteImport + parentRoute: typeof rootRouteImport + } + '/(group)/_layout': { + id: '/(group)/_layout' + path: '' + fullPath: '' + preLoaderRoute: typeof groupLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/(another-group)/onlyrouteinside': { + id: '/(another-group)/onlyrouteinside' + path: '/onlyrouteinside' + fullPath: '/onlyrouteinside' + preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + parentRoute: typeof rootRouteImport + } + '/posts_/$postId/edit': { + id: '/posts_/$postId/edit' + path: '/posts/$postId/edit' + fullPath: '/posts/$postId/edit' + preLoaderRoute: typeof PostsPostIdEditRouteImport + parentRoute: typeof rootRouteImport } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -431,13 +417,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts_/$postId/edit': { - id: '/posts_/$postId/edit' - path: '/posts/$postId/edit' - fullPath: '/posts/$postId/edit' - preLoaderRoute: typeof PostsPostIdEditRouteImport + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/(group)/subfolder/inside': { + id: '/(group)/subfolder/inside' + path: '/subfolder/inside' + fullPath: '/subfolder/inside' + preLoaderRoute: typeof groupSubfolderInsideRouteImport parentRoute: typeof rootRouteImport } + '/(group)/_layout/insidelayout': { + id: '/(group)/_layout/insidelayout' + path: '/insidelayout' + fullPath: '/insidelayout' + preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport + parentRoute: typeof groupLayoutRoute + } } } diff --git a/examples/vue/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx b/examples/vue/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx index e475111e40..727c1b4d94 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/(another-group)/onlyrouteinside.tsx @@ -1,32 +1,27 @@ import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { z } from 'zod' -const OnlyRouteInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ - from: '/(another-group)/onlyrouteinside', - }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
-
{searchViaHook.value.hello}
-
- {searchViaRouteHook.value.hello} -
-
- {searchViaRouteApi.value.hello} -
-
- ) - }, -}) - export const Route = createFileRoute('/(another-group)/onlyrouteinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: OnlyRouteInsideComponent, }) const routeApi = getRouteApi('/(another-group)/onlyrouteinside') + +function OnlyRouteInsideComponent() { + const searchViaHook = useSearch({ from: '/(another-group)/onlyrouteinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
+
{searchViaHook.value.hello}
+
+ {searchViaRouteHook.value.hello} +
+
+ {searchViaRouteApi.value.hello} +
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx b/examples/vue/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx index 869e536811..4b239f3ef4 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/(group)/_layout.insidelayout.tsx @@ -1,30 +1,27 @@ import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { z } from 'zod' -const InsideLayoutComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
-
{searchViaHook.value.hello}
-
- {searchViaRouteHook.value.hello} -
-
- {searchViaRouteApi.value.hello} -
-
- ) - }, -}) - export const Route = createFileRoute('/(group)/_layout/insidelayout')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideLayoutComponent, }) const routeApi = getRouteApi('/(group)/_layout/insidelayout') + +function InsideLayoutComponent() { + const searchViaHook = useSearch({ from: '/(group)/_layout/insidelayout' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
+
{searchViaHook.value.hello}
+
+ {searchViaRouteHook.value.hello} +
+
+ {searchViaRouteApi.value.hello} +
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/(group)/inside.tsx b/examples/vue/basic-file-based-jsx/src/routes/(group)/inside.tsx index 4a0caa8f8d..f12ca517d3 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/(group)/inside.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/(group)/inside.tsx @@ -1,30 +1,27 @@ import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { z } from 'zod' -const InsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
-
{searchViaHook.value.hello}
-
- {searchViaRouteHook.value.hello} -
-
- {searchViaRouteApi.value.hello} -
-
- ) - }, -}) - export const Route = createFileRoute('/(group)/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: InsideComponent, }) const routeApi = getRouteApi('/(group)/inside') + +function InsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
+
{searchViaHook.value.hello}
+
+ {searchViaRouteHook.value.hello} +
+
+ {searchViaRouteApi.value.hello} +
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx b/examples/vue/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx index fdae632aee..05b34eb201 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/(group)/lazyinside.tsx @@ -1,30 +1,27 @@ import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { z } from 'zod' -const LazyInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
-
{searchViaHook.value.hello}
-
- {searchViaRouteHook.value.hello} -
-
- {searchViaRouteApi.value.hello} -
-
- ) - }, -}) - export const Route = createFileRoute('/(group)/lazyinside')({ validateSearch: z.object({ hello: z.string().optional() }), component: LazyInsideComponent, }) const routeApi = getRouteApi('/(group)/lazyinside') + +function LazyInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/lazyinside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
+
{searchViaHook.value.hello}
+
+ {searchViaRouteHook.value.hello} +
+
+ {searchViaRouteApi.value.hello} +
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx b/examples/vue/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx index 8c7222ee70..317c766186 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/(group)/subfolder/inside.tsx @@ -1,30 +1,27 @@ import { createFileRoute, getRouteApi, useSearch } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { z } from 'zod' -const SubfolderInsideComponent = defineComponent({ - setup() { - const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) - const searchViaRouteHook = routeApi.useSearch() - const searchViaRouteApi = routeApi.useSearch() - - return () => ( -
-
{searchViaHook.value.hello}
-
- {searchViaRouteHook.value.hello} -
-
- {searchViaRouteApi.value.hello} -
-
- ) - }, -}) - export const Route = createFileRoute('/(group)/subfolder/inside')({ validateSearch: z.object({ hello: z.string().optional() }), component: SubfolderInsideComponent, }) const routeApi = getRouteApi('/(group)/subfolder/inside') + +function SubfolderInsideComponent() { + const searchViaHook = useSearch({ from: '/(group)/subfolder/inside' }) + const searchViaRouteHook = routeApi.useSearch() + const searchViaRouteApi = routeApi.useSearch() + + return ( +
+
{searchViaHook.value.hello}
+
+ {searchViaRouteHook.value.hello} +
+
+ {searchViaRouteApi.value.hello} +
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/__root.tsx b/examples/vue/basic-file-based-jsx/src/routes/__root.tsx index adcc3acbd7..59c9e6fa48 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/__root.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/__root.tsx @@ -8,100 +8,97 @@ import { useRouterState, } from '@tanstack/vue-router' import { TanStackRouterDevtools } from '@tanstack/vue-router-devtools' -import { defineComponent } from 'vue' import NotFoundComponent from '../components/NotFoundComponent.vue' -const RootComponent = defineComponent({ - setup() { - const router = useRouter() - const canGoBack = useCanGoBack() - // test useRouterState doesn't crash client side navigation - const _state = useRouterState() - - return () => ( - <> - -
- - - Home - - - Posts - - - Layout - - - Only Route Inside Group - - - Inside Group - - - Inside Subfolder Inside Group - - - Inside Group Inside Layout - - - Lazy Inside Group - - - unicode path - - - This Route Does Not Exist - -
-
- - - - ) - }, -}) - export const Route = createRootRoute({ component: RootComponent, notFoundComponent: NotFoundComponent, }) + +function RootComponent() { + const router = useRouter() + const canGoBack = useCanGoBack() + // test useRouterState doesn't crash client side navigation + const _state = useRouterState() + + return ( + <> + +
+ + + Home + + + Posts + + + Layout + + + Only Route Inside Group + + + Inside Group + + + Inside Subfolder Inside Group + + + Inside Group Inside Layout + + + Lazy Inside Group + + + unicode path + + + This Route Does Not Exist + +
+
+ + + + ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/posts.$postId.tsx b/examples/vue/basic-file-based-jsx/src/routes/posts.$postId.tsx index bc1dbfbbd0..15d17387c8 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/posts.$postId.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/posts.$postId.tsx @@ -1,27 +1,24 @@ import { createFileRoute } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import PostErrorComponent from '../components/PostErrorComponent.vue' import { fetchPost } from '../posts' import type { PostType } from '../posts' -const PostComponent = defineComponent({ - setup() { - const post = Route.useLoaderData() - - return () => ( -
-

- {(post.value as PostType).title} -

-
{(post.value as PostType).body}
-
- ) - }, -}) - export const Route = createFileRoute('/posts/$postId')({ loader: async ({ params: { postId } }) => fetchPost(postId), component: PostComponent, errorComponent: PostErrorComponent, notFoundComponent: () =>

Post not found

, }) + +function PostComponent() { + const post = Route.useLoaderData() + + return ( +
+

+ {(post.value as PostType).title} +

+
{(post.value as PostType).body}
+
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/posts.tsx b/examples/vue/basic-file-based-jsx/src/routes/posts.tsx index 522988e52b..ae580dfc02 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/posts.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/posts.tsx @@ -1,38 +1,7 @@ import { Link, Outlet, createFileRoute } from '@tanstack/vue-router' -import { defineComponent } from 'vue' import { fetchPosts } from '../posts' import type { PostType } from '../posts' -const PostsComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
-
    - {[ - ...(posts.value as Array), - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => ( -
  • - -
    {post.title.substring(0, 20)}
    - -
  • - ))} -
-
- -
- ) - }, -}) - export const Route = createFileRoute('/posts')({ head: () => ({ meta: [ @@ -44,3 +13,31 @@ export const Route = createFileRoute('/posts')({ loader: fetchPosts, component: PostsComponent, }) + +function PostsComponent() { + const posts = Route.useLoaderData() + + return ( +
+
    + {[ + ...(posts.value as Array), + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => ( +
  • + +
    {post.title.substring(0, 20)}
    + +
  • + ))} +
+
+ +
+ ) +} diff --git a/examples/vue/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx b/examples/vue/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx index ad20bcdf97..57963c6b64 100644 --- a/examples/vue/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx +++ b/examples/vue/basic-file-based-jsx/src/routes/posts_.$postId.edit.tsx @@ -1,28 +1,23 @@ import { createFileRoute, getRouteApi, useParams } from '@tanstack/vue-router' -import { defineComponent } from 'vue' - -const PostEditComponent = defineComponent({ - setup() { - const paramsViaApi = api.useParams() - const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) - const paramsViaRouteHook = api.useParams() - - return () => ( -
-
{paramsViaHook.value.postId}
-
- {paramsViaRouteHook.value.postId} -
-
- {paramsViaApi.value.postId} -
-
- ) - }, -}) export const Route = createFileRoute('/posts_/$postId/edit')({ component: PostEditComponent, }) const api = getRouteApi('/posts_/$postId/edit') + +function PostEditComponent() { + const paramsViaApi = api.useParams() + const paramsViaHook = useParams({ from: '/posts_/$postId/edit' }) + const paramsViaRouteHook = api.useParams() + + return ( +
+
{paramsViaHook.value.postId}
+
+ {paramsViaRouteHook.value.postId} +
+
{paramsViaApi.value.postId}
+
+ ) +} diff --git a/examples/vue/basic-file-based-sfc/package.json b/examples/vue/basic-file-based-sfc/package.json index 87ab2c332b..91581cc30d 100644 --- a/examples/vue/basic-file-based-sfc/package.json +++ b/examples/vue/basic-file-based-sfc/package.json @@ -10,9 +10,9 @@ }, "dependencies": { "@tailwindcss/vite": "^4.2.2", - "@tanstack/router-plugin": "^1.169.0", - "@tanstack/vue-router": "^1.170.42", - "@tanstack/vue-router-devtools": "^1.167.3", + "@tanstack/router-plugin": "^1.168.19", + "@tanstack/vue-router": "^1.170.16", + "@tanstack/vue-router-devtools": "^1.167.0", "redaxios": "^0.5.1", "tailwindcss": "^4.2.2", "vue": "^3.5.16", @@ -23,6 +23,6 @@ "@vitejs/plugin-vue-jsx": "^5.1.5", "typescript": "~5.8.3", "vite": "^8.0.14", - "vue-tsc": "^3.3.8" + "vue-tsc": "^3.1.5" } } diff --git a/examples/vue/basic-file-based-sfc/src/posts.ts b/examples/vue/basic-file-based-sfc/src/posts.ts index f7a1941605..1b4c92b41d 100644 --- a/examples/vue/basic-file-based-sfc/src/posts.ts +++ b/examples/vue/basic-file-based-sfc/src/posts.ts @@ -7,7 +7,11 @@ export type PostType = { body: string } -const queryURL = 'https://jsonplaceholder.typicode.com' +let queryURL = 'https://jsonplaceholder.typicode.com' + +if (import.meta.env.VITE_NODE_ENV === 'test') { + queryURL = `http://localhost:${import.meta.env.VITE_EXTERNAL_PORT}` +} export const fetchPost = async (postId: string) => { console.info(`Fetching post with id ${postId}...`) diff --git a/examples/vue/basic-file-based-sfc/src/routeTree.gen.ts b/examples/vue/basic-file-based-sfc/src/routeTree.gen.ts index 0bfdddab3d..fa00eb1ce0 100644 --- a/examples/vue/basic-file-based-sfc/src/routeTree.gen.ts +++ b/examples/vue/basic-file-based-sfc/src/routeTree.gen.ts @@ -11,73 +11,45 @@ import { lazyRouteComponent } from '@tanstack/vue-router' import { Route as rootRouteImport } from './routes/__root' -import { Route as IndexRouteImport } from './routes/index' -import { Route as LayoutRouteImport } from './routes/_layout' -import { Route as EditingARouteImport } from './routes/editing-a' -import { Route as EditingBRouteImport } from './routes/editing-b' -import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' -import { Route as PostsRouteImport } from './routes/posts' -import { Route as RemountDepsRouteImport } from './routes/remountDeps' import { Route as Char45824Char54620Char48124Char44397RouteImport } from './routes/대한민국' -import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' -import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' -import { Route as groupInsideRouteImport } from './routes/(group)/inside' -import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' -import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as RemountDepsRouteImport } from './routes/remountDeps' +import { Route as PostsRouteImport } from './routes/posts' +import { Route as NotRemountDepsRouteImport } from './routes/notRemountDeps' +import { Route as EditingBRouteImport } from './routes/editing-b' +import { Route as EditingARouteImport } from './routes/editing-a' +import { Route as LayoutRouteImport } from './routes/_layout' +import { Route as IndexRouteImport } from './routes/index' import { Route as PostsIndexRouteImport } from './routes/posts.index' import { Route as PostsPostIdRouteImport } from './routes/posts.$postId' -import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' -import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' -import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2RouteImport } from './routes/_layout/_layout-2' +import { Route as groupLazyinsideRouteImport } from './routes/(group)/lazyinside' +import { Route as groupInsideRouteImport } from './routes/(group)/inside' +import { Route as groupLayoutRouteImport } from './routes/(group)/_layout' +import { Route as anotherGroupOnlyrouteinsideRouteImport } from './routes/(another-group)/onlyrouteinside' import { Route as PostsPostIdEditRouteImport } from './routes/posts_.$postId.edit' +import { Route as LayoutLayout2LayoutBRouteImport } from './routes/_layout/_layout-2/layout-b' +import { Route as LayoutLayout2LayoutARouteImport } from './routes/_layout/_layout-2/layout-a' +import { Route as groupSubfolderInsideRouteImport } from './routes/(group)/subfolder/inside' +import { Route as groupLayoutInsidelayoutRouteImport } from './routes/(group)/_layout.insidelayout' -const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', +const Char45824Char54620Char48124Char44397Route = + Char45824Char54620Char48124Char44397RouteImport.update({ + id: '/대한민국', + path: '/대한민국', + getParentRoute: () => rootRouteImport, + } as any).update({ + component: lazyRouteComponent( + () => import('./routes/대한민국.component.vue'), + 'default', + ), + }) +const RemountDepsRoute = RemountDepsRouteImport.update({ + id: '/remountDeps', + path: '/remountDeps', getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/index.component.vue'), - 'default', - ), -}) -const LayoutRoute = LayoutRouteImport.update({ - id: '/_layout', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/_layout.component.vue'), - 'default', - ), -}) -const EditingARoute = EditingARouteImport.update({ - id: '/editing-a', - path: '/editing-a', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/editing-a.component.vue'), - 'default', - ), -}) -const EditingBRoute = EditingBRouteImport.update({ - id: '/editing-b', - path: '/editing-b', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/editing-b.component.vue'), - 'default', - ), -}) -const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ - id: '/notRemountDeps', - path: '/notRemountDeps', - getParentRoute: () => rootRouteImport, -} as any).update({ - component: lazyRouteComponent( - () => import('./routes/notRemountDeps.component.vue'), + () => import('./routes/remountDeps.component.vue'), 'default', ), }) @@ -91,80 +63,52 @@ const PostsRoute = PostsRouteImport.update({ 'default', ), }) -const RemountDepsRoute = RemountDepsRouteImport.update({ - id: '/remountDeps', - path: '/remountDeps', +const NotRemountDepsRoute = NotRemountDepsRouteImport.update({ + id: '/notRemountDeps', + path: '/notRemountDeps', getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/remountDeps.component.vue'), + () => import('./routes/notRemountDeps.component.vue'), 'default', ), }) -const Char45824Char54620Char48124Char44397Route = - Char45824Char54620Char48124Char44397RouteImport.update({ - id: '/대한민국', - path: '/대한민국', - getParentRoute: () => rootRouteImport, - } as any).update({ - component: lazyRouteComponent( - () => import('./routes/대한민국.component.vue'), - 'default', - ), - }) -const anotherGroupOnlyrouteinsideRoute = anotherGroupOnlyrouteinsideRouteImport - .update({ - id: '/(another-group)/onlyrouteinside', - path: '/onlyrouteinside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(another-group)/onlyrouteinside.component.vue'), - 'default', - ), - }) -const groupLayoutRoute = groupLayoutRouteImport - .update({ - id: '/(group)/_layout', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/_layout.component.vue'), - 'default', - ), - }) -const groupInsideRoute = groupInsideRouteImport - .update({ - id: '/(group)/inside', - path: '/inside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/inside.component.vue'), - 'default', - ), - }) -const groupLazyinsideRoute = groupLazyinsideRouteImport - .update({ - id: '/(group)/lazyinside', - path: '/lazyinside', - getParentRoute: () => rootRouteImport, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/lazyinside.component.vue'), - 'default', - ), - }) -const LayoutLayout2Route = LayoutLayout2RouteImport.update({ - id: '/_layout-2', - getParentRoute: () => LayoutRoute, +const EditingBRoute = EditingBRouteImport.update({ + id: '/editing-b', + path: '/editing-b', + getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/_layout/_layout-2.component.vue'), + () => import('./routes/editing-b.component.vue'), + 'default', + ), +}) +const EditingARoute = EditingARouteImport.update({ + id: '/editing-a', + path: '/editing-a', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/editing-a.component.vue'), + 'default', + ), +}) +const LayoutRoute = LayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/_layout.component.vue'), + 'default', + ), +}) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/index.component.vue'), 'default', ), }) @@ -192,37 +136,69 @@ const PostsPostIdRoute = PostsPostIdRouteImport.update({ 'default', ), }) -const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport +const LayoutLayout2Route = LayoutLayout2RouteImport.update({ + id: '/_layout-2', + getParentRoute: () => LayoutRoute, +} as any).update({ + component: lazyRouteComponent( + () => import('./routes/_layout/_layout-2.component.vue'), + 'default', + ), +}) +const groupLazyinsideRoute = groupLazyinsideRouteImport .update({ - id: '/insidelayout', - path: '/insidelayout', - getParentRoute: () => groupLayoutRoute, - } as any) - .update({ - component: lazyRouteComponent( - () => import('./routes/(group)/_layout.insidelayout.component.vue'), - 'default', - ), - }) -const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport - .update({ - id: '/(group)/subfolder/inside', - path: '/subfolder/inside', + id: '/(group)/lazyinside', + path: '/lazyinside', getParentRoute: () => rootRouteImport, } as any) .update({ component: lazyRouteComponent( - () => import('./routes/(group)/subfolder/inside.component.vue'), + () => import('./routes/(group)/lazyinside.component.vue'), 'default', ), }) -const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ - id: '/layout-a', - path: '/layout-a', - getParentRoute: () => LayoutLayout2Route, +const groupInsideRoute = groupInsideRouteImport + .update({ + id: '/(group)/inside', + path: '/inside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/inside.component.vue'), + 'default', + ), + }) +const groupLayoutRoute = groupLayoutRouteImport + .update({ + id: '/(group)/_layout', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/_layout.component.vue'), + 'default', + ), + }) +const anotherGroupOnlyrouteinsideRoute = anotherGroupOnlyrouteinsideRouteImport + .update({ + id: '/(another-group)/onlyrouteinside', + path: '/onlyrouteinside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(another-group)/onlyrouteinside.component.vue'), + 'default', + ), + }) +const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ + id: '/posts_/$postId/edit', + path: '/posts/$postId/edit', + getParentRoute: () => rootRouteImport, } as any).update({ component: lazyRouteComponent( - () => import('./routes/_layout/_layout-2/layout-a.component.vue'), + () => import('./routes/posts_.$postId.edit.component.vue'), 'default', ), }) @@ -236,16 +212,40 @@ const LayoutLayout2LayoutBRoute = LayoutLayout2LayoutBRouteImport.update({ 'default', ), }) -const PostsPostIdEditRoute = PostsPostIdEditRouteImport.update({ - id: '/posts_/$postId/edit', - path: '/posts/$postId/edit', - getParentRoute: () => rootRouteImport, +const LayoutLayout2LayoutARoute = LayoutLayout2LayoutARouteImport.update({ + id: '/layout-a', + path: '/layout-a', + getParentRoute: () => LayoutLayout2Route, } as any).update({ component: lazyRouteComponent( - () => import('./routes/posts_.$postId.edit.component.vue'), + () => import('./routes/_layout/_layout-2/layout-a.component.vue'), 'default', ), }) +const groupSubfolderInsideRoute = groupSubfolderInsideRouteImport + .update({ + id: '/(group)/subfolder/inside', + path: '/subfolder/inside', + getParentRoute: () => rootRouteImport, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/subfolder/inside.component.vue'), + 'default', + ), + }) +const groupLayoutInsidelayoutRoute = groupLayoutInsidelayoutRouteImport + .update({ + id: '/insidelayout', + path: '/insidelayout', + getParentRoute: () => groupLayoutRoute, + } as any) + .update({ + component: lazyRouteComponent( + () => import('./routes/(group)/_layout.insidelayout.component.vue'), + 'default', + ), + }) export interface FileRoutesByFullPath { '/': typeof IndexRoute @@ -388,46 +388,11 @@ export interface RootRouteChildren { declare module '@tanstack/vue-router' { interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout': { - id: '/_layout' - path: '' - fullPath: '/' - preLoaderRoute: typeof LayoutRouteImport - parentRoute: typeof rootRouteImport - } - '/editing-a': { - id: '/editing-a' - path: '/editing-a' - fullPath: '/editing-a' - preLoaderRoute: typeof EditingARouteImport - parentRoute: typeof rootRouteImport - } - '/editing-b': { - id: '/editing-b' - path: '/editing-b' - fullPath: '/editing-b' - preLoaderRoute: typeof EditingBRouteImport - parentRoute: typeof rootRouteImport - } - '/notRemountDeps': { - id: '/notRemountDeps' - path: '/notRemountDeps' - fullPath: '/notRemountDeps' - preLoaderRoute: typeof NotRemountDepsRouteImport - parentRoute: typeof rootRouteImport - } - '/posts': { - id: '/posts' - path: '/posts' - fullPath: '/posts' - preLoaderRoute: typeof PostsRouteImport + '/대한민국': { + id: '/대한민국' + path: '/대한민국' + fullPath: '/대한민국' + preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport parentRoute: typeof rootRouteImport } '/remountDeps': { @@ -437,47 +402,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof RemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/대한민국': { - id: '/대한민국' - path: '/대한민국' - fullPath: '/대한민국' - preLoaderRoute: typeof Char45824Char54620Char48124Char44397RouteImport + '/posts': { + id: '/posts' + path: '/posts' + fullPath: '/posts' + preLoaderRoute: typeof PostsRouteImport parentRoute: typeof rootRouteImport } - '/(another-group)/onlyrouteinside': { - id: '/(another-group)/onlyrouteinside' - path: '/onlyrouteinside' - fullPath: '/onlyrouteinside' - preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + '/notRemountDeps': { + id: '/notRemountDeps' + path: '/notRemountDeps' + fullPath: '/notRemountDeps' + preLoaderRoute: typeof NotRemountDepsRouteImport parentRoute: typeof rootRouteImport } - '/(group)/_layout': { - id: '/(group)/_layout' + '/editing-b': { + id: '/editing-b' + path: '/editing-b' + fullPath: '/editing-b' + preLoaderRoute: typeof EditingBRouteImport + parentRoute: typeof rootRouteImport + } + '/editing-a': { + id: '/editing-a' + path: '/editing-a' + fullPath: '/editing-a' + preLoaderRoute: typeof EditingARouteImport + parentRoute: typeof rootRouteImport + } + '/_layout': { + id: '/_layout' path: '' fullPath: '/' - preLoaderRoute: typeof groupLayoutRouteImport + preLoaderRoute: typeof LayoutRouteImport parentRoute: typeof rootRouteImport } - '/(group)/inside': { - id: '/(group)/inside' - path: '/inside' - fullPath: '/inside' - preLoaderRoute: typeof groupInsideRouteImport - parentRoute: typeof rootRouteImport - } - '/(group)/lazyinside': { - id: '/(group)/lazyinside' - path: '/lazyinside' - fullPath: '/lazyinside' - preLoaderRoute: typeof groupLazyinsideRouteImport - parentRoute: typeof rootRouteImport - } - '/_layout/_layout-2': { - id: '/_layout/_layout-2' - path: '' + '/': { + id: '/' + path: '/' fullPath: '/' - preLoaderRoute: typeof LayoutLayout2RouteImport - parentRoute: typeof LayoutRoute + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport } '/posts/': { id: '/posts/' @@ -493,26 +458,47 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof PostsPostIdRouteImport parentRoute: typeof PostsRoute } - '/(group)/_layout/insidelayout': { - id: '/(group)/_layout/insidelayout' - path: '/insidelayout' - fullPath: '/insidelayout' - preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport - parentRoute: typeof groupLayoutRoute + '/_layout/_layout-2': { + id: '/_layout/_layout-2' + path: '' + fullPath: '/' + preLoaderRoute: typeof LayoutLayout2RouteImport + parentRoute: typeof LayoutRoute } - '/(group)/subfolder/inside': { - id: '/(group)/subfolder/inside' - path: '/subfolder/inside' - fullPath: '/subfolder/inside' - preLoaderRoute: typeof groupSubfolderInsideRouteImport + '/(group)/lazyinside': { + id: '/(group)/lazyinside' + path: '/lazyinside' + fullPath: '/lazyinside' + preLoaderRoute: typeof groupLazyinsideRouteImport parentRoute: typeof rootRouteImport } - '/_layout/_layout-2/layout-a': { - id: '/_layout/_layout-2/layout-a' - path: '/layout-a' - fullPath: '/layout-a' - preLoaderRoute: typeof LayoutLayout2LayoutARouteImport - parentRoute: typeof LayoutLayout2Route + '/(group)/inside': { + id: '/(group)/inside' + path: '/inside' + fullPath: '/inside' + preLoaderRoute: typeof groupInsideRouteImport + parentRoute: typeof rootRouteImport + } + '/(group)/_layout': { + id: '/(group)/_layout' + path: '' + fullPath: '' + preLoaderRoute: typeof groupLayoutRouteImport + parentRoute: typeof rootRouteImport + } + '/(another-group)/onlyrouteinside': { + id: '/(another-group)/onlyrouteinside' + path: '/onlyrouteinside' + fullPath: '/onlyrouteinside' + preLoaderRoute: typeof anotherGroupOnlyrouteinsideRouteImport + parentRoute: typeof rootRouteImport + } + '/posts_/$postId/edit': { + id: '/posts_/$postId/edit' + path: '/posts/$postId/edit' + fullPath: '/posts/$postId/edit' + preLoaderRoute: typeof PostsPostIdEditRouteImport + parentRoute: typeof rootRouteImport } '/_layout/_layout-2/layout-b': { id: '/_layout/_layout-2/layout-b' @@ -521,13 +507,27 @@ declare module '@tanstack/vue-router' { preLoaderRoute: typeof LayoutLayout2LayoutBRouteImport parentRoute: typeof LayoutLayout2Route } - '/posts_/$postId/edit': { - id: '/posts_/$postId/edit' - path: '/posts/$postId/edit' - fullPath: '/posts/$postId/edit' - preLoaderRoute: typeof PostsPostIdEditRouteImport + '/_layout/_layout-2/layout-a': { + id: '/_layout/_layout-2/layout-a' + path: '/layout-a' + fullPath: '/layout-a' + preLoaderRoute: typeof LayoutLayout2LayoutARouteImport + parentRoute: typeof LayoutLayout2Route + } + '/(group)/subfolder/inside': { + id: '/(group)/subfolder/inside' + path: '/subfolder/inside' + fullPath: '/subfolder/inside' + preLoaderRoute: typeof groupSubfolderInsideRouteImport parentRoute: typeof rootRouteImport } + '/(group)/_layout/insidelayout': { + id: '/(group)/_layout/insidelayout' + path: '/insidelayout' + fullPath: '/insidelayout' + preLoaderRoute: typeof groupLayoutInsidelayoutRouteImport + parentRoute: typeof groupLayoutRoute + } } } diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index af74afff3a..046be6614d 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -9,17 +9,16 @@ "start": "vite" }, "dependencies": { - "@tanstack/vue-router": "^1.170.42", - "@tanstack/vue-router-devtools": "^1.167.3", + "@tanstack/vue-router": "^1.170.16", + "@tanstack/vue-router-devtools": "^1.167.0", "redaxios": "^0.5.1", "vue": "^3.5.13", "tailwindcss": "4.1.18" }, "devDependencies": { - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "typescript": "^6.0.2", "vite": "^8.0.14", - "vue-tsc": "^3.3.8", + "vue-tsc": "^3.1.5", "@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue-jsx": "^5.1.5", "@tailwindcss/vite": "^4.2.2" diff --git a/examples/vue/basic/src/main.tsx b/examples/vue/basic/src/main.tsx index 09878913a8..dc12871db0 100644 --- a/examples/vue/basic/src/main.tsx +++ b/examples/vue/basic/src/main.tsx @@ -1,4 +1,4 @@ -import { createApp, defineComponent } from 'vue' +import { createApp } from 'vue' import { ErrorComponent, Link, @@ -102,20 +102,6 @@ function PostsIndexComponent() { return
Select a post.
} -const PostComponent = defineComponent({ - setup() { - const post = postRoute.useLoaderData() - - return () => ( -
-

{post.value.title}

-
-
{post.value.body}
-
- ) - }, -}) - const postRoute = createRoute({ getParentRoute: () => postsLayoutRoute, path: '$postId', @@ -132,6 +118,18 @@ function PostErrorComponent({ error }: ErrorComponentProps) { return } +function PostComponent() { + const post = postRoute.useLoaderData() + + return ( +
+

{post.value.title}

+
+
{post.value.body}
+
+ ) +} + const pathlessLayoutRoute = createRoute({ getParentRoute: () => rootRoute, id: '_pathlessLayout', diff --git a/examples/vue/basic/src/posts.lazy.tsx b/examples/vue/basic/src/posts.lazy.tsx index 8602de045f..1fd64723e5 100644 --- a/examples/vue/basic/src/posts.lazy.tsx +++ b/examples/vue/basic/src/posts.lazy.tsx @@ -1,39 +1,36 @@ import { Link, Outlet, createLazyRoute } from '@tanstack/vue-router' -import { defineComponent } from 'vue' - -const PostsLayoutComponent = defineComponent({ - setup() { - const posts = Route.useLoaderData() - - return () => ( -
-
    - {[ - ...posts.value, - { id: 'i-do-not-exist', title: 'Non-existent Post' }, - ].map((post) => { - return ( -
  • - -
    {post.title.substring(0, 20)}
    - -
  • - ) - })} -
- -
- ) - }, -}) export const Route = createLazyRoute('/posts')({ component: PostsLayoutComponent, }) + +function PostsLayoutComponent() { + const posts = Route.useLoaderData() + + return ( +
+
    + {[ + ...posts.value, + { id: 'i-do-not-exist', title: 'Non-existent Post' }, + ].map((post) => { + return ( +
  • + +
    {post.title.substring(0, 20)}
    + +
  • + ) + })} +
+ +
+ ) +} diff --git a/labeler-config.yml b/labeler-config.yml index 9da92bf7ff..c1ad49328e 100644 --- a/labeler-config.yml +++ b/labeler-config.yml @@ -10,6 +10,9 @@ 'package: history': - changed-files: - any-glob-to-any-file: 'packages/history/**/*' +'package: nitro-v2-vite-plugin': + - changed-files: + - any-glob-to-any-file: 'packages/nitro-v2-vite-plugin/**/*' 'package: react-router': - changed-files: - any-glob-to-any-file: 'packages/react-router/**/*' diff --git a/media/header_router.png b/media/header_router.png new file mode 100644 index 0000000000..5f2d58134d Binary files /dev/null and b/media/header_router.png differ diff --git a/media/header_start.png b/media/header_start.png new file mode 100644 index 0000000000..8622986ee1 Binary files /dev/null and b/media/header_start.png differ diff --git a/nx.json b/nx.json index b7df8b2c09..08e7563642 100644 --- a/nx.json +++ b/nx.json @@ -1,7 +1,6 @@ { "$schema": "./node_modules/nx/schemas/nx-schema.json", "defaultBase": "main", - "bust": "nx24-exclusive-e2e-16-medium-baseline-2026-10-25-05", "nxCloudId": "6442f7de8226a6291646a813", "useInferencePlugins": false, "parallel": 5, @@ -10,26 +9,10 @@ }, "namedInputs": { "sharedGlobals": [ - "{workspaceRoot}/.npmrc", - "{workspaceRoot}/nx.json", - "{workspaceRoot}/.github/workflows/pr.yml", - "{workspaceRoot}/.nx/ci-config.yaml", - "{workspaceRoot}/.nx/workflows/ultracache-config.yaml", "{workspaceRoot}/.nvmrc", "{workspaceRoot}/package.json", "{workspaceRoot}/tsconfig.json" ], - "dependentTaskOutputs": [ - { - "dependentTasksOutputFiles": "**/*", - "transitive": true - } - ], - "streamingSsrTests": [ - "{workspaceRoot}/e2e/streaming-ssr-assertions.ts", - "{workspaceRoot}/e2e/streaming-ssr-fixtures/**/*", - "{workspaceRoot}/e2e/streaming-ssr-specs/**/*" - ], "default": [ "sharedGlobals", "{projectRoot}/**/*", @@ -39,119 +22,64 @@ "default", "!{projectRoot}/tests/**/*", "!{projectRoot}/eslint.config.js" - ], - "buildProduction": ["sharedGlobals", "{projectRoot}/**/*"] + ] }, "targetDefaults": { "test:docs": { "cache": true, - "inputs": ["sharedGlobals", "{workspaceRoot}/docs/**/*"] + "inputs": ["{workspaceRoot}/docs/**/*"] }, "test:eslint": { "cache": true, - "dependsOn": ["^build", "build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ] + "dependsOn": ["^build"], + "inputs": ["default", "^production", "{workspaceRoot}/eslint.config.js"] }, "test:unit": { "cache": true, "dependsOn": ["^build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ], + "inputs": ["default", "^production"], "outputs": ["{projectRoot}/coverage"] }, "test:e2e": { "cache": true, "dependsOn": ["^build", "test:e2e--*"], - "inputs": ["buildProduction", "^production", "dependentTaskOutputs"], - "outputs": ["{projectRoot}/dist", "{projectRoot}/test-results"], - "parallelism": false + "inputs": ["default", "^production"] }, "test:e2e:nitro": { "cache": true, "dependsOn": ["^build"], - "inputs": ["default", "^production"], - "parallelism": false + "inputs": ["default", "^production"] }, "test:e2e:basepath": { "cache": true, "dependsOn": ["^build"], - "inputs": ["default", "^production"], - "parallelism": false + "inputs": ["default", "^production"] }, "test:e2e:preview": { "cache": true, "dependsOn": ["^build"], - "inputs": ["default", "^production"], - "parallelism": false + "inputs": ["default", "^production"] }, "test:types": { "cache": true, - "dependsOn": ["^build", "build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/eslint.config.js", - "dependentTaskOutputs" - ] - }, - "test:types:client": { - "cache": true, - "inputs": [ - "default", - "^production", - "{workspaceRoot}/benchmarks/client-nav/*.{ts,json}", - "{workspaceRoot}/benchmarks/client-nav/scenarios/*.ts", - "{workspaceRoot}/benchmarks/client-nav/scenarios/*/*.ts", - "{workspaceRoot}/benchmarks/memory/*.ts", - "{workspaceRoot}/benchmarks/memory/client/*.{ts,json}", - "{workspaceRoot}/benchmarks/memory/client/scenarios/*/*.ts", - "{workspaceRoot}/benchmarks/cpu-simulation.ts", - "dependentTaskOutputs" - ] + "dependsOn": ["^build"], + "inputs": ["default", "^production"] }, "test:types:ssr": { "cache": true, - "dependsOn": ["^build", "build"], - "inputs": [ - "default", - "^production", - "{workspaceRoot}/benchmarks/ssr/bench-utils.ts", - "{workspaceRoot}/benchmarks/cpu-simulation.ts", - "{workspaceRoot}/benchmarks/ssr/scenarios/*/*.ts", - "{workspaceRoot}/benchmarks/memory/*.ts", - "{workspaceRoot}/benchmarks/memory/server/*.ts", - "{workspaceRoot}/benchmarks/memory/server/scenarios/*/*.ts", - "dependentTaskOutputs" - ] + "dependsOn": ["^build"], + "inputs": ["default", "^production"] }, "build": { "cache": true, "dependsOn": ["^build"], - "inputs": ["buildProduction", "^buildProduction", "dependentTaskOutputs"], - "outputs": [ - "{projectRoot}/.netlify", - "{projectRoot}/.wrangler", - "{projectRoot}/.output", - "{projectRoot}/build", - "{projectRoot}/dist" - ] + "inputs": ["production", "^production"], + "outputs": ["{projectRoot}/build", "{projectRoot}/dist"] }, "test:build": { "cache": true, "dependsOn": ["build"], - "inputs": ["buildProduction", "dependentTaskOutputs"] - }, - "test:e2e*": { - "parallelism": false + "inputs": ["production"] } }, "plugins": [ diff --git a/package.json b/package.json index 3ef11b1969..cdc2bf2bc8 100644 --- a/package.json +++ b/package.json @@ -5,25 +5,24 @@ "type": "git", "url": "git+https://github.com/TanStack/router.git" }, - "packageManager": "pnpm@12.18.0", + "packageManager": "pnpm@11.9.0", "engines": { - "pnpm": ">=12.18.0" + "pnpm": ">=11.9.0" }, "type": "module", "scripts": { "cleanNodeModules": "pnpm -r exec rm -rf node_modules", "clean": "pnpm --filter \"./packages/**\" run clean", "test": "pnpm run test:ci", - "test:pr": "nx affected --targets=test:eslint,test:unit,test:integration,test:e2e,test:types,test:build,build", - "test:ci": "nx run-many --targets=test:eslint,test:unit,test:integration,test:e2e,test:types,test:build,build", + "test:pr": "nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build", + "test:ci": "nx run-many --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build", "test:eslint": "nx affected --target=test:eslint --exclude=examples/**,e2e/**", "test:unit": "nx affected --target=test:unit --exclude=examples/**,e2e/**", "test:unit:dev": "pnpm run test:unit && nx watch --all -- pnpm run test:unit", "test:build": "nx affected --target=test:build --exclude=examples/**", "test:types": "nx affected --target=test:types --exclude=examples/**", "test:e2e": "nx run-many --target=test:e2e", - "benchmark:bundle-size": "node scripts/benchmarks/bundle-size/build.mjs", - "benchmark:bundle-size:run": "node scripts/benchmarks/bundle-size/run.mjs", + "benchmark:bundle-size": "nx run @benchmarks/bundle-size:build", "benchmark:bundle-size:query": "node scripts/benchmarks/bundle-size/query.mjs", "benchmark:bundle-size:diff": "node scripts/benchmarks/bundle-size/diff.mjs", "benchmark:bundle-size:history": "node scripts/benchmarks/bundle-size/history.mjs", @@ -45,8 +44,7 @@ "format": "prettier --experimental-cli --ignore-unknown '**/*' --write", "changeset": "changeset", "changeset:publish": "changeset publish", - "changeset:version": "changeset version && pnpm run update:example-deps && pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile && pnpm format", - "update:example-deps": "node scripts/update-example-deps.mjs", + "changeset:version": "changeset version && node scripts/update-example-deps.mjs && pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile && pnpm format", "gpt-generate": "node gpt/generate.js", "set-ts-version": "node scripts/set-ts-version.js", "labeler-generate": "node scripts/generate-labeler-config.ts", @@ -63,25 +61,45 @@ ] }, "devDependencies": { + "@arethetypeswrong/cli": "^0.18.4", "@changesets/changelog-github": "^0.7.0", "@changesets/cli": "^2.30.0", - "@nx/devkit": "24.0.0", + "@eslint-react/eslint-plugin": "^1.26.2", + "@nx/devkit": "22.7.5", "@playwright/test": "catalog:", + "@swc-node/core": "^1.14.1", "@swc-node/register": "^1.11.1", "@tanstack/eslint-config": "0.4.0", + "@tanstack/query-core": "catalog:", + "@tanstack/react-query": "catalog:", + "@tanstack/solid-query": "catalog:", + "@tanstack/vite-config": "0.5.2", + "@tanstack/vue-query": "catalog:", "@types/node": "catalog:", + "@types/react": "catalog:", + "@types/react-dom": "catalog:", + "@vitest/browser": "^4.1.4", + "@vitest/ui": "^4.1.4", "eslint": "catalog:", + "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-unused-imports": "^4.1.4", + "jsdom": "^25.0.1", "markdown-link-extractor": "^4.0.3", - "nx": "24.0.0", + "nx": "22.7.5", "prettier": "^3.8.0", + "publint": "^0.3.16", + "react": "catalog:", + "react-dom": "catalog:", + "redaxios": "^0.5.1", + "rimraf": "^6.1.2", "tinyglobby": "^0.2.15", - "typescript": "npm:@typescript/typescript6@^6.0.2", - "vite": "catalog:", - "@typescript/native": "npm:typescript@^7.0.2", + "typescript": "^6.0.2", + "typescript55": "npm:typescript@5.5", "typescript56": "npm:typescript@5.6", "typescript57": "npm:typescript@5.7", "typescript58": "npm:typescript@5.8", - "typescript59": "npm:typescript@5.9" + "typescript59": "npm:typescript@5.9", + "vite": "catalog:", + "vitest": "^4.1.4" } } diff --git a/packages/AGENTS.md b/packages/AGENTS.md deleted file mode 100644 index 0c63c3a15c..0000000000 --- a/packages/AGENTS.md +++ /dev/null @@ -1,16 +0,0 @@ -# Packages - -- Route generation/code splitting live in `router-generator`/`router-plugin`; Start build transforms live in `start-plugin-core`. - -## Router bindings - -- Navigation/render identity is more than href or route membership: same-href navigations can have different history keys, and suspended renders must acknowledge only their own match publication. Preserve those identity checks when optimizing stores or render notifications. -- In navigation params/search, an explicit `undefined` can clear an inherited value; an absent key can inherit it. Preserve that distinction when comparing or memoizing options; React's `useValueStable` uses `deepEqual` with `ignoreUndefined: false`. - -## Tests - -- Inspect test commands: several `test:unit` scripts immediately exit or only echo a message. For these packages, validate behavior in the shared core or consuming e2e app; a successful placeholder target provides no unit coverage. -- For `*-router-ssr-query` changes, run `router-ssr-query-core` unit tests and the affected framework's `e2e/-start/query-integration` tests. The framework wrapper unit targets currently exit without running tests. -- For single-command Vitest targets, append filters after `--`, e.g. `-- tests/link.test.tsx -t "preloading"`. -- `solid-router` and `router-generator` chain two Vitest commands in `test:unit`. Trailing file/name/update arguments reach only the final command. Run the full target for verification: Solid needs browser and server suites; the generator needs fixture generation followed by typechecking. -- For public type changes, add `*.test-d.*` inference regressions and run both unit and type targets. React/Solid Router's TypeScript compiler matrix checks `src`; Vitest runs their inference tests. For changes to inference cost, follow the [type-safety performance guidance](../docs/router/guide/type-safety.md#performance-recommendations); `test:perf` measures runtime, not compiler cost. diff --git a/packages/arktype-adapter/package.json b/packages/arktype-adapter/package.json index ceca3fad73..f7840ba4f8 100644 --- a/packages/arktype-adapter/package.json +++ b/packages/arktype-adapter/package.json @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", @@ -66,19 +66,11 @@ "devDependencies": { "@tanstack/react-router": "workspace:*", "arktype": "^2.1.7", - "@testing-library/jest-dom": "catalog:", - "@testing-library/react": "catalog:", - "react": "catalog:", - "react-dom": "catalog:", - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.2.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "vite": "*" }, "peerDependencies": { "arktype": ">=2.0.0-rc <3", diff --git a/packages/arktype-adapter/tests/index.test.tsx b/packages/arktype-adapter/tests/index.test.tsx index ce6eb74756..a99ecda9c4 100644 --- a/packages/arktype-adapter/tests/index.test.tsx +++ b/packages/arktype-adapter/tests/index.test.tsx @@ -9,6 +9,7 @@ import { cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, test, vi } from 'vitest' import { type } from 'arktype' import { arkTypeValidator } from '../src' +import '@testing-library/jest-dom/vitest' afterEach(() => { vi.resetAllMocks() diff --git a/packages/arktype-adapter/tests/jest-dom.setup.ts b/packages/arktype-adapter/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/packages/arktype-adapter/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/packages/arktype-adapter/vite.config.ts b/packages/arktype-adapter/vite.config.ts index 8d553e0a59..8c8c0c519f 100644 --- a/packages/arktype-adapter/vite.config.ts +++ b/packages/arktype-adapter/vite.config.ts @@ -9,7 +9,6 @@ const config = defineConfig({ watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts'], }, }) diff --git a/packages/eslint-plugin-router/package.json b/packages/eslint-plugin-router/package.json index 9be54c220e..b99ee55e13 100644 --- a/packages/eslint-plugin-router/package.json +++ b/packages/eslint-plugin-router/package.json @@ -18,12 +18,12 @@ "clean": "rimraf ./dist ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --pack .", @@ -56,26 +56,11 @@ }, "devDependencies": { "@typescript-eslint/rule-tester": "^8.23.0", - "combinate": "catalog:", + "combinate": "^1.1.11", "eslint": "^9.22.0", - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vite": "*" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0" - }, - "nx": { - "targets": { - "build": { - "inputs": [ - "...", - "{workspaceRoot}/eslint.config.js" - ] - } - } } } diff --git a/packages/eslint-plugin-start/package.json b/packages/eslint-plugin-start/package.json index 803264ed10..c4867c58d0 100644 --- a/packages/eslint-plugin-start/package.json +++ b/packages/eslint-plugin-start/package.json @@ -18,29 +18,29 @@ "clean": "rimraf ./dist ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --pack .", "build": "vite build && tsc --noEmit" }, "type": "module", - "types": "dist/esm/index.d.ts", + "types": "dist/esm/src/index.d.ts", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.js", "exports": { ".": { "import": { - "types": "./dist/esm/index.d.ts", + "types": "./dist/esm/src/index.d.ts", "default": "./dist/esm/index.js" }, "require": { - "types": "./dist/cjs/index.d.cts", + "types": "./dist/cjs/src/index.d.cts", "default": "./dist/cjs/index.cjs" } }, @@ -58,25 +58,10 @@ "devDependencies": { "@typescript-eslint/rule-tester": "^8.44.1", "eslint": "^9.22.0", - "typescript": "^5.8.2", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "typescript": "^5.8.2" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.7.0" - }, - "nx": { - "targets": { - "build": { - "inputs": [ - "...", - "{workspaceRoot}/eslint.config.js" - ] - } - } } } diff --git a/packages/history/AGENTS.md b/packages/history/AGENTS.md deleted file mode 100644 index 509da6a4ec..0000000000 --- a/packages/history/AGENTS.md +++ /dev/null @@ -1,3 +0,0 @@ -# History - -Accepted browser push/replace operations update the in-memory location immediately and batch native writes into a microtask. Preserve coalescing: the latest href/state wins, but any queued push wins over replaces. Use `history.flush()` when native browser state must be current; verify subsequent updates still flush afterward in `tests/createBrowserHistory.test.ts`. diff --git a/packages/history/CHANGELOG.md b/packages/history/CHANGELOG.md index ca3341088c..dbd02474bf 100644 --- a/packages/history/CHANGELOG.md +++ b/packages/history/CHANGELOG.md @@ -1,63 +1,5 @@ # @tanstack/history -## 1.162.5 - -### Patch Changes - -- [#8605](https://github.com/TanStack/router/pull/8605) [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2) - Drop a duplicated current-location flag and a redundant `createHref` wrapper. - -- [#8605](https://github.com/TanStack/router/pull/8605) [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2) - Avoid temporary arrays when reading hash-history locations. - -- [#8605](https://github.com/TanStack/router/pull/8605) [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2) - 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. - -- [#8602](https://github.com/TanStack/router/pull/8602) [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb) - 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. - -- [#8605](https://github.com/TanStack/router/pull/8605) [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2) - Use `slice` instead of `substring` where the bounds are always ordered and non-negative. - -## 1.162.4 - -### Patch Changes - -- [#8359](https://github.com/TanStack/router/pull/8359) [`8fff7fa`](https://github.com/TanStack/router/commit/8fff7fa1f2e6f061916b0bf5e0ec486b2e732f94) - Normalize memory history hrefs consistently with browser and server history, including protocol-relative paths and control characters. - -- [#8352](https://github.com/TanStack/router/pull/8352) [`f021f6d`](https://github.com/TanStack/router/commit/f021f6d1c6dce6c9b54d70766f1d636d8fd9e184) - Avoid temporary arrays when replacing forward memory-history entries. - -- [#8349](https://github.com/TanStack/router/pull/8349) [`ae68535`](https://github.com/TanStack/router/commit/ae68535929043607d4ee9438f8ae401f3a064862) - Avoid generating unused history keys for locations with existing state. - -- [#8354](https://github.com/TanStack/router/pull/8354) [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244) - Use lightweight request history for SSR and make server navigation a no-op. Use redirect() to issue HTTP redirects. Server hrefs use the same normalization as browser history to handle protocol-relative URLs and control characters. - -## 1.162.3 - -### Patch Changes - -- [#8308](https://github.com/TanStack/router/pull/8308) [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8) - Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies. - - Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized. - - Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once. - - Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation. - - Share normalized pathname comparisons in Solid and Vue links to reduce bundle size. - -- [#8287](https://github.com/TanStack/router/pull/8287) [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9) - Use full-document navigation when an output rewrite produces a cross-origin destination, including the public URL of a route mask. - - Respect registered history blockers during document navigation, passing history locations and the requested push or replace action. - -## 1.162.2 - -### Patch Changes - -- [#8264](https://github.com/TanStack/router/pull/8264) [`9035abc`](https://github.com/TanStack/router/commit/9035abc41163d83409ef582f7743a3c7be57dd93) - Respect `ignoreBlocker` during `go()` navigation, including document unload warnings. Preserve beforeunload warnings during back and forward navigation unless `ignoreBlocker` is requested, and clear the bypass after same-document traversal so later document navigation still warns about unsaved changes. - - Restore the original browser history entry when forward or multi-entry navigation is blocked. - -## 1.162.1 - -### Patch Changes - -- [#7985](https://github.com/TanStack/router/pull/7985) [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b) - perf: compact private bundle boundaries- [#7975](https://github.com/TanStack/router/issues/7975) - ## 1.162.0 ### Minor Changes diff --git a/packages/history/package.json b/packages/history/package.json index d09c710d2f..790acabc3c 100644 --- a/packages/history/package.json +++ b/packages/history/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/history", - "version": "1.162.5", + "version": "1.162.0", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -22,12 +22,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch", @@ -59,12 +59,6 @@ "node": ">=20.19" }, "devDependencies": { - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vite": "*" } } diff --git a/packages/history/src/index.ts b/packages/history/src/index.ts index d2f80581b9..0f3be8242e 100644 --- a/packages/history/src/index.ts +++ b/packages/history/src/index.ts @@ -36,9 +36,7 @@ export interface RouterHistory { flush: () => void destroy: () => void notify: (action: SubscriberHistoryAction) => void - _getBlockers: () => Array _ignoreSubscribers?: boolean - _ignoreNextBeforeUnload?: (href: string) => void } export interface HistoryLocation extends ParsedPath { @@ -98,40 +96,12 @@ const stateIndexKey = '__TSR_index' const popStateEvent = 'popstate' const beforeUnloadEvent = 'beforeunload' -/** - * Turn protocol-relative inputs such as "//evil.example" into paths - * such as "/evil.example", keeping navigation on the current origin. - * - * For HTTP(S) URLs, WHATWG parsing ignores leading C0 controls and spaces, - * removes tabs/newlines, and treats backslashes as slashes, so inputs like - * "/\evil.example" also need normalization. This only allocates when those - * rules would make the input protocol-relative. - */ -// eslint-disable-next-line no-control-regex -const protocolRelativePrefix = /^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/ - -export function normalizeProtocolRelative(url: string): string { - const match = protocolRelativePrefix.exec(url) - return match ? '/' + url.slice(match[0].length) : url -} - -function normalizeHref(href: string): string { - // eslint-disable-next-line no-control-regex - if (/[\x00-\x1f\x7f]/.test(href)) { - // eslint-disable-next-line no-control-regex - href = href.replace(/[\x00-\x1f\x7f]/g, (character) => - '\t\n\r'.includes(character) ? '' : encodeURIComponent(character), - ) - } - return normalizeProtocolRelative(href) -} - export function createHistory(opts: { getLocation: () => HistoryLocation getLength: () => number pushState: (path: string, state: any) => void replaceState: (path: string, state: any) => void - go: (n: number, ignoreBlocker: boolean) => void + go: (n: number) => void back: (ignoreBlocker: boolean) => void forward: (ignoreBlocker: boolean) => void createHref: (path: string) => string @@ -156,21 +126,27 @@ export function createHistory(opts: { else location = opts.getLocation() } - 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') - ) { + 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) { for (const blocker of blockers) { - const nextLocation = parseHref(args.path, args.state) + const nextLocation = parseHref(actionInfo.path, actionInfo.state) const isBlocked = await blocker.blockerFn({ currentLocation: location, nextLocation, - action: args.type, + action: actionInfo.type, }) if (isBlocked) { opts.onBlocked?.() @@ -179,7 +155,7 @@ export function createHistory(opts: { } } - args.task() + task() } return { @@ -228,7 +204,7 @@ export function createHistory(opts: { go: (index, navigateOpts) => { tryNavigation({ task: () => { - opts.go(index, navigateOpts?.ignoreBlocker ?? false) + opts.go(index) handleIndexChange({ type: 'GO', index }) }, navigateOpts, @@ -270,11 +246,13 @@ export function createHistory(opts: { flush: () => opts.flush?.(), destroy: () => opts.destroy?.(), notify, - _getBlockers: () => opts.getBlockers?.() ?? [], } } function assignKeyAndIndex(index: number, state: HistoryState | undefined) { + if (!state) { + state = {} + } const key = createRandomKey() return { ...state, @@ -317,8 +295,7 @@ export function createBrowserHistory(opts?: { const _setBlockers = (newBlockers: Array) => (blockers = newBlockers) - const createHref = (path: string) => - normalizeHref(opts?.createHref ? opts.createHref(path) : path) + const createHref = opts?.createHref ?? ((path) => path) const parseLocation = opts?.parseLocation ?? (() => @@ -345,9 +322,6 @@ export function createBrowserHistory(opts?: { let nextPopIsGo = false let ignoreNextPop = false - // TODO: An ignored traversal past a history boundary emits neither popstate - // nor beforeunload, leaving these bypasses active for a later navigation. - // The History API provides no completion signal for such no-op traversals. let skipBlockerNextPop = false let ignoreNextBeforeUnload = false @@ -355,14 +329,18 @@ export function createBrowserHistory(opts?: { let next: | undefined - | [ - // The latest location that we were attempting to push/replace - href: string, - // The latest state that we were attempting to push/replace - state: any, - // Whether any queued update needs to push rather than replace - isPush: boolean, - ] + | { + // This is the latest location that we were attempting to push/replace + href: string + // This is the latest state that we were attempting to push/replace + state: any + // This is the latest type that we were attempting to push/replace + isPush: boolean + } + + // We need to track the current scheduled update to prevent + // multiple updates from being scheduled at the same time. + let scheduled: undefined | boolean // This function flushes the next update to the browser history const flush = () => { @@ -374,47 +352,46 @@ export function createBrowserHistory(opts?: { history._ignoreSubscribers = true // Update the browser history - ;(next[2 /* is push */] ? win.history.pushState : win.history.replaceState)( - next[1 /* state */], + ;(next.isPush ? win.history.pushState : win.history.replaceState)( + next.state, '', - next[0 /* href */], + next.href, ) // Stop ignoring subscriber updates history._ignoreSubscribers = false - // Clear the queued action after it reaches browser history. + // Reset the nextIsPush flag and clear the scheduled update next = undefined + scheduled = false rollbackLocation = undefined } // This function queues up a call to update the browser history const queueHistoryAction = ( - isPush: boolean, + type: 'push' | 'replace', destHref: string, state: any, ) => { - // A formatter changes the URL space and must receive the original input. - // Otherwise parseHref below already produces the browser destination. - const href = opts?.createHref ? createHref(destHref) : undefined - const hasPendingAction = !!next + const href = createHref(destHref) - if (!hasPendingAction) { + if (!scheduled) { rollbackLocation = currentLocation } - // Keep the optimistic location in the router's logical URL space. + // Update the location in memory currentLocation = parseHref(destHref, state) // Keep track of the next location we need to flush to the URL - next = [ - href ?? currentLocation.href, + next = { + href, state, - next?.[2 /* is push */] || isPush, - ] + isPush: next?.isPush || type === 'push', + } - if (!hasPendingAction) { + if (!scheduled) { // Schedule an update to the browser history + scheduled = true queueMicrotask(() => flush()) } } @@ -426,10 +403,6 @@ export function createBrowserHistory(opts?: { } const onPushPopEvent = async () => { - // Same-document traversals do not fire beforeunload, so consume their - // exemption here instead of carrying it into a later document navigation. - ignoreNextBeforeUnload = false - if (ignoreNextPop) { ignoreNextPop = false return @@ -466,7 +439,7 @@ export function createBrowserHistory(opts?: { }) if (isBlocked) { ignoreNextPop = true - win.history.go(-delta) + win.history.go(1) history.notify(notify) return } @@ -516,31 +489,23 @@ export function createBrowserHistory(opts?: { const history = createHistory({ getLocation, getLength: () => win.history.length, - pushState: (href, state) => queueHistoryAction(true, href, state), - replaceState: (href, state) => queueHistoryAction(false, href, state), + pushState: (href, state) => queueHistoryAction('push', href, state), + replaceState: (href, state) => queueHistoryAction('replace', href, state), back: (ignoreBlocker) => { - if (ignoreBlocker) { - skipBlockerNextPop = true - ignoreNextBeforeUnload = true - } + if (ignoreBlocker) skipBlockerNextPop = true + ignoreNextBeforeUnload = true return win.history.back() }, forward: (ignoreBlocker) => { - if (ignoreBlocker) { - skipBlockerNextPop = true - ignoreNextBeforeUnload = true - } + if (ignoreBlocker) skipBlockerNextPop = true + ignoreNextBeforeUnload = true win.history.forward() }, - go: (n, ignoreBlocker) => { + go: (n) => { nextPopIsGo = true - if (ignoreBlocker) { - skipBlockerNextPop = true - ignoreNextBeforeUnload = true - } win.history.go(n) }, - createHref, + createHref: (href) => createHref(href), flush, destroy: () => { win.history.pushState = originalPushState @@ -562,21 +527,6 @@ export function createBrowserHistory(opts?: { notifyOnIndexChange: false, }) - history._ignoreNextBeforeUnload = (href) => { - ignoreNextBeforeUnload = false - try { - href = new URL(href, win.document.baseURI).href - // External handlers and same-document fragments may emit neither - // beforeunload nor popstate, leaving an exemption for a later departure. - ignoreNextBeforeUnload = - /^https?:/.test(href) && - (!href.includes('#') || - href.split('#')[0] !== win.location.href.split('#')[0]) - } catch { - // Invalid URLs cannot unload the document. - } - } - win.addEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true }) win.addEventListener(popStateEvent, onPushPopEvent) @@ -607,17 +557,14 @@ export function createHashHistory(opts?: { window?: any }): RouterHistory { return createBrowserHistory({ window: win, parseLocation: () => { - // `#/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, - ) + 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) }, createHref: (href) => `${win.location.pathname}${win.location.search}#${href}`, @@ -657,13 +604,13 @@ export function createMemoryHistory( getLength: () => entries.length, pushState: (path, state) => { // Removes all subsequent entries after the current index to start a new branch - index = index < entries.length - 1 ? index + 1 : entries.length - states[index] = state - entries[index] = path if (index < entries.length - 1) { - entries.length = index + 1 - states.length = index + 1 + entries.splice(index + 1) + states.splice(index + 1) } + states.push(state) + entries.push(path) + index = Math.max(entries.length - 1, 0) }, replaceState: (path, state) => { states[index] = state @@ -678,89 +625,54 @@ export function createMemoryHistory( go: (n) => { index = Math.min(Math.max(index + n, 0), entries.length - 1) }, - createHref: normalizeHref, + createHref: (path) => path, getBlockers: _getBlockers, setBlockers: _setBlockers, }) } -const noop = () => {} +/** + * Sanitize a path to prevent open redirect vulnerabilities. + * Removes control characters and collapses leading double slashes. + */ +function sanitizePath(path: string): string { + // Remove ASCII control characters (0x00-0x1F) and DEL (0x7F) + // These include CR (\r = 0x0D), LF (\n = 0x0A), and other potentially dangerous characters + // eslint-disable-next-line no-control-regex + let sanitized = path.replace(/[\x00-\x1f\x7f]/g, '') -class ServerHistory implements RouterHistory { - declare private _subscribers?: RouterHistory['subscribers'] - - constructor(public location: HistoryLocation) {} - - get length() { - return 1 + // Prevent open redirect via protocol-relative URLs (e.g. "//evil.com") + // Collapse leading double slashes to a single slash + if (sanitized.startsWith('//')) { + sanitized = '/' + sanitized.replace(/^\/+/, '') } - // Preserve the history interface without allocating a Set for each request. - get subscribers() { - return (this._subscribers ??= new Set()) - } - - subscribe() { - return noop - } - - push() {} - replace() {} - go() {} - back() {} - forward() {} - - canGoBack() { - return false - } - - createHref(href: string) { - return normalizeHref(href) - } - - block() { - return noop - } - - flush() {} - destroy() {} - notify() {} - - _getBlockers(): Array { - return [] - } -} - -/** A fixed request location; server navigation is a no-op. */ -export function createServerHistory(href: string): RouterHistory { - return new ServerHistory(parseHref(href, undefined)) + return sanitized } export function parseHref( href: string, state: ParsedHistoryState | undefined, ): HistoryLocation { - const sanitizedHref = normalizeHref(href) + const sanitizedHref = sanitizePath(href) const hashIndex = sanitizedHref.indexOf('#') const searchIndex = sanitizedHref.indexOf('?') - if (!state) { - const key = createRandomKey() - state = { [stateIndexKey]: 0, key, __TSR_key: key } - } + + const addedKey = createRandomKey() return { href: sanitizedHref, - pathname: sanitizedHref.slice( + pathname: sanitizedHref.substring( 0, - hashIndex > -1 - ? searchIndex > -1 + hashIndex > 0 + ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex - : searchIndex > -1 + : searchIndex > 0 ? searchIndex : sanitizedHref.length, ), - hash: hashIndex > -1 ? sanitizedHref.slice(hashIndex) : '', + hash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : '', search: searchIndex > -1 ? sanitizedHref.slice( @@ -768,11 +680,11 @@ export function parseHref( hashIndex === -1 ? undefined : hashIndex, ) : '', - state, + state: state || { [stateIndexKey]: 0, key: addedKey, __TSR_key: addedKey }, } } // Thanks co-pilot! function createRandomKey() { - return (Math.random() + 1).toString(36).slice(7) + return (Math.random() + 1).toString(36).substring(7) } diff --git a/packages/history/tests/createBrowserHistory.test.ts b/packages/history/tests/createBrowserHistory.test.ts deleted file mode 100644 index 5b24744fb5..0000000000 --- a/packages/history/tests/createBrowserHistory.test.ts +++ /dev/null @@ -1,307 +0,0 @@ -import { describe, expect, test, vi } from 'vitest' -import { createBrowserHistory } from '../src' - -function createBrowserHistoryHarness(createHref?: (path: string) => string) { - const listeners = new Map any>() - const location = { - pathname: '/', - search: '', - hash: '', - } - const pushState = vi.fn() - const replaceState = vi.fn() - const nativeHistory = { - state: { __TSR_index: 0, __TSR_key: 'initial' }, - length: 1, - pushState, - replaceState, - back: vi.fn(), - forward: vi.fn(), - go: vi.fn(), - } - const window = { - location, - history: nativeHistory, - addEventListener: vi.fn((type: string, listener: (event: any) => any) => { - listeners.set(type, listener) - }), - removeEventListener: vi.fn((type: string) => { - listeners.delete(type) - }), - dispatchEvent: (event: { type: string }) => - listeners.get(event.type)?.(event), - } - const history = createBrowserHistory({ window, createHref }) - - return { - history, - pushState, - replaceState, - window, - } -} - -describe('createBrowserHistory', () => { - test('passes the original destination to a custom formatter', () => { - const { history, pushState } = createBrowserHistoryHarness( - (href) => '/mapped?value=' + encodeURIComponent(href), - ) - history.push('/a\tb') - history.flush() - expect(pushState).toHaveBeenCalledWith( - expect.anything(), - '', - '/mapped?value=%2Fa%09b', - ) - expect(history.location.href).toBe('/ab') - history.destroy() - }) - - test.each(['/a\x00b?q=a\x01b#/\\section\x7f', '/a\tb?q=a\nb#/\\section\r'])( - 'preserves the browser interpretation of %j', - (href) => { - const originalHref = window.location.href - const expected = new URL(href, originalHref) - const history = createBrowserHistory() - try { - expect(new URL(history.createHref(href), originalHref).href).toBe( - expected.href, - ) - history.push(href) - history.flush() - expect(window.location.href).toBe(expected.href) - expect(new URL(history.location.href, originalHref).href).toBe( - expected.href, - ) - } finally { - history.destroy() - window.history.replaceState(null, '', originalHref) - } - }, - ) - - test('coalesces consecutive replaces into the latest replace', async () => { - const { history, pushState, replaceState } = createBrowserHistoryHarness() - - history.replace('/first', { value: 1 }) - history.replace('/second', { value: 2 }) - await Promise.resolve() - - expect(pushState).not.toHaveBeenCalled() - expect(replaceState).toHaveBeenCalledTimes(1) - expect(replaceState).toHaveBeenCalledWith( - expect.objectContaining({ value: 2 }), - '', - '/second', - ) - history.destroy() - }) - - test('promotes a queued replace to a push', async () => { - const { history, pushState, replaceState } = createBrowserHistoryHarness() - - history.replace('/first', { value: 1 }) - history.push('/second', { value: 2 }) - await Promise.resolve() - - expect(replaceState).not.toHaveBeenCalled() - expect(pushState).toHaveBeenCalledTimes(1) - expect(pushState).toHaveBeenCalledWith( - expect.objectContaining({ value: 2 }), - '', - '/second', - ) - history.destroy() - }) - - test('keeps a queued push when followed by a replace', async () => { - const { history, pushState, replaceState } = createBrowserHistoryHarness() - - history.push('/first', { value: 1 }) - history.replace('/second', { value: 2 }) - await Promise.resolve() - - expect(replaceState).not.toHaveBeenCalled() - expect(pushState).toHaveBeenCalledTimes(1) - expect(pushState).toHaveBeenCalledWith( - expect.objectContaining({ value: 2 }), - '', - '/second', - ) - history.destroy() - }) - - test('flushes a later action after an explicit flush', async () => { - const { history, pushState, replaceState } = createBrowserHistoryHarness() - - history.replace('/first', { value: 1 }) - history.flush() - await Promise.resolve() - history.replace('/second', { value: 2 }) - await Promise.resolve() - - expect(pushState).not.toHaveBeenCalled() - expect(replaceState).toHaveBeenCalledTimes(2) - expect(replaceState).toHaveBeenLastCalledWith( - expect.objectContaining({ value: 2 }), - '', - '/second', - ) - history.destroy() - }) - - test.each([ - '//evil.com/path', - '///evil.com/path', - '/\\evil.com/path', - '/\\\\evil.com/path', - '/\\/evil.com/path', - '\\/evil.com/path', - '\\\\evil.com/path', - ' /\\evil.com/path', - '\x01//evil.com/path', - '/\t/evil.com/path', - ])('sanitizes %j before calling the native History API', async (href) => { - const { history, pushState } = createBrowserHistoryHarness() - - history.push(href) - await Promise.resolve() - - expect(pushState).toHaveBeenCalledOnce() - const pushedHref = pushState.mock.calls[0]![2] - const serializedUrl = new URL(pushedHref, 'https://victim.example') - expect(serializedUrl.origin).toBe('https://victim.example') - expect(serializedUrl.pathname).toBe( - href === '\x01//evil.com/path' ? '/%01//evil.com/path' : '/evil.com/path', - ) - expect( - new URL(history.location.href, 'https://victim.example').origin, - ).toBe('https://victim.example') - history.destroy() - }) - - test('does not exempt a normal traversal from beforeunload blockers', () => { - const { history, window } = createBrowserHistoryHarness() - history.block({ blockerFn: vi.fn(), enableBeforeUnload: true }) - - history.back() - const event = { - type: 'beforeunload', - preventDefault: vi.fn(), - returnValue: undefined, - } - window.dispatchEvent(event) - - expect(event.preventDefault).toHaveBeenCalledOnce() - expect(event.returnValue).toBe('') - history.destroy() - }) - - test('exempts an ignored document traversal from beforeunload blockers', () => { - const { history, window } = createBrowserHistoryHarness() - history.block({ blockerFn: vi.fn(), enableBeforeUnload: true }) - - history.back({ ignoreBlocker: true }) - const event = { - type: 'beforeunload', - preventDefault: vi.fn(), - returnValue: undefined, - } - window.dispatchEvent(event) - - expect(event.preventDefault).not.toHaveBeenCalled() - expect(event.returnValue).toBeUndefined() - history.destroy() - }) - - test('passes the logical requested destination to blockers', async () => { - const { history } = createBrowserHistoryHarness( - () => '/mapped/../browser-destination', - ) - const blockerFn = vi.fn(() => true) - history.block({ blockerFn, enableBeforeUnload: false }) - - history.push('/logical/../destination?query=value#hash') - await Promise.resolve() - - expect(blockerFn).toHaveBeenCalledWith( - expect.objectContaining({ - action: 'PUSH', - nextLocation: expect.objectContaining({ - href: '/logical/../destination?query=value#hash', - pathname: '/logical/../destination', - search: '?query=value', - hash: '#hash', - }), - }), - ) - history.destroy() - }) - - test('normalizes the final result of a custom createHref', async () => { - const { history, pushState, replaceState } = createBrowserHistoryHarness( - () => ' \t/\\evil.example/path', - ) - - expect(history.createHref('/safe')).toBe('/evil.example/path') - - history.push('/safe') - await Promise.resolve() - history.replace('/safe') - await Promise.resolve() - - expect(pushState).toHaveBeenCalledWith( - expect.anything(), - '', - '/evil.example/path', - ) - expect(replaceState).toHaveBeenCalledWith( - expect.anything(), - '', - '/evil.example/path', - ) - expect(history.location.href).toBe('/safe') - history.destroy() - }) - - test('keeps the optimistic location in the logical URL space', async () => { - const { history, pushState } = createBrowserHistoryHarness( - () => '/mapped/../browser-destination', - ) - - history.push('/logical/../destination?query=value#hash') - await Promise.resolve() - - expect(history.location).toMatchObject({ - href: '/logical/../destination?query=value#hash', - pathname: '/logical/../destination', - search: '?query=value', - hash: '#hash', - }) - expect(pushState).toHaveBeenCalledWith( - expect.anything(), - '', - '/mapped/../browser-destination', - ) - history.destroy() - }) - - test('does not retain a beforeunload exemption after a same-document traversal', async () => { - const { history, window } = createBrowserHistoryHarness() - history.block({ blockerFn: vi.fn(), enableBeforeUnload: true }) - - history.back({ ignoreBlocker: true }) - await window.dispatchEvent({ type: 'popstate' }) - - const event = { - type: 'beforeunload', - preventDefault: vi.fn(), - returnValue: undefined, - } - window.dispatchEvent(event) - - expect(event.preventDefault).toHaveBeenCalledOnce() - expect(event.returnValue).toBe('') - history.destroy() - }) -}) diff --git a/packages/history/tests/createHashHistory.test.ts b/packages/history/tests/createHashHistory.test.ts index e54b1a1ae1..4d68238249 100644 --- a/packages/history/tests/createHashHistory.test.ts +++ b/packages/history/tests/createHashHistory.test.ts @@ -1,162 +1,8 @@ -import { describe, expect, test, vi } from 'vitest' +import { describe, expect, test } from 'vitest' import { createHashHistory } from '../src' describe('createHashHistory', () => { - test.each(['\x00/route', '/route\x01', '/route?q=a\x1fb#c\x7fd'])( - 'keeps logical control data stable after reading the browser URL again: %j', - (href) => { - const originalHref = window.location.href - window.history.replaceState(null, '', '/shell') - const history = createHashHistory() - let reloaded: ReturnType | undefined - try { - history.push(href) - history.flush() - const location = history.location - history.destroy() - reloaded = createHashHistory() - expect(reloaded.location).toEqual(location) - } finally { - history.destroy() - reloaded?.destroy() - window.history.replaceState(null, '', originalHref) - } - }, - ) - - 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 = { - location: { - pathname: '//nested/path', - search: '', - hash: '', - }, - history: { - state: { __TSR_index: 0, __TSR_key: 'initial' }, - length: 1, - pushState, - replaceState: vi.fn(), - back: vi.fn(), - forward: vi.fn(), - go: vi.fn(), - }, - addEventListener: vi.fn(), - removeEventListener: vi.fn(), - } - const history = createHashHistory({ window }) - - history.push('/logical') - await Promise.resolve() - - expect(pushState).toHaveBeenCalledWith( - expect.anything(), - '', - '/nested/path#/logical', - ) - expect(history.location.href).toBe('/logical') - 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/createMemoryHistory.test.ts b/packages/history/tests/createMemoryHistory.test.ts index c0f565115e..1a27c04919 100644 --- a/packages/history/tests/createMemoryHistory.test.ts +++ b/packages/history/tests/createMemoryHistory.test.ts @@ -2,53 +2,6 @@ import { describe, expect, test, vi } from 'vitest' import { createMemoryHistory } from '../src' describe('createMemoryHistory', () => { - test.each([ - ['//example.com/path', '/example.com/path'], - ['/\\example.com/path', '/example.com/path'], - ['\\/example.com/path', '/example.com/path'], - ['\\\\example.com/path', '/example.com/path'], - [' \t/\r\\example.com/path', '/example.com/path'], - ['/\t/example.com/path', '/example.com/path'], - ['/a\tb?q=a\nb#section\r', '/ab?q=ab#section'], - ['/a\u0000b?q=a\u0001b#section\u007f', '/a%00b?q=a%01b#section%7F'], - ['/', '/'], - ['/posts/123?sort=new#comments', '/posts/123?sort=new#comments'], - ['/caf%C3%A9?q=%2F#//section', '/caf%C3%A9?q=%2F#//section'], - ['/a//b?q=//value#\\/section', '/a//b?q=//value#\\/section'], - ['/%2Fexample.com/path', '/%2Fexample.com/path'], - ])('creates href %j consistent with navigation', (href, expected) => { - const history = createMemoryHistory() - const location = history.location - const createdHref = history.createHref(href) - - expect(createdHref).toBe(expected) - expect(history.location).toBe(location) - expect(new URL(createdHref, 'https://app.example').origin).toBe( - 'https://app.example', - ) - - history.push(href) - expect(history.location.href).toBe(createdHref) - }) - - test('exposes the current blocker registry after registration and removal', () => { - const history = createMemoryHistory() - const first = { blockerFn: vi.fn(() => true) } - const second = { blockerFn: vi.fn(() => false) } - - expect(history._getBlockers()).toEqual([]) - - const removeFirst = history.block(first) - const removeSecond = history.block(second) - expect(history._getBlockers()).toEqual([first, second]) - - removeFirst() - expect(history._getBlockers()).toEqual([second]) - - removeSecond() - expect(history._getBlockers()).toEqual([]) - }) - test('back', () => { const initialEntry = '/initial' const history = createMemoryHistory({ initialEntries: [initialEntry] }) @@ -99,38 +52,6 @@ describe('createMemoryHistory', () => { expect(history.location.pathname).toBe('/b') }) - test('discards forward entries and their state when pushing a new branch', () => { - const initialEntries = ['/'] - const history = createMemoryHistory({ initialEntries }) - history.push('/kept', { marker: 'kept' }) - const keptState = history.location.state - history.push('/discarded-first', { marker: 'discarded-first' }) - history.push('/discarded-last', { marker: 'discarded-last' }) - history.go(-2) - history.push('/new', { marker: 'new' }) - - expect(initialEntries).toEqual(['/', '/kept', '/new']) - expect(history.length).toBe(3) - expect(history.location.pathname).toBe('/new') - expect(history.location.state).toMatchObject({ - __TSR_index: 2, - marker: 'new', - }) - const newState = history.location.state - - history.forward() - expect(history.location.pathname).toBe('/new') - expect(history.location.state).toBe(newState) - - history.back() - expect(history.location.pathname).toBe('/kept') - expect(history.location.state).toBe(keptState) - - history.forward() - expect(history.location.pathname).toBe('/new') - expect(history.location.state).toBe(newState) - }) - test('length', () => { const history = createMemoryHistory() expect(history.length).toBe(1) diff --git a/packages/history/tests/createServerHistory.test.ts b/packages/history/tests/createServerHistory.test.ts deleted file mode 100644 index c036cea185..0000000000 --- a/packages/history/tests/createServerHistory.test.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { describe, expect, test, vi } from 'vitest' -import { - createBrowserHistory, - createMemoryHistory, - createServerHistory, -} from '../src' - -describe('server history', () => { - test.each([ - '/', - '/posts/123?sort=new#comments', - '/caf%C3%A9?q=%2F#//section', - '//example.com/path', - '/\\example.com/path', - '/path\nname?value=\u0000', - ])('parses and sanitizes %j like memory history', (href) => { - const history = createServerHistory(href) - const memory = createMemoryHistory({ initialEntries: [href] }) - expect(history.location).toEqual({ - ...memory.location, - state: { - key: expect.any(String), - __TSR_key: expect.any(String), - __TSR_index: 0, - }, - }) - expect(history.location.state.key).toBe(history.location.state.__TSR_key) - }) - - test.each([ - '//evil.example/path', - '/\\evil.example/path', - '\\/evil.example/path', - '\\\\evil.example/path', - ' \t/\r\\evil.example/path', - '/\t/evil.example/path', - '/a\tb?q=a\nb#section\r', - '/a\u0000b?q=a\u0001b#section\u007f', - '/', - '/posts/123?sort=new#comments', - '/caf%C3%A9?q=%2F#//section', - '/a//b?q=//value#\\/section', - '/%2Fevil.example/path', - ])('normalizes href %j like browser history', (href) => { - const history = createServerHistory('/request') - const browser = createBrowserHistory() - try { - expect(history.createHref(href)).toBe(browser.createHref(href)) - expect(history.location.href).toBe('/request') - } finally { - browser.destroy() - } - }) - - test('ignores navigation, subscriptions, and blockers', () => { - const history = createServerHistory('/request?q=1') - const location = history.location - const subscriber = vi.fn() - const blockerFn = vi.fn(() => true) - const unsubscribe = history.subscribe(subscriber) - const unblock = history.block({ blockerFn }) - - history.push('/pushed', { value: 1 }) - history.replace('/replaced', { value: 2 }) - history.go(-1) - history.back() - history.forward() - history.notify({ type: 'PUSH' }) - history.flush() - history.destroy() - unsubscribe() - unblock() - - expect(history.location).toBe(location) - expect(history.length).toBe(1) - expect(history.canGoBack()).toBe(false) - expect(history.subscribers.size).toBe(0) - expect(history._getBlockers()).toEqual([]) - expect(subscriber).not.toHaveBeenCalled() - expect(blockerFn).not.toHaveBeenCalled() - }) - - test('isolates state and exposed collections between requests', () => { - const first = createServerHistory('/first') - const second = createServerHistory('/second') - first.location.state.__TSR_index = 10 - first.subscribers.add(vi.fn()) - first._getBlockers().push({ blockerFn: () => true }) - - expect(second.location.pathname).toBe('/second') - expect(second.location.state.__TSR_index).toBe(0) - expect(second.subscribers.size).toBe(0) - expect(second._getBlockers()).toEqual([]) - }) -}) diff --git a/packages/history/tests/parseHref.test.ts b/packages/history/tests/parseHref.test.ts index aa6882e6fc..e1b8db9c1a 100644 --- a/packages/history/tests/parseHref.test.ts +++ b/packages/history/tests/parseHref.test.ts @@ -1,19 +1,7 @@ import { describe, expect, test } from 'vitest' import { parseHref } from '../src' -const baseUrl = new URL('https://victim.example/base') - describe('parseHref', () => { - test.each(['\x00', '\x01', '\x1f', '\x7f', '\t', '\n', '\r'])( - 'preserves browser path, query, and fragment interpretation for %j', - (character) => { - const href = `/a${character}b?q=a${character}b#a${character}b` - expect(new URL(parseHref(href, undefined).href, baseUrl).href).toBe( - new URL(href, baseUrl).href, - ) - }, - ) - test('works', () => { const parsed = parseHref('/foo?bar=baz#qux', {} as any) expect(parsed.pathname).toEqual('/foo') @@ -21,42 +9,6 @@ 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' }, - ])('preserves supplied state %j', (state) => { - Object.freeze(state) - expect(parseHref('/foo', state).state).toBe(state) - }) - - test('creates independent initial states with matching history keys', () => { - const first = parseHref('/foo', undefined) - const second = parseHref('/bar', undefined) - - for (const location of [first, second]) { - expect(location.state).toEqual({ - __TSR_index: 0, - key: expect.any(String), - __TSR_key: location.state.key, - }) - } - - first.state.__TSR_index = 1 - expect(second.state.__TSR_index).toBe(0) - }) - describe('open redirect prevention', () => { test('strips CR characters to prevent open redirect', () => { // If \r (CR) is in the href, it should be stripped @@ -93,86 +45,6 @@ describe('parseHref', () => { expect(url.pathname).toBe('/evil.com/') }) - test.each([ - '//evil.com/path', - '///evil.com/path', - '/\\evil.com/path', - '/\\\\evil.com/path', - '/\\/evil.com/path', - '\\/evil.com/path', - '\\\\evil.com/path', - ' /\\evil.com/path', - '\x01//evil.com/path', - '/\t/evil.com/path', - ])('keeps protocol-relative input %j on the current origin', (href) => { - const parsed = parseHref(href, undefined) - const url = new URL(parsed.href, 'https://victim.example') - - expect(url.origin).toBe('https://victim.example') - }) - - test.each([ - 'h\x00ttps://evil.example', - 'java\x00script:alert(1)', - '/\x00/evil.example', - '\x7f//evil.example', - '/%5c/evil.example', - '/%2f/evil.example', - '?next=//evil.example', - '#//evil.example', - '//evil.example', - '', - ' ', - '\x00', - '\x00\t\n', - ])('does not make same-origin input %j cross-origin', (href) => { - expect(new URL(href, baseUrl).origin).toBe(baseUrl.origin) - - const parsed = parseHref(href, undefined) - - expect(new URL(parsed.href, baseUrl).origin).toBe(baseUrl.origin) - }) - - test('matches WHATWG parsing of protocol-relative prefixes', () => { - const alphabet = [ - '/', - '\\', - '\t', - '\n', - '\r', - '\x00', - '\x0b', - ' ', - '\x7f', - ] - - for (let length = 0; length <= 4; length++) { - const count = alphabet.length ** length - for (let value = 0; value < count; value++) { - let input = '' - let cursor = value - for (let index = 0; index < length; index++) { - input += alphabet[cursor % alphabet.length] - cursor = Math.floor(cursor / alphabet.length) - } - input += 'evil.example/path' - - try { - new URL(input, baseUrl) - } catch { - continue - } - - const parsed = parseHref(input, undefined) - - expect( - new URL(parsed.href, baseUrl).origin, - JSON.stringify(input), - ).toBe(baseUrl.origin) - } - } - }) - test('normal paths remain unchanged', () => { const parsed = parseHref('/users/profile?id=1#section', undefined) expect(parsed.href).toBe('/users/profile?id=1#section') diff --git a/packages/nitro-v2-vite-plugin/CHANGELOG.md b/packages/nitro-v2-vite-plugin/CHANGELOG.md new file mode 100644 index 0000000000..934532d11b --- /dev/null +++ b/packages/nitro-v2-vite-plugin/CHANGELOG.md @@ -0,0 +1,19 @@ +# @tanstack/nitro-v2-vite-plugin + +## 1.155.0 + +### Minor Changes + +- Clean minor bump, fresh start ([#7395](https://github.com/TanStack/router/pull/7395)) + +## 1.154.9 + +### Patch Changes + +- build: update to vite-config 5.x (rolldown) ([#6926](https://github.com/TanStack/router/pull/6926)) + +## 1.154.8 + +### Patch Changes + +- fix: build with @tanstack/vite-config 0.4.3 ([#6923](https://github.com/TanStack/router/pull/6923)) diff --git a/packages/nitro-v2-vite-plugin/README.md b/packages/nitro-v2-vite-plugin/README.md new file mode 100644 index 0000000000..5882e61120 --- /dev/null +++ b/packages/nitro-v2-vite-plugin/README.md @@ -0,0 +1 @@ +# Experimental Nitro v2 Vite Plugin diff --git a/packages/nitro-v2-vite-plugin/eslint.config.js b/packages/nitro-v2-vite-plugin/eslint.config.js new file mode 100644 index 0000000000..8ce6ad05fc --- /dev/null +++ b/packages/nitro-v2-vite-plugin/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +import rootConfig from '../../eslint.config.js' + +export default [...rootConfig] diff --git a/packages/nitro-v2-vite-plugin/package.json b/packages/nitro-v2-vite-plugin/package.json new file mode 100644 index 0000000000..b3021ea3c6 --- /dev/null +++ b/packages/nitro-v2-vite-plugin/package.json @@ -0,0 +1,69 @@ +{ + "name": "@tanstack/nitro-v2-vite-plugin", + "version": "1.155.0", + "description": "Modern and scalable routing for React applications", + "author": "Tanner Linsley", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/TanStack/router.git", + "directory": "packages/nitro-v2-vite-plugin" + }, + "homepage": "https://tanstack.com/router", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "keywords": [ + "react", + "location", + "router", + "routing", + "async", + "async router", + "typescript" + ], + "scripts": { + "clean": "rimraf ./dist && rimraf ./coverage", + "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", + "test:unit": "echo 'No unit tests are needed here since we do them in @tanstack/router-plugin!'", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", + "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", + "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", + "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", + "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", + "test:types:ts60": "tsc", + "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", + "build": "vite build" + }, + "type": "module", + "types": "dist/esm/index.d.ts", + "main": "dist/cjs/index.cjs", + "module": "dist/esm/index.js", + "exports": { + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "./package.json": "./package.json" + }, + "sideEffects": false, + "files": [ + "dist", + "src" + ], + "engines": { + "node": ">=22.12" + }, + "dependencies": { + "nitropack": "^2.13.1", + "pathe": "^2.0.3" + }, + "peerDependencies": { + "vite": ">=7.0.0" + } +} diff --git a/packages/nitro-v2-vite-plugin/src/index.ts b/packages/nitro-v2-vite-plugin/src/index.ts new file mode 100644 index 0000000000..d8ae5009de --- /dev/null +++ b/packages/nitro-v2-vite-plugin/src/index.ts @@ -0,0 +1,197 @@ +import { build, copyPublicAssets, createNitro, prepare } from 'nitropack' +import { dirname, resolve } from 'pathe' + +import type { PluginOption, ResolvedConfig, Rollup } from 'vite' +import type { NitroConfig } from 'nitropack' + +let ssrBundle: Rollup.OutputBundle +let ssrEntryFile: string + +function isFullUrl(str: string): boolean { + try { + new URL(str) + return true + } catch { + return false + } +} + +export function nitroV2Plugin(nitroConfig?: NitroConfig): Array { + let resolvedConfig: ResolvedConfig + return [ + { + name: 'tanstack-nitro-v2-vite-plugin', + + generateBundle: { + handler(_options, bundle) { + if (this.environment.name !== 'ssr') { + return + } + + // find entry point of ssr bundle + let entryFile: string | undefined + for (const [_name, file] of Object.entries(bundle)) { + if (file.type === 'chunk') { + if (file.isEntry) { + if (entryFile !== undefined) { + this.error( + `Multiple entry points found for service "${this.environment.name}". Only one entry point is allowed.`, + ) + } + entryFile = file.fileName + } + } + } + if (entryFile === undefined) { + this.error( + `No entry point found for service "${this.environment.name}".`, + ) + } + ssrEntryFile = entryFile! + ssrBundle = bundle + }, + }, + + configResolved(config) { + resolvedConfig = config + }, + config(_, env) { + if (env.command !== 'build') { + return + } + + return { + environments: { + ssr: { + consumer: 'server', + build: { + ssr: true, + // we don't write to the file system as the below 'capture-output' plugin will + // capture the output and write it to the virtual file system + write: false, + copyPublicDir: false, + commonjsOptions: { + include: [/node_modules/], + }, + }, + }, + }, + builder: { + sharedPlugins: true, + async buildApp(builder) { + const client = builder.environments.client + const server = builder.environments.ssr + + if (!client) { + throw new Error('Client environment not found') + } + + if (!server) { + throw new Error('SSR environment not found') + } + + await builder.build(client) + await builder.build(server) + + const virtualEntry = '#tanstack/start/entry' + const baseURL = !isFullUrl(resolvedConfig.base) + ? resolvedConfig.base + : undefined + const config: NitroConfig = { + baseURL, + publicAssets: [ + { + dir: client.config.build.outDir, + maxAge: 31536000, // 1 year + baseURL: '/', + }, + ], + ...nitroConfig, + esbuild: { + options: { + target: server.config.build.target || undefined, + ...nitroConfig?.esbuild?.options, + }, + }, + renderer: virtualEntry, + rollupConfig: { + ...nitroConfig?.rollupConfig, + plugins: [virtualBundlePlugin(ssrBundle) as any], + }, + virtual: { + ...nitroConfig?.virtual, + [virtualEntry]: `import { fromWebHandler } from 'h3' + import handler from '${ssrEntryFile}' + export default fromWebHandler(handler.fetch)`, + }, + } + + const nitro = await createNitro(config) + + await prepare(nitro) + await copyPublicAssets(nitro) + await build(nitro) + + await nitro.close() + }, + }, + } + }, + }, + ] +} + +function virtualBundlePlugin(bundle: Rollup.OutputBundle): Rollup.Plugin { + type VirtualModule = { code: string; map: string | null } + let _modules: Map | null = null + + // lazy initialize _modules since at the time of plugin creation, the bundles are not available yet + const getModules = () => { + if (_modules) { + return _modules + } + _modules = new Map() + // group chunks and source maps + for (const [fileName, content] of Object.entries(bundle)) { + if (content.type === 'chunk') { + const virtualModule: VirtualModule = { + code: content.code, + map: null, + } + const maybeMap = bundle[`${fileName}.map`] + if (maybeMap && maybeMap.type === 'asset') { + virtualModule.map = maybeMap.source as string + } + _modules.set(fileName, virtualModule) + _modules.set(resolve(fileName), virtualModule) + } + } + return _modules + } + + return { + name: 'virtual-bundle', + resolveId(id, importer) { + const modules = getModules() + if (modules.has(id)) { + return resolve(id) + } + + if (importer) { + const resolved = resolve(dirname(importer), id) + if (modules.has(resolved)) { + return resolved + } + } + return null + }, + load(id) { + const modules = getModules() + const m = modules.get(id) + if (!m) { + return null + } + return m + }, + } +} diff --git a/packages/nitro-v2-vite-plugin/tsconfig.build.json b/packages/nitro-v2-vite-plugin/tsconfig.build.json new file mode 100644 index 0000000000..92be18587f --- /dev/null +++ b/packages/nitro-v2-vite-plugin/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + }, + "include": ["src"] +} diff --git a/packages/nitro-v2-vite-plugin/tsconfig.json b/packages/nitro-v2-vite-plugin/tsconfig.json new file mode 100644 index 0000000000..bd398a8728 --- /dev/null +++ b/packages/nitro-v2-vite-plugin/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "vite.config.ts", "tests"], + "exclude": ["tests/test-files/**", "tests/snapshots/**"], + "compilerOptions": { + "jsx": "react-jsx" + } +} diff --git a/packages/nitro-v2-vite-plugin/vite.config.ts b/packages/nitro-v2-vite-plugin/vite.config.ts new file mode 100644 index 0000000000..7401092b13 --- /dev/null +++ b/packages/nitro-v2-vite-plugin/vite.config.ts @@ -0,0 +1,14 @@ +import { defineConfig, mergeConfig } from 'vitest/config' +import { tanstackViteConfig } from '@tanstack/vite-config' + +const config = defineConfig({}) + +export default mergeConfig( + config, + tanstackViteConfig({ + tsconfigPath: './tsconfig.build.json', + entry: './src/index.ts', + srcDir: './src', + exclude: ['./src/tests/'], + }), +) diff --git a/packages/react-router-devtools/CHANGELOG.md b/packages/react-router-devtools/CHANGELOG.md index f74de5f187..40e065c673 100644 --- a/packages/react-router-devtools/CHANGELOG.md +++ b/packages/react-router-devtools/CHANGELOG.md @@ -1,30 +1,5 @@ # @tanstack/react-router-devtools -## 1.167.3 - -### Patch Changes - -- Updated dependencies [[`bbf9b75`](https://github.com/TanStack/router/commit/bbf9b75808d8eee497a6dd1663f0cf08426512e0)]: - - @tanstack/router-devtools-core@1.168.3 - -## 1.167.2 - -### Patch Changes - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`6387d58`](https://github.com/TanStack/router/commit/6387d581eabc6e6a3acc87a0bc924e5a38d9c8b2), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`6387d58`](https://github.com/TanStack/router/commit/6387d581eabc6e6a3acc87a0bc924e5a38d9c8b2), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/react-router@1.170.36 - - @tanstack/router-devtools-core@1.168.2 - -## 1.167.1 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - - @tanstack/react-router@1.170.19 - - @tanstack/router-devtools-core@1.168.1 - ## 1.167.0 ### Minor Changes diff --git a/packages/react-router-devtools/README.md b/packages/react-router-devtools/README.md index 0079d7c065..7be76f46c2 100644 --- a/packages/react-router-devtools/README.md +++ b/packages/react-router-devtools/README.md @@ -1,22 +1,5 @@ -
- - - - TanStack React Router - -
# TanStack React Router Devtools See https://tanstack.com/router/latest/docs/framework/react/devtools diff --git a/packages/react-router-devtools/package.json b/packages/react-router-devtools/package.json index 969371a6a6..3cb40e24b0 100644 --- a/packages/react-router-devtools/package.json +++ b/packages/react-router-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-router-devtools", - "version": "1.167.3", + "version": "1.167.0", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -65,21 +65,11 @@ "@tanstack/router-devtools-core": "workspace:*" }, "devDependencies": { - "@vitejs/plugin-react": "catalog:", - "react": "catalog:", - "react-dom": "catalog:", + "@vitejs/plugin-react": "^4.3.4", + "react": ">=19", + "react-dom": ">=19", "vite": "*", - "@types/node": ">=20", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@eslint-react/eslint-plugin": "catalog:", - "eslint-plugin-react-hooks": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@types/node": ">=20" }, "peerDependencies": { "@tanstack/react-router": "workspace:^", diff --git a/packages/react-router-ssr-query/CHANGELOG.md b/packages/react-router-ssr-query/CHANGELOG.md index d0fc73ff50..8e4f3df45d 100644 --- a/packages/react-router-ssr-query/CHANGELOG.md +++ b/packages/react-router-ssr-query/CHANGELOG.md @@ -1,39 +1,5 @@ # @tanstack/react-router-ssr-query -## 1.167.3 - -### Patch Changes - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26)]: - - @tanstack/router-ssr-query-core@1.169.3 - -## 1.167.2 - -### Patch Changes - -- Updated dependencies [[`79e3533`](https://github.com/TanStack/router/commit/79e35335b4bb1c3b5e2275a8df5181aa05036628)]: - - @tanstack/router-ssr-query-core@1.169.2 - ## 1.167.1 ### Patch Changes diff --git a/packages/react-router-ssr-query/README.md b/packages/react-router-ssr-query/README.md index c3a60d1008..0a19fd3b81 100644 --- a/packages/react-router-ssr-query/README.md +++ b/packages/react-router-ssr-query/README.md @@ -2,21 +2,7 @@ # TanStack React Router - - - - TanStack React Router - +![TanStack Router Header](https://raw.githubusercontent.com/TanStack/router/main/media/header_router.png) 🤖 Type-safe router w/ built-in caching & URL state management for React! diff --git a/packages/react-router-ssr-query/package.json b/packages/react-router-ssr-query/package.json index 7333146047..82d9917747 100644 --- a/packages/react-router-ssr-query/package.json +++ b/packages/react-router-ssr-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-router-ssr-query", - "version": "1.167.3", + "version": "1.167.1", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "exit 0; vitest", "test:unit:dev": "pnpm run test:unit --watch", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", @@ -67,28 +67,18 @@ "@tanstack/router-ssr-query-core": "workspace:*" }, "devDependencies": { - "@vitejs/plugin-react": "catalog:", - "react": "catalog:", - "react-dom": "catalog:", + "@vitejs/plugin-react": "^4.3.4", + "react": ">=19", + "react-dom": ">=19", "@tanstack/react-router": "workspace:*", - "@tanstack/react-query": ">=5.102.0", - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@eslint-react/eslint-plugin": "catalog:", - "eslint-plugin-react-hooks": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@tanstack/react-query": ">=5.90.0", + "vite": "*" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", - "@tanstack/query-core": ">=5.102.0", - "@tanstack/react-router": ">=1.170.33", - "@tanstack/react-query": ">=5.102.0" + "@tanstack/query-core": ">=5.90.0", + "@tanstack/react-router": ">=1.127.0", + "@tanstack/react-query": ">=5.90.0" } } diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 7e1e2f1a62..dc138ae4ed 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,364 +1,5 @@ # @tanstack/react-router -## 1.170.46 - -### Patch Changes - -- [#8670](https://github.com/TanStack/router/pull/8670) [`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c) - Reference agent skills in other packages by their `intent load` identifier (`@tanstack/#`) instead of relative file links that break once packages are installed. - -- [#8671](https://github.com/TanStack/router/pull/8671) [`689a7c5`](https://github.com/TanStack/router/commit/689a7c5419de68bce0aaaef72b9a36f115ea1398) - Publish the `@tanstack/react-router` agent skills (`react-router`, `compositions/router-query`, `lifecycle/migrate-from-react-router`), which were missing from the package's `files` list. - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - -## 1.170.45 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - -## 1.170.44 - -### Patch Changes - -- Updated dependencies [[`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/router-core@1.171.37 - -## 1.170.43 - -### Patch Changes - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - -## 1.170.42 - -### Patch Changes - -- [#8594](https://github.com/TanStack/router/pull/8594) [`2413cc0`](https://github.com/TanStack/router/commit/2413cc009826fba4f97b166a35a8a50a4a8fe4bb) - reduce component nesting per route match - -- [#8602](https://github.com/TanStack/router/pull/8602) [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb) - 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. - -- [#8602](https://github.com/TanStack/router/pull/8602) [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb) - 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. - -- [#8579](https://github.com/TanStack/router/pull/8579) [`d35aab4`](https://github.com/TanStack/router/commit/d35aab425b07b46e222a507c0f0239644669757b) - Cancel pending link preload timers when starting navigation to avoid redundant preloading while the destination is loading. - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/history@1.162.5 - - @tanstack/router-core@1.171.35 - -## 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 - -- [#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 - -- [#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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - -## 1.170.37 - -### Patch Changes - -- [#8418](https://github.com/TanStack/router/pull/8418) [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387) - `deepEqual` now takes its flags as positional arguments — `deepEqual(a, b, partial?, explicitUndefined?)` — instead of an options object. The router's hot callers (Link option stabilization and active-state checks, `matchRoute`) no longer allocate an options object per comparison, and the comparator reads two booleans instead of a polymorphic object. `explicitUndefined` replaces `ignoreUndefined: false`. `deepEqual` is an internal helper; it stays exported for compatibility of two-argument calls. - -- [#8419](https://github.com/TanStack/router/pull/8419) [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd) - `resolvePath` (internal helper) now takes positional arguments — `resolvePath(base, to, trailingSlash?, cache?)` — so `buildLocation` and `matchRoute` no longer allocate an options object per path resolution. - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- [#8420](https://github.com/TanStack/router/pull/8420) [`8e164d2`](https://github.com/TanStack/router/commit/8e164d28f9e9eb1a7301109230d7ece9817492a8) - `useLinkProps` no longer calls through an internal wrapper. The host element `Link` renders on is an `@internal` overload parameter that is stripped from the published declarations, so the public `useLinkProps(options, forwardedRef?)` signature is unchanged. - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - -## 1.170.36 - -### Patch Changes - -- [#8390](https://github.com/TanStack/router/pull/8390) [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776) - Keep the Link location cache out of server bundles: `buildLocation` only creates, reads and writes it when `isServer` is false. Render React Links on the server without the extra prop copies and the forwarded-ref hook. Link SSR rendering is 20-40% faster in the Link benchmarks and the React Start SSR request loop about 7% faster. - - React `activeProps` and `inactiveProps` now follow one precedence rule on every link, including links whose destination is blocked for using a disallowed scheme: state props override element props, `ref` and event handlers, while `href`, `disabled` and `target` stay controlled by the router. Previously a blocked link ignored a `ref` or handler from its inactive props. - - React `Link` and `useLinkProps` split router options from element props with one key set on the client and the server. Element props pass through as given: external links forward them verbatim, falsy values included, and `useLinkProps` now returns `children` for router-controlled links as it already did for external ones. - -- [#8324](https://github.com/TanStack/router/pull/8324) [`6387d58`](https://github.com/TanStack/router/commit/6387d581eabc6e6a3acc87a0bc924e5a38d9c8b2) - Reuse hydration snapshot getters to avoid unnecessary store-instance effect updates when Links and other hydration-aware components rerender. - -- [#8318](https://github.com/TanStack/router/pull/8318) [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8) - Allow active and inactive Link props to override base element props in React and Solid while preserving class/style merging. Keep React's `href`, `target`, and `disabled` values controlled by routing options. Preserve Vue object and nested-array class bindings, including reactive updates and server rendering, without mutating cached bindings during VNode normalization. - -- [#8327](https://github.com/TanStack/router/pull/8327) [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef) - Make `pathParamsAllowedCharacters` initialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches. - -- [#8370](https://github.com/TanStack/router/pull/8370) [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5) - Stop exporting the internal `isPlainObject` and `isPlainArray` helpers. - -- [#8324](https://github.com/TanStack/router/pull/8324) [`6387d58`](https://github.com/TanStack/router/commit/6387d581eabc6e6a3acc87a0bc924e5a38d9c8b2) - Avoid a redundant prop copy when rendering native Links while preserving custom-component props and the public hook result. - -- [#8252](https://github.com/TanStack/router/pull/8252) [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734) - Reduce the bundle cost of shared Link pathname interpolation while preserving its rendering performance. Reuse one interpolation pass for pathname and optional metadata, keep the bounded cache on the router, and simplify React Link active-state and prop merging. - -- [#8370](https://github.com/TanStack/router/pull/8370) [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5) - Reuse built locations for Links whose destination does not depend on the current location. `buildLocation` keeps the result per options object when the build never read the current location, and the React `Link` passes one stable options object per instance, so navigations resolve unchanged Links with a lookup instead of a full build. The per-route pathname interpolation cache this replaces is removed. Link `params`, `search` and `activeOptions` are compared by value on render, so inline object literals with unchanged contents keep reusing the Link's location. Pass a new object to change a destination; like any other React prop, an object mutated in place is not re-read. - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`8fff7fa`](https://github.com/TanStack/router/commit/8fff7fa1f2e6f061916b0bf5e0ec486b2e732f94), [`f021f6d`](https://github.com/TanStack/router/commit/f021f6d1c6dce6c9b54d70766f1d636d8fd9e184), [`ae68535`](https://github.com/TanStack/router/commit/ae68535929043607d4ee9438f8ae401f3a064862), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/history@1.162.4 - -## 1.170.35 - -### Patch Changes - -- [#7824](https://github.com/TanStack/router/pull/7824) [`8c43c71`](https://github.com/TanStack/router/commit/8c43c712523fc63dc3a814f3a19617e270ce8ed1) - Upgrade TanStack Store to 0.11 and migrate router subscriptions to useSelector, preserving selector comparisons and Vue subscription cleanup. - -## 1.170.34 - -### Patch Changes - -- [#8279](https://github.com/TanStack/router/pull/8279) [`aee42c6`](https://github.com/TanStack/router/commit/aee42c6b641d8e919bfed9e0f04bb1b72092f3a6) - Avoid allocating event-handler arrays and wrapper functions for links without user-supplied event handlers. - -- [#8308](https://github.com/TanStack/router/pull/8308) [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8) - Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies. - - Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized. - - Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once. - - Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation. - - Share normalized pathname comparisons in Solid and Vue links to reduce bundle size. - -- [#8311](https://github.com/TanStack/router/pull/8311) [`9aec5a7`](https://github.com/TanStack/router/commit/9aec5a7012c47e83ec23bb4763494b72a5e68bfc) - React Links resolve state props without temporary class-name arrays or unnecessary style copies. - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - - @tanstack/history@1.162.3 - -## 1.170.33 - -### Patch Changes - -- [#8165](https://github.com/TanStack/router/pull/8165) [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2) - Exclude structural descendants below error and not-found boundaries from route lifecycle callbacks. Preserve lifecycle membership through invalidation, hydration, background reloads, and superseded navigation publication. - -- [#8209](https://github.com/TanStack/router/pull/8209) [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f) - Preserve falsy thrown values in React and Vue error boundaries. Type React and Vue boundary error components and `onCatch` callbacks as `unknown`. Solid boundary errors remain typed as `Error`; SSR now wraps non-`Error` loader errors to match Solid’s native boundary behavior, preserving the original value in `cause`. Router state and loader `onError` values are unchanged. - - When upgrading React or Vue, narrow boundary errors (for example, with `error instanceof Error`) before reading `message` or `stack`. `ErrorComponentProps` remains available for values narrowed to a specific error type. Route `onError` types are unchanged. - -- [#8161](https://github.com/TanStack/router/pull/8161) [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96) - Retain successful not-found matches as terminal shared boundaries during client navigation, preserving route context while the destination loads. - -- [#8251](https://github.com/TanStack/router/pull/8251) [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b) - Use URL.canParse for absolute URL checks in links, navigation, redirects, and build configuration. Preserve a URL constructor fallback for older browsers. - -- [#8169](https://github.com/TanStack/router/pull/8169) [`0caf6b9`](https://github.com/TanStack/router/commit/0caf6b9a2b7e14b0b146c74cc27cb05c19d700a5) - Fix route-scoped `useMatch`, `useSearch`, and `useParams` APIs to forward the `shouldThrow` option and preserve optional return types when `shouldThrow: false`. - -- [#8257](https://github.com/TanStack/router/pull/8257) [`cf166d1`](https://github.com/TanStack/router/commit/cf166d160e6397007a979bfc7065b45ff69ea543) - Fix repeated `innerHTML` writes for unchanged styles and data scripts during React re-renders. This prevents unnecessary CSS parsing and Trusted Types errors during client navigation. - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`9035abc`](https://github.com/TanStack/router/commit/9035abc41163d83409ef582f7743a3c7be57dd93), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - - @tanstack/history@1.162.2 - -## 1.170.32 - -### Patch Changes - -- [#8130](https://github.com/TanStack/router/pull/8130) [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b) - preserve context during reloads - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - -## 1.170.31 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - -## 1.170.30 - -### Patch Changes - -- [#8084](https://github.com/TanStack/router/pull/8084) [`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175) - preserve pending UI across retained routes - -- [#8068](https://github.com/TanStack/router/pull/8068) [`f75cada`](https://github.com/TanStack/router/commit/f75cada01707e51fb9650dd301bc04f8b2265a2a) - direct export of CatchBoundary class component, remove function wrapper - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - -## 1.170.29 - -### Patch Changes - -- [#8073](https://github.com/TanStack/router/pull/8073) [`0fdf9ff`](https://github.com/TanStack/router/commit/0fdf9ff16fc532de9fc131d18df167ebd8038720) - inline isCtrlKey inside Link component for byte shaving - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - -## 1.170.28 - -### Patch Changes - -- [#8055](https://github.com/TanStack/router/pull/8055) [`0c25a7b`](https://github.com/TanStack/router/commit/0c25a7b43b5331ee6ebf94d50e9793002783adab) - Avoid wrapping root components that may render the HTML document in a Suspense boundary during SSR and hydration. - -- [#8054](https://github.com/TanStack/router/pull/8054) [`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90) - Reuse resolved lazy route components when revisiting code-split routes, preventing unnecessary pending UI. - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90)]: - - @tanstack/router-core@1.171.23 - -## 1.170.27 - -### Patch Changes - -- [#8047](https://github.com/TanStack/router/pull/8047) [`b0817f5`](https://github.com/TanStack/router/commit/b0817f50cc639ae50b6c30cd11c5adbf7eed028c) - useMatchRoute w/ React Compiler - -## 1.170.26 - -### Patch Changes - -- [#8045](https://github.com/TanStack/router/pull/8045) [`f500760`](https://github.com/TanStack/router/commit/f5007607d62e932b8df19de866cdc6bddcff8db3) - Warn when an Outlet is rendered inside a pending, error, or not-found component. - -- [#8043](https://github.com/TanStack/router/pull/8043) [`1aafca9`](https://github.com/TanStack/router/commit/1aafca9b45d24f8f0dba78e716fc9582346c6ca1) - remove the undocumented Link `isTransitioning` state and `data-transitioning` attribute - -- [#8044](https://github.com/TanStack/router/pull/8044) [`aa10b65`](https://github.com/TanStack/router/commit/aa10b6589eeda215f5a60ea0af95a3101d8c414e) - Apply `preloadDelay` to viewport link preloading and cancel pending preloads when links leave the viewport. - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13)]: - - @tanstack/router-core@1.171.22 - -## 1.170.25 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - -## 1.170.24 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - -## 1.170.23 - -### Patch Changes - -- [#7952](https://github.com/TanStack/router/pull/7952) [`95dec51`](https://github.com/TanStack/router/commit/95dec51018d01483949c6f1fe3094b019ccf3b4f) - bail out of `Link` re-renders when the resolved href and active state are unchanged - -## 1.170.22 - -### Patch Changes - -- [#7992](https://github.com/TanStack/router/pull/7992) [`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9) - retain mounted UI during revalidation - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - -## 1.170.21 - -### Patch Changes - -- [#7961](https://github.com/TanStack/router/pull/7961) [`697ebb6`](https://github.com/TanStack/router/commit/697ebb6ddbd433d052b6b4707938a5c595865d58) - Prevent a blank frame before zero-delay initial pending UI by using a - component-scoped React transition for match publication. Pending timing, - boundary selection, and rendered matches continue to come from the router - core. - -- [#7970](https://github.com/TanStack/router/pull/7970) [`2435885`](https://github.com/TanStack/router/commit/2435885fa8b5e31c8c4b74d93920919f27316ebf) - createFileRoute does not rely on FileRoute class - -- [#7971](https://github.com/TanStack/router/pull/7971) [`86bf510`](https://github.com/TanStack/router/commit/86bf510c2923afb76804223bd04afc2a809b33e7) - clean intersection observer options in link component - -- [#7967](https://github.com/TanStack/router/pull/7967) [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c) - Preserve path params in their raw string form while matching routes so structured values returned by `params.parse` produce stable match IDs and do not reuse stale loader data. - - `RouterCore.getMatchedRoutes()` now returns `[matchedRoutes, rawParams, foundRoute]` instead of an object. - -- Updated dependencies [[`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/router-core@1.171.18 - - @tanstack/history@1.162.1 - -## 1.170.20 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - -## 1.170.19 - -### Patch Changes - -- [#7805](https://github.com/TanStack/router/pull/7805) [`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd) - Rewrite match loading around a lane-based scheduler that tracks each navigation, preload, and background reload as an ordered unit of work. This fixes pending/redirect/retry state leaking between overlapping navigations, restores correct SSR status codes for redirects, errors, and not-found responses, and closes hydration gaps where the client re-ran work the server had already completed. - - Invalidation now retires matching active preloads so older speculative loader results cannot become fresh cache data after invalidation. - - Route `headers()` now only runs on the server, matching the documented behavior — it is no longer invoked during client-side asset projection. - - The documented default `gcTime` and `preloadGcTime` now match the existing runtime default of 5 minutes (`300_000`). - - **Removed / changed exported internals** - - `RouterState` no longer includes `loadedAt`, `isTransitioning`, `statusCode`, or `redirect`. Use `match.updatedAt` in place of `loadedAt`; subscribe to `router.state.status` / `router.state.isLoading` in place of `isTransitioning`; server response status and redirect handling are now internal to the server loader and are no longer exposed on `router.state`. - - `RouteMatch.fetchCount` has been removed, with no replacement — it was purely informational. - - `RouteMatch.status` no longer includes `'redirected'` (it remains `'pending' | 'success' | 'error' | 'notFound'`) — redirected matches are dropped from the match list instead of being rendered. - - `RouteMatch.globalNotFound` has been renamed and privatized to the internal `_notFound` field. Use `match.status === 'notFound'` instead. - - The exported React, Solid, and Vue `Match` components now accept `routeId` instead of `matchId`. - - The exported `RouterStores` adapter contract now uses route-keyed presentation stores: `matchesId` is replaced by `ids`, `matchStores` by `byRoute`, and `getRouteMatchStore()` by `getMatchStore()`. The separate `loadedAt`, `isLoading`, `isTransitioning`, `statusCode`, and `redirect` stores have been removed, along with the pending/cache stores and their setters. `StoreConfig.init` has also been removed. Read application-facing state from `router.state`; preload and cache coordination are now internal. - - Removed `RouterCore` members `getMatch()`, `updateMatch()`, `cancelMatch()`, and `cancelMatches()` — read matches from `router.state.matches` (e.g. `router.state.matches.find((m) => m.id === id)`); there is no replacement for mutating or cancelling an individual in-flight match from outside the router. - - Removed `RouterCore.hasNotFoundMatch()` — use `router.state.matches.some((m) => m.status === 'notFound')`. - - Removed `RouterCore.looseRoutesById` — use `routesById`. - - Removed `RouterCore.isPrerendering()`, `RouterCore.isViewTransitionTypesSupported`, and `RouterCore.viewTransitionPromise`, with no replacement. - - Removed `RouterCore.getParsedLocationHref()` and `RouterCore.clearExpiredCache()`, with no replacement — expired cache entries are now reconciled automatically as part of match commit. - - Removed `RouterCore.latestLoadPromise` and `RouterCore.beforeLoad()`, with no replacement. - - `RouterCore.commitLocationPromise` and `RouterCore.pendingBuiltLocation` have been replaced by the internal `_commitPromise` and `_pendingLocation` fields. - - Removed the exported `GetMatchFn` and `UpdateMatchFn` types, along with the methods they typed. - - Removed the standalone `getMatchedRoutes()` export from `@tanstack/router-core` — use the `router.getMatchedRoutes()` instance method instead. - - `RouterCore.loadRouteChunk()` no longer accepts an array of component types as its second argument. One-argument usage is unchanged; the optional second argument is now `'errorComponent'`, `'notFoundComponent'`, or `false` for internal boundary loading. - - Removed `Redirect.redirectHandled`, which was internal redirect bookkeeping. - - `MatchRoutesOpts.preload` and `MatchRoutesOpts.dest` have been removed. - - `StartTransitionFn` is now `(fn, expected) => Promise` (previously `(fn) => void`). This only affects custom framework adapters that implement `startTransition`. - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - -## 1.170.18 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - ## 1.170.17 ### Patch Changes diff --git a/packages/react-router/README.md b/packages/react-router/README.md index c3a60d1008..0a19fd3b81 100644 --- a/packages/react-router/README.md +++ b/packages/react-router/README.md @@ -2,21 +2,7 @@ # TanStack React Router - - - - TanStack React Router - +![TanStack Router Header](https://raw.githubusercontent.com/TanStack/router/main/media/header_router.png) 🤖 Type-safe router w/ built-in caching & URL state management for React! diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 9a61d5af25..2e63f8d973 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-router", - "version": "1.170.46", + "version": "1.170.17", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js -p tsconfig.legacy.json", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js -p tsconfig.legacy.json", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js -p tsconfig.legacy.json", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js -p tsconfig.legacy.json", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js -p tsconfig.legacy.json", - "test:types:ts60": "tsc6 -p tsconfig.legacy.json", - "test:types:ts70": "tsc -p tsconfig.legacy.json", + "test:types:ts60": "tsc -p tsconfig.legacy.json", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --hideSkippedTests", "test:perf": "vitest bench", @@ -86,40 +86,27 @@ "sideEffects": false, "files": [ "dist", - "src", - "skills", - "!skills/_artifacts" + "src" ], "engines": { "node": ">=20.19" }, "dependencies": { "@tanstack/history": "workspace:*", - "@tanstack/react-store": "^0.11.2", + "@tanstack/react-store": "^0.9.3", "@tanstack/router-core": "workspace:*", - "isbot": "catalog:" + "isbot": "^5.1.22" }, "devDependencies": { - "@testing-library/jest-dom": "catalog:", - "@testing-library/react": "catalog:", - "@tanstack/react-query": "catalog:", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.2.0", "@types/node": ">=20", - "@vitejs/plugin-react": "catalog:", - "combinate": "catalog:", - "react": "catalog:", - "react-dom": "catalog:", + "@vitejs/plugin-react": "^4.3.4", + "combinate": "^1.1.11", + "react": "^19.0.0", + "react-dom": "^19.0.0", "vite": "*", - "zod": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@eslint-react/eslint-plugin": "catalog:", - "eslint-plugin-react-hooks": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "zod": "^4.4.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", diff --git a/packages/react-router/skills/compositions/router-query/SKILL.md b/packages/react-router/skills/compositions/router-query/SKILL.md index 4fdd74fc30..89fba76b54 100644 --- a/packages/react-router/skills/compositions/router-query/SKILL.md +++ b/packages/react-router/skills/compositions/router-query/SKILL.md @@ -1,15 +1,14 @@ --- -name: router-query +name: compositions/router-query description: >- Integrating TanStack Router with TanStack Query: queryClient - in router context, static queries and fire-and-forget queries in loaders, + in router context, ensureQueryData/prefetchQuery in loaders, useSuspenseQuery in components, defaultPreloadStaleTime: 0, setupRouterSsrQueryIntegration for SSR dehydration/hydration and streaming, per-request QueryClient isolation. -metadata: - type: composition - library: tanstack-router - library_version: '1.166.2' +type: composition +library: tanstack-router +library_version: '1.166.2' requires: - router-core - router-core/data-loading @@ -21,7 +20,7 @@ sources: # TanStack Router + TanStack Query Integration -This skill requires familiarity with both TanStack Router and TanStack Query. Read `@tanstack/router-core#router-core` and [react-router](../../react-router/SKILL.md) first. +This skill requires familiarity with both TanStack Router and TanStack Query. Read [router-core](../../../../router-core/skills/router-core/SKILL.md) and [react-router](../../react-router/SKILL.md) first. This skill covers coordinating TanStack Query as an external data cache with TanStack Router's loader system. The router acts as a **coordinator** — it triggers data fetching during navigation, while Query manages caching, background refetching, and data lifecycle. @@ -182,9 +181,9 @@ export function createAppRouter() { } ``` -## Core Pattern: Static `query` in Loader + `useSuspenseQuery` in Component +## Core Pattern: `ensureQueryData` in Loader + `useSuspenseQuery` in Component -This is the recommended pattern. The loader queries data before render (no loading flash), using `staleTime: 'static'` to reuse cached data without a stale refetch. The component subscribes to the cache for updates. +This is the recommended pattern. The loader ensures data is in the cache before render (no loading flash). The component subscribes to the cache for updates. ```tsx // src/routes/posts.tsx @@ -204,12 +203,9 @@ const postsQueryOptions = queryOptions({ export const Route = createFileRoute('/posts')({ loader: ({ context }) => { - // query returns cached data when available and fetches when it is missing - // Keep this query static so a stale refetch does not block navigation - return context.queryClient.query({ - ...postsQueryOptions, - staleTime: 'static', - }) + // ensureQueryData returns cached data if available, fetches if not in cache + // To also refetch stale data, pass revalidateIfStale: true + return context.queryClient.ensureQueryData(postsQueryOptions) }, component: PostsPage, }) @@ -249,10 +245,7 @@ const postQueryOptions = (postId: string) => export const Route = createFileRoute('/posts/$postId')({ loader: ({ context, params }) => { - return context.queryClient.query({ - ...postQueryOptions(params.postId), - staleTime: 'static', - }) + return context.queryClient.ensureQueryData(postQueryOptions(params.postId)) }, component: PostPage, }) @@ -265,23 +258,20 @@ function PostPage() { } ``` -## Streaming Pattern: Fire-and-Forget `query` (Not Awaited) +## Streaming Pattern: `prefetchQuery` (Not Awaited) -For non-critical data, start a query without blocking navigation. Handle its rejection with `noop` so a background failure does not become an unhandled rejection: +For non-critical data, start the fetch without blocking navigation: ```tsx -import { noop, useQuery, useSuspenseQuery } from '@tanstack/react-query' +import { useQuery, useSuspenseQuery } from '@tanstack/react-query' export const Route = createFileRoute('/dashboard')({ loader: ({ context }) => { // Await critical data - const user = context.queryClient.query({ - ...userQueryOptions, - staleTime: 'static', - }) + const user = context.queryClient.ensureQueryData(userQueryOptions) - // Start non-critical query without awaiting — streams during SSR - void context.queryClient.query({ ...analyticsQueryOptions }).catch(noop) + // Start non-critical fetch without awaiting — streams during SSR + context.queryClient.prefetchQuery(analyticsQueryOptions) return user }, @@ -313,10 +303,7 @@ import { useRouter } from '@tanstack/react-router' export const Route = createFileRoute('/posts')({ loader: ({ context }) => - context.queryClient.query({ - ...postsQueryOptions, - staleTime: 'static', - }), + context.queryClient.ensureQueryData(postsQueryOptions), errorComponent: PostsErrorComponent, component: PostsPage, }) @@ -325,7 +312,7 @@ function PostsErrorComponent({ error, reset, }: { - error: unknown + error: Error reset: () => void }) { const router = useRouter() @@ -337,7 +324,7 @@ function PostsErrorComponent({ return (
-

{error instanceof Error ? error.message : String(error)}

+

{error.message}

) @@ -385,29 +372,24 @@ export function createAppRouter() { } ``` -### 3. MEDIUM: Awaiting a fire-and-forget query in a loader blocks rendering +### 3. MEDIUM: Awaiting `prefetchQuery` in loader blocks rendering -A query used for streaming should start in the background and handle errors with `catch(noop)`. Awaiting it blocks the navigation transition until the data resolves, defeating the purpose of streaming. +`prefetchQuery` is designed to fire-and-forget. Awaiting it blocks the navigation transition until the data resolves, defeating the purpose of streaming. ```tsx -import { noop } from '@tanstack/react-query' - // WRONG — blocks navigation, no streaming benefit loader: async ({ context }) => { - await context.queryClient.query({ ...analyticsQueryOptions }).catch(noop) + await context.queryClient.prefetchQuery(analyticsQueryOptions) } -// CORRECT — fire and forget for streaming, with handled rejection +// CORRECT — fire and forget for streaming loader: ({ context }) => { - void context.queryClient.query({ ...analyticsQueryOptions }).catch(noop) + context.queryClient.prefetchQuery(analyticsQueryOptions) } -// If you need to block (critical data), use a static query instead: +// If you need to block (critical data), use ensureQueryData instead: loader: ({ context }) => { - return context.queryClient.query({ - ...criticalQueryOptions, - staleTime: 'static', - }) + return context.queryClient.ensureQueryData(criticalQueryOptions) } ``` @@ -432,10 +414,10 @@ const rootRoute = createRootRouteWithContext<{ queryClient: QueryClient }>()({ TanStack Router has its own SWR cache (`staleTime`, `gcTime`, `defaultPreloadStaleTime`). When using Query as an external cache: - Set `defaultPreloadStaleTime: 0` to prevent Router's cache from short-circuiting Query's freshness logic -- Router's `staleTime`/`gcTime` still apply to the loader return value. For pure Query patterns, return nothing from the loader (just a static `query` for the side effect) and read data exclusively from `useSuspenseQuery` -- `router.invalidate()` re-runs loaders (which call `query` with `staleTime: 'static'`), so the cached Query data remains the freshness authority +- Router's `staleTime`/`gcTime` still apply to the loader return value. For pure Query patterns, return nothing from the loader (just `ensureQueryData` for the side effect) and read data exclusively from `useSuspenseQuery` +- `router.invalidate()` re-runs loaders (which call `ensureQueryData`), but Query decides whether to actually refetch based on its own `staleTime` ## Cross-References -- `@tanstack/router-core#router-core/data-loading` — built-in loader caching fundamentals -- `@tanstack/router-core#router-core/ssr` — SSR setup for dehydration/hydration +- [router-core/data-loading](../../../../router-core/skills/router-core/data-loading/SKILL.md) — built-in loader caching fundamentals +- [router-core/ssr](../../../../router-core/skills/router-core/ssr/SKILL.md) — SSR setup for dehydration/hydration diff --git a/packages/react-router/skills/lifecycle/migrate-from-react-router/SKILL.md b/packages/react-router/skills/lifecycle/migrate-from-react-router/SKILL.md index fdc4f4c4e5..c9f53358e6 100644 --- a/packages/react-router/skills/lifecycle/migrate-from-react-router/SKILL.md +++ b/packages/react-router/skills/lifecycle/migrate-from-react-router/SKILL.md @@ -1,14 +1,13 @@ --- -name: migrate-from-react-router +name: lifecycle/migrate-from-react-router description: >- Step-by-step migration from React Router v7 to TanStack Router: route definition conversion, Link/useNavigate API differences, useSearchParams to validateSearch + useSearch, useParams with from, Outlet replacement, loader conversion, code splitting differences. -metadata: - type: lifecycle - library: tanstack-router - library_version: '1.166.2' +type: lifecycle +library: tanstack-router +library_version: '1.166.2' requires: - router-core - react-router diff --git a/packages/react-router/skills/react-router/SKILL.md b/packages/react-router/skills/react-router/SKILL.md index f8df76df02..074f23e091 100644 --- a/packages/react-router/skills/react-router/SKILL.md +++ b/packages/react-router/skills/react-router/SKILL.md @@ -8,11 +8,10 @@ description: >- Outlet, CatchBoundary, ErrorComponent. React-specific patterns for hooks, providers, SSR hydration, and createLink with forwardRef. -metadata: - type: framework - library: tanstack-router - library_version: '1.166.2' - framework: react +type: framework +library: tanstack-router +library_version: '1.166.2' +framework: react requires: - router-core sources: @@ -23,7 +22,9 @@ sources: # React Router (`@tanstack/react-router`) -This skill builds on router-core. Read `@tanstack/router-core#router-core` first for foundational concepts. +This skill builds on router-core. Read [router-core](../../../router-core/skills/router-core/SKILL.md) first for foundational concepts. + +This skill covers the React-specific bindings, components, hooks, and setup for TanStack Router. > **CRITICAL**: TanStack Router types are FULLY INFERRED. Never cast, never annotate inferred values. > **CRITICAL**: TanStack Router is CLIENT-FIRST. Loaders run on the client by default, not on the server. @@ -346,7 +347,7 @@ import { CatchBoundary } from '@tanstack/react-router' ; 'widget'} onCatch={(error) => console.error(error)} - errorComponent={({ error }) =>
{String(error)}
} + errorComponent={({ error }) =>
Error: {error.message}
} >
@@ -495,4 +496,4 @@ function App() { ## Cross-References -- `@tanstack/router-core#router-core` — all sub-skills for domain-specific patterns (search params, data loading, navigation, auth, SSR, etc.) +- [router-core/SKILL.md](../../../router-core/skills/router-core/SKILL.md) — all sub-skills for domain-specific patterns (search params, data loading, navigation, auth, SSR, etc.) diff --git a/packages/react-router/src/Asset.tsx b/packages/react-router/src/Asset.tsx index 04cbac9064..5e4f159f52 100644 --- a/packages/react-router/src/Asset.tsx +++ b/packages/react-router/src/Asset.tsx @@ -42,11 +42,6 @@ export function Asset( }, ): React.ReactElement | null { const { attrs, children, nonce, preventScriptHoist } = asset - // React 19 compares this object by reference before assigning innerHTML. - const innerHTML = React.useMemo( - () => (children === undefined ? undefined : { __html: children }), - [children], - ) switch (asset.tag) { case 'title': @@ -83,7 +78,11 @@ export function Asset( } return ( - + return case 'script': - return + return ', - 'entry.js': "import './root.css'; import('./component.js')", - 'component.js': - "import './component.module.css'; import './unused.css?inline'", - 'root.css': '@import "./base.css"; .root { color: red; }', - 'base.css': '.base { --base-marker: 1; }', - 'component.module.css': '.component { --component-marker: 1; }', - 'unused.css': '.unused { --unused-marker: 1; }', - }).map(([file, code]) => writeFile(path.join(root, file), code)), - ) - let snapshot: ReturnType | undefined - const completed = Promise.withResolvers() - const server = await createServer({ - root, - configFile: false, - logLevel: 'silent', - experimental: { bundledDev: true }, - build: { rolldownOptions: { experimental: { devMode: { lazy: false } } } }, - optimizeDeps: { noDiscovery: true }, - server: { port: 0 }, - plugins: [ - { - name: 'capture-completed-styles', - generateBundle() { - // Rolldown module ids use forward slashes, also on Windows. - if (!this.getModuleInfo(normalizePath(path.join(root, 'entry.js')))) { - return - } - snapshot = captureBundledDevStyles(this, root) - completed.resolve() - }, - }, - ], - }) - try { - await server.listen() - const address = server.httpServer!.address() - if (!address || typeof address === 'string') { - throw new Error('Expected the dev server to listen on a TCP port') - } - await fetch(`http://localhost:${address.port}/`) - await completed.promise - const css = collectBundledDevStyles(snapshot, [path.join(root, 'entry.js')]) - expect(css).toContain('/* /root.css */') - expect(css).toContain('/* /component.module.css */') - expect(css?.match(/--base-marker/g)).toHaveLength(1) - expect(css).toContain('--component-marker') - expect(css).not.toContain('--unused-marker') - expect(css!.indexOf('/* /root.css */')).toBeLessThan( - css!.indexOf('/* /component.module.css */'), - ) - expect( - collectBundledDevStyles(snapshot, [path.join(root, 'unknown.js')]), - ).toBeUndefined() - } finally { - await server.close() - await rm(root, { recursive: true, force: true }) - } -}, 20_000) diff --git a/packages/start-plugin-core/tests/vite/dev-styles.test.ts b/packages/start-plugin-core/tests/vite/dev-styles.test.ts deleted file mode 100644 index da355b74c2..0000000000 --- a/packages/start-plugin-core/tests/vite/dev-styles.test.ts +++ /dev/null @@ -1,644 +0,0 @@ -import { describe, expect, test } from 'vitest' -import { - collectDevStyles, - fetchCssFromModule, -} from '../../src/vite/dev-server-plugin/dev-styles' -import type { EnvironmentModuleNode } from 'vite' - -function createCssNode(url: string, css: string): EnvironmentModuleNode { - return { - url, - file: `/app${url}`, - importedModules: new Set(), - transformResult: { - code: `const __vite__css = ${JSON.stringify(css)}`, - }, - } as EnvironmentModuleNode -} - -function createEntryNode( - url: string, - depUrl: string | Array, -): EnvironmentModuleNode { - return { - url, - file: `/app${url}`, - importedModules: new Set(), - transformResult: { - deps: Array.isArray(depUrl) ? depUrl : [depUrl], - }, - } as EnvironmentModuleNode -} - -describe('collectDevStyles', () => { - test('recognizes virtual Vue style blocks by URL', async () => { - const styleUrl = '/src/App.vue?vue&type=style&index=0&lang.css' - const entry = createEntryNode('/src/entry.tsx', styleUrl) - const vueStyle = createCssNode(styleUrl, '.vue-style {}') - vueStyle.file = '/app/src/App.vue' - const importedCss = createCssNode('/src/imported.css', '.imported {}') - vueStyle.transformResult!.deps = [importedCss.url] - vueStyle.importedModules.add(importedCss) - const modules = new Map( - [entry, vueStyle, importedCss].map((node) => [node.url, node]), - ) - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(environment, url), - }) - - expect(css).toContain(`/* ${styleUrl} */`) - expect(css).toContain('.vue-style {}') - expect(css).not.toContain('/* /src/imported.css */') - }) - - test('does not traverse dependencies of CSS files', async () => { - const entry = createEntryNode('/src/entry.tsx', '/src/importer.css') - const importerCss = createCssNode( - '/src/importer.css', - '.dep-imported {}\n.module-imported {}\n.importer {}', - ) - const depImportedCss = createCssNode( - '/src/dep-imported.css', - '.dep-imported {}', - ) - const moduleImportedCss = createCssNode( - '/src/module-imported.css', - '.module-imported {}', - ) - importerCss.transformResult!.deps = [depImportedCss.url] - importerCss.importedModules.add(moduleImportedCss) - const modules = new Map( - [entry, importerCss, depImportedCss, moduleImportedCss].map((node) => [ - node.url, - node, - ]), - ) - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(environment, url), - }) - - expect(css).toContain('/* /src/importer.css */') - expect(css).not.toContain('/* /src/dep-imported.css */') - expect(css).not.toContain('/* /src/module-imported.css */') - }) - - test('loads CSS modules from the client environment', async () => { - const serverEntry = createEntryNode( - '/src/entry.tsx', - '/src/route.module.css', - ) - const serverCssModule = createCssNode( - '/src/route.module.css', - '.server-transform {}', - ) - const clientCssModule = createCssNode( - '/src/route.module.css', - '.client-transform {}', - ) - const serverModules = new Map( - [serverEntry, serverCssModule].map((node) => [node.url, node]), - ) - const clientModules = new Map([[clientCssModule.url, clientCssModule]]) - const serverEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return serverModules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - const clientEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return clientModules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(clientEnvironment, url), - }) - - expect(css).toContain('.client-transform {}') - expect(css).not.toContain('.server-transform {}') - }) - - test('traverses code-split modules that are only in importedModules', async () => { - const entry = createEntryNode('/src/entry.tsx', []) - const splitModule = createEntryNode( - '/src/entry.tsx?tsr-split=component', - '/src/code-split.css', - ) - const splitCss = createCssNode('/src/code-split.css', '.code-split {}') - entry.importedModules.add(splitModule) - const modules = new Map( - [entry, splitModule, splitCss].map((node) => [node.url, node]), - ) - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(environment, url), - }) - - expect(css).toContain('/* /src/code-split.css */') - expect(css?.match(/\.code-split \{\}/g)).toHaveLength(1) - }) - - test('preserves entry order when graph lookups finish out of order', async () => { - const rootEntry = createEntryNode('/src/root.tsx', '/src/root.css') - const routeEntry = createEntryNode('/src/route.tsx', '/src/route.css') - const rootCss = createCssNode('/src/root.css', '.root {}') - const routeCss = createCssNode('/src/route.css', '.route {}') - - const modules = new Map( - [rootEntry, routeEntry, rootCss, routeCss].map((node) => [ - node.url, - node, - ]), - ) - const moduleGraph = { - async getModuleByUrl(url: string) { - if (url === rootEntry.url) { - await new Promise((resolve) => setTimeout(resolve, 20)) - } - return modules.get(url) - }, - } - const environment = { - moduleGraph, - async transformRequest() { - return null - }, - } - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/root.tsx', '/app/src/route.tsx'], - loadCssContents: (url) => fetchCssFromModule(environment, url), - }) - - expect(css).toBeDefined() - expect(css!.indexOf('/* /src/root.css */')).toBeLessThan( - css!.indexOf('/* /src/route.css */'), - ) - }) - - test('preserves dependency order while resolving dependencies in parallel', async () => { - const entry = createEntryNode('/src/entry.tsx', [ - '/src/first.css', - '/src/second.css', - ]) - const firstCss = createCssNode('/src/first.css', '.first {}') - const secondCss = createCssNode('/src/second.css', '.second {}') - const modules = new Map( - [entry, firstCss, secondCss].map((node) => [node.url, node]), - ) - - let firstLookupFinished = false - let secondStartedBeforeFirstFinished = false - const moduleGraph = { - async getModuleByUrl(url: string) { - if (url === firstCss.url && !firstLookupFinished) { - await new Promise((resolve) => setTimeout(resolve, 20)) - firstLookupFinished = true - } - if (url === secondCss.url && !firstLookupFinished) { - secondStartedBeforeFirstFinished = true - } - return modules.get(url) - }, - } - const environment = { - moduleGraph, - async transformRequest() { - return null - }, - } - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(environment, url), - }) - - expect(secondStartedBeforeFirstFinished).toBe(true) - expect(css).toContain('/* /src/first.css */') - expect(css).toContain('/* /src/second.css */') - expect(css!.indexOf('/* /src/first.css */')).toBeLessThan( - css!.indexOf('/* /src/second.css */'), - ) - }) - - test('preserves CSS order while loading regular and module CSS in parallel', async () => { - const entry = createEntryNode('/src/entry.tsx', [ - '/src/root.css', - '/src/route.module.css', - ]) - const rootCss = createCssNode('/src/root.css', '') - const routeCss = createCssNode('/src/route.module.css', '') - const modules = new Map( - [entry, rootCss, routeCss].map((node) => [node.url, node]), - ) - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - let rootFinished = false - let routeStartedBeforeRootFinished = false - - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: async (url) => { - if (url === rootCss.url) { - await new Promise((resolve) => setTimeout(resolve, 20)) - rootFinished = true - return '.root {}' - } - if (!rootFinished) { - routeStartedBeforeRootFinished = true - } - return '.route {}' - }, - }) - - expect(routeStartedBeforeRootFinished).toBe(true) - expect(css!.indexOf('/* /src/root.css */')).toBeLessThan( - css!.indexOf('/* /src/route.module.css */'), - ) - }) - - test('handles cycles and coalesces shared dependency lookups', async () => { - const firstEntry = createEntryNode('/src/first.tsx', [ - '/src/first.css', - 'external-package', - '/src/shared.css', - ]) - const secondEntry = createEntryNode('/src/second.tsx', [ - '/src/second.css', - 'external-package', - '/src/shared.css', - ]) - const firstCss = createCssNode('/src/first.css', '.first {}') - const secondCss = createCssNode('/src/second.css', '.second {}') - const sharedCss = createCssNode('/src/shared.css', '.shared {}') - firstEntry.importedModules.add(secondEntry) - secondEntry.importedModules.add(firstEntry) - const modules = new Map( - [firstEntry, secondEntry, firstCss, secondCss, sharedCss].map((node) => [ - node.url, - node, - ]), - ) - const lookupCounts = new Map() - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - lookupCounts.set(url, (lookupCounts.get(url) ?? 0) + 1) - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/first.tsx', '/app/src/second.tsx'], - loadCssContents: async (url) => `.${url.split('/').at(-1)} {}`, - }) - - expect(lookupCounts.get('external-package')).toBe(1) - expect(lookupCounts.get('/src/shared.css')).toBe(1) - expect(css?.match(/\/\* \/src\/shared\.css \*\//g)).toHaveLength(1) - expect(css!.indexOf('/* /src/first.css */')).toBeLessThan( - css!.indexOf('/* /src/shared.css */'), - ) - expect(css!.indexOf('/* /src/shared.css */')).toBeLessThan( - css!.indexOf('/* /src/second.css */'), - ) - }) - - test('refreshes the graph and client CSS after invalidation', async () => { - const entry = createEntryNode('/src/entry.tsx', '/src/old.css') - const oldServerCss = createCssNode('/src/old.css', '') - const newServerCss = createCssNode('/src/new.css', '') - const oldClientCss = createCssNode('/src/old.css', '.old {}') - const newClientCss = createCssNode('/src/new.css', '.new {}') - const newClientTransform = newClientCss.transformResult! - newClientCss.transformResult = null - - const serverModules = new Map( - [entry, oldServerCss, newServerCss].map((node) => [node.url, node]), - ) - const clientModules = new Map( - [oldClientCss, newClientCss].map((node) => [node.url, node]), - ) - const serverEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return serverModules.get(url) - }, - }, - async transformRequest(url: string) { - if (url === entry.url) { - entry.transformResult = { - code: '', - map: null, - deps: [newServerCss.url], - } - } - return entry.transformResult - }, - } - const clientEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return clientModules.get(url) - }, - }, - async transformRequest(url: string) { - if (url === newClientCss.url) { - newClientCss.transformResult = newClientTransform - return newClientTransform - } - return null - }, - } - const options = { - serverEnvironment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url: string) => - fetchCssFromModule(clientEnvironment, url), - } - - const initialCss = await collectDevStyles(options) - entry.transformResult = null - const invalidatedCss = await collectDevStyles(options) - - expect(initialCss).toContain('.old {}') - expect(invalidatedCss).toContain('.new {}') - expect(invalidatedCss).not.toContain('.old {}') - }) - - test('refreshes cached CSS when the same URL is invalidated', async () => { - const entry = createEntryNode('/src/entry.tsx', '/src/route.css') - const serverCss = createCssNode('/src/route.css', '') - const clientCss = createCssNode('/src/route.css', '.old {}') - const serverModules = new Map( - [entry, serverCss].map((node) => [node.url, node]), - ) - const clientModules = new Map([[clientCss.url, clientCss]]) - const newTransform = { - code: `const __vite__css = ${JSON.stringify('.new {}')}`, - map: null, - } - const serverEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return serverModules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - const clientEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return clientModules.get(url) - }, - }, - async transformRequest(url: string) { - if (url === clientCss.url) { - clientCss.transformResult = newTransform - return newTransform - } - return null - }, - } - const options = { - serverEnvironment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url: string) => - fetchCssFromModule(clientEnvironment, url), - } - - const initialCss = await collectDevStyles(options) - clientCss.transformResult = null - const invalidatedCss = await collectDevStyles(options) - - expect(initialCss).toContain('.old {}') - expect(invalidatedCss).toContain('.new {}') - expect(invalidatedCss).not.toContain('.old {}') - }) - - test('snapshots importedModules before awaiting dependency lookups', async () => { - const entry = createEntryNode('/src/entry.tsx', 'slow-dependency') - const initialCss = createCssNode('/src/initial.css', '.initial {}') - const lateCss = createCssNode('/src/late.css', '.late {}') - entry.importedModules.add(initialCss) - const modules = new Map( - [entry, initialCss, lateCss].map((node) => [node.url, node]), - ) - let notifyLookupStarted!: () => void - let finishLookup!: () => void - const lookupStarted = new Promise((resolve) => { - notifyLookupStarted = resolve - }) - const lookupCanFinish = new Promise((resolve) => { - finishLookup = resolve - }) - const environment = { - moduleGraph: { - async getModuleByUrl(url: string) { - if (url === 'slow-dependency') { - notifyLookupStarted() - await lookupCanFinish - } - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - const options = { - serverEnvironment: environment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url: string) => fetchCssFromModule(environment, url), - } - - const inFlightCollection = collectDevStyles(options) - await lookupStarted - entry.importedModules.add(lateCss) - finishLookup() - const inFlightCss = await inFlightCollection - const nextCss = await collectDevStyles(options) - - expect(inFlightCss).toContain('.initial {}') - expect(inFlightCss).not.toContain('.late {}') - expect(nextCss).toContain('.late {}') - }) - - test('keeps other styles when a CSS transform fails', async () => { - const entry = createEntryNode('/src/entry.tsx', [ - '/src/good.css', - '/src/partial.scss', - ]) - const goodServerCss = createCssNode('/src/good.css', '') - const partialServerCss = createCssNode('/src/partial.scss', '') - const goodClientCss = createCssNode('/src/good.css', '.good {}') - const partialClientCss = createCssNode('/src/partial.scss', '') - partialClientCss.transformResult = null - const serverModules = new Map( - [entry, goodServerCss, partialServerCss].map((node) => [node.url, node]), - ) - const clientModules = new Map( - [goodClientCss, partialClientCss].map((node) => [node.url, node]), - ) - const serverEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return serverModules.get(url) - }, - }, - async transformRequest() { - return null - }, - } - const clientEnvironment = { - moduleGraph: { - async getModuleByUrl(url: string) { - return clientModules.get(url) - }, - }, - async transformRequest(url: string) { - if (url === partialClientCss.url) { - throw new Error('Sass partial cannot compile in isolation') - } - return null - }, - } - - const css = await collectDevStyles({ - serverEnvironment, - rootDirectory: '/app', - entries: ['/app/src/entry.tsx'], - loadCssContents: (url) => fetchCssFromModule(clientEnvironment, url), - }) - - expect(css).toContain('.good {}') - expect(css).not.toContain('partial.scss') - }) - - test('does not traverse modules that exist only in the client graph', async () => { - const ssrRoot = createEntryNode('/src/root.tsx', '/src/root.css') - const ssrRootCss = createCssNode('/src/root.css', '') - const ssrModules = new Map( - [ssrRoot, ssrRootCss].map((node) => [node.url, node]), - ) - - const clientRoot = createEntryNode('/src/root.tsx', '/src/root.css') - const clientRootCss = createCssNode('/src/root.css', '.root {}') - const clientOnlyModule = createEntryNode( - '/src/client-only.ts', - '/src/client-only.css', - ) - const clientOnlyCss = createCssNode( - '/src/client-only.css', - '.client-only {}', - ) - clientRoot.importedModules.add(clientOnlyModule) - const clientModules = new Map( - [clientRoot, clientRootCss, clientOnlyModule, clientOnlyCss].map( - (node) => [node.url, node], - ), - ) - - const createEnvironment = ( - modules: Map, - ) => ({ - moduleGraph: { - async getModuleByUrl(url: string) { - return modules.get(url) - }, - }, - async transformRequest() { - return null - }, - }) - const clientEnvironment = createEnvironment(clientModules) - const ssrEnvironment = createEnvironment(ssrModules) - - const css = await collectDevStyles({ - serverEnvironment: ssrEnvironment, - rootDirectory: '/app', - entries: ['/app/src/root.tsx'], - loadCssContents: (url) => fetchCssFromModule(clientEnvironment, url), - }) - - expect(css).toContain('.root {}') - expect(css).not.toContain('.client-only {}') - }) -}) diff --git a/packages/start-plugin-core/tests/vite/module-id.test.ts b/packages/start-plugin-core/tests/vite/module-id.test.ts deleted file mode 100644 index 003926a606..0000000000 --- a/packages/start-plugin-core/tests/vite/module-id.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { describe, expect, test } from 'vitest' -import { - appendIdQueryFlag, - hasIdQueryFlag, - removeIdQueryFlag, -} from '../../src/vite/module-id' - -const flag = 'server-fn-module-lookup' - -describe('hasIdQueryFlag', () => { - test.each([ - ['/src/route.ts', false], - [`/src/route.ts?${flag}`, true], - [`/src/route.ts?mode=dev&${flag}`, true], - [`/src/route.ts?${flag}=enabled`, true], - [`/src/route.ts?mode=${flag}`, false], - [`/src/route.ts?${flag}-suffix`, false], - ])('checks the query parameter name in %s', (id, expected) => { - expect(hasIdQueryFlag(id, flag)).toBe(expected) - }) -}) - -describe('appendIdQueryFlag', () => { - test.each([ - ['/src/route.ts', `/src/route.ts?${flag}`], - ['/src/route.ts?mode=dev', `/src/route.ts?mode=dev&${flag}`], - ['/src/route.ts?', `/src/route.ts?&${flag}`], - ['/src/route.ts?mode=dev&', `/src/route.ts?mode=dev&${flag}`], - ])('appends the flag to %s', (id, expected) => { - expect(appendIdQueryFlag(id, flag)).toBe(expected) - }) -}) - -describe('removeIdQueryFlag', () => { - test.each([ - [`/src/route.ts?${flag}`, '/src/route.ts'], - [`/src/route.ts?mode=dev&${flag}`, '/src/route.ts?mode=dev'], - [`/src/route.ts?${flag}&mode=dev`, `/src/route.ts?${flag}&mode=dev`], - ['/src/route.ts?mode=dev', '/src/route.ts?mode=dev'], - ])('removes only an appended flag from %s', (id, expected) => { - expect(removeIdQueryFlag(id, flag)).toBe(expected) - }) -}) - -describe('module ID query flag round trip', () => { - test.each([ - '/src/route.ts', - '/src/route.ts?', - '/src/route.ts?variant=client', - '\0virtual:factory?variant=client&encoded=a%2Fb', - `/src/route.ts?${flag}`, - ])('preserves the original ID %s', (id) => { - const withFlag = appendIdQueryFlag(id, flag) - expect(removeIdQueryFlag(withFlag, flag)).toBe(id) - }) -}) diff --git a/packages/start-plugin-core/vite.config.ts b/packages/start-plugin-core/vite.config.ts index 0b33045be3..fc76204069 100644 --- a/packages/start-plugin-core/vite.config.ts +++ b/packages/start-plugin-core/vite.config.ts @@ -1,40 +1,13 @@ -import { configDefaults, defineConfig, mergeConfig } from 'vitest/config' +import { defineConfig, mergeConfig } from 'vitest/config' import { tanstackViteConfig } from '@tanstack/vite-config' import packageJson from './package.json' -/** The build output (`dist`) of this package and `@tanstack/react-start`. */ -const builtStartPackages = - /\/packages\/(?:start-plugin-core|react-start)\/dist\// - const config = defineConfig({ test: { name: packageJson.name, dir: './tests', watch: false, - projects: [ - { - // `test:unit` - extends: true, - test: { - name: 'unit', - exclude: [...configDefaults.exclude, 'integration/**'], - typecheck: { enabled: true }, - }, - }, - { - // `test:integration`: real builds and dev servers of Start apps - // (`tests/integration/start-app.ts`), with the built Start packages. - // Node loads them, as it loads an installed package, so the plugin - // and the loaders Rspack loads from the same `dist` share one module - // instance. - extends: true, - test: { - name: 'integration', - include: ['integration/**/*.test.ts'], - server: { deps: { external: [builtStartPackages] } }, - }, - }, - ], + typecheck: { enabled: true }, }, }) @@ -48,7 +21,6 @@ export default mergeConfig( './src/vite/index.ts', './src/rsbuild/index.ts', './src/rsbuild/types.ts', - './src/rsbuild/import-protection-loader.ts', './src/rsbuild/start-compiler-metadata-loader.ts', ], srcDir: './src', diff --git a/packages/start-server-core/AGENTS.md b/packages/start-server-core/AGENTS.md deleted file mode 100644 index af5046c332..0000000000 --- a/packages/start-server-core/AGENTS.md +++ /dev/null @@ -1,6 +0,0 @@ -# Start server runtime - -- Keep request assets out of cached manifests. Assets may mutate in place between head and Scripts rendering; compose their current contents without caching solely by object identity. Asset transforms must preserve the base manifest; request-dependent transforms use `cache: false`. -- Middleware can replace or wrap an SSR response before its body is read. Preserve response ownership with the existing `SsrResponse` helpers: a returned response continues the owned body when it has the same body stream or the owned body is locked (a pipe, tee, or `Response` copy that reads it). Dispose only unread abandoned bodies, and consume/cancel unused clone or tee branches. Rendering completion, serialization completion, and request cleanup are separate lifecycles; read [`../router-core/src/ssr/STREAMING.md`](../router-core/src/ssr/STREAMING.md) before changing them. -- Merge client-sent context with `safeObjectMerge`, placing trusted server middleware context last. Preserve this precedence for JSON, GET, FormData, and direct SSR calls; validate through the `server-functions-global-middleware` e2e suite. -- Changes to `src/frame-protocol.ts` must remain compatible with `../start-client-core/src/client-rpc/frame-decoder.ts`. Keep both packages' framing tests and relevant RawStream e2e coverage. diff --git a/packages/start-server-core/CHANGELOG.md b/packages/start-server-core/CHANGELOG.md index fe54531e58..a07a1b30b7 100644 --- a/packages/start-server-core/CHANGELOG.md +++ b/packages/start-server-core/CHANGELOG.md @@ -1,332 +1,5 @@ # @tanstack/start-server-core -## 1.169.45 - -### Patch Changes - -- [#8670](https://github.com/TanStack/router/pull/8670) [`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c) - Reference agent skills in other packages by their `intent load` identifier (`@tanstack/#`) instead of relative file links that break once packages are installed. - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - - @tanstack/start-client-core@1.170.39 - - @tanstack/start-storage-context@1.167.41 - -## 1.169.44 - -### Patch Changes - -- [#8212](https://github.com/TanStack/router/pull/8212) [`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031) - Render generated script preloads (`modulepreload`, or `preload as="script"` for IIFE output) with `fetchPriority="low"` and forward it into static Early Hints, so they no longer compete with render-blocking stylesheets, fonts and images. - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - - @tanstack/start-client-core@1.170.38 - - @tanstack/start-storage-context@1.167.40 - -## 1.169.43 - -### Patch Changes - -- [#8710](https://github.com/TanStack/router/pull/8710) [`71d9694`](https://github.com/TanStack/router/commit/71d9694da6346fbece2cda4ecde92b0b12a7ee08) - Update `fetchdts` to `^0.2.0`. The typed request and response header helpers keep the same header names and value types. - -## 1.169.42 - -### Patch Changes - -- [#8451](https://github.com/TanStack/router/pull/8451) [`740b0ce`](https://github.com/TanStack/router/commit/740b0ce17737d1f7398740136acdbeabe80df7d8) - Skip request middleware bookkeeping when no request middleware is configured, and stop copying serialization adapters when the router adds none. - - Server route handlers and route middleware now receive the router's decoded pathname, the same one used for route matching. Characters that would change how the path is read, such as `%2F`, `%3F`, and `%23`, stay encoded. - -- [#8441](https://github.com/TanStack/router/pull/8441) [`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82) - Reuse the parsed request location during SSR instead of repeating input rewrites. Match server routes against the app router's parsed pathname while preserving encoded pathnames for server handlers and middleware. - -- Updated dependencies [[`740b0ce`](https://github.com/TanStack/router/commit/740b0ce17737d1f7398740136acdbeabe80df7d8), [`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/start-storage-context@1.167.39 - - @tanstack/router-core@1.171.37 - - @tanstack/start-client-core@1.170.37 - -## 1.169.41 - -### Patch Changes - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Return 400 Bad Request for malformed percent-encoded request pathnames before running server entry callbacks. Preserve valid encoded paths and query handling. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Reduce request middleware overhead, reuse loaded entries and transport header requirements, and avoid unnecessary URL normalization for server functions. Preserve response helper writes made during body cancellation and SSR cleanup. - - Avoid allocating absent middleware headers and reply context, and construct RPC redirects with their final response state. Preserve middleware accessor evaluation and the documented undefined value for absent `sendContext`. - - Reduce synchronous server-function response overhead while preserving cancellation cleanup and middleware response mutations. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Keep streaming a page when request middleware returns a response that reads the page body, such as a copy made through a wrapped global `Response`, a copy in Bun, or a body piped through a transform. Start now disposes a replaced page stream only when nothing reads it. `transferResponseBodyOwnership` is removed: return the derived response directly. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Let request middleware read the body of a `HEAD` response, and strip it when the response leaves the pipeline. Start no longer applies `Content-Encoding`, `Content-Length`, or other framing headers set through response helpers to error bodies and serialized server-function replies that it builds itself. A response that middleware assigns to `result.response` is now disposed when the middleware returns another response. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Remove the built-in `useSession` API. Applications choose a session library, such as iron-session, and save or destroy sessions explicitly before returning or redirecting. Connect a cookie adapter through `getCookie` and `setCookie`, or append serialized cookies with `appendResponseHeader('set-cookie', cookie)`. Existing session cookies require a deliberate migration or signing in again with a new cookie name. - - `createServerEntry` keeps the complete callback, including custom error handling, inside the request context and converts errors that escape it. The built-in entry still converts errors automatically. Raw `createStartHandler` handlers now rethrow the original error. For custom reporting, catch inside `createServerEntry`, then rethrow for default conversion or return `handleStartError(error)` to preserve response-helper status, headers, and cookies. Return an explicit `Response` when choosing a custom error payload. - - Response helpers now apply consistently across server routes, SSR, server functions, redirects, errors, and middleware response replacements. Helper setters override returned values; cookie helpers preserve independent cookies and replace matching cookie identities. Use `appendResponseHeader('set-cookie', cookie)` when adding a serialized cookie without replacing other cookies. Changed responses receive copied headers and reuse the body stream, so applications should inspect the response returned by Start rather than relying on mutation of the original response. - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`550f478`](https://github.com/TanStack/router/commit/550f47881070c0558a87e1acce7f38fbc85b9549), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - - @tanstack/start-storage-context@1.167.38 - - @tanstack/start-client-core@1.170.36 - -## 1.169.40 - -### Patch Changes - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/history@1.162.5 - - @tanstack/router-core@1.171.35 - - @tanstack/start-client-core@1.170.35 - - @tanstack/start-storage-context@1.167.37 - -## 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 - -- [#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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - - @tanstack/start-client-core@1.170.32 - - @tanstack/start-storage-context@1.167.34 - -## 1.169.36 - -### Patch Changes - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - - @tanstack/start-client-core@1.170.31 - - @tanstack/start-storage-context@1.167.33 - -## 1.169.35 - -### Patch Changes - -- [#8354](https://github.com/TanStack/router/pull/8354) [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244) - Use lightweight request history for SSR and make server navigation a no-op. Use redirect() to issue HTTP redirects. Server hrefs use the same normalization as browser history to handle protocol-relative URLs and control characters. - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`8fff7fa`](https://github.com/TanStack/router/commit/8fff7fa1f2e6f061916b0bf5e0ec486b2e732f94), [`f021f6d`](https://github.com/TanStack/router/commit/f021f6d1c6dce6c9b54d70766f1d636d8fd9e184), [`ae68535`](https://github.com/TanStack/router/commit/ae68535929043607d4ee9438f8ae401f3a064862), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/history@1.162.4 - - @tanstack/start-client-core@1.170.30 - - @tanstack/start-storage-context@1.167.32 - -## 1.169.34 - -### Patch Changes - -- [#8340](https://github.com/TanStack/router/pull/8340) [`d914b08`](https://github.com/TanStack/router/commit/d914b085bb4bf29ec18a531201e377c10681b661) - Fix `setResponseHeaders` to iterate `Headers` entries, replace existing values, and preserve separate `Set-Cookie` values. - -## 1.169.33 - -### Patch Changes - -- [#8308](https://github.com/TanStack/router/pull/8308) [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8) - Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies. - - Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized. - - Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once. - - Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation. - - Share normalized pathname comparisons in Solid and Vue links to reduce bundle size. - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - - @tanstack/history@1.162.3 - - @tanstack/start-client-core@1.170.29 - - @tanstack/start-storage-context@1.167.31 - -## 1.169.32 - -### Patch Changes - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`9035abc`](https://github.com/TanStack/router/commit/9035abc41163d83409ef582f7743a3c7be57dd93), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - - @tanstack/history@1.162.2 - - @tanstack/start-client-core@1.170.28 - - @tanstack/start-storage-context@1.167.30 - -## 1.169.31 - -### Patch Changes - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - - @tanstack/start-client-core@1.170.27 - - @tanstack/start-storage-context@1.167.29 - -## 1.169.30 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - - @tanstack/start-client-core@1.170.26 - - @tanstack/start-storage-context@1.167.28 - -## 1.169.29 - -### Patch Changes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - - @tanstack/start-client-core@1.170.25 - - @tanstack/start-storage-context@1.167.27 - -## 1.169.28 - -### Patch Changes - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - - @tanstack/start-client-core@1.170.24 - - @tanstack/start-storage-context@1.167.26 - -## 1.169.27 - -### Patch Changes - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90)]: - - @tanstack/router-core@1.171.23 - - @tanstack/start-client-core@1.170.23 - - @tanstack/start-storage-context@1.167.25 - -## 1.169.26 - -### Patch Changes - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13)]: - - @tanstack/router-core@1.171.22 - - @tanstack/start-client-core@1.170.22 - - @tanstack/start-storage-context@1.167.24 - -## 1.169.25 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - - @tanstack/start-client-core@1.170.21 - - @tanstack/start-storage-context@1.167.23 - -## 1.169.24 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`c59788c`](https://github.com/TanStack/router/commit/c59788ca20f2d2e7f264a859ebe01b7646ba3154), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - - @tanstack/start-client-core@1.170.20 - - @tanstack/start-storage-context@1.167.22 - -## 1.169.23 - -### Patch Changes - -- Updated dependencies [[`2fbc99f`](https://github.com/TanStack/router/commit/2fbc99f2c262b057cb957e6ebba1ee073c655186), [`6bede65`](https://github.com/TanStack/router/commit/6bede65d7074dcd83455151b66b4574268bc782c)]: - - @tanstack/start-client-core@1.170.19 - -## 1.169.22 - -### Patch Changes - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - - @tanstack/start-client-core@1.170.18 - - @tanstack/start-storage-context@1.167.21 - -## 1.169.21 - -### Patch Changes - -- [#7967](https://github.com/TanStack/router/pull/7967) [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c) - Preserve path params in their raw string form while matching routes so structured values returned by `params.parse` produce stable match IDs and do not reuse stale loader data. - - `RouterCore.getMatchedRoutes()` now returns `[matchedRoutes, rawParams, foundRoute]` instead of an object. - -- Updated dependencies [[`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/router-core@1.171.18 - - @tanstack/start-client-core@1.170.17 - - @tanstack/history@1.162.1 - - @tanstack/start-storage-context@1.167.20 - -## 1.169.20 - -### Patch Changes - -- [#7962](https://github.com/TanStack/router/pull/7962) [`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5) - Update Seroval dependencies to version 1.6.2. - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - - @tanstack/start-client-core@1.170.16 - - @tanstack/start-storage-context@1.167.19 - -## 1.169.19 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - - @tanstack/start-client-core@1.170.15 - - @tanstack/start-storage-context@1.167.18 - -## 1.169.18 - -### Patch Changes - -- [#7944](https://github.com/TanStack/router/pull/7944) [`65f7b7f`](https://github.com/TanStack/router/commit/65f7b7f791272f2ea581a1fe0fcd43183bc01162) - Use focused server entrypoints for shared constants and handler helpers so build tooling and framework renderers do not traverse the full Start server barrel. - -## 1.169.17 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - - @tanstack/start-client-core@1.170.14 - - @tanstack/start-storage-context@1.167.17 - ## 1.169.16 ### Patch Changes diff --git a/packages/start-server-core/INTERNALS.md b/packages/start-server-core/INTERNALS.md deleted file mode 100644 index b2ac36ce80..0000000000 --- a/packages/start-server-core/INTERNALS.md +++ /dev/null @@ -1,77 +0,0 @@ -# Start server response ownership - -This document describes how Start tracks response bodies while server middleware runs. - -## Two ownership layers - -Response body ownership tells Start which body belongs to the current middleware result. - -Router SSR ownership tells Router when it can release request data, serialization state, readers, timers, and renderer work. - -An internal `SsrResponse` value carries Router SSR cleanup data beside a `Response`. Start stores that data while middleware sees the ordinary `Response`. - -Each request must use a separate router instance. Sharing one router between requests is unsupported. - -## Middleware transfers - -Start keeps one ownership record for the current response body. A response without a body does not need an ownership record. - -Ownership moves to the response that middleware returns in these cases: - -- Middleware returns the same `Response` object. -- Middleware returns another `Response` with the same body object. -- Middleware returns another `Response` with a body while the current body is locked. - -Web Streams do not expose the source of a different body. A lock is the only public sign that code reads the current body. A pipe or `tee()` locks it, and so does a `Response` constructor that copies a body by reading it, as in Bun or with a wrapped global `Response`. - -A lock does not prove stream ancestry: a reader can also stop early. Start cannot tell that reader from a pipe, so it never disposes a locked body when middleware replaces it. Such a stream ends with the request's abort or the SSR stream's lifetime limit. - -Only the same body object keeps the transport headers that Start protects for serialized server-function replies. A different body can carry different bytes. - -When Start rebuilds the current response to apply response helpers or restore protocol headers, the rebuilt response takes over the ownership record directly. Start does not compare bodies for its own rebuilds. - -## Replacement and disposal - -A response with an unrelated body replaces the current ownership record when nothing reads the current body. Start disposes the old record before it stores the replacement. - -For a Router SSR response, disposal releases Router SSR state and cancels the original SSR body. - -If ownership moved to a different body, disposal also cancels that final body. This cancellation propagates through a pipe. - -For a plain response, disposal cancels the current body. - -Body cancellation is best effort. Start does not await it, and a cancellation failure does not block Router cleanup. - -Cleanup paths can request disposal more than once. Router SSR cleanup and native stream cancellation have idempotent effects. - -Every internal `SsrResponse` disposer must also have idempotent effects. - -A result that settles after request cancellation is no longer usable. Start disposes that late result when it arrives. - -## Locks, clones, and branches - -Start checks the lock of the body that the current `Response` exposes when middleware returns a different response. - -Start cannot cancel a locked body through `body.cancel()`. The code that acquired the reader owns that reader and must cancel or release it. - -`Response.clone()` creates two body branches. It can also change the body object exposed by the original `Response`. Middleware should return the original response and read the clone. When middleware returns the clone, Start sees the original branch and continues the stream only while that branch is being read. - -Start reads the current response body during disposal. It keeps only the original SSR body for Router cleanup. - -Middleware owns every clone or `tee()` branch that it does not return. Middleware must consume or cancel each unused branch. - -## Final handoff - -Redirect conversion and `HEAD` handling dispose any body that they replace or remove. - -Before returning a Router SSR stream, Start checks request cancellation. Start disposes the stream immediately if the request is already aborted. - -Start binds later request cancellation to the disposer. While Router SSR state is live, SSR cleanup removes that listener. Otherwise the one-time listener ends with the request signal. - -The Router stream transform releases Router SSR state after natural completion, stream errors, or consumer cancellation. - -After handoff, the HTTP runtime owns consumption or cancellation of the returned body. - -If Start does not hand off Router SSR ownership, the request cleanup block releases any remaining Router SSR state. - -An abort can race with final handoff. Cleanup is idempotent. Either path can safely request cleanup. diff --git a/packages/start-server-core/docs/RECONCILIATION.md b/packages/start-server-core/docs/RECONCILIATION.md deleted file mode 100644 index 3f3b49f88e..0000000000 --- a/packages/start-server-core/docs/RECONCILIATION.md +++ /dev/null @@ -1,200 +0,0 @@ -# Response Reconciliation - -This package owns request and response state for the TanStack Start server runtime. Applications choose their session library and connect it to Start's request and response cookie helpers. - -## Request State - -Every Start request runs inside a shared `AsyncLocalStorage` event. The event contains: - -- `request`: the original platform `Request` -- `requestUrl`: the parsed request URL, memoized so the framework parses each request URL only once -- `responseState`: lazily created mutable Start response state (`undefined` until the first helper write) -- `currentResponse`: the most recently reconciled response -- `responseHeaderAppends`: lazily created request-owned records of already-applied header appends - -The ALS instance is stored on a global symbol so separately bundled copies of this module share one request context. Helper state and append records belong to that invocation. Protocol protection describes the response body: its immutable snapshot is attached to Start-created responses through a non-enumerable global symbol. This protection follows the response through delegated requests, including cloned requests and separately bundled runtime copies. - -`createServerEntry` owns the scope around the complete entry callback, including custom error handling. Delegating through another wrapped entry or Start handler with the same `Request` object reuses that scope. A different `Request` object gets its own scope. - -Native helpers read directly from this event: - -- `getRequest` -- `getRequestHeaders` -- `getRequestHeader` -- `getRequestHost` -- `getRequestProtocol` -- `getRequestUrl` -- `getRequestIP` -- `getCookies` -- `getCookie` - -These helpers do not construct or read from an h3 event. - -## Response State - -Start response helpers mutate event-owned state, not `h3` state: - -- `setResponseStatus` -- `setResponseHeader` -- `setResponseHeaders` -- `appendResponseHeader` -- `removeResponseHeader` -- `clearResponseHeaders` -- `setCookie` -- `deleteCookie` - -Response state is created lazily on the first helper write. Requests that never call a response helper skip response-state allocation. Reconciliation still enforces bodyless response rules, and Start restores protocol headers when a server-function reply leaves the request middleware pipeline. - -`getResponseHeader` and `getResponseHeaders` read the current returned response plus helper overlay. Helper writes are visible immediately, even before a final `Response` exists. `getResponseHeaders()` returns a detached snapshot with a read-only TypeScript interface. Its `forEach` callback also receives that read-only interface. Casting the snapshot to `Headers` and mutating it does not change outgoing response state; outside production, `set`, `append`, and `delete` on the snapshot log a warning that lists the helpers to use instead. Use `setResponseHeader`, `setResponseHeaders`, `appendResponseHeader`, `removeResponseHeader`, or `clearResponseHeaders` for writes. Use `getSetCookie()` on the snapshot when all individual cookie values are needed. - -Internal code can use `getSerializedResponseState` to read the helper status and status text that apply to a serialized server-function reply. This is not public API and it is read-only; all writes go through the status/header/cookie helpers above. - -## Reconciliation Model - -Route handlers, middleware, SSR handlers, and server functions can all return `Response` objects. Start reconciles those responses with helper mutations before they cross each user middleware boundary. The request-scope wrapper only establishes or reuses the scope; it does not repeat reconciliation after the pipeline completes. Responses created outside the pipeline, including resolved redirects and server-function errors, are finalized at those creation points. - -When middleware replaces a body, or response status rules drop it, Start disposes the body before reading the helper state and recording applied appends. Synchronous cancellation and SSR cleanup callbacks can therefore contribute headers to the outgoing response. Eager router cleanup also finishes before final response publication. - -Reconciliation rules: - -- Helper state overlays returned `Response` state. -- Status and status text from `setResponseStatus` win over returned response status. -- Header replacement helpers win over returned response headers; append helpers retain the existing values. -- `removeResponseHeader` and `clearResponseHeaders` can remove headers from a returned response. -- Helper deltas survive when a later middleware replaces the response. -- Direct mutations to an old `response.headers` object do not survive response replacement. -- Direct mutations to the current response are visible while that response remains current. -- Reconciliation returns the original `Response` instance when its effective headers, status, status text, and body shape are unchanged. It still records which helper appends have been applied. -- If headers, status, or body shape change, reconciliation creates a new `Response` with copied headers and the same body stream, unless the body must be dropped. - -Reconciliation does not mutate a response supplied by application code, including a response reused across requests. It does not call `Response.clone()` or tee the body. The replacement becomes the body owner; application code must not also consume the original response's body. - -Router redirect responses keep their navigation options until Start resolves their destination and, for server-function RPC calls, creates the JSON redirect envelope. Generic response materialization runs after this step. While a redirect is pending, response getter helpers see the helper overlay, but direct reads of `result.response.headers` or `result.response.status` still see the unresolved redirect's own values. - -## Header Tracking - -Helper intent is recorded directly by the helper write functions: - -- `setResponseHeader`/`setResponseHeaders` record a helper write. -- `appendResponseHeader` records a helper write without replacing values. -- `removeResponseHeader` records a helper removal. -- `clearResponseHeaders()` records a full clear. - -This metadata matters because a plain `Headers` object cannot distinguish between "not set" and "explicitly removed". All response-state mutations flow through these module-level functions; the state object never escapes for direct mutation. - -For example, appending `Origin` to a response containing `Vary: Accept-Encoding` produces `Vary: Accept-Encoding, Origin`. Repeated reconciliation of that response does not repeat the append. A later append is applied once, and helper appends also apply when middleware replaces the response with a fresh response. - -An application-created response is a new explicit base. If middleware copies headers that already contain an applied helper append into a new response, that copied value is part of the new base and the helper append can appear again. Reuse the current response when it already contains the desired headers; returning a new response does not transfer Start's private append metadata. - -## Cookies - -Cookies use native `cookie-es` parsing and serialization. - -`setCookie` appends `Set-Cookie` values and dedupes by cookie identity: - -- name -- domain -- path - -If domain is absent, identity uses an empty domain. `setCookie` defaults to `Path=/`, but returned `Set-Cookie` headers without `Path` keep an empty path identity so they do not dedupe against explicit-path cookies. - -A `Set-Cookie` value that `cookie-es` cannot parse, for example one whose name is an `Object.prototype` key such as `constructor` or whose name and value exceed 4096 characters, is identified by its exact string. Only identical strings dedupe. - -Cookie behavior has two modes: - -- `setCookie`/`deleteCookie`/`appendResponseHeader('set-cookie', ...)`: merge with existing returned response cookies. -- `setResponseHeader('set-cookie', ...)`: replace returned response cookies. - -This preserves multiple `Set-Cookie` headers and lets explicit header APIs replace cookie state when requested. - -`appendResponseHeader('set-cookie', ...)` takes fully serialized cookie strings and merges them through the same identity dedupe as `setCookie`. It is the generic primitive for bridging external session/auth libraries that produce raw `Set-Cookie` strings. - -## Protected Transport Headers - -Server function protocol responses protect required header values and required absence: - -- Serialized JSON and framed results require their content type and `x-tss-serialized: true`, with `x-tss-raw` absent. -- Plain redirect and not-found JSON require JSON content type, with both incompatible transport markers absent. -- Explicit raw responses require `x-tss-raw: true`; their application content type is not protected. -- A non-redirect `Response` that a server function or its function middleware throws requires `x-tss-raw: thrown`, and the client rejects the call with it. Its application content type is not protected either. `fetch` follows a raw or thrown `Response` with a redirect status and `Location` before the client sees it, so navigation uses `redirect()`. - -Every serialized reply (JSON and framed results, errors, not-found envelopes, and RPC redirect envelopes) also requires `Location` to be absent, whether it comes from a helper, from error metadata, or from `notFound({ headers })`. The client decodes these replies from their body. Error replies always use an error status, but a helper can still select a 3xx status for other serialized replies, and an HTTP `Location` would then make fetch follow the redirect before the client decodes the reply. For redirect envelopes, the client reads the destination from the JSON `href`. Native form and document redirects still use `Location`. Helper status and status text control HTTP metadata, while the redirect's own `statusCode` remains in its Router navigation options. - -Other helper headers and cookies still reconcile onto server function responses. Replacing, removing, or clearing headers through the helpers cannot change protected protocol requirements. - -Middleware can also change protocol headers directly on `result.response`, including from a callback attached to the `next()` promise it returns. Start restores the protocol headers once, when the reply leaves the request middleware pipeline, so the client always receives them. Until then, outer middleware reading `result.response.headers` sees such a direct change, while `getResponseHeader` and `getResponseHeaders` always report the protocol values. Without request middleware, only Start has handled the reply, so nothing is checked. Start does not check at every middleware boundary because `Headers.get` validates each header name on every call, which made the check a measurable share of each server-function request. - -## Null Body Responses - -Reconciliation drops bodies for response shapes that cannot carry one: - -- `HEAD` requests -- status `204` -- status `205` -- status `304` - -Request middleware still sees the body of a `HEAD` response, so middleware that reads it to compute an `ETag` or `Content-Length` produces the same headers as for `GET`. Start strips a `HEAD` body once, when the response leaves the request middleware pipeline. - -`setResponseStatus` ignores codes that are not integers from `200` to `599`, such as informational `101`, `0`, or `NaN`, because Fetch responses cannot carry them. The call changes neither status nor status text: an earlier helper status, or otherwise the returned or error status, stays in effect, and Start logs a warning outside production. Call `setResponseStatus(undefined, text)` to set only the status text. - -Server-function replies that Start serializes are the exception. Their protected content type describes a body that the client must decode, so reconciliation never applies a helper-selected `204`, `205`, or `304` to them, together with that call's status text. Serialized errors ignore these statuses from error metadata too. Outside production, Start logs a warning, once per request, when it ignores such a status for a serialized reply. Serialized replies are recognized by the protocol requirements Start attaches to the `Response` it creates. Only a wrapper around the same body stream keeps those requirements. A clone, or a response rebuilt around a new body, is an ordinary response, so a bodyless helper status drops its body and its `Location` is not removed. A raw `Response` returned by a server function is not serialized and still follows the rules above. - -If a middleware sets one of these statuses after a streamed SSR response is produced, the middleware executor treats that as response replacement and disposes the original SSR stream owner. - -## Stream Ownership - -SSR streaming responses carry cleanup ownership metadata. Middleware reconciliation preserves or disposes that ownership based on the final body: - -- Same response: ownership is preserved. -- Wrapper response with the same body: ownership moves to the wrapper, and the wrapper keeps the protected transport headers of the body it wraps. Start recognizes such a wrapper by the identity of its body stream. A wrapper around a reply without a body has no stream to compare and is an ordinary replacement response without protocol protection. -- Response with a different body while the original body is being read: ownership moves to the new response, without protected transport headers. A pipe, `tee()`, or a `Response` constructor that copies a body by reading it locks the original body. This includes Bun, which gives a same-body wrapper a new stream object, and libraries that wrap the global `Response`. Start cannot tell such a reader from one that stops early, so a stream whose reader stops early ends with the request's abort or the SSR stream's lifetime limit. -- Different response while nothing reads the original body, or dropped body: original stream owner is disposed. -- Middleware error after `next()`: original stream owner is disposed. -- Response assigned to `result.response` and then replaced by a returned response: Start takes over the assigned response before the returned one, so a replacement disposes the assigned body, such as a transform piped from the original. -- Late result from an abandoned `next()`: a middleware can return its own response while its `next()` is still running, for example a timeout built with `Promise.race`. From then on, the result of that `next()` is abandoned, even while outer middleware is still running. It never replaces or cancels the response the middleware returned, and its body is disposed. Helper writes made by the abandoned work still apply, because helper state belongs to the request. - -This prevents cleanup leaks while still allowing middleware to wrap streamed responses without prematurely disposing the stream. - -A same-body wrapper does not copy helper append records: an application wrapper's headers remain a fresh base for helper writes. - -## Error Handling - -`createStartHandler` rethrows the original uncaught value, including primitive values. No error object is used as a key for recovering request state. Concurrent requests can throw the same error or reusable bodyless response without sharing helper state. A response body stream still has a single consumer. - -Built-in server entries use `createServerEntry` to keep the complete entry callback inside its request scope. The wrapper catches an uncaught value in that scope and calls `handleStartError`. A custom catch inside the wrapper can log and rethrow the error, return a custom response, or call `handleStartError(error)` to preserve Start's helper state. - -Server function RPC errors are converted before the top-level server-entry boundary so serialized protocol headers and bodies are preserved. Their body is the same `{ error }` envelope that a failed server-function call sends, so the client rethrows whatever value was thrown, including strings, plain objects, and `undefined`. A value that cannot be serialized is replaced by the serialization error, as for a result that cannot be serialized. A `Response` that request middleware throws during a server-function request is sent with `x-tss-raw: thrown`, and the client rejects the call with it. Throwing the reply that `next()` returned, or a wrapper around its body, re-sends that reply unchanged, because the body keeps the protocol that decodes it. - -Errors thrown inside a server-function handler or its function middleware do not reach these builders: the function returns them in its serialized result, which uses the helper status or `200` like any other result. A thrown non-redirect `Response` is sent raw instead, with its own status unless a helper selected one. Both error builders resolve status the same way. An error response only uses an error status (`400`-`599`). A status set with `setResponseStatus` before the error applies only when it is an error status. A success, redirect, or bodyless status such as `200`, `201`, `302`, or `204` describes the response that the failure replaced, so Start discards it together with its status text and uses the error's own status or `500`. Error metadata such as `error.status` or `error.statusCode` likewise applies only when it is `400` or higher. Start logs the error to the server console unless the error's own metadata marks it as an HTTP error with a status of `400` or higher, even when a helper selected the status. Because a discarded helper status no longer applies, later reconciliation and `getResponseStatus()` report the error status. - -Both error builders adopt HTTP-style metadata from the thrown value, or from `error.cause` when the error has no `headers`. Start builds a new JSON body for an error, so it never copies the framing and connection headers `Content-Length`, `Content-Encoding`, `Transfer-Encoding`, `Trailer`, `Connection`, `Keep-Alive`, `Proxy-Connection`, and `TE` from error metadata. It does not apply them from response helpers either, for example when a handler set the encoding and length of a file before reading it failed. The same holds for every serialized server-function reply, whose body Start also builds. When `error.cause` is a `Response`, such as a failed upstream `fetch` from any fetch implementation, Start uses its status and status text but none of its headers, because they were written for that upstream reply. - -`handleStartError` behavior: - -- Inside an active request scope, it uses that invocation's event for object, response, and primitive throws. -- If the error is a `Response`, it returns that response when no Start event exists. -- Otherwise it returns a generic JSON error response. - -Calling `handleStartError` after a raw handler has escaped its request scope cannot recover that request's state. Wrap the complete entry callback with `createServerEntry` instead. When rewriting or cloning a request, invoke a wrapped entry for that new `Request`, so errors are converted within its child scope. Calling a raw handler with the new request and catching only in the original request's scope cannot recover the child's helper writes. - -A response returned by a custom entry catch is used as-is. It does not automatically inherit helper state; call `handleStartError` when that inheritance is intended. Delegation through wrapped entries with the same request shares helper state, but each wrapped entry still converts uncaught errors. Invoke a raw `createStartHandler` function when an outer custom catch needs the original thrown value. - -## External sessions - -Start has no built-in session API, session cache, encryption engine, or direct h3 dependency. Session policy and persistence belong to the application's chosen library. - -Three integration boundaries are supported: - -- Libraries that read `Cookie` and emit serialized `Set-Cookie`: use `getRequestHeader('cookie')` and `appendResponseHeader('set-cookie', serializedCookie)`. -- Libraries with a cookie adapter, such as iron-session 9: supply `{ read: getCookie, write: setCookie }`. Load inside the request, then await `session.save()` before returning or redirecting. -- Libraries with a Fetch handler: return the library's `fetch(request)` response from a Start server route. Its response cookies participate in normal reconciliation. - -Use `appendResponseHeader` once for each serialized cookie. Preserve separate `Set-Cookie` values with `headers.getSetCookie()` when adapting a headers collection; commas in `Expires` are not cookie separators. `setResponseHeader('set-cookie', ...)` intentionally replaces the cookie collection and is inappropriate for adding an independent session cookie. - -Start does not auto-save session mutations, consume flash values, renew tokens, share multiple independently loaded session objects, or revoke server-side records. Read a session once per request and share that object through request middleware context when needed. Commit changes explicitly before a response is sent. Parallel requests still need the selected store's concurrency policy; request context does not serialize them. - -Removing the old APIs does not migrate existing sealed h3 cookies. Choose a fresh cookie name and require sign-in again, or implement and test an application-specific transition with the old library before removing it. See the authentication guide and the external-session fixture for concrete integrations. - -## Malformed URLs - -The request boundary validates `request.url` before creating its scope. A URL construction `TypeError` becomes `400 Bad Request`. Other errors are rethrown. diff --git a/packages/start-server-core/package.json b/packages/start-server-core/package.json index 020747da69..9b1a02d9b8 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.45", + "version": "1.169.16", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,28 +27,17 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit", "test:unit": "vitest", - "test:perf": "NODE_ENV=production vitest bench --config vitest.bench.config.ts", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, - "nx": { - "targets": { - "test:perf": { - "dependsOn": [ - "^build" - ], - "cache": false - } - } - }, "type": "module", "types": "dist/esm/index.d.ts", "exports": { @@ -76,18 +65,6 @@ "default": "./dist/esm/request-response.js" } }, - "./constants": { - "import": { - "types": "./dist/esm/constants.d.ts", - "default": "./dist/esm/constants.js" - } - }, - "./virtual-modules": { - "import": { - "types": "./dist/esm/virtual-modules.d.ts", - "default": "./dist/esm/virtual-modules.js" - } - }, "./package.json": "./package.json" }, "imports": { @@ -96,6 +73,9 @@ }, "#tanstack-start-plugin-adapters": { "default": "./dist/esm/empty-plugin-adapters.js" + }, + "#tanstack-start-server-fn-dispatch": { + "default": "./dist/esm/default-server-fn-dispatch.js" } }, "sideEffects": false, @@ -114,20 +94,14 @@ "@tanstack/router-core": "workspace:*", "@tanstack/start-client-core": "workspace:*", "@tanstack/start-storage-context": "workspace:*", - "cookie-es": "^3.0.0", - "fetchdts": "^0.2.0", - "seroval": "^1.6.7" + "fetchdts": "^0.1.6", + "h3-v2": "npm:h3@2.0.1-rc.20", + "seroval": "^1.5.4" }, "devDependencies": { "@standard-schema/spec": "^1.0.0", + "cookie-es": "^3.0.0", "vite": "*", - "@types/node": ">=20", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:", - "iron-session": "9.0.1" + "@types/node": ">=20" } } diff --git a/packages/start-server-core/skills/_artifacts/domain_map.yaml b/packages/start-server-core/skills/_artifacts/domain_map.yaml index 7dc4d303ac..1a6351bdea 100644 --- a/packages/start-server-core/skills/_artifacts/domain_map.yaml +++ b/packages/start-server-core/skills/_artifacts/domain_map.yaml @@ -1,12 +1,12 @@ # domain_map.yaml # Library: @tanstack/start-server-core -# Version: 1.169.17 +# Version: 1.166.2 # Date: 2026-03-08 # Status: reviewed library: name: '@tanstack/start-server-core' - version: '1.169.17' + version: '1.166.2' repository: 'https://github.com/TanStack/router' description: >- Server-side runtime for TanStack Start: createStartHandler, @@ -62,20 +62,4 @@ skills: priority: MEDIUM status: active - - mistake: 'Capturing request or environment state at module scope' - mechanism: >- - Request context and edge runtime environment values are per-request. - Module-level capture can read undefined values or leak state between - concurrent requests. - priority: CRITICAL - status: active - - - mistake: 'Treating cookie session data as authoritative persistence' - mechanism: >- - Cookie sessions should contain a small stable identifier. Current - permissions and revocable state belong in an authoritative server - store and must be loaded for each protected request. - priority: HIGH - status: active - gaps: [] diff --git a/packages/start-server-core/skills/_artifacts/skill_spec.md b/packages/start-server-core/skills/_artifacts/skill_spec.md index 402eb2c118..19270dc59a 100644 --- a/packages/start-server-core/skills/_artifacts/skill_spec.md +++ b/packages/start-server-core/skills/_artifacts/skill_spec.md @@ -12,15 +12,13 @@ Server-side runtime for TanStack Start: createStartHandler, request/response uti | Skill | Type | Domain | What it covers | Failure modes | | ----------------- | ---- | -------------- | ---------------------------------------------------------------- | ------------- | -| start-server-core | core | server-runtime | createStartHandler, cookies, sessions, three-phase handling, ALS | 4 | +| start-server-core | core | server-runtime | createStartHandler, cookies, sessions, three-phase handling, ALS | 2 | ## Failure Mode Inventory -### start-server-core (4 failure modes) +### start-server-core (2 failure modes) -| # | Mistake | Priority | Source | -| --- | --------------------------------------------------------- | -------- | ---------------------- | -| 1 | Missing AsyncLocalStorage setup | HIGH | source/docs | -| 2 | Incorrect handler export for deployment target | MEDIUM | source/docs | -| 3 | Capturing request or environment state at module scope | CRITICAL | protocol-v4 evaluation | -| 4 | Treating cookie session data as authoritative persistence | HIGH | protocol-v4 evaluation | +| # | Mistake | Priority | Source | +| --- | ---------------------------------------------- | -------- | ----------- | +| 1 | Missing AsyncLocalStorage setup | HIGH | source/docs | +| 2 | Incorrect handler export for deployment target | MEDIUM | source/docs | diff --git a/packages/start-server-core/skills/_artifacts/skill_tree.yaml b/packages/start-server-core/skills/_artifacts/skill_tree.yaml index 70125a39b6..6c792cf1bd 100644 --- a/packages/start-server-core/skills/_artifacts/skill_tree.yaml +++ b/packages/start-server-core/skills/_artifacts/skill_tree.yaml @@ -1,6 +1,6 @@ library: name: '@tanstack/start-server-core' - version: '1.169.17' + version: '1.166.2' repository: 'https://github.com/TanStack/router' description: >- Server-side runtime for TanStack Start: createStartHandler, diff --git a/packages/start-server-core/skills/start-server-core/SKILL.md b/packages/start-server-core/skills/start-server-core/SKILL.md index 2e37e7b7ff..7dc16d517f 100644 --- a/packages/start-server-core/skills/start-server-core/SKILL.md +++ b/packages/start-server-core/skills/start-server-core/SKILL.md @@ -3,12 +3,11 @@ name: start-server-core description: >- Server-side runtime for TanStack Start: createStartHandler, request/response utilities (getRequest, setResponseHeader, - setCookie, getCookie, appendResponseHeader), three-phase request handling, + setCookie, getCookie, useSession), three-phase request handling, AsyncLocalStorage context. -metadata: - type: core - library: tanstack-start - library_version: '1.169.17' +type: core +library: tanstack-start +library_version: '1.166.2' sources: - TanStack/router:packages/start-server-core/src - TanStack/router:docs/start/framework/react/guide/server-entry-point.md @@ -16,13 +15,11 @@ sources: # Start Server Core (`@tanstack/start-server-core`) -Server-side runtime for TanStack Start. Provides the request handler, request/response utilities, cookie management, and integration primitives for external session libraries. All utilities are available anywhere in the call stack during a request via AsyncLocalStorage. +Server-side runtime for TanStack Start. Provides the request handler, request/response utilities, cookie management, and session management. All utilities are available anywhere in the call stack during a request via AsyncLocalStorage. > **CRITICAL**: These utilities are SERVER-ONLY. Import them from `@tanstack/-start/server`, not from the main entry point. They throw if called outside a server request context. > > **CRITICAL**: Types are FULLY INFERRED. Never cast, never annotate inferred values. -> -> **CRITICAL**: Read cookies, headers, request URLs, and runtime environment values inside the active request. Do not capture them at module scope; edge runtimes may inject them per request, and concurrent requests must never share request-derived state. ## `createStartHandler` @@ -92,7 +89,6 @@ import { getResponseHeaders, getResponseHeader, getResponseStatus, - appendResponseHeader, removeResponseHeader, clearResponseHeaders, } from '@tanstack/react-start/server' @@ -106,14 +102,6 @@ const serverFn = createServerFn({ method: 'POST' }).handler(async () => { }) ``` -`getResponseHeader` and `getResponseHeaders` are read helpers. Treat the `Headers` returned by `getResponseHeaders()` as a snapshot; mutating it does not change the outgoing response. Use the setter/removal helpers for writes. - -`appendResponseHeader(name, value)` appends without replacing existing values. For `set-cookie` it accepts fully serialized cookie strings and merges them by cookie identity (name + domain + path; a value `cookie-es` cannot parse is identified by its exact string) — the primitive for bridging external session/auth libraries: - -```ts -appendResponseHeader('set-cookie', await externalSessionLib.commit()) -``` - ## Cookie Management ```ts @@ -132,8 +120,7 @@ const serverFn = createServerFn({ method: 'POST' }).handler(async () => { setCookie('preference', 'dark', { httpOnly: true, - secure: process.env.NODE_ENV === 'production', - sameSite: 'lax', + secure: true, maxAge: 60 * 60 * 24 * 30, // 30 days path: '/', }) @@ -142,62 +129,89 @@ const serverFn = createServerFn({ method: 'POST' }).handler(async () => { }) ``` -## External Session Libraries +## Session Management -Start has no built-in session API. Use an external library and connect it to the active request using the cookie helpers, serialized headers, or a Fetch handler. - -For a cookie adapter, iron-session 9 accepts Start's cookie functions directly: +Encrypted sessions stored in cookies. Requires a password for encryption. ```ts -import { getIronSession } from 'iron-session' -import { getCookie, setCookie } from '@tanstack/react-start/server' +// Use @tanstack/-start for your framework (react, solid, vue) +import { createServerFn } from '@tanstack/react-start' +import { + useSession, + getSession, + updateSession, + clearSession, +} from '@tanstack/react-start/server' -// This is an application helper, not a Start export. -export function getAppSession() { - const password = process.env.SESSION_SECRET - if (!password || password.length < 32) { - throw new Error('SESSION_SECRET must be at least 32 characters') - } - - return getIronSession<{ userId: string }>( - { read: getCookie, write: setCookie }, - { - cookieName: 'app-session', - password, - ttl: 7 * 24 * 60 * 60, - cookieOptions: { - httpOnly: true, - secure: process.env.NODE_ENV === 'production', - sameSite: 'lax', - path: '/', - }, - }, - ) +const sessionConfig = { + password: process.env.SESSION_SECRET!, + name: 'my-app-session', + maxAge: 60 * 60 * 24 * 7, // 7 days } -// After validating credentials in a server function: -const session = await getAppSession() -session.userId = user.id -await session.save() +// Full session manager +const getUser = createServerFn({ method: 'GET' }).handler(async () => { + const session = await useSession<{ userId: string }>(sessionConfig) + return session.data +}) -// In a logout handler: -const logoutSession = await getAppSession() -logoutSession.destroy() +// Update session +const login = createServerFn({ method: 'POST' }) + .validator((data: { userId: string }) => data) + .handler(async ({ data }) => { + await updateSession(sessionConfig, { userId: data.userId }) + return { success: true } + }) + +// Clear session +const logout = createServerFn({ method: 'POST' }).handler(async () => { + await clearSession(sessionConfig) + return { success: true } +}) ``` -Use `session.userId`, with an absent-user check, when reading. Keep one session object per operation, or pass it from middleware through request context. The adapter reads the incoming cookie; calling it again does not read pending response cookies. Await writes before returning or redirecting. Do not put a session object or request-derived configuration in module scope. +### Session Config -iron-session checks `ttl` when unsealing, and each save renews that lifetime. Choose and test expiration, rotation, and storage behavior explicitly. +| Option | Type | Default | Description | +| ---------- | ------------------------ | ----------- | ----------------- | +| `password` | `string` | required | Encryption key | +| `name` | `string` | `'start'` | Cookie name | +| `maxAge` | `number` | `undefined` | Expiry in seconds | +| `cookie` | `false \| CookieOptions` | `undefined` | Cookie settings | -For libraries that accept a Fetch `Request` and return a `Response`, pass the current request and return the library's response from a server route. For cookie-only transfer, append each value from `response.headers.getSetCookie()` separately; commas can occur inside an `Expires` attribute. Do not use `setResponseHeader('set-cookie', ...)` to append alongside unrelated cookies. +### Session Manager Methods -### Production Session Rules +```ts +const session = await useSession<{ userId: string }>(config) -- Keep credentials and session objects in server code; use a new object for each request. -- Load current account permissions from the authoritative store. A client route guard does not authorize a server function. -- Use server-side session records for immediate revocation, device tracking, or large data. Deleting a cookie does not invalidate copies of stateless credentials. -- Use `HttpOnly`, an appropriate `SameSite`, `Path=/`, and `Secure` on HTTPS deployments. Cookie flags complement CSRF protection. -- Test login, authenticated SSR and navigation, persistence before redirects, expiry, logout, and concurrent requests. Start handles request/response plumbing; the application and its session library own session semantics. +session.id // Session ID (string | undefined) +session.data // Session data (typed) +await session.update({ userId: '123' }) // Persist session data +await session.clear() // Clear session data +``` + +## Query Validation + +Validate query string parameters using a Standard Schema: + +```ts +// Use @tanstack/-start for your framework (react, solid, vue) +import { getValidatedQuery } from '@tanstack/react-start/server' +import { z } from 'zod' + +const serverFn = createServerFn({ method: 'GET' }).handler(async () => { + const query = await getValidatedQuery( + z.object({ + page: z.coerce.number().default(1), + limit: z.coerce.number().default(20), + }), + ) + + return { page: query.page } +}) +``` + +> Note: `getValidatedQuery` accepts a Standard Schema validator, not a callback function. ## How Request Handling Works @@ -233,20 +247,16 @@ const getAuth = createServerFn({ method: 'GET' }).handler(async () => { }) ``` -### 2. HIGH: Forgetting to persist an external session +### 2. HIGH: Forgetting session password for most session operations -Mutating a session object does not necessarily write a cookie. Follow the library's explicit save or commit API and await it before returning or redirecting. Append serialized `Set-Cookie` values individually, preserving cookies from other middleware. +`useSession`, `getSession`, `updateSession`, and `sealSession` all require a `password` field for encryption. Missing it throws at runtime. `clearSession` accepts `Partial`, so password is optional for clearing. ### 3. MEDIUM: Using session without HTTPS in production Session cookies should use `secure: true` in production. The default cookie options may not enforce this. -### 4. CRITICAL: Capturing request or environment state at module scope - -Do not create session config from `process.env` at module load or cache `getRequest()`, headers, cookies, or session data in a module variable. Create config and read request state inside the handler or middleware callback. This is required for per-request edge environments and prevents cross-request data leaks. - ## Cross-References -- `@tanstack/start-client-core#start-core/server-functions` — creating server functions that use these utilities -- `@tanstack/start-client-core#start-core/middleware` — request middleware -- `@tanstack/start-client-core#start-core/server-routes` — server route handlers +- [start-core/server-functions](../../../start-client-core/skills/start-core/server-functions/SKILL.md) — creating server functions that use these utilities +- [start-core/middleware](../../../start-client-core/skills/start-core/middleware/SKILL.md) — request middleware +- [start-core/server-routes](../../../start-client-core/skills/start-core/server-routes/SKILL.md) — server route handlers diff --git a/packages/start-server-core/src/createStartHandler.ts b/packages/start-server-core/src/createStartHandler.ts index f1be8fe0d9..661cf460cb 100644 --- a/packages/start-server-core/src/createStartHandler.ts +++ b/packages/start-server-core/src/createStartHandler.ts @@ -1,7 +1,5 @@ -import { createServerHistory } from '@tanstack/history' +import { createMemoryHistory } from '@tanstack/history' import { - X_TSS_RAW_RESPONSE, - X_TSS_SERIALIZED, createCsrfMiddleware, createNullProtoObject, csrfSymbol, @@ -10,41 +8,26 @@ import { safeObjectMerge, } from '@tanstack/start-client-core' import { - _getRenderedMatches, - isDangerousProtocol, - isPromise, + executeRewriteInput, isRedirect, + isResolvedRedirect, } from '@tanstack/router-core' import { attachRouterServerSsrUtils, - bindSsrResponseToRequest, - disposeSsrResponse, getNormalizedURL, + getOrigin, isSsrResponse, normalizeSsrResponse, + replaceSsrResponse, stripSsrResponseBody, - waitForRequest, } from '@tanstack/router-core/ssr/server' import { getStartContext, runWithStartContext, } from '@tanstack/start-storage-context' -import { - createFinalizedResponse, - finalizeResponse, - reconcileResponse, - restoreResponseProtocol, - transferResponseMetadata, - transferResponseProtocol, - withStartRequest, -} from './internal-request-response' +import { requestHandler } from './request-response' import { getStartManifest } from './router-manifest' -import { - DeferredResponse, - createServerFnErrorResponse, - handleServerAction, - toThrownServerFnResponse, -} from './server-functions-handler' +import { dispatchServerFnRequest } from '#tanstack-start-server-fn-dispatch' import { createEarlyHintsCollector } from './early-hints' import { createCachedBaseManifestLoader, @@ -62,8 +45,7 @@ import type { RouterEntry, StartEntry, } from '@tanstack/start-client-core' -import type { RequestHandler, RequestOptions } from './request-handler' -import type { StartEvent } from './internal-request-response' +import type { RequestHandler } from './request-handler' import type { AnyRoute, AnyRouter, @@ -87,13 +69,16 @@ export interface CreateStartHandlerOptions extends FinalManifestOptions { handler: HandlerCallback } -function getStartResponseHeaders(router: AnyRouter) { - const headers = new Headers({ 'content-type': 'text/html; charset=utf-8' }) - const matches = _getRenderedMatches(router.stores.matches.get()) - // Most matches set no headers; merge only when one does. - return matches.some((match) => match.headers) - ? mergeHeaders(headers, ...matches.map((match) => match.headers)) - : headers +function getStartResponseHeaders(opts: { router: AnyRouter }) { + const headers = mergeHeaders( + { + 'Content-Type': 'text/html; charset=utf-8', + }, + ...opts.router.stores.matches.get().map((match) => { + return match.headers + }), + ) + return headers } interface PluginAdaptersEntry { @@ -107,8 +92,9 @@ interface Entries { pluginAdapters: PluginAdaptersEntry } -// Share initialization, then reuse the loaded entries without a promise wait. -let cachedEntries: Entries | Promise | undefined +// Cached entries - promises stored immediately to prevent concurrent imports +// that can cause race conditions during module initialization +let entriesPromise: Promise | undefined let hasWarnedMissingCsrfMiddleware = false const defaultCsrfMiddleware = createCsrfMiddleware({ filter: (ctx) => ctx.handlerType === 'serverFn', @@ -142,13 +128,10 @@ async function loadEntries(): Promise { } function getEntries() { - if (!cachedEntries) { - cachedEntries = loadEntries().then((entries) => { - cachedEntries = entries - return entries - }) + if (!entriesPromise) { + entriesPromise = loadEntries() } - return cachedEntries + return entriesPromise } function hasCsrfMiddleware( @@ -208,382 +191,156 @@ function throwIfMayNotDefer(): never { throw new Error(ERR_NO_DEFER) } -function getResponseFromResult(result: TODO): TODO { - return isSsrResponse(result) || result instanceof Response - ? result - : result?.response -} - -type StreamSsrResponse = Extract - -type ResponseBody = NonNullable -type ResponseWithBody = Response & { readonly body: ResponseBody } - -/** The context object threaded through one middleware pipeline. */ -interface PipelineContext { - request: Request - pathname: string - handlerType: 'serverFn' | 'router' - context: Record - params?: Record - response?: Response - // Middleware may add arbitrary own properties through `next(ctx)`. - [key: string]: unknown -} - -interface MiddlewareResponseOwnership { - response: ResponseWithBody - sourceBody: ResponseBody - streamResponse?: StreamSsrResponse -} - -function disposeResponseResult(result: TODO, reason: unknown): void { - const response = getResponseFromResult(result) - if (isSsrResponse(response) || response instanceof Response) { - disposeSsrResponse(response, reason) - } -} - /** - * A new body continues the owned one when it is the same stream, or when the - * owned body is already being read, as by a pipe, a tee, or a `Response` that - * copies a body by reading it (Bun, or a wrapped global `Response`). Start - * cannot tell such a reader from one that stops early, so it disposes only an - * unread body. A stream whose reader stops early ends with the request's abort - * or the SSR stream's lifetime limit. + * Check if a value is a special response (Response or Redirect) */ -function inheritsResponseOwnership( - ownership: MiddlewareResponseOwnership, - body: ResponseBody, -): boolean { - const ownedBody = ownership.response.body - return body === ownedBody || ownedBody.locked -} - -function disposeResponseOwnership( - ownership: MiddlewareResponseOwnership, - reason: unknown, -): void { - const { response, sourceBody, streamResponse } = ownership - streamResponse?.dispose(reason) - if (!streamResponse || response.body !== sourceBody) { - void response.body.cancel(reason).catch(() => {}) - } -} - -function getOwnedResponse( - ownership: MiddlewareResponseOwnership, -): HandlerCallbackResult { - const { response, sourceBody, streamResponse } = ownership - if (!streamResponse) { - return response - } - if (streamResponse.response === response && response.body === sourceBody) { - return streamResponse - } - if (response.body === sourceBody) { - return { ...streamResponse, response } - } - return { - ...streamResponse, - response, - dispose(reason): undefined { - disposeResponseOwnership(ownership, reason) - }, - } -} - -function createLateResponseDisposer(signal: AbortSignal) { - return (result: TODO) => disposeResponseResult(result, signal.reason) +function isSpecialResponse(value: unknown): value is Response { + return value instanceof Response || isRedirect(value) } /** - * Compose middleware around a terminal response handler. With no middleware - * the terminal runs directly. + * Normalize middleware result to context shape + */ +function handleCtxResult(result: TODO) { + if (isSsrResponse(result) || isSpecialResponse(result)) { + return { response: result } + } + return result +} + +/** + * Execute a middleware chain */ async function executeMiddleware( middlewares: Array, - terminal: TODO, - ctx: PipelineContext, - signal: AbortSignal, - event: StartEvent, - terminalNext?: TODO, -): Promise { + ctx: TODO, +): Promise<{ ctx: TODO; response: HandlerCallbackResult }> { let index = -1 - let responseOwnership: MiddlewareResponseOwnership | undefined - // Invocations form one chain: invocation `d` runs middleware `d` and calls - // next() at most once; the pipeline itself is depth -1. Once an invocation - // returns, a result of next() still pending below it is abandoned: it must - // not replace or cancel the response that invocation chose (for example the - // winner of a `Promise.race`). A caller at depth `d` is therefore abandoned - // when `returnedDepth <= d`, where this is the shallowest returned depth. - let returnedDepth = Infinity - const disposeAbandonedResult = createLateResponseDisposer(signal) + let streamResponse: + | Extract + | undefined - const adoptResponse = ( - exposed: Response | undefined, - streamResponse?: StreamSsrResponse, - ) => { - const current = responseOwnership - // Read the body once: the getter can allocate a stream for a response - // that has not exposed one yet. - const body = exposed instanceof Response ? exposed.body : null - // `exposed` is a Response with this body whenever `body` is set. - const response = exposed as ResponseWithBody - if (streamResponse && !body && streamResponse !== current?.streamResponse) { - streamResponse.dispose('Response body dropped by Start reconciliation') - } - if (current && current.response === exposed) { - current.streamResponse ??= streamResponse - } else if (current && body && inheritsResponseOwnership(current, body)) { - // A wrapper around the same body stream carries the same encoded bytes, - // so it keeps the transport requirements that decode them. - if (body === current.response.body) { - transferResponseProtocol(current.response, response) - } - current.response = response - current.streamResponse ??= streamResponse - } else { - if (current) { - responseOwnership = undefined - disposeResponseOwnership(current, 'middleware response replaced') - } - responseOwnership = body - ? { response, sourceBody: body, streamResponse } - : undefined - } - ctx.response = exposed - } - - const disposeCurrentBody = (reason: string) => { - const current = responseOwnership - responseOwnership = undefined - if (current) { - disposeResponseOwnership(current, reason) - } - } - - const setResponse = (response: TODO, caller: number) => { - // The owned response is already adopted; only helper state can still - // change it. - const owned = - response !== undefined && response === responseOwnership?.response - const ssrResponse = !owned && isSsrResponse(response) ? response : undefined - const exposed: Response | undefined = ssrResponse - ? ssrResponse.response - : response - - if (returnedDepth <= caller) { - if (exposed !== ctx.response) { - disposeResponseResult(response, 'late middleware response') + const setResponse = (response: TODO) => { + if (isSsrResponse(response)) { + if (response.serverSsrCleanup === 'stream') { + streamResponse = response } + ctx.response = response.response return } - if (!owned) { - // Dispose a replaced body before reading helper state: cancellation and - // SSR cleanup callbacks may set headers on the response that replaces it. - adoptResponse( - exposed, - ssrResponse?.serverSsrCleanup === 'stream' ? ssrResponse : undefined, - ) - } - if (exposed instanceof Response) { - const reconciled = reconcileResponse(exposed, event, disposeCurrentBody) - if (reconciled !== exposed) { - adoptRebuilt(exposed, reconciled) - } - } + + ctx.response = response } - // Start rebuilds the owned response around its body, or without a body when - // the response cannot have one. A rebuilt body takes over ownership without - // comparing streams: a wrapped global `Response` copies it into a new one. - const adoptRebuilt = (exposed: Response, rebuilt: Response) => { - const current = responseOwnership - if (current?.response === exposed && rebuilt.body) { - current.response = rebuilt as ResponseWithBody - ctx.response = rebuilt - } else { - adoptResponse(rebuilt) + const disposeStreamResponse = async (reason: string) => { + const response = streamResponse + if (!response) { + return } + + streamResponse = undefined + const currentResponse = ctx.response + if ( + currentResponse === response.response || + (currentResponse instanceof Response && + response.response.body !== null && + currentResponse.body === response.response.body) + ) { + ctx.response = undefined + } + await response.dispose(reason) } - let nextPromise: Promise | undefined + const getFinalResponse = async (): Promise => { + const response = ctx.response + if (!response) { + throwRouteHandlerError() + } - function next(nextCtx?: TODO): Promise { - // Only the deepest started invocation can call next(). - const result = runNext(index, nextCtx) - nextPromise = result - return result + if (!streamResponse) { + return response + } + + if (response === streamResponse.response) { + return streamResponse + } + + if ( + streamResponse.response.body !== null && + response.body === streamResponse.response.body + ) { + return { ...streamResponse, response } + } + + await disposeStreamResponse('middleware response replaced') + return response } - async function runNext(caller: number, nextCtx?: TODO): Promise { - signal.throwIfAborted() - + const next = async (nextCtx?: TODO): Promise => { // Merge context if provided using safeObjectMerge for prototype pollution prevention if (nextCtx) { if (nextCtx.context) { ctx.context = safeObjectMerge(ctx.context, nextCtx.context) } - // Copy own properties except context (Object.keys returns only own - // enumerable properties). An indexed loop avoids the iterator protocol. - const keys = Object.keys(nextCtx) - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < keys.length; i++) { - const key = keys[i]! + // Copy own properties except context (Object.keys returns only own enumerable properties) + for (const key of Object.keys(nextCtx)) { if (key === 'response') { - setResponse(nextCtx.response, caller) + setResponse(nextCtx.response) } else if (key !== 'context') { ctx[key] = nextCtx[key] } } } - const depth = ++index - const isTerminal = depth === middlewares.length - const middleware = - depth < middlewares.length - ? middlewares[depth] - : isTerminal - ? terminal - : undefined - const middlewareNext = isTerminal && terminalNext ? terminalNext : next - if (!middleware) { - return ctx - } + index++ + const middleware = middlewares[index] + if (!middleware) return ctx let result: TODO try { - const pending = middleware({ ...ctx, next: middlewareNext }) - // A directly returned next() promise already propagates request aborts. - if (nextPromise && pending === nextPromise) { - nextPromise = undefined - result = await pending - signal.throwIfAborted() - } else if (!isPromise(pending)) { - result = pending - signal.throwIfAborted() - } else { - result = await waitForRequest( - pending, - signal, - disposeAbandonedResult, - disposeAbandonedResult, - ) - } + result = await middleware({ ...ctx, next }) } catch (err) { - if (depth < returnedDepth) { - returnedDepth = depth - } - if (returnedDepth > caller) { - // Middleware can replace next()'s shared response before throwing. - // Track that body for cleanup without rebuilding a body it may have - // already locked, consumed, or transferred. - adoptResponse(ctx.response) - } - if (signal.aborted) { - if (result !== undefined) { - disposeAbandonedResult(result) - } - if (err !== signal.reason) { - disposeAbandonedResult(err) - } - throw signal.reason - } - if (err instanceof Response) { - // A thrown Response replies to the request. For a server function - // call, the client rejects the call with it. - setResponse( - ctx.handlerType === 'serverFn' ? toThrownServerFnResponse(err) : err, - caller, - ) + if (isSpecialResponse(err)) { + setResponse(err) return ctx } + await disposeStreamResponse('middleware error') throw err } - if (depth < returnedDepth) { - returnedDepth = depth - } - if (isTerminal && terminalNext && !result) { - throwRouteHandlerError() - } - - if (isTerminal && !terminalNext && result instanceof DeferredResponse) { - if (returnedDepth > caller) { - // Cleanup may write response helpers. Construct only after it has run, - // then publish without rechecking headers that no user has received. - adoptResponse(undefined) - adoptResponse(result.createResponse(event)) + const normalized = handleCtxResult(result) + if (normalized) { + if (normalized.response !== undefined) { + setResponse(normalized.response) } - return ctx - } - - if (result && result !== ctx) { - const response = getResponseFromResult(result) - // Select the replacement before reconciling: middleware may already - // have transferred or piped the previous response's body. - if (response !== undefined) { - // Middleware can assign next()'s shared response and then return - // another one, such as a 304 after transforming the body. Track the - // assigned body first, so the replacement disposes it, without - // rebuilding a body it may have already locked or consumed. - if ( - ctx.response !== responseOwnership?.response && - ctx.response !== response && - returnedDepth > caller - ) { - adoptResponse(ctx.response) - } - setResponse(response, caller) - } else { - setResponse(ctx.response, caller) + if (normalized.context) { + ctx.context = safeObjectMerge(ctx.context, normalized.context) } - if ( - returnedDepth > caller && - response !== result && - result.context && - result.context !== ctx.context - ) { - ctx.context = safeObjectMerge(ctx.context, result.context) - } - } else { - setResponse(ctx.response, caller) } return ctx } - try { - await runNext(-1) - let response = ctx.response + await next() + return { ctx, response: await getFinalResponse() } +} + +/** + * Wrap a route handler as middleware + */ +function handlerToMiddleware( + handler: RouteMethodHandlerFn, + mayDefer: boolean = false, +): TODO { + if (mayDefer) { + return handler + } + return async (ctx: TODO) => { + const response = await handler({ ...ctx, next: throwIfMayNotDefer }) if (!response) { throwRouteHandlerError() } - if (signal.aborted) { - throw signal.reason - } - returnedDepth = -1 - // Middleware can change protocol headers directly on a server-function - // reply, the only response that has them. Restore them once, as the reply - // leaves the pipeline; without middleware only Start has handled it. - if (middlewares.length && ctx.handlerType === 'serverFn') { - const restored = restoreResponseProtocol(response, event) - if (restored !== response) { - adoptRebuilt(response, restored) - response = restored - } - } - return responseOwnership ? getOwnedResponse(responseOwnership) : response - } catch (err) { - returnedDepth = -1 - if (responseOwnership) { - disposeResponseOwnership( - responseOwnership, - signal.aborted ? signal.reason : err, - ) - } - throw err + return response } } @@ -639,56 +396,30 @@ export function createStartHandler( }) } - const startRequestResolver = async ( - request: Request, - requestOpts: RequestOptions | undefined, - event: StartEvent, - ): Promise => { - const signal = request.signal - let router: AnyRouter | undefined - let routerPromise: Promise | undefined - let responseOwnsCleanup = false - let response: Response | undefined + const startRequestResolver: RequestHandler = async ( + request, + requestOpts, + ) => { + let router: AnyRouter | null = null as AnyRouter | null + let responseOwnsCleanup = false as boolean try { - signal.throwIfAborted() - // The Start event already parsed and validated the request URL; reuse - // it instead of re-parsing. The memoized URL must not be mutated. - const requestUrl = event.requestUrl - let url = requestUrl - const pathname = url.pathname - // Plain RPC paths need no routing normalization. Their payload is read - // from the original query; normalize only if they later request a router. - if ( - !SERVER_FN_BASE || - !pathname.startsWith(SERVER_FN_BASE) || - pathname.includes('%') || - pathname.startsWith('//') - ) { - const normalized = getNormalizedURL(requestUrl) - url = normalized.url - if (normalized.handledProtocolRelativeURL) { - return finalizeResponse(Response.redirect(url, 308), event) - } + // normalizing and sanitizing the pathname here for server, so we always deal with the same format during SSR. + // during normalization paths like '//posts' are flattened to '/posts'. + // in these cases we would prefer to redirect to the new path + const { url, handledProtocolRelativeURL } = getNormalizedURL(request.url) + const href = url.pathname + url.search + url.hash + const origin = getOrigin(request) + + if (handledProtocolRelativeURL) { + return Response.redirect(url, 308) } - const pendingEntries = getEntries() - const entries = isPromise(pendingEntries) - ? await waitForRequest(pendingEntries, signal) - : pendingEntries - const isServerFnRequest = - !!SERVER_FN_BASE && url.pathname.startsWith(SERVER_FN_BASE) - const startInstance = entries.startEntry.startInstance - let startOptions: AnyStartInstanceOptions - if (startInstance) { - const pendingStartOptions = startInstance.getOptions() - startOptions = isPromise(pendingStartOptions) - ? await waitForRequest(pendingStartOptions, signal) - : pendingStartOptions - signal.throwIfAborted() - } else { - startOptions = {} as AnyStartInstanceOptions - } + const entries = await getEntries() + const hasStartInstance = !!entries.startEntry.startInstance + const startOptions: AnyStartInstanceOptions = + (await entries.startEntry.startInstance?.getOptions()) || + ({} as AnyStartInstanceOptions) const { hasPluginAdapters, pluginSerializationAdapters } = entries.pluginAdapters @@ -701,88 +432,57 @@ export function createStartHandler( const requestStartOptions = { ...startOptions, - requestMiddleware: startInstance + requestMiddleware: hasStartInstance ? startOptions.requestMiddleware - : isServerFnRequest - ? [defaultCsrfMiddleware] - : undefined, + : [defaultCsrfMiddleware], serializationAdapters, } - const requestMiddleware = requestStartOptions.requestMiddleware - let executedRequestMiddlewares: Set | undefined - let flattenedRequestMiddlewares: ReturnType = - [] - if (requestMiddleware?.length) { - // Reuse the flattening set for request middleware deduplication. - executedRequestMiddlewares = new Set() - flattenedRequestMiddlewares = flattenMiddlewares( - requestMiddleware, - undefined, - executedRequestMiddlewares, - ) - } + // Flatten request middlewares once + const flattenedRequestMiddlewares = requestStartOptions.requestMiddleware + ? flattenMiddlewares(requestStartOptions.requestMiddleware) + : [] + + // Create set for deduplication + const executedRequestMiddlewares = new Set( + flattenedRequestMiddlewares, + ) // Memoized router getter - const getRouter = (): Promise => { - routerPromise ??= (async () => { - signal.throwIfAborted() - const routerUrl = url === requestUrl ? getNormalizedURL(url).url : url - const pendingRouter = entries.routerEntry.getRouter() - const requestRouter = isPromise(pendingRouter) - ? await waitForRequest(pendingRouter, signal) - : pendingRouter + const getRouter = async (): Promise => { + if (router) return router - let isShell = IS_SHELL_ENV - if (IS_PRERENDERING && !isShell) { - isShell = request.headers.get(HEADERS.TSS_SHELL) === 'true' - } + router = await entries.routerEntry.getRouter() - const history = createServerHistory( - routerUrl.pathname + routerUrl.search + routerUrl.hash, - ) + let isShell = IS_SHELL_ENV + if (IS_PRERENDERING && !isShell) { + isShell = request.headers.get(HEADERS.TSS_SHELL) === 'true' + } - requestRouter.update({ - history, - isShell, - isPrerendering: IS_PRERENDERING, - origin: requestRouter.options.origin ?? routerUrl.origin, - // Start-owned options that RouterConstructorOptions omits. - ...{ - defaultSsr: requestStartOptions.defaultSsr, - serializationAdapters: requestRouter.options.serializationAdapters - ?.length - ? [ - ...requestStartOptions.serializationAdapters, - ...requestRouter.options.serializationAdapters, - ] - : requestStartOptions.serializationAdapters, - }, - basepath: ROUTER_BASEPATH, - }) + const history = createMemoryHistory({ + initialEntries: [href], + }) - router = requestRouter - return requestRouter - })() + router.update({ + history, + isShell, + isPrerendering: IS_PRERENDERING, + origin: router.options.origin ?? origin, + ...{ + defaultSsr: requestStartOptions.defaultSsr, + serializationAdapters: [ + ...requestStartOptions.serializationAdapters, + ...(router.options.serializationAdapters || []), + ], + }, + basepath: ROUTER_BASEPATH, + }) - return routerPromise + return router } - const handlerType = isServerFnRequest - ? ('serverFn' as const) - : ('router' as const) - const startContext = { - getRouter, - startOptions: requestStartOptions, - request, - executedRequestMiddlewares, - handlerType, - } - let terminal: ( - ctx: PipelineContext, - ) => Promise - - if (isServerFnRequest) { + // Check for server function requests first (early exit) + if (SERVER_FN_BASE && url.pathname.startsWith(SERVER_FN_BASE)) { if ( process.env.NODE_ENV !== 'production' && process.env.TSS_DISABLE_CSRF_MIDDLEWARE_WARNING !== 'true' && @@ -791,257 +491,217 @@ export function createStartHandler( warnMissingCsrfMiddlewareOnce() } - const serverFnId = url.pathname - .slice(SERVER_FN_BASE.length) - .split('/')[0] - - if (!serverFnId) { - throw new Error('Invalid server action param for serverFnId') - } - - terminal = ({ context }) => - runWithStartContext( - { ...startContext, contextAfterGlobalMiddlewares: context }, + const serverFnHandler = async ({ context }: TODO) => { + return runWithStartContext( + { + getRouter, + startOptions: requestStartOptions, + contextAfterGlobalMiddlewares: context, + request, + executedRequestMiddlewares, + handlerType: 'serverFn', + }, () => - handleServerAction({ + dispatchServerFnRequest({ request, - serverFnId, + context: requestOpts?.context, + serverFnBase: SERVER_FN_BASE, }), ) - } else { - // Runs as the route pipeline's terminal, which waits on the request - // signal and disposes a result that settles after an abort. - const executeRouter = async ( - serverContext: TODO, - matchedRoutes: ReadonlyArray, - routerInstance: AnyRouter, - ): Promise => { - if ( - !/(^|,)\s*(\*\/\*|text\/html)/.test( - request.headers.get('Accept') || '*/*', - ) - ) { - return normalizeSsrResponse( - Response.json( - { error: 'Only HTML requests are supported here' }, - { status: 406 }, - ), - ) - } + } - const pendingManifest = resolveManifestForRequest({ + const middlewares = flattenedRequestMiddlewares.map( + (d) => d.options.server, + ) + const { response: middlewareResponse } = await executeMiddleware( + [...middlewares, serverFnHandler], + { request, - requestInlineCss: requestOpts?.inlineCss, - getBaseManifest: () => getBaseManifest(matchedRoutes), - }) - const manifest = isPromise(pendingManifest) - ? await waitForRequest(pendingManifest, signal) - : pendingManifest + pathname: url.pathname, + handlerType: 'serverFn', + context: createNullProtoObject(requestOpts?.context), + }, + ) - const earlyHints = createEarlyHintsForRequest(requestOpts) + const result = await handleRedirectResponse( + middlewareResponse, + request, + getRouter, + ) + responseOwnsCleanup = result.serverSsrCleanup === 'stream' + return result.response + } - earlyHints?.collectStatic({ manifest, matchedRoutes }) + // Router execution function + const executeRouter = async ( + serverContext: TODO, + matchedRoutes?: ReadonlyArray, + ): Promise => { + const acceptHeader = request.headers.get('Accept') || '*/*' + const acceptParts = acceptHeader.split(',') + const supportedMimeTypes = ['*/*', 'text/html'] - // The request's stored context, not the resolver's template: RSC - // adds request assets to it, so read them at call time. - const storedStartContext = getStartContext({ throwIfNotFound: false }) - attachRouterServerSsrUtils({ - router: routerInstance, - manifest, - getRequestAssets: () => storedStartContext?.requestAssets, - }) + const isSupported = supportedMimeTypes.some((mimeType) => + acceptParts.some((part) => part.trim().startsWith(mimeType)), + ) - // `additionalContext` is request-scoped and only read from router.options - // during load; avoid a full router.update() and redundant location parse. - routerInstance.options.additionalContext = { serverContext } - await routerInstance.load({ - _signal: signal, - _skipLocationUpdate: true, - }) - signal.throwIfAborted() - - if (routerInstance._serverResult?.type === 'redirect') { - return normalizeSsrResponse(routerInstance._serverResult.redirect) - } - - earlyHints?.collectDynamic( - _getRenderedMatches(routerInstance.stores.matches.get()), - ) - - // Pass request-scoped assets to dehydrate for manifest injection - await routerInstance.serverSsr!.dehydrate({ - requestAssets: storedStartContext?.requestAssets, - signal, - }) - signal.throwIfAborted() - - const responseHeaders = getStartResponseHeaders(routerInstance) - earlyHints?.appendResponseHeaders(responseHeaders) - signal.throwIfAborted() + if (!isSupported) { return normalizeSsrResponse( - await cb({ - request, - router: routerInstance, - responseHeaders, - }), + Response.json( + { error: 'Only HTML requests are supported here' }, + { status: 500 }, + ), ) } - terminal = ({ context }) => - runWithStartContext( - { ...startContext, contextAfterGlobalMiddlewares: context }, - () => - handleServerRoutes({ + const manifest = await resolveManifestForRequest({ + request, + requestInlineCss: requestOpts?.inlineCss, + getBaseManifest: () => getBaseManifest(matchedRoutes), + }) + + const earlyHints = createEarlyHintsForRequest({ + onEarlyHints: requestOpts?.onEarlyHints, + responseLinkHeader: requestOpts?.responseLinkHeader, + }) + + earlyHints?.collectStatic({ manifest, matchedRoutes }) + + const routerInstance = await getRouter() + + attachRouterServerSsrUtils({ + router: routerInstance, + manifest, + getRequestAssets: () => + getStartContext({ throwIfNotFound: false })?.requestAssets, + }) + + // `additionalContext` is request-scoped and only read from router.options + // during load; avoid a full router.update() and redundant location parse. + routerInstance.options.additionalContext = { serverContext } + await routerInstance.load() + + if (routerInstance.state.redirect) { + return normalizeSsrResponse(routerInstance.state.redirect) + } + + earlyHints?.collectDynamic(routerInstance.stores.matches.get()) + + // Pass request-scoped assets to dehydrate for manifest injection + const ctx = getStartContext({ throwIfNotFound: false }) + await routerInstance.serverSsr!.dehydrate({ + requestAssets: ctx?.requestAssets, + }) + + const responseHeaders = getStartResponseHeaders({ + router: routerInstance, + }) + earlyHints?.appendResponseHeaders(responseHeaders) + const response = await cb({ + request, + router: routerInstance, + responseHeaders, + }) + return normalizeSsrResponse(response) + } + + // Main request handler + const requestHandlerMiddleware = async ({ context }: TODO) => { + return runWithStartContext( + { + getRouter, + startOptions: requestStartOptions, + contextAfterGlobalMiddlewares: context, + request, + executedRequestMiddlewares, + handlerType: 'router', + }, + async () => { + try { + return await handleServerRoutes({ getRouter, request, + url, executeRouter, context, executedRequestMiddlewares, - signal, - event, - }), - ) - } - - const middlewareCtx: PipelineContext = { - request, - pathname: url.pathname, - handlerType, - context: createNullProtoObject(requestOpts?.context), - } - let middlewareResponse: HandlerCallbackResult - try { - if (!isServerFnRequest && flattenedRequestMiddlewares.length === 0) { - // An empty global pipeline has no additional middleware to run. The - // route pipeline already reconciles responses, owns cleanup, and - // waits on the request signal for every pending result. Only - // server-function terminals can defer JSON construction. - middlewareResponse = await (terminal( - middlewareCtx, - ) as Promise) - } else { - middlewareResponse = await executeMiddleware( - flattenedRequestMiddlewares.map((d) => d.options.server), - terminal, - middlewareCtx, - signal, - event, - ) - } - } catch (error) { - if (signal.aborted) { - throw error - } - if (error instanceof Response) { - middlewareResponse = reconcileResponse(error, event) - } else if (!isServerFnRequest) { - throw error - } else { - // Request middleware can throw before the server function runs. - const disposeLate = createLateResponseDisposer(signal) - middlewareResponse = await waitForRequest( - runWithStartContext( - { - ...startContext, - contextAfterGlobalMiddlewares: middlewareCtx.context, - }, - () => createServerFnErrorResponse(error), - ), - signal, - disposeLate, - disposeLate, - ) - middlewareResponse = reconcileResponse(middlewareResponse, event) - } - } - - let result: SsrResponse - try { - result = normalizeSsrResponse(middlewareResponse) - if (isRedirect(result.response)) { - result = await handleRedirectResponse( - result, - getRouter, - signal, - isServerFnRequest && - request.headers.get('x-tsr-serverFn') === 'true', - event, - ) - } - // Request middleware can read a HEAD body, for example to compute an - // ETag, so it is stripped only when the response leaves the pipeline. - if (request.method === 'HEAD' && result.response.body !== null) { - const source = result.response - result = stripSsrResponseBody(result, 'HEAD body stripped') - transferResponseMetadata(source, result.response) - } - } catch (error) { - disposeResponseResult( - middlewareResponse, - signal.aborted ? signal.reason : error, + }) + } catch (err) { + if (err instanceof Response) { + return err + } + throw err + } + }, ) - throw error } - bindSsrResponseToRequest(router, result, signal) - signal.throwIfAborted() - responseOwnsCleanup = result.serverSsrCleanup === 'stream' - response = result.response + + const middlewares = flattenedRequestMiddlewares.map( + (d) => d.options.server, + ) + const { response: middlewareResponse } = await executeMiddleware( + [...middlewares, requestHandlerMiddleware], + { + request, + pathname: url.pathname, + handlerType: 'router', + context: createNullProtoObject(requestOpts?.context), + }, + ) + + const response = await handleRedirectResponse( + middlewareResponse, + request, + getRouter, + ) + responseOwnsCleanup = response.serverSsrCleanup === 'stream' + return response.response } finally { if (router?.serverSsr && !responseOwnsCleanup) { - // Stream disposal already publishes its cleanup writes at the pipeline - // boundary. Only live eager SSR state can still add response helpers. + // Clean up router SSR state if it was set up but won't be cleaned up by the callback + // (e.g., in redirect cases or early returns before the callback is invoked). + // Transformed streaming response bodies clean up when consumed/cancelled. router.serverSsr.cleanup() - if (response) { - response = finalizeResponse(response, event) - } } - // `routerPromise` stays memoized: a streamed Suspense boundary or a late - // server function may still ask for this request's router. + router = null } - return response } - return withStartRequest(startRequestResolver) + return requestHandler(startRequestResolver) } -const relativeRedirectProtocols = new Set() -const SERIALIZED_REDIRECT_HEADERS: ReadonlyMap = new Map( - [ - ['content-type', 'application/json'], - ['location', null], - [X_TSS_RAW_RESPONSE, null], - [X_TSS_SERIALIZED, null], - ], -) - async function handleRedirectResponse( - ssrResponse: SsrResponse, + response: HandlerCallbackResult, + request: Request, getRouter: () => Promise, - signal: AbortSignal, - serializeRedirect: boolean, - event: StartEvent, ): Promise { - signal.throwIfAborted() - const redirect = ssrResponse.response - if (!isRedirect(redirect)) { + const ssrResponse = normalizeSsrResponse(response) + if (!isRedirect(ssrResponse.response)) { return ssrResponse } - const opts = redirect.options - const href = redirect.headers.get('Location') || opts.href - if ( - !href && - opts.to && - typeof opts.to === 'string' && - !opts.to.startsWith('/') - ) { + if (isResolvedRedirect(ssrResponse.response)) { + if (request.headers.get('x-tsr-serverFn') === 'true') { + return replaceSsrResponse( + ssrResponse, + Response.json( + { ...ssrResponse.response.options, isSerializedRedirect: true }, + { headers: ssrResponse.response.headers }, + ), + 'redirect response replaced', + ) + } + return ssrResponse + } + + const opts = ssrResponse.response.options + if (opts.to && typeof opts.to === 'string' && !opts.to.startsWith('/')) { throw new Error( `Server side redirects must use absolute paths via the 'href' or 'to' options. The redirect() method's "to" property accepts an internal path only. Use the "href" property to provide an external URL. Received: ${JSON.stringify(opts)}`, ) } if ( - !href && ['params', 'search', 'hash'].some( (d) => typeof (opts as TODO)[d] === 'function', ) @@ -1056,115 +716,54 @@ async function handleRedirectResponse( ) } - signal.throwIfAborted() - // Unambiguous relative hrefs need no route resolution or protocol policy. - // Every scheme falls back to the router to honor its custom allowlist. - if (href && !isDangerousProtocol(href, relativeRedirectProtocols)) { - opts.href = href - redirect.headers.set('Location', href) - } else { - const router = await getRouter() - signal.throwIfAborted() - // Resolves `redirect` in place. - router.resolveRedirect(redirect) - } + const router = await getRouter() + const redirect = router.resolveRedirect(ssrResponse.response) - if (serializeRedirect) { - const redirectOptions = { ...(opts as TODO) } - delete redirectOptions.headers - redirectOptions.isSerializedRedirect = true - const responseHeaders = new Headers(redirect.headers) - responseHeaders.set('content-type', 'application/json') - // The client follows the href in this JSON envelope. An HTTP Location - // would let fetch follow it first if a response helper selected 3xx. - responseHeaders.delete('location') - responseHeaders.delete(X_TSS_RAW_RESPONSE) - responseHeaders.delete(X_TSS_SERIALIZED) - // A caller-supplied toJSON can return undefined despite the library type. - const body = JSON.stringify(redirectOptions) as string | undefined - if (body === undefined) { - throw new TypeError('Value is not JSON serializable') - } - // Both serialization and disposal can write helpers. Construct the envelope - // afterward with its final state instead of reconciling a temporary response. - disposeSsrResponse(ssrResponse, 'redirect response replaced') - return { - response: createFinalizedResponse( - body, - responseHeaders, - SERIALIZED_REDIRECT_HEADERS, - event, + if (request.headers.get('x-tsr-serverFn') === 'true') { + return replaceSsrResponse( + ssrResponse, + Response.json( + { ...ssrResponse.response.options, isSerializedRedirect: true }, + { headers: ssrResponse.response.headers }, ), - serverSsrCleanup: 'none', - } - } - - ssrResponse.response = finalizeResponse(redirect, event) - return ssrResponse -} - -function withParsedParams( - handler: RouteMethodHandlerFn, - matchedRoutes: ReadonlyArray, -): TODO { - if ( - !matchedRoutes.some( - (route) => route.options.params?.parse ?? route.options.parseParams, + 'redirect response replaced', ) - ) { - 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 }) - } + return replaceSsrResponse(ssrResponse, redirect, 'redirect response replaced') } async function handleServerRoutes({ getRouter, request, + url, executeRouter, context, executedRequestMiddlewares, - signal, - event, }: { getRouter: () => Promise request: Request + url: URL executeRouter: ( serverContext: any, - matchedRoutes: ReadonlyArray, - router: AnyRouter, + matchedRoutes?: ReadonlyArray, ) => Promise context: any - executedRequestMiddlewares: Set | undefined - signal: AbortSignal - event: StartEvent + executedRequestMiddlewares: Set }): Promise { const router = await getRouter() - const { pathname } = router.latestLocation + const rewrittenUrl = executeRewriteInput(router.rewrite, url) + const pathname = rewrittenUrl.pathname // this will perform a fuzzy match, however for server routes we need an exact match // if the route is not an exact match, executeRouter will handle rendering the app router - // The cached match avoids another route-tree traversal during the app router render. - const [matchedRoutes, rawParams, foundRoute] = + // the match will be cached internally, so no extra work is done during the app router render + const { matchedRoutes, foundRoute, routeParams } = router.getMatchedRoutes(pathname) - const isExactMatch = foundRoute && rawParams['**'] === undefined + const isExactMatch = foundRoute && routeParams['**'] === undefined // Collect and dedupe route middlewares const routeMiddlewares: Array = [] - let terminalHandler: TODO = (ctx: TODO) => - executeRouter(ctx.context, matchedRoutes, router) - let terminalNext: TODO // Collect middleware from matched routes, filtering out those already executed // in the request phase @@ -1175,7 +774,7 @@ async function handleServerRoutes({ if (serverMiddleware) { const flattened = flattenMiddlewares(serverMiddleware) for (const m of flattened) { - if (!executedRequestMiddlewares?.has(m)) { + if (!executedRequestMiddlewares.has(m)) { routeMiddlewares.push(m.options.server) } } @@ -1184,6 +783,7 @@ async function handleServerRoutes({ // Add handler middleware if exact match const server = foundRoute?.options.server + let isHeadFallback = false if (server?.handlers && isExactMatch) { const handlers = typeof server.handlers === 'function' @@ -1197,45 +797,50 @@ async function handleServerRoutes({ requestMethod === 'HEAD' ? (handlers['HEAD'] ?? handlers['GET'] ?? handlers['ANY']) : (handlers[requestMethod] ?? handlers['ANY']) + isHeadFallback = + requestMethod === 'HEAD' && handler !== undefined && !handlers['HEAD'] + if (handler) { const mayDefer = !!foundRoute.options.component - if (typeof handler !== 'function') { + if (typeof handler === 'function') { + routeMiddlewares.push(handlerToMiddleware(handler, mayDefer)) + } else { if (handler.middleware?.length) { const handlerMiddlewares = flattenMiddlewares(handler.middleware) for (const m of handlerMiddlewares) { routeMiddlewares.push(m.options.server) } } - } - 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) + if (handler.handler) { + routeMiddlewares.push(handlerToMiddleware(handler.handler, mayDefer)) } } } } - const response = await executeMiddleware( - routeMiddlewares, - terminalHandler, - { - request, - context, - params: rawParams, - pathname, - handlerType: 'router', - }, - signal, - event, - terminalNext, - ) + // Final middleware: execute router with matched routes for dev styles + routeMiddlewares.push(((ctx: TODO) => + executeRouter(ctx.context, matchedRoutes)) as TODO) + + const { ctx, response } = await executeMiddleware(routeMiddlewares, { + request, + context, + params: routeParams, + pathname, + handlerType: 'router', + }) + + // RFC 9110 §9.3.2: HEAD must carry the same header fields as GET but no body. + // Resolve any redirect before stripping so the Location header survives. + if (isHeadFallback) { + if (!ctx.response) { + throwRouteHandlerError() + } + + const resolved = await handleRedirectResponse(response, request, getRouter) + return stripSsrResponseBody(resolved, 'HEAD body stripped') + } return normalizeSsrResponse(response) } diff --git a/packages/start-server-core/src/default-server-fn-dispatch.ts b/packages/start-server-core/src/default-server-fn-dispatch.ts new file mode 100644 index 0000000000..81c3c3a2d2 --- /dev/null +++ b/packages/start-server-core/src/default-server-fn-dispatch.ts @@ -0,0 +1,5 @@ +// Default resolution target for `#tanstack-start-server-fn-dispatch` (see +// the package.json `imports` map): the split-transport dispatch. Alternative +// transports (e.g. the solid directive transport) override the specifier +// with a virtual module at build time. +export { defaultDispatchServerFnRequest as dispatchServerFnRequest } from './server-functions-handler' diff --git a/packages/start-server-core/src/early-hints.ts b/packages/start-server-core/src/early-hints.ts index 4b504d77d5..f46cf5f587 100644 --- a/packages/start-server-core/src/early-hints.ts +++ b/packages/start-server-core/src/early-hints.ts @@ -191,7 +191,7 @@ export function collectStaticHintsFromManifest( rel: attrs.rel, as: 'script', } - addEarlyHintFetchAttrs(hint, attrs) + if (attrs.crossOrigin !== undefined) hint.crossOrigin = attrs.crossOrigin hints.push(hint) } diff --git a/packages/start-server-core/src/finalManifest.ts b/packages/start-server-core/src/finalManifest.ts index f1a9a7044e..274e6cb000 100644 --- a/packages/start-server-core/src/finalManifest.ts +++ b/packages/start-server-core/src/finalManifest.ts @@ -3,7 +3,10 @@ import { resolveTransformAssetsConfig, transformManifestAssets, } from './transformAssetUrls' -import { getStaticInlineCss, resolveInlineCssForRequest } from './inlineCss' +import { + getStaticHandlerInlineCssDefault, + resolveInlineCssForRequest, +} from './inlineCss' import type { ServerManifest } from '@tanstack/router-core' import type { HandlerInlineCssOption } from './inlineCss' import type { @@ -37,12 +40,7 @@ export interface FinalManifestOptions { } type FinalManifestCacheKey = 'inline-css' | 'linked-css' -// An entry holds the pending manifest, then the manifest itself once it -// resolves, so later requests read it without waiting. -type FinalManifestCache = Map< - FinalManifestCacheKey, - ServerManifest | Promise -> +type FinalManifestCache = Map> export type GetBaseManifest = () => Promise export interface FinalManifestRequestOptions { @@ -64,9 +62,7 @@ export interface FinalManifestResolver { warmup: (opts: { getBaseManifest: GetBaseManifest }) => Promise | undefined - resolveCached: ( - opts: FinalManifestRequestOptions, - ) => ServerManifest | Promise + resolveCached: (opts: FinalManifestRequestOptions) => Promise resolveUncached: ( opts: FinalManifestRequestOptions, ) => Promise @@ -147,7 +143,9 @@ export function createFinalManifestResolver( opts.transformAssets, { cacheCreateTransform: opts.cacheCreateTransform }, ) - const handlerDefaultInlineCss = getStaticInlineCss(undefined, opts.inlineCss) + const handlerDefaultInlineCss = getStaticHandlerInlineCssDefault( + opts.inlineCss, + ) const getRequestManifestOptions = async ( requestOpts: FinalManifestRequestOptions, @@ -192,24 +190,8 @@ export function createFinalManifestResolver( transformResolver.getTransformFn({ warmup: true }), onError: transformResolver.clearCachedCreateTransform, }), - resolveCached: (requestOpts) => { - // With a cached transform, the entry for the request's inline-CSS choice - // is the manifest resolveRequest would produce, unless a handler - // callback still has to make that choice. - const inlineCss = getStaticInlineCss( - requestOpts.requestInlineCss, - opts.inlineCss, - ) - if (transformResolver.cache && inlineCss !== undefined) { - const cached = finalManifestCache.get( - getFinalManifestCacheKey(inlineCss), - ) - if (cached) { - return cached - } - } - return resolveRequest(requestOpts, finalManifestCache) - }, + resolveCached: (requestOpts) => + resolveRequest(requestOpts, finalManifestCache), resolveUncached: (requestOpts) => resolveRequest(requestOpts, undefined), } } @@ -219,41 +201,35 @@ function getFinalManifestCacheKey(inlineCss: boolean): FinalManifestCacheKey { } function cacheFinalManifestPromise( - finalManifestCache: FinalManifestCache, + cachedFinalManifestPromises: FinalManifestCache, cacheKey: FinalManifestCacheKey, promise: Promise, ): Promise { - const cachedPromise = promise.then( - (manifest) => { - if (finalManifestCache.get(cacheKey) === cachedPromise) { - finalManifestCache.set(cacheKey, manifest) - } - return manifest - }, - (error) => { - if (finalManifestCache.get(cacheKey) === cachedPromise) { - finalManifestCache.delete(cacheKey) - } - throw error - }, - ) + const cachedFinalManifestPromise = promise.catch((error) => { + if ( + cachedFinalManifestPromises.get(cacheKey) === cachedFinalManifestPromise + ) { + cachedFinalManifestPromises.delete(cacheKey) + } + throw error + }) - finalManifestCache.set(cacheKey, cachedPromise) - return cachedPromise + cachedFinalManifestPromises.set(cacheKey, cachedFinalManifestPromise) + return cachedFinalManifestPromise } -function getOrCreateCachedFinalManifest( - finalManifestCache: FinalManifestCache, +function getOrCreateCachedFinalManifestPromise( + cachedFinalManifestPromises: FinalManifestCache, cacheKey: FinalManifestCacheKey, computeFinalManifest: () => Promise, -): ServerManifest | Promise { - const cached = finalManifestCache.get(cacheKey) - if (cached) { - return cached +): Promise { + const cachedFinalManifestPromise = cachedFinalManifestPromises.get(cacheKey) + if (cachedFinalManifestPromise) { + return cachedFinalManifestPromise } return cacheFinalManifestPromise( - finalManifestCache, + cachedFinalManifestPromises, cacheKey, Promise.resolve().then(computeFinalManifest), ) @@ -287,7 +263,7 @@ async function resolveFinalManifest(opts: { } if (opts.finalManifestCache && (!opts.transformFn || opts.cache)) { - return getOrCreateCachedFinalManifest( + return getOrCreateCachedFinalManifestPromise( opts.finalManifestCache, getFinalManifestCacheKey(opts.inlineCss), computeFinalManifest, @@ -314,13 +290,11 @@ function warmupFinalManifest(opts: { return undefined } - // Warmup runs when the handler is created, before any request fills the - // cache. const inlineCss = opts.handlerDefaultInlineCss - const warmupPromise = cacheFinalManifestPromise( + const warmupPromise = getOrCreateCachedFinalManifestPromise( opts.finalManifestCache, getFinalManifestCacheKey(inlineCss), - Promise.resolve().then(async () => { + async () => { const [base, transformFn] = await Promise.all([ opts.getBaseManifest(), opts.getTransformFn(), @@ -331,7 +305,7 @@ function warmupFinalManifest(opts: { transformFn, inlineCss, }) - }), + }, ) if (opts.onError) { diff --git a/packages/start-server-core/src/frame-protocol.ts b/packages/start-server-core/src/frame-protocol.ts index b1f32eb702..e96275c0bb 100644 --- a/packages/start-server-core/src/frame-protocol.ts +++ b/packages/start-server-core/src/frame-protocol.ts @@ -8,41 +8,31 @@ * - payload: variable length bytes */ -import { - FRAME_HEADER_SIZE, - FRAME_TYPE_CHUNK, - FRAME_TYPE_END, - FRAME_TYPE_ERROR, - FRAME_TYPE_JSON, - MAX_FRAME_PAYLOAD_SIZE, -} from '@tanstack/start-client-core/client-rpc' +// Re-export constants from shared location +import { FRAME_HEADER_SIZE, FrameType } from '@tanstack/start-client-core' -type FrameType = - | typeof FRAME_TYPE_JSON - | typeof FRAME_TYPE_CHUNK - | typeof FRAME_TYPE_END - | typeof FRAME_TYPE_ERROR +export { + FRAME_HEADER_SIZE, + FrameType, + TSS_CONTENT_TYPE_FRAMED, + TSS_CONTENT_TYPE_FRAMED_VERSIONED, + TSS_FRAMED_PROTOCOL_VERSION, +} from '@tanstack/start-client-core' /** Cached TextEncoder for frame encoding */ const textEncoder = new TextEncoder() /** Shared empty payload for END frames - avoids allocation per call */ const EMPTY_PAYLOAD = new Uint8Array(0) -const MAX_ERROR_MESSAGE_CODE_UNITS = 4096 /** * Encodes a single frame with header and payload. */ -function encodeFrame( +export function encodeFrame( type: FrameType, streamId: number, payload: Uint8Array, ): Uint8Array { - if (payload.byteLength > MAX_FRAME_PAYLOAD_SIZE) { - throw new RangeError( - `Frame payload exceeds ${MAX_FRAME_PAYLOAD_SIZE} bytes`, - ) - } const frame = new Uint8Array(FRAME_HEADER_SIZE + payload.length) // Write header bytes directly to avoid DataView allocation per frame // Frame format: [type:1][streamId:4 BE][length:4 BE] @@ -59,15 +49,37 @@ function encodeFrame( return frame } -/** Encodes an error message payload, truncated to a bounded length. */ -function encodeErrorPayload(error: unknown): Uint8Array { - const originalMessage = - error instanceof Error ? error.message : String(error ?? 'Unknown error') +/** + * Encodes a JSON frame (type 0, streamId 0). + */ +export function encodeJSONFrame(json: string): Uint8Array { + return encodeFrame(FrameType.JSON, 0, textEncoder.encode(json)) +} + +/** + * Encodes a raw stream chunk frame. + */ +export function encodeChunkFrame( + streamId: number, + chunk: Uint8Array, +): Uint8Array { + return encodeFrame(FrameType.CHUNK, streamId, chunk) +} + +/** + * Encodes a raw stream end frame. + */ +export function encodeEndFrame(streamId: number): Uint8Array { + return encodeFrame(FrameType.END, streamId, EMPTY_PAYLOAD) +} + +/** + * Encodes a raw stream error frame. + */ +export function encodeErrorFrame(streamId: number, error: unknown): Uint8Array { const message = - originalMessage.length > MAX_ERROR_MESSAGE_CODE_UNITS - ? `${originalMessage.slice(0, MAX_ERROR_MESSAGE_CODE_UNITS)}…` - : originalMessage - return textEncoder.encode(message) + error instanceof Error ? error.message : String(error ?? 'Unknown error') + return encodeFrame(FrameType.ERROR, streamId, textEncoder.encode(message)) } /** @@ -79,280 +91,168 @@ export interface LateStreamRegistration { stream: ReadableStream } -/** One serialized JSON patch and the raw streams referenced by that patch. */ -export interface MultiplexedStreamRecord { - json: Uint8Array - rawStreams: Array -} - -export interface MultiplexedStreamOptions { - onCancel?: (reason?: unknown) => void - signal?: AbortSignal -} - -type CancellableReader = Pick< - ReadableStreamDefaultReader, - 'cancel' | 'releaseLock' -> - /** - * Creates a multiplexed ReadableStream from serialized response records. + * Creates a multiplexed ReadableStream from JSON stream and raw streams. * - * A record's JSON frame is admitted before any raw stream referenced by that - * record starts. Raw streams from admitted records are pumped concurrently. - * The caller bounds the stream count before records reach this function. + * The JSON stream emits NDJSON lines (from seroval's toCrossJSONStream). + * Raw streams are pumped concurrently, interleaved with JSON frames. + * + * Supports late stream registration for RawStreams discovered after initial + * serialization (e.g., from resolved Promises). + * + * @param jsonStream Stream of JSON strings (each string is one NDJSON line) + * @param rawStreams Map of stream IDs to raw binary streams (known at start) + * @param lateStreamSource Optional stream of late registrations for streams discovered later */ export function createMultiplexedStream( - recordStream: ReadableStream, - options: MultiplexedStreamOptions = {}, + jsonStream: ReadableStream, + rawStreams: Map>, + lateStreamSource?: ReadableStream, ): ReadableStream { + // Shared state for the multiplexed stream let controller: ReadableStreamDefaultController - let stopped: false | [unknown] = false - let activePumps = 0 - let wakeDemand: (() => void) | undefined - let admission: Promise | undefined - const readers = new Set() - const pendingRawStreams = new Set>() - const abortOutput = () => errorOutput(options.signal?.reason) + let cancelled = false + const readers: Array> = [] - const wakeAdmission = () => { - const wake = wakeDemand - wakeDemand = undefined - wake?.() - } - - const cancelReader = (reader: CancellableReader, reason?: unknown) => { - void reader.cancel(reason).catch(() => {}) - } - - const cancelStream = (stream: ReadableStream, reason?: unknown) => { - void stream.cancel(reason).catch(() => {}) - } - - const stop = (reason?: unknown) => { - if (stopped) { + // Helper to enqueue a frame, ignoring errors if stream is closed/cancelled + const enqueue = (frame: Uint8Array): boolean => { + if (cancelled) return false + try { + controller.enqueue(frame) + return true + } catch { return false } - stopped = [reason] - options.signal?.removeEventListener('abort', abortOutput) - wakeAdmission() - for (const reader of readers) { - cancelReader(reader, reason) - } - for (const stream of pendingRawStreams) { - cancelStream(stream, reason) - } - pendingRawStreams.clear() - return true } - const errorOutput = (error: unknown) => { - if (!stop(error)) { - return - } + // Helper to error the output stream (for fatal errors like JSON stream failure) + const errorOutput = (error: unknown): void => { + if (cancelled) return + cancelled = true try { controller.error(error) } catch { - // The output was already closed by its consumer. + // Already errored + } + // Cancel all readers to stop other pumps + for (const reader of readers) { + reader.cancel().catch(() => {}) } } - const waitForDemand = async () => { - while (!stopped && (controller.desiredSize ?? 0) <= 0) { - await new Promise((resolve) => { - wakeDemand = resolve - }) - } - return !stopped - } - - // Only the pump at the head of this chain may inspect desiredSize and - // enqueue. Each other pump can retain at most one unencoded source chunk. - // The frame is encoded only once the output has demand for it. - const admitFrame = ( - type: FrameType, - streamId: number, - payload: Uint8Array, - ): boolean | Promise => { - if (stopped) { - return false - } - if (!admission && (controller.desiredSize ?? 0) > 0) { - controller.enqueue(encodeFrame(type, streamId, payload)) - return true - } - - const runAdmission = async () => { - if (!(await waitForDemand())) { - return false - } - controller.enqueue(encodeFrame(type, streamId, payload)) - return true - } - const result = admission ? admission.then(runAdmission) : runAdmission() - const clearAdmission = () => { - if (admission === tail) { - admission = undefined - } - } - const tail = result.then(clearAdmission, clearAdmission) - admission = tail - return result - } - - const maybeClose = () => { - if (activePumps !== 0 || !stop()) { - return - } - try { - controller.close() - } catch { - // The output was already closed by its consumer. - } - } - - const startPump = (pump: () => Promise) => { - activePumps++ - void pump().then( - () => { - activePumps-- - maybeClose() - }, - (error) => { - activePumps-- - errorOutput(error) - }, - ) - } - + // Pumps a raw stream, sending CHUNK frames and END/ERROR on completion async function pumpRawStream( streamId: number, stream: ReadableStream, - ) { + ): Promise { const reader = stream.getReader() - readers.add(reader) + readers.push(reader) try { - while (!stopped) { + while (!cancelled) { const { done, value } = await reader.read() - // Cancellation can run while the read is suspended. - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (stopped) { - return - } if (done) { - const frameAdmission = admitFrame( - FRAME_TYPE_END, - streamId, - EMPTY_PAYLOAD, - ) - if (frameAdmission !== true) { - await frameAdmission - } + enqueue(encodeEndFrame(streamId)) return } - if (!(value instanceof Uint8Array)) { - throw new TypeError('RawStream chunks must be Uint8Array') - } - // One frame per read, split only when the chunk exceeds a frame. - let offset = 0 - do { - const chunk = - value.byteLength <= MAX_FRAME_PAYLOAD_SIZE - ? value - : value.subarray(offset, offset + MAX_FRAME_PAYLOAD_SIZE) - const frameAdmission = admitFrame(FRAME_TYPE_CHUNK, streamId, chunk) - if ( - frameAdmission !== true && - (frameAdmission === false || !(await frameAdmission)) - ) { - return - } - offset += MAX_FRAME_PAYLOAD_SIZE - } while (offset < value.byteLength) + if (!enqueue(encodeChunkFrame(streamId, value))) return } } catch (error) { - if (!stopped) { - // A raw-stream failure is isolated to that stream. - const frameAdmission = admitFrame( - FRAME_TYPE_ERROR, - streamId, - encodeErrorPayload(error), - ) - if (frameAdmission !== true) { - await frameAdmission - } - } + // Raw stream error - send ERROR frame, don't fail entire response + enqueue(encodeErrorFrame(streamId, error)) } finally { - readers.delete(reader) reader.releaseLock() } } - async function pumpRecords() { - const reader = recordStream.getReader() - readers.add(reader) + // Pumps the JSON stream, sending JSON frames + // JSON stream errors are fatal - they error the entire output + async function pumpJSON(): Promise { + const reader = jsonStream.getReader() + readers.push(reader) try { - while (!stopped) { + while (!cancelled) { const { done, value } = await reader.read() - // Cancellation can run while the read is suspended. - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (stopped) { - if (!done) { - for (const registration of value.rawStreams) { - cancelStream(registration.stream, stopped[0]) - } - } - return - } - if (done) { - return - } - for (const registration of value.rawStreams) { - pendingRawStreams.add(registration.stream) - } - const frameAdmission = admitFrame(FRAME_TYPE_JSON, 0, value.json) - if ( - frameAdmission !== true && - (frameAdmission === false || !(await frameAdmission)) - ) { - return - } - for (const registration of value.rawStreams) { - pendingRawStreams.delete(registration.stream) - startPump( - pumpRawStream.bind(undefined, registration.id, registration.stream), - ) - } + if (done) return + if (!enqueue(encodeJSONFrame(value))) return } } catch (error) { - if (!stopped) { - // JSON records describe the response graph, so losing one is fatal. - errorOutput(error) - } + // JSON stream error is fatal - error the entire output + errorOutput(error) + throw error // Re-throw to signal failure to Promise.all } finally { - readers.delete(reader) reader.releaseLock() } } + // Pumps late stream registrations, spawning raw stream pumps as they arrive + async function pumpLateStreams(): Promise>> { + if (!lateStreamSource) return [] + + const lateStreamPumps: Array> = [] + const reader = lateStreamSource.getReader() + readers.push(reader) + try { + while (!cancelled) { + const { done, value } = await reader.read() + if (done) break + // Start pumping this late stream and track it + lateStreamPumps.push(pumpRawStream(value.id, value.stream)) + } + } finally { + reader.releaseLock() + } + return lateStreamPumps + } + return new ReadableStream({ - start(ctrl) { + async start(ctrl) { controller = ctrl - if (options.signal?.aborted) { - cancelStream(recordStream, options.signal.reason) - errorOutput(options.signal.reason) - return + + // Collect all pump promises + const pumps: Array>>> = [pumpJSON()] + + for (const [streamId, stream] of rawStreams) { + pumps.push(pumpRawStream(streamId, stream)) } - options.signal?.addEventListener('abort', abortOutput, { once: true }) - startPump(pumpRecords) - }, - pull() { - wakeAdmission() - }, - cancel(reason) { - if (stop(reason)) { - options.onCancel?.(reason) + + // Add late stream pump (returns array of spawned pump promises) + if (lateStreamSource) { + pumps.push(pumpLateStreams()) } + + try { + // Wait for initial pumps to complete + const results = await Promise.all(pumps) + + // Wait for any late stream pumps that were spawned + const latePumps = results.find(Array.isArray) as + | Array> + | undefined + if (latePumps && latePumps.length > 0) { + await Promise.all(latePumps) + } + + // All pumps done - close the output stream + if (!cancelled) { + try { + controller.close() + } catch { + // Already closed + } + } + } catch { + // Error already handled by errorOutput in pumpJSON + // or was a raw stream error (non-fatal, already sent ERROR frame) + } + }, + + cancel() { + cancelled = true + // Cancel all readers to stop pumps quickly + for (const reader of readers) { + reader.cancel().catch(() => {}) + } + readers.length = 0 }, }) } diff --git a/packages/start-server-core/src/headers.ts b/packages/start-server-core/src/headers.ts deleted file mode 100644 index e336588a32..0000000000 --- a/packages/start-server-core/src/headers.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { splitSetCookieString } from 'cookie-es' - -type HeadersWithGetSetCookie = Headers & { - getSetCookie?: () => Array -} - -export function getSetCookieValues(headers: Headers): Array { - const headersWithSetCookie = headers as HeadersWithGetSetCookie - if (typeof headersWithSetCookie.getSetCookie === 'function') { - return headersWithSetCookie.getSetCookie() - } - const value = headers.get('set-cookie') - return value ? splitSetCookieString(value) : [] -} diff --git a/packages/start-server-core/src/index.tsx b/packages/start-server-core/src/index.tsx index 00d036b024..2428bd1703 100644 --- a/packages/start-server-core/src/index.tsx +++ b/packages/start-server-core/src/index.tsx @@ -26,10 +26,14 @@ export * from './request-response' export * from './virtual-modules' +export { defaultDispatchServerFnRequest } from './server-functions-handler' + export { HEADERS } from './constants' export type { RequestHandler, RequestOptions } from './request-handler' +export type { SessionConfig } from './session' + export type { EarlyHint, EarlyHintsEvent, diff --git a/packages/start-server-core/src/inlineCss.ts b/packages/start-server-core/src/inlineCss.ts index 6fd7bd7fe2..249b7f40c8 100644 --- a/packages/start-server-core/src/inlineCss.ts +++ b/packages/start-server-core/src/inlineCss.ts @@ -4,21 +4,13 @@ export type HandlerInlineCssOption = | boolean | ((ctx: { request: Request }) => Awaitable) -/** - * The inline-CSS choice that needs no handler callback: a request override - * wins, then a static handler option, then the default. Undefined when a - * handler callback has to decide. - */ -export function getStaticInlineCss( - requestInlineCss: boolean | undefined, +export function getStaticHandlerInlineCssDefault( handlerInlineCss: HandlerInlineCssOption | undefined, -): boolean | undefined { - if (requestInlineCss !== undefined) { - return requestInlineCss - } +) { if (typeof handlerInlineCss === 'function') { return undefined } + return handlerInlineCss ?? true } @@ -27,15 +19,13 @@ export async function resolveInlineCssForRequest(opts: { handlerInlineCss: HandlerInlineCssOption | undefined requestInlineCss: boolean | undefined }) { - const inlineCss = getStaticInlineCss( - opts.requestInlineCss, - opts.handlerInlineCss, - ) - if (inlineCss !== undefined) { - return inlineCss + if (opts.requestInlineCss !== undefined) { + return opts.requestInlineCss } - // Only a handler callback leaves the choice open. - return await ( - opts.handlerInlineCss as Exclude - )({ request: opts.request }) + + if (typeof opts.handlerInlineCss === 'function') { + return await opts.handlerInlineCss({ request: opts.request }) + } + + return opts.handlerInlineCss ?? true } diff --git a/packages/start-server-core/src/internal-request-response.ts b/packages/start-server-core/src/internal-request-response.ts deleted file mode 100644 index 90128ab29c..0000000000 --- a/packages/start-server-core/src/internal-request-response.ts +++ /dev/null @@ -1,1490 +0,0 @@ -import { AsyncLocalStorage } from 'node:async_hooks' -import { isRedirect } from '@tanstack/router-core' - -import { parseCookie, parseSetCookie, serializeCookie } from 'cookie-es' -import { getSetCookieValues } from './headers' -import type { - RequestHeaderMap, - RequestHeaderName, - ResponseHeaderMap, - ResponseHeaderName, - TypedHeaders, -} from 'fetchdts' - -import type { CookieSerializeOptions } from 'cookie-es' -import type { RequestHandler } from './request-handler' - -export interface StartEvent { - request: Request - /** The parsed request URL. Callers must not mutate it. */ - requestUrl: URL - /** - * Lazily created response state. Stays `undefined` until the first - * response helper write so requests that never use helpers pay nothing. - */ - responseState?: ResponseState - /** The most recently reconciled response, used by response read helpers. */ - currentResponse?: Response - /** Applied helper operations belong to this invocation, across runtime copies. */ - responseHeaderAppends?: WeakMap> -} - -/** - * Event-owned mutable response state, recorded by the response helpers. - * - * A plain `Headers` object cannot distinguish between "not set" and - * "explicitly removed", so removals and Set-Cookie intent are tracked - * alongside the headers. All mutations flow through the helper functions in - * this module (`setResponseHeader`, `setCookie`, ...), which record that - * intent directly. - */ -interface ResponseState { - status?: number - statusText?: string - headers: Headers - removedHeaders?: Set - clearHeaders: boolean - setCookieBehavior?: 'merge' | 'replace' - headerAppends?: Map - /** Outside production: a discarded bodyless status was already reported. */ - bodylessStatusWarned?: boolean - /** Identity of each Set-Cookie string seen by this request's merges. */ - setCookieKeys?: Map -} - -interface HeaderAppendOperation { - value: string - previous?: HeaderAppendOperation -} - -// Use a global symbol to ensure the same AsyncLocalStorage instance is shared -// across different bundles that may each bundle this module. -const GLOBAL_EVENT_STORAGE_KEY = Symbol.for('tanstack-start:event-storage') - -const globalObj = globalThis as typeof globalThis & { - [GLOBAL_EVENT_STORAGE_KEY]?: AsyncLocalStorage -} - -if (!globalObj[GLOBAL_EVENT_STORAGE_KEY]) { - globalObj[GLOBAL_EVENT_STORAGE_KEY] = new AsyncLocalStorage() -} - -const eventStorage = globalObj[GLOBAL_EVENT_STORAGE_KEY] - -export type { ResponseHeaderName, RequestHeaderName } - -/** A detached view of outgoing headers. Use the response helpers for writes. */ -export type ReadonlyResponseHeaders = Omit< - TypedHeaders, - 'append' | 'delete' | 'set' | 'forEach' -> & { - forEach: ( - callback: ( - value: string, - name: ResponseHeaderName, - headers: ReadonlyResponseHeaders, - ) => void, - thisArg?: unknown, - ) => void -} - -// Lowercase protocol header names mapped to a required value, or to null when -// the header must be absent. Set-Cookie is never protected: it has one value -// per cookie. -type ProtectedHeaders = ReadonlyMap - -type MaybePromise = T | Promise - -// Protocol requirements describe the response body, so they follow the response -// through delegated requests as well as separately bundled runtime copies. -const PROTECTED_RESPONSE_HEADERS = Symbol.for( - 'tanstack-start:protected-response-headers', -) -type ProtectedResponse = Response & { - [PROTECTED_RESPONSE_HEADERS]?: ProtectedHeaders -} - -function getProtectedResponseHeaders( - response: Response, -): ProtectedHeaders | undefined { - return (response as ProtectedResponse)[PROTECTED_RESPONSE_HEADERS] -} - -function installProtectedResponseHeaders( - response: Response, - headers: ProtectedHeaders, -): void { - Object.defineProperty(response, PROTECTED_RESPONSE_HEADERS, { - value: headers, - configurable: true, - }) -} - -/** Transport requirements belong to the encoded body, not its wrapper. */ -export function transferResponseProtocol( - source: Response, - target: Response, -): void { - const protectedHeaders = getProtectedResponseHeaders(source) - if ( - protectedHeaders && - getProtectedResponseHeaders(target) !== protectedHeaders - ) { - installProtectedResponseHeaders(target, protectedHeaders) - } -} - -/** Preserve metadata when Start reconstructs an existing response. */ -export function transferResponseMetadata( - source: Response, - target: Response, -): void { - transferResponseProtocol(source, target) - const event = eventStorage.getStore() - const appliedHeaderAppends = event?.responseHeaderAppends?.get(source) - if (appliedHeaderAppends) { - event!.responseHeaderAppends!.set(target, appliedHeaderAppends) - } -} - -function normalizeHeaderName(name: string): string { - return name.toLowerCase() -} - -function sanitizeStatusMessage(statusMessage: string): string { - // Strip everything except horizontal tab and printable ASCII (space–'~') - // to prevent header injection through status text. - return statusMessage.replace(/[^\t\x20-\x7e]/g, '') -} - -// The Fetch `Response` constructor only accepts statuses in the 200-599 -// range (anything else throws a RangeError). Start responses are always -// represented as `Response` objects — for server routes and SSR documents -// just like for server functions — so out-of-range statuses (1xx, or exotic -// codes like 783/999) cannot be carried through the pipeline at all. -function sanitizeStatusCode( - statusCode: string | number | undefined, -): number | undefined { - const code = typeof statusCode === 'string' ? Number(statusCode) : statusCode - if ( - code === undefined || - !Number.isInteger(code) || - code < 200 || - code > 599 - ) { - return undefined - } - return code -} - -function getObjectProperty(value: unknown, key: string): unknown { - if ((typeof value === 'object' && value) || typeof value === 'function') { - return (value as Record)[key] - } - return undefined -} - -function getStatusCodeProperty( - value: unknown, - key: 'status' | 'statusCode', -): string | number | undefined { - const property = getObjectProperty(value, key) - if (typeof property === 'string' || typeof property === 'number') { - return property - } - return undefined -} - -function getErrorStatus(error: unknown): number | undefined { - const cause = getObjectProperty(error, 'cause') - return sanitizeStatusCode( - getStatusCodeProperty(error, 'status') ?? - getStatusCodeProperty(error, 'statusCode') ?? - getStatusCodeProperty(cause, 'status') ?? - getStatusCodeProperty(cause, 'statusCode'), - ) -} - -function getErrorStatusText(error: unknown): string | undefined { - const cause = getObjectProperty(error, 'cause') - const statusText = - getObjectProperty(error, 'statusText') ?? - getObjectProperty(error, 'statusMessage') ?? - getObjectProperty(cause, 'statusText') ?? - getObjectProperty(cause, 'statusMessage') - if (typeof statusText === 'string') { - return sanitizeStatusMessage(statusText) - } - return undefined -} - -// Start builds error bodies and serialized replies itself. These headers -// describe another body's framing or its connection, whether they come from -// error metadata or from helpers, so they would corrupt that body on the wire. -const GENERATED_BODY_EXCLUDED_HEADERS: ReadonlySet = new Set([ - 'connection', - 'content-encoding', - 'content-length', - 'keep-alive', - 'proxy-connection', - 'te', - 'trailer', - 'transfer-encoding', -]) - -// Responses from another fetch implementation or realm fail instanceof. -function isResponse(value: unknown): boolean { - return ( - value instanceof Response || - Object.prototype.toString.call(value) === '[object Response]' - ) -} - -export function getErrorHeaders(error: unknown): Headers | undefined { - let init = getObjectProperty(error, 'headers') - if (!init) { - const cause = getObjectProperty(error, 'cause') - // A Response cause is another server's reply, such as a failed upstream - // fetch. Its headers were written for that reply, not for this client. - if (isResponse(cause)) { - return undefined - } - init = getObjectProperty(cause, 'headers') - } - if (!init) { - return undefined - } - let headers: Headers - try { - headers = new Headers(init as HeadersInit) - } catch { - return undefined - } - for (const name of GENERATED_BODY_EXCLUDED_HEADERS) { - headers.delete(name) - } - return headers -} - -function getResponseState(event: StartEvent): ResponseState { - return (event.responseState ||= { - headers: new Headers(), - clearHeaders: false, - }) -} - -function setHeaderState(event: StartEvent, name: string, value: string): void { - const state = getResponseState(event) - const normalizedName = normalizeHeaderName(name) - state.headers.set(name, value) - state.headerAppends?.delete(normalizedName) - state.removedHeaders?.delete(normalizedName) - if (normalizedName === 'set-cookie') { - state.setCookieBehavior = 'replace' - } -} - -function appendHeaderState( - event: StartEvent, - name: string, - value: string, -): void { - const state = getResponseState(event) - const normalizedName = normalizeHeaderName(name) - const appendToReturnedHeader = - normalizedName !== 'set-cookie' && - !state.clearHeaders && - !state.removedHeaders?.has(normalizedName) && - (!state.headers.has(normalizedName) || - state.headerAppends?.has(normalizedName)) - // Validate and normalize through native Headers before recording intent. - state.headers.append(name, value) - if (appendToReturnedHeader) { - const appends = (state.headerAppends ||= new Map()) - appends.set(normalizedName, { - value, - previous: appends.get(normalizedName), - }) - } - state.removedHeaders?.delete(normalizedName) - if ( - normalizedName === 'set-cookie' && - state.setCookieBehavior !== 'replace' - ) { - state.setCookieBehavior = 'merge' - } -} - -function deleteHeaderState(event: StartEvent, name: string): void { - const state = getResponseState(event) - const normalizedName = normalizeHeaderName(name) - state.headers.delete(name) - state.headerAppends?.delete(normalizedName) - ;(state.removedHeaders ||= new Set()).add(normalizedName) - if (normalizedName === 'set-cookie') { - state.setCookieBehavior = 'replace' - } -} - -function getDistinctCookieKey( - name: string, - options: { domain?: string; path?: string }, - defaultPath = '', -): string { - return [name, options.domain || '', options.path ?? defaultPath].join(';') -} - -function getDistinctCookieKeyFromHeader(cookie: string): string { - const parsed = parseSetCookie(cookie) - // A cookie the parser rejects is identified by its exact string, so merging - // it again replaces it. Header values cannot contain NUL, so this key cannot - // match a parsed name, domain, and path. - return parsed ? getDistinctCookieKey(parsed.name, parsed) : `\0${cookie}` -} - -function replaceSetCookieValues( - headers: Headers, - cookies: Array, -): void { - headers.delete('set-cookie') - for (const cookie of cookies) { - headers.append('set-cookie', cookie) - } -} - -// Every reconcile pass merges the same immutable cookie strings again, so -// parse each string's identity once per request. -function getCookieKey(state: ResponseState, cookie: string): string { - const keys = (state.setCookieKeys ||= new Map()) - let key = keys.get(cookie) - if (key === undefined) { - key = getDistinctCookieKeyFromHeader(cookie) - keys.set(cookie, key) - } - return key -} - -function getMergedSetCookieValues( - state: ResponseState, - currentCookies: Array, - cookiesToMerge: Array, -): Array { - if (currentCookies.length === 0) { - return cookiesToMerge - } - const cookieKeysToMerge = new Set() - for (const cookie of cookiesToMerge) { - cookieKeysToMerge.add(getCookieKey(state, cookie)) - } - return currentCookies - .filter((cookie) => !cookieKeysToMerge.has(getCookieKey(state, cookie))) - .concat(cookiesToMerge) -} - -function mergeStartSetCookieValues( - event: StartEvent, - cookies: Array, -): void { - if (cookies.length === 0) { - return - } - - const state = getResponseState(event) - state.removedHeaders?.delete('set-cookie') - if (state.setCookieBehavior !== 'replace') { - state.setCookieBehavior = 'merge' - } - replaceSetCookieValues( - state.headers, - getMergedSetCookieValues(state, getSetCookieValues(state.headers), cookies), - ) -} - -function hasProtectedHeaderChanges( - response: Response, - protectedHeaders: ProtectedHeaders, -): boolean { - const headers = response.headers - for (const [name, value] of protectedHeaders) { - if (headers.get(name) !== value) { - return true - } - } - return false -} - -function applyProtectedHeaders( - protectedHeaders: ProtectedHeaders, - headers: Headers, -): void { - for (const [name, value] of protectedHeaders) { - if (value === null) { - headers.delete(name) - } else { - headers.set(name, value) - } - } -} - -function applyHeaderState( - target: Headers, - state: ResponseState, - generatedBody: boolean, - protectedHeaders?: ProtectedHeaders, - appliedHeaderAppends?: Map, -): Headers { - let headers = target - const mutableHeaders = () => { - if (headers === target) { - headers = new Headers(target) - } - return headers - } - - if (state.clearHeaders) { - // Snapshot the keys before deleting: deleting during live Headers - // iteration skips entries. - for (const name of Array.from(target.keys())) { - if (!protectedHeaders?.has(name)) { - mutableHeaders().delete(name) - } - } - } - - if (!state.clearHeaders && state.removedHeaders) { - for (const name of state.removedHeaders) { - if (!protectedHeaders?.has(name) && headers.has(name)) { - mutableHeaders().delete(name) - } - } - } - - // Headers iteration combines repeated header values into one comma-joined - // value, so `set` carries multi-value headers (Link, Vary, ...) losslessly. - // Set-Cookie is the one header where comma-joining is unsafe (cookie - // attributes like Expires contain commas), so it is handled separately. - for (const [name, value] of state.headers) { - if ( - name !== 'set-cookie' && - !protectedHeaders?.has(name) && - !(generatedBody && GENERATED_BODY_EXCLUDED_HEADERS.has(name)) - ) { - let append = state.headerAppends?.get(name) - if (!append) { - if (headers.get(name) !== value) { - mutableHeaders().set(name, value) - } - continue - } - const applied = appliedHeaderAppends?.get(name) - const pending: Array = [] - while (append && append !== applied) { - pending.push(append.value) - append = append.previous - } - for (let index = pending.length - 1; index >= 0; index--) { - mutableHeaders().append(name, pending[index]!) - } - } - } - - if (state.setCookieBehavior && !protectedHeaders?.has('set-cookie')) { - const eventSetCookies = getSetCookieValues(state.headers) - const currentCookies = getSetCookieValues(headers) - const cookies = - state.setCookieBehavior === 'replace' - ? eventSetCookies - : getMergedSetCookieValues(state, currentCookies, eventSetCookies) - if ( - cookies.length !== currentCookies.length || - cookies.some((cookie, index) => cookie !== currentCookies[index]) - ) { - replaceSetCookieValues(mutableHeaders(), cookies) - } - } - return headers -} - -function canHaveBody(method: string, status: number): boolean { - return method !== 'HEAD' && status !== 204 && status !== 205 && status !== 304 -} - -/** A protected content type marks a Start-serialized body the client decodes. */ -function isSerializedResponse(protectedHeaders: ProtectedHeaders | undefined) { - return typeof protectedHeaders?.get('content-type') === 'string' -} - -/** - * A helper status that forbids a body never applies to a serialized - * server-function reply, because the client must decode it. Only a HEAD request - * drops its body. - */ -function getHelperStatus( - state: ResponseState | undefined, - serialized: boolean, -): number | undefined { - const status = state?.status - if (!serialized || status === undefined || canHaveBody('GET', status)) { - return status - } - if (process.env.NODE_ENV !== 'production' && !state!.bodylessStatusWarned) { - state!.bodylessStatusWarned = true - console.warn( - `setResponseStatus(${status}) does not apply to serialized server function responses, because the client must decode their body. Return a Response from the server function to send a response without a body.`, - ) - } - return undefined -} - -/** Helper status text describes the helper status and is ignored with it. */ -function getHelperStatusText( - state: ResponseState | undefined, - helperStatus: number | undefined, -): string | undefined { - return helperStatus === state?.status ? state?.statusText : undefined -} - -function cancelDroppedBody(response: Response, reason: string): void { - try { - response.body?.cancel(reason).catch(() => {}) - } catch { - // Ignore locked or already-consumed bodies. - } -} - -function createReconciledResponse( - body: Response['body'], - status: number, - statusText: string, - headers: Headers, -): Response { - try { - return new Response(body, { - status, - statusText, - headers, - }) - } catch (cause) { - throw new Error( - 'Unable to reconcile response because its body has already been consumed or locked.', - { cause }, - ) - } -} - -/** Apply helper state to a response that leaves Start. */ -export function finalizeResponse( - response: Response, - event: StartEvent, -): Response { - return applyResponseState(response, event, event.request.method) -} - -/** - * Apply helper state with the body rules of `method`. Request middleware still - * reads a HEAD response's body, so the pipeline applies GET rules and strips a - * HEAD body only when the response leaves it. - */ -function applyResponseState( - response: Response, - event: StartEvent, - method: string, - disposeBody?: (reason: string) => void, -): Response { - const protectedHeaders = getProtectedResponseHeaders(response) - const serialized = isSerializedResponse(protectedHeaders) - let helperStatus = getHelperStatus(event.responseState, serialized) - // Some runtimes, such as Bun, allow a body on a 204, 205, or 304 response, - // so check the response's own status too. Read the body last: the getter - // allocates a stream for responses that have not exposed one yet. - const mustDropBody = - !canHaveBody(method, helperStatus ?? response.status) && - response.body !== null - if (mustDropBody) { - const reason = - method === 'HEAD' - ? 'HEAD body stripped' - : 'Response body dropped by Start reconciliation' - if (disposeBody) { - disposeBody(reason) - } else { - cancelDroppedBody(response, reason) - } - // Cancellation/SSR cleanup can write helpers. Read their final state - // before applying headers or recording appends. - helperStatus = getHelperStatus(event.responseState, serialized) - } - const state = event.responseState - - // Without helper writes, preserve the response. - if (!state && !mustDropBody) { - event.currentResponse = response - return response - } - - const status = helperStatus ?? response.status - const statusText = - getHelperStatusText(state, helperStatus) ?? response.statusText - const statusChanged = status !== response.status - const statusTextChanged = statusText !== response.statusText - // applyHeaderState returns the same headers when helper intent changes - // nothing. - const headers = state - ? applyHeaderState( - response.headers, - state, - serialized, - protectedHeaders, - event.responseHeaderAppends?.get(response), - ) - : response.headers - - const reconciled = - statusChanged || - statusTextChanged || - mustDropBody || - headers !== response.headers - ? createReconciledResponse( - mustDropBody ? null : response.body, - status, - statusText, - headers, - ) - : response - if (protectedHeaders && reconciled !== response) { - installProtectedResponseHeaders(reconciled, protectedHeaders) - } - return publishResponse(reconciled, event) -} - -function publishResponse(response: Response, event: StartEvent): Response { - const headerAppends = event.responseState?.headerAppends - if (headerAppends?.size) { - ;(event.responseHeaderAppends ||= new WeakMap()).set( - response, - new Map(headerAppends), - ) - } - event.currentResponse = response - return response -} - -function getHttpErrorStatus(status: number | undefined): number | undefined { - return status !== undefined && status >= 400 ? status : undefined -} - -/** - * Status for a response built from an uncaught error. Only an error status - * (400-599) from a helper or from error metadata describes the failure, so a - * success or redirect status set before the throw cannot hide it. The error is - * logged unless its own metadata marks it as an HTTP error. Reporting runs - * before helper state is read, so hooks that write helpers are included. - */ -function resolveErrorStatus( - error: unknown, - event: Pick | undefined, -): { status: number; statusText: string } { - const metadataStatus = getErrorStatus(error) - const errorStatus = getHttpErrorStatus(metadataStatus) - if (errorStatus === undefined) { - console.error(error) - } - const state = event?.responseState - const helperStatus = getHttpErrorStatus(state?.status) - const status = helperStatus ?? errorStatus ?? 500 - const statusText = - getHelperStatusText(state, helperStatus) ?? - (status === errorStatus || metadataStatus === undefined - ? getErrorStatusText(error) - : undefined) ?? - '' - if (state && state.status !== helperStatus) { - // The failure replaced the response that status was meant for. Discard it - // so later reconciliation keeps the error status. - state.status = undefined - state.statusText = undefined - } - return { status, statusText } -} - -/** - * Internal: status and status text for a serialized server-function error. - * Logs the error and discards a non-error helper status, like any error - * response Start builds. - */ -export function resolveErrorResponseStatus(error: unknown): { - status: number - statusText: string -} { - return resolveErrorStatus(error, eventStorage.getStore()) -} - -function createErrorResponse(error: unknown, event: StartEvent): Response { - // Error metadata and reporting hooks can call public response helpers. - // Materialize them before taking the state used to build the response. - let headers = getErrorHeaders(error) ?? new Headers() - const { status, statusText } = resolveErrorStatus(error, event) - const state = event.responseState - const body = canHaveBody(event.request.method, status) - ? JSON.stringify({ - status, - statusText, - unhandled: true, - message: 'HTTPError', - }) - : null - if (!headers.has('content-type')) { - headers.set('content-type', 'application/json') - } - - if (state) { - headers = applyHeaderState(headers, state, true) - } - - // Build Start-owned errors with their final headers instead of creating a - // response that reconciliation must immediately reconstruct. A byte body - // keeps Fetch from restoring Content-Type after an explicit helper removal. - return publishResponse( - new Response( - body !== null && !headers.has('content-type') - ? new TextEncoder().encode(body) - : body, - { status, statusText, headers }, - ), - event, - ) -} - -function finalizeError(error: unknown, event: StartEvent): Response { - if (error instanceof Response) { - return finalizeResponse(error, event) - } - return createErrorResponse(error, event) -} - -export function handleStartError(error: unknown): Response { - const event = eventStorage.getStore() - if (event) { - return finalizeError(error, event) - } - if (error instanceof Response) { - return error - } - // Outside a server entry there is no invocation to recover. The thrown - // value is never used as a request identifier. - const request = new Request('http://localhost') - return createErrorResponse(error, { - request, - requestUrl: new URL(request.url), - }) -} - -/** Apply helper state to a response inside the request middleware pipeline. */ -export function reconcileResponse( - response: Response, - event: StartEvent, - disposeBody?: (reason: string) => void, -): Response { - // Without helper writes, only a bodyless status could change the response, - // and the response Start last published already satisfies it. Router - // redirects still need destination resolution (or an RPC envelope), so they - // keep their identity until createStartHandler resolves them; response - // getters can already read the helper overlay on this snapshot. - if ( - (!event.responseState && - (response === event.currentResponse || - canHaveBody('GET', response.status))) || - isRedirect(response) - ) { - event.currentResponse = response - return response - } - return applyResponseState(response, event, 'GET', disposeBody) -} - -/** - * Restore protocol headers that middleware changed directly on the response. - * Start does this once, when the response leaves the request middleware - * pipeline; helper writes never override them. - */ -export function restoreResponseProtocol( - response: Response, - event: StartEvent, -): Response { - const protectedHeaders = getProtectedResponseHeaders(response) - if ( - !protectedHeaders || - !hasProtectedHeaderChanges(response, protectedHeaders) - ) { - return response - } - const headers = new Headers(response.headers) - applyProtectedHeaders(protectedHeaders, headers) - const restored = createReconciledResponse( - response.body, - response.status, - response.statusText, - headers, - ) - transferResponseMetadata(response, restored) - event.currentResponse = restored - return restored -} - -/** - * Build a Start-owned serialized reply with already normalized protocol - * headers. A bodyless helper status never applies to it; only a HEAD request - * drops its body. - */ -export function createFinalizedResponse( - body: string | Uint8Array, - headers: Headers, - protectedHeaders: ProtectedHeaders, - event: StartEvent, -): Response { - const state = event.responseState - let status = 200 - let statusText = '' - if (state) { - const helperStatus = getHelperStatus(state, true) - status = helperStatus ?? 200 - statusText = getHelperStatusText(state, helperStatus) ?? '' - headers = applyHeaderState(headers, state, true, protectedHeaders) - } - const response = new Response( - canHaveBody(event.request.method, status) ? (body as BodyInit) : null, - { status, statusText, headers }, - ) - // A new response has no protection to merge with. - installProtectedResponseHeaders(response, protectedHeaders) - return publishResponse(response, event) -} - -export function protectResponseHeaders( - response: Response, - headers: ProtectedHeaders, -): void { - // Callers supply immutable protocol requirements with lowercase names. - // Share those requirements across responses instead of capturing each one. - const previous = getProtectedResponseHeaders(response) - if (previous === headers) { - return - } - if (previous) { - const merged = new Map(previous) - for (const [name, value] of headers) { - merged.set(name, value) - } - headers = merged - } - installProtectedResponseHeaders(response, headers) -} - -/** - * Set and protect transport headers on a new response. Reuse the body stream - * without cloning or teeing it; callers transfer ownership to the result. - */ -export function setProtectedResponseHeaders( - response: Response, - headers: ProtectedHeaders, -): Response { - let next: Response - try { - // Response copies its initializer's headers; change only that fresh copy. - next = new Response(response.body, response) - applyProtectedHeaders(headers, next.headers) - } catch (cause) { - throw new Error( - 'Unable to set response header because its body has already been consumed or locked.', - { cause }, - ) - } - transferResponseMetadata(response, next) - protectResponseHeaders(next, headers) - return next -} - -function decodePathname(pathname: string): string | undefined { - try { - // Return the value so bundlers preserve the potentially throwing decode. - return decodeURI(pathname) - } catch (error) { - if (error instanceof URIError) { - return undefined - } - throw error - } -} - -/** A Start handler that runs in a request scope and receives its event. */ -type ScopedRequestHandler = ( - request: Request, - requestOpts: any, - event: StartEvent, -) => MaybePromise - -function runInStartRequest( - request: Request, - requestOpts: any, - handler: ScopedRequestHandler, -): MaybePromise { - let requestUrl: URL - try { - requestUrl = new URL(request.url) - } catch (error) { - if (error instanceof TypeError) { - return new Response(null, { status: 400, statusText: 'Bad Request' }) - } - throw error - } - const pathname = requestUrl.pathname - // Validate encoded paths without changing the pathname used for routing. - if (pathname.includes('%') && decodePathname(pathname) === undefined) { - return new Response(null, { status: 400, statusText: 'Bad Request' }) - } - const event: StartEvent = { request, requestUrl } - return eventStorage.run(event, handler, request, requestOpts, event) -} - -/** - * Keep the complete server entry, including custom error handling, inside one - * request scope. A custom returned response is used as-is; call handleStartError - * in a custom catch to preserve Start's response helper state. - */ -export function createServerEntry(entry: { - fetch: RequestHandler -}): { fetch: RequestHandler } { - return { - fetch: withStartRequest(async (request: Request, requestOpts: any) => { - try { - return await entry.fetch(request, requestOpts) - } catch (error) { - return handleStartError(error) - } - }), - } -} - -/** - * Establish request scope; the response pipeline owns reconciliation. A nested - * handler delegating the same request participates in its scope. Independent - * fetch invocations and different requests get a fresh event. - */ -export function withStartRequest(handler: ScopedRequestHandler) { - return (request: Request, requestOpts: any): MaybePromise => { - const event = eventStorage.getStore() - if (event?.request === request) { - return handler(request, requestOpts, event) - } - return runInStartRequest(request, requestOpts, handler) - } -} - -export function getStartEvent() { - const event = eventStorage.getStore() - if (!event) { - throw new Error( - `No StartEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.`, - ) - } - return event -} - -/** - * Internal: returns the per-request parsed URL for `request`, memoized on the - * Start event so the framework parses each request URL only once. Falls back - * to parsing when called outside a Start event (e.g. in unit tests) or for a - * foreign request. Callers MUST NOT mutate the returned URL. - */ -export function getParsedRequestUrl(request: Request): URL { - const event = eventStorage.getStore() - if (event && event.request === request) { - return event.requestUrl - } - return new URL(request.url) -} - -export function getRequest(): Request { - return getStartEvent().request -} - -export function getRequestHeaders(): TypedHeaders { - return getStartEvent().request.headers as TypedHeaders -} - -export function getRequestHeader(name: RequestHeaderName): string | undefined { - return getRequestHeaders().get(name) ?? undefined -} - -export function getRequestIP(opts?: { - /** - * Use the X-Forwarded-For HTTP header set by proxies. - * - * Note: Make sure that this header can be trusted (your application running behind a CDN or reverse proxy) before enabling. - */ - xForwardedFor?: boolean -}) { - const request = getRequest() - if (opts?.xForwardedFor) { - const forwardedFor = request.headers.get('x-forwarded-for') - const forwardedIp = forwardedFor?.split(',', 1)[0]?.trim() - if (forwardedIp) { - return forwardedIp - } - } - - return ( - (request as Request & { context?: { clientAddress?: string }; ip?: string }) - .context?.clientAddress || - (request as Request & { ip?: string }).ip || - undefined - ) -} - -/** - * Get the request hostname. - * - * If `xForwardedHost` is `true`, it will use the `x-forwarded-host` header if it exists. - * - * If no host header is found, it uses the request URL's host. - */ -export function getRequestHost(opts?: { xForwardedHost?: boolean }) { - const headers = getRequestHeaders() - if (opts?.xForwardedHost) { - const forwardedHost = headers.get('x-forwarded-host') - const host = forwardedHost?.split(',', 1)[0]?.trim() - if (host) { - return host - } - } - return headers.get('host') || getStartEvent().requestUrl.host || 'localhost' -} - -/** - * Get the full incoming request URL. - * - * If `xForwardedHost` is `true`, it will use the `x-forwarded-host` header if it exists. - * - * If `xForwardedProto` is `false`, it will not use the `x-forwarded-proto` header. - */ -export function getRequestUrl(opts?: { - xForwardedHost?: boolean - xForwardedProto?: boolean -}) { - const event = getStartEvent() - // Clone the memoized URL so callers can mutate the result freely. - const url = new URL(event.requestUrl) - url.protocol = getRequestProtocol(opts) - if (opts?.xForwardedHost) { - const host = getRequestHost(opts) - if (host) { - url.host = host - if (!/:\d+$/.test(host)) { - url.port = '' - } - } - } - return url -} - -/** - * Get the request protocol. - * - * If `x-forwarded-proto` header is set to "https", it will return "https". You can disable this behavior by setting `xForwardedProto` to `false`. - * - * If protocol cannot be determined, it will default to "http". - */ -export function getRequestProtocol(opts?: { - xForwardedProto?: boolean -}): 'http' | 'https' | (string & {}) { - const request = getRequest() - if (opts?.xForwardedProto !== false) { - const forwardedProto = request.headers - .get('x-forwarded-proto') - ?.split(',', 1)[0] - ?.trim() - .toLowerCase() - if (forwardedProto === 'https') { - return 'https' - } - if (forwardedProto === 'http') { - return 'http' - } - } - const url = getStartEvent().requestUrl - return url.protocol.slice(0, -1) as 'http' | 'https' | (string & {}) -} - -export function setResponseHeaders( - headers: TypedHeaders | ReadonlyResponseHeaders, -): void { - if (headers instanceof Headers) { - for (const [name, value] of headers) { - if (name !== 'set-cookie') { - setResponseHeader(name as ResponseHeaderName, value) - } - } - - const cookies = getSetCookieValues(headers) - if (cookies.length > 0) { - setResponseHeader( - 'set-cookie', - cookies.length === 1 ? cookies[0]! : cookies, - ) - } - return - } - - if (!Array.isArray(headers)) { - for (const [name, value] of Object.entries( - headers as unknown as Record>, - )) { - setResponseHeader(name as ResponseHeaderName, value) - } - return - } - - const groupedHeaders = new Map< - string, - { name: ResponseHeaderName; values: Array } - >() - const addHeader = (name: string, value: string) => { - const normalizedName = normalizeHeaderName(name) - let header = groupedHeaders.get(normalizedName) - if (!header) { - header = { name: name as ResponseHeaderName, values: [] } - groupedHeaders.set(normalizedName, header) - } - header.values.push(value) - } - - for (const [name, value] of headers) { - addHeader(name, value) - } - - for (const { name, values } of groupedHeaders.values()) { - setResponseHeader(name, values.length === 1 ? values[0]! : values) - } -} - -let SnapshotHeaders: typeof Headers | undefined - -/** - * Outside production, return the snapshot as a Headers subclass that warns when - * code tries to change the outgoing response through it. Its contents and - * behavior are identical to the production snapshot. - */ -function toResponseHeadersSnapshot(headers: Headers): ReadonlyResponseHeaders { - if (process.env.NODE_ENV === 'production') { - return headers as ReadonlyResponseHeaders - } - SnapshotHeaders ??= class ResponseHeadersSnapshot extends Headers { - override append(name: string, value: string): void { - warnSnapshotMutation('append') - super.append(name, value) - } - override delete(name: string): void { - warnSnapshotMutation('delete') - super.delete(name) - } - override set(name: string, value: string): void { - warnSnapshotMutation('set') - super.set(name, value) - } - } - // The constructor fills entries without calling the overridden methods. - const entries: Array<[string, string]> = [] - for (const [name, value] of headers) { - if (name !== 'set-cookie') { - entries.push([name, value]) - } - } - for (const cookie of getSetCookieValues(headers)) { - entries.push(['set-cookie', cookie]) - } - return new SnapshotHeaders(entries) as ReadonlyResponseHeaders -} - -function warnSnapshotMutation(method: string): void { - console.warn( - `getResponseHeaders().${method}() does not change the response: getResponseHeaders() returns a read-only snapshot. Use setResponseHeader, appendResponseHeader, removeResponseHeader, clearResponseHeaders, or setCookie instead.`, - ) -} - -/** - * Read a detached snapshot of the effective response headers. - * Use response header and cookie helpers to change the outgoing response. - */ -export function getResponseHeaders(): ReadonlyResponseHeaders { - const event = getStartEvent() - const state = event.responseState - const currentResponse = event.currentResponse - if (!currentResponse) { - return toResponseHeadersSnapshot( - state ? new Headers(state.headers) : new Headers(), - ) - } - const protectedHeaders = getProtectedResponseHeaders(currentResponse) - let headers = currentResponse.headers - if (state) { - headers = applyHeaderState( - headers, - state, - isSerializedResponse(protectedHeaders), - protectedHeaders, - event.responseHeaderAppends?.get(currentResponse), - ) - } - // Read helpers always return a detached snapshot, including when applying - // helper intent did not need to copy any headers. - if (headers === currentResponse.headers) { - headers = new Headers(headers) - } - if (protectedHeaders) { - applyProtectedHeaders(protectedHeaders, headers) - } - return toResponseHeadersSnapshot(headers) -} - -export function getResponseHeader( - name: ResponseHeaderName, -): string | undefined { - const event = getStartEvent() - const normalizedName = normalizeHeaderName(name) - if ( - normalizedName === 'set-cookie' || - event.responseState?.headerAppends?.has(normalizedName) - ) { - return getResponseHeaders().get(name) ?? undefined - } - const currentResponse = event.currentResponse - const protectedHeaders = currentResponse - ? getProtectedResponseHeaders(currentResponse) - : undefined - if (protectedHeaders?.has(normalizedName)) { - return protectedHeaders.get(normalizedName) ?? undefined - } - if ( - GENERATED_BODY_EXCLUDED_HEADERS.has(normalizedName) && - isSerializedResponse(protectedHeaders) - ) { - return currentResponse!.headers.get(name) ?? undefined - } - - const state = event.responseState - if (state) { - const stateValue = state.headers.get(name) - if (stateValue !== null) { - return stateValue - } - - if (state.clearHeaders) { - return undefined - } - - if (state.removedHeaders?.has(normalizedName)) { - return undefined - } - } - - return currentResponse?.headers.get(name) ?? undefined -} - -export function setResponseHeader( - name: ResponseHeaderName, - value: string | Array, -): void { - const event = getStartEvent() - if (Array.isArray(value)) { - deleteHeaderState(event, name) - for (const valueItem of value) { - appendHeaderState(event, name, valueItem) - } - } else { - setHeaderState(event, name, value) - } -} - -/** - * Append a response header value without replacing existing values. - * - * Ordinary values are appended once per returned response. Start transfers - * that application state when it reconstructs a response. A new response - * created by application code is fresh input: copying already-reconciled - * headers into it also copies their appended values, and helper appends apply - * again. Mutate the current response or pass its middleware result through - * when preserving an existing response's headers. - * - * For `set-cookie`, values must be fully serialized cookie strings; they are - * merged into the outgoing cookies and deduped by cookie identity - * (name + domain + path), exactly like `setCookie`. A value that cannot be - * parsed is identified by its exact string. This is the primitive to - * use when bridging external session/auth libraries that produce raw - * `Set-Cookie` strings. - * - * ```ts - * appendResponseHeader('set-cookie', await externalLib.commitSession(session)) - * ``` - */ -export function appendResponseHeader( - name: ResponseHeaderName, - value: string | Array, -): void { - const event = getStartEvent() - const values = Array.isArray(value) ? value : [value] - if (normalizeHeaderName(name) === 'set-cookie') { - // Merge one value at a time so a batched call behaves exactly like - // sequential calls (same-identity cookies dedupe, last wins). - for (const valueItem of values) { - // Validate before changing cookie identity or removal intent. External - // libraries supply serialized strings, which can fail native validation. - const headers = new Headers({ 'set-cookie': valueItem }) - mergeStartSetCookieValues(event, getSetCookieValues(headers)) - } - return - } - for (const valueItem of values) { - appendHeaderState(event, name, valueItem) - } -} - -export function removeResponseHeader(name: ResponseHeaderName): void { - deleteHeaderState(getStartEvent(), name) -} - -export function clearResponseHeaders( - headerNames?: Array, -): void { - const event = getStartEvent() - if (headerNames && headerNames.length > 0) { - for (const name of headerNames) { - deleteHeaderState(event, name) - } - return - } - - const state = getResponseState(event) - state.clearHeaders = true - state.headers = new Headers() - state.headerAppends = undefined -} - -export function getResponseStatus(): number { - const event = getStartEvent() - const currentResponse = event.currentResponse - const serialized = - !!currentResponse && - isSerializedResponse(getProtectedResponseHeaders(currentResponse)) - return ( - getHelperStatus(event.responseState, serialized) ?? - currentResponse?.status ?? - 200 - ) -} - -export function setResponseStatus(code?: number, text?: string): void { - const event = getStartEvent() - if (code !== undefined) { - // An unusable code must not replace an earlier, returned, or error status. - // Ignore the whole call, including its status text, which describes it. - const status = sanitizeStatusCode(code) - if (status === undefined) { - if (process.env.NODE_ENV !== 'production') { - console.warn( - `setResponseStatus(${code}) was ignored: Fetch Response status codes must be integers from 200 to 599.`, - ) - } - return - } - getResponseState(event).status = status - } - if (text) { - getResponseState(event).statusText = sanitizeStatusMessage(text) - } -} - -/** - * Parse the request to get HTTP Cookie header string and return an object of all cookie name-value pairs. - * @returns Object of cookie name-value pairs - * ```ts - * const cookies = getCookies() - * ``` - */ -export function getCookies(): Record { - const cookies = parseCookie(getRequestHeaders().get('cookie') || '') - const definedCookies: Record = Object.create(null) - - for (const [name, value] of Object.entries(cookies)) { - if (value !== undefined) { - definedCookies[name] = value - } - } - - return definedCookies -} - -/** - * Get a cookie value by name. - * @param name Name of the cookie to get - * @returns {*} Value of the cookie (String or undefined) - * ```ts - * const authorization = getCookie('Authorization') - * ``` - */ -export function getCookie(name: string): string | undefined { - return getCookies()[name] -} - -/** - * Set a cookie value by name. - * @param name Name of the cookie to set - * @param value Value of the cookie to set - * @param options {CookieSerializeOptions} Options for serializing the cookie - * ```ts - * setCookie('Authorization', '1234567') - * ``` - */ -export function setCookie( - name: string, - value: string, - options?: CookieSerializeOptions, -): void { - const { encode, stringify, ...attrs } = options ?? {} - mergeStartSetCookieValues(getStartEvent(), [ - serializeCookie( - { name, value, path: '/', ...attrs }, - { encode, stringify }, - ), - ]) -} - -/** - * Remove a cookie by name. - * @param name Name of the cookie to delete - * @param serializeOptions {CookieSerializeOptions} Cookie options - * ```ts - * deleteCookie('SessionId') - * ``` - */ -export function deleteCookie( - name: string, - options?: CookieSerializeOptions, -): void { - setCookie(name, '', { - ...options, - maxAge: 0, - }) -} - -/** - * Internal: helper status state for a serialized server-function reply. - * Bodyless statuses never apply to it and are omitted with their status text. - */ -export function getSerializedResponseState(): { - status: number | undefined - statusText: string | undefined -} { - const state = getStartEvent().responseState - const status = getHelperStatus(state, true) - return { status, statusText: getHelperStatusText(state, status) } -} diff --git a/packages/start-server-core/src/request-response.ts b/packages/start-server-core/src/request-response.ts index 83c529ff9f..e0ad8a336a 100644 --- a/packages/start-server-core/src/request-response.ts +++ b/packages/start-server-core/src/request-response.ts @@ -1,30 +1,428 @@ -export { - appendResponseHeader, - clearResponseHeaders, - createServerEntry, - deleteCookie, - getCookie, - getCookies, - getRequest, - getRequestHeader, - getRequestHeaders, - getRequestHost, - getRequestIP, - getRequestProtocol, - getRequestUrl, - getResponseHeader, - getResponseHeaders, - getResponseStatus, - handleStartError, - removeResponseHeader, - setCookie, - setResponseHeader, - setResponseHeaders, - setResponseStatus, -} from './internal-request-response' +import { AsyncLocalStorage } from 'node:async_hooks' -export type { - ReadonlyResponseHeaders, +import { + H3Event, + clearSession as h3_clearSession, + deleteCookie as h3_deleteCookie, + getRequestHost as h3_getRequestHost, + getRequestIP as h3_getRequestIP, + getRequestProtocol as h3_getRequestProtocol, + getRequestURL as h3_getRequestURL, + getSession as h3_getSession, + getValidatedQuery as h3_getValidatedQuery, + parseCookies as h3_parseCookies, + sanitizeStatusCode as h3_sanitizeStatusCode, + sanitizeStatusMessage as h3_sanitizeStatusMessage, + sealSession as h3_sealSession, + setCookie as h3_setCookie, + toResponse as h3_toResponse, + unsealSession as h3_unsealSession, + updateSession as h3_updateSession, + useSession as h3_useSession, +} from 'h3-v2' +import type { + RequestHeaderMap, RequestHeaderName, + ResponseHeaderMap, ResponseHeaderName, -} from './internal-request-response' + TypedHeaders, +} from 'fetchdts' + +import type { CookieSerializeOptions } from 'cookie-es' +import type { + Session, + SessionConfig, + SessionData, + SessionManager, + SessionUpdate, +} from './session' +import type { StandardSchemaV1 } from '@standard-schema/spec' +import type { RequestHandler } from './request-handler' + +interface StartEvent { + h3Event: H3Event +} + +// Use a global symbol to ensure the same AsyncLocalStorage instance is shared +// across different bundles that may each bundle this module. +const GLOBAL_EVENT_STORAGE_KEY = Symbol.for('tanstack-start:event-storage') + +const globalObj = globalThis as typeof globalThis & { + [GLOBAL_EVENT_STORAGE_KEY]?: AsyncLocalStorage +} + +if (!globalObj[GLOBAL_EVENT_STORAGE_KEY]) { + globalObj[GLOBAL_EVENT_STORAGE_KEY] = new AsyncLocalStorage() +} + +const eventStorage = globalObj[GLOBAL_EVENT_STORAGE_KEY] + +export type { ResponseHeaderName, RequestHeaderName } + +type HeadersWithGetSetCookie = Headers & { + getSetCookie?: () => Array +} + +type MaybePromise = T | Promise + +function isPromiseLike(value: MaybePromise): value is Promise { + return typeof (value as Promise).then === 'function' +} + +function getSetCookieValues(headers: Headers): Array { + const headersWithSetCookie = headers as HeadersWithGetSetCookie + if (typeof headersWithSetCookie.getSetCookie === 'function') { + return headersWithSetCookie.getSetCookie() + } + const value = headers.get('set-cookie') + return value ? [value] : [] +} + +function mergeEventResponseHeaders(response: Response, event: H3Event): void { + if (response.ok) { + return + } + + const eventSetCookies = getSetCookieValues(event.res.headers) + if (eventSetCookies.length === 0) { + return + } + + const responseSetCookies = getSetCookieValues(response.headers) + response.headers.delete('set-cookie') + for (const cookie of responseSetCookies) { + response.headers.append('set-cookie', cookie) + } + for (const cookie of eventSetCookies) { + response.headers.append('set-cookie', cookie) + } +} + +function attachResponseHeaders( + value: MaybePromise, + event: H3Event, +): MaybePromise { + if (isPromiseLike(value)) { + return value.then((resolved) => { + if (resolved instanceof Response) { + mergeEventResponseHeaders(resolved, event) + } + return resolved + }) + } + + if (value instanceof Response) { + mergeEventResponseHeaders(value, event) + } + + return value +} + +export function requestHandler( + handler: RequestHandler, +) { + return (request: Request, requestOpts: any): Promise | Response => { + let h3Event: H3Event + try { + h3Event = new H3Event(request) + } catch (error) { + if (error instanceof URIError) { + return new Response(null, { + status: 400, + statusText: 'Bad Request', + }) + } + throw error + } + + const response = eventStorage.run({ h3Event }, () => + handler(request, requestOpts), + ) + return h3_toResponse(attachResponseHeaders(response, h3Event), h3Event) + } +} + +function getH3Event() { + const event = eventStorage.getStore() + if (!event) { + throw new Error( + `No StartEvent found in AsyncLocalStorage. Make sure you are using the function within the server runtime.`, + ) + } + return event.h3Event +} + +export function getRequest(): Request { + const event = getH3Event() + return event.req +} + +export function getRequestHeaders(): TypedHeaders { + return getH3Event().req.headers +} + +export function getRequestHeader(name: RequestHeaderName): string | undefined { + return getRequestHeaders().get(name) || undefined +} + +export function getRequestIP(opts?: { + /** + * Use the X-Forwarded-For HTTP header set by proxies. + * + * Note: Make sure that this header can be trusted (your application running behind a CDN or reverse proxy) before enabling. + */ + xForwardedFor?: boolean +}) { + return h3_getRequestIP(getH3Event(), opts) +} + +/** + * Get the request hostname. + * + * If `xForwardedHost` is `true`, it will use the `x-forwarded-host` header if it exists. + * + * If no host header is found, it will default to "localhost". + */ +export function getRequestHost(opts?: { xForwardedHost?: boolean }) { + return h3_getRequestHost(getH3Event(), opts) +} + +/** + * Get the full incoming request URL. + * + * If `xForwardedHost` is `true`, it will use the `x-forwarded-host` header if it exists. + * + * If `xForwardedProto` is `false`, it will not use the `x-forwarded-proto` header. + */ +export function getRequestUrl(opts?: { + xForwardedHost?: boolean + xForwardedProto?: boolean +}) { + return h3_getRequestURL(getH3Event(), opts) +} + +/** + * Get the request protocol. + * + * If `x-forwarded-proto` header is set to "https", it will return "https". You can disable this behavior by setting `xForwardedProto` to `false`. + * + * If protocol cannot be determined, it will default to "http". + */ +export function getRequestProtocol(opts?: { + xForwardedProto?: boolean +}): 'http' | 'https' | (string & {}) { + return h3_getRequestProtocol(getH3Event(), opts) +} + +export function setResponseHeaders( + headers: TypedHeaders, +): void { + const event = getH3Event() + for (const [name, value] of Object.entries(headers)) { + event.res.headers.set(name, value) + } +} + +export function getResponseHeaders(): TypedHeaders { + const event = getH3Event() + return event.res.headers +} + +export function getResponseHeader( + name: ResponseHeaderName, +): string | undefined { + const event = getH3Event() + return event.res.headers.get(name) || undefined +} + +export function setResponseHeader( + name: ResponseHeaderName, + value: string | Array, +): void { + const event = getH3Event() + if (Array.isArray(value)) { + event.res.headers.delete(name) + for (const valueItem of value) { + event.res.headers.append(name, valueItem) + } + } else { + event.res.headers.set(name, value) + } +} +export function removeResponseHeader(name: ResponseHeaderName): void { + const event = getH3Event() + event.res.headers.delete(name) +} + +export function clearResponseHeaders( + headerNames?: Array, +): void { + const event = getH3Event() + // If headerNames is provided, clear only those headers + if (headerNames && headerNames.length > 0) { + for (const name of headerNames) { + event.res.headers.delete(name) + } + // Otherwise, clear all headers + } else { + for (const name of event.res.headers.keys()) { + event.res.headers.delete(name) + } + } +} + +export function getResponseStatus(): number { + return getH3Event().res.status || 200 +} + +export function setResponseStatus(code?: number, text?: string): void { + const event = getH3Event() + if (code) { + event.res.status = h3_sanitizeStatusCode(code, event.res.status) + } + if (text) { + event.res.statusText = h3_sanitizeStatusMessage(text) + } +} + +/** + * Parse the request to get HTTP Cookie header string and return an object of all cookie name-value pairs. + * @returns Object of cookie name-value pairs + * ```ts + * const cookies = getCookies() + * ``` + */ +export function getCookies(): Record { + const event = getH3Event() + const cookies = h3_parseCookies(event) + const definedCookies: Record = Object.create(null) + + for (const [name, value] of Object.entries(cookies)) { + if (value !== undefined) { + definedCookies[name] = value + } + } + + return definedCookies +} + +/** + * Get a cookie value by name. + * @param name Name of the cookie to get + * @returns {*} Value of the cookie (String or undefined) + * ```ts + * const authorization = getCookie('Authorization') + * ``` + */ +export function getCookie(name: string): string | undefined { + return getCookies()[name] +} + +/** + * Set a cookie value by name. + * @param name Name of the cookie to set + * @param value Value of the cookie to set + * @param options {CookieSerializeOptions} Options for serializing the cookie + * ```ts + * setCookie('Authorization', '1234567') + * ``` + */ +export function setCookie( + name: string, + value: string, + options?: CookieSerializeOptions, +): void { + const event = getH3Event() + h3_setCookie(event, name, value, options) +} + +/** + * Remove a cookie by name. + * @param name Name of the cookie to delete + * @param serializeOptions {CookieSerializeOptions} Cookie options + * ```ts + * deleteCookie('SessionId') + * ``` + */ +export function deleteCookie( + name: string, + options?: CookieSerializeOptions, +): void { + const event = getH3Event() + h3_deleteCookie(event, name, options) +} + +function getDefaultSessionConfig(config: SessionConfig): SessionConfig { + return { + name: 'start', + ...config, + } +} + +/** + * Create a session manager for the current request. + */ +export function useSession( + config: SessionConfig, +): Promise> { + const event = getH3Event() + return h3_useSession(event, getDefaultSessionConfig(config)) +} +/** + * Get the session for the current request + */ +export function getSession( + config: SessionConfig, +): Promise> { + const event = getH3Event() + return h3_getSession(event, getDefaultSessionConfig(config)) +} + +/** + * Update the session data for the current request. + */ +export function updateSession( + config: SessionConfig, + update?: SessionUpdate, +): Promise> { + const event = getH3Event() + return h3_updateSession(event, getDefaultSessionConfig(config), update) +} + +/** + * Encrypt and sign the session data for the current request. + */ +export function sealSession(config: SessionConfig): Promise { + const event = getH3Event() + return h3_sealSession(event, getDefaultSessionConfig(config)) +} +/** + * Decrypt and verify the session data for the current request. + */ +export function unsealSession( + config: SessionConfig, + sealed: string, +): Promise> { + const event = getH3Event() + return h3_unsealSession(event, getDefaultSessionConfig(config), sealed) +} + +/** + * Clear the session data for the current request. + */ +export function clearSession(config: Partial): Promise { + const event = getH3Event() + return h3_clearSession(event, { name: 'start', ...config }) +} + +export function getResponse() { + const event = getH3Event() + return event.res +} + +// not public API (yet) +export function getValidatedQuery( + schema: StandardSchemaV1, +): Promise> { + return h3_getValidatedQuery(getH3Event(), schema) +} diff --git a/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts b/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts index 0eb4993cac..d127b253d5 100644 --- a/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts +++ b/packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts @@ -18,18 +18,7 @@ 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( - { - data: opts?.data, - context: opts?.context, - method: serverFn.method ?? 'GET', - }, - signal, - ) - // Only a failed call has an `error` key, holding the thrown value. - if ('error' in result) { - throw result.error - } + const result = await serverFn(opts ?? {}, signal) 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 9fdad40281..99ed7e2abd 100644 --- a/packages/start-server-core/src/server-functions-handler.ts +++ b/packages/start-server-core/src/server-functions-handler.ts @@ -1,186 +1,77 @@ -import { invariant, isNotFound, isRedirect } from '@tanstack/router-core' import { createRawStreamRPCPlugin, - defaultSerovalDeserializerPlugins as routerDefaultSerovalPlugins, -} from '@tanstack/router-core/ssr/server' + invariant, + isNotFound, + isRedirect, +} from '@tanstack/router-core' import { - TSS_CONTENT_TYPE_FRAMED_VERSIONED, TSS_FORMDATA_CONTEXT, X_TSS_RAW_RESPONSE, X_TSS_SERIALIZED, - getSerovalPlugins, + getDefaultSerovalPlugins, + safeObjectMerge, } from '@tanstack/start-client-core' -import { - MAX_FRAMED_STREAMS, - MAX_FRAME_PAYLOAD_SIZE, -} from '@tanstack/start-client-core/client-rpc' import { fromJSON, toCrossJSONAsync, toCrossJSONStream } from 'seroval' -import { - createFinalizedResponse, - getErrorHeaders, - getParsedRequestUrl, - getSerializedResponseState, - protectResponseHeaders, - resolveErrorResponseStatus, - setProtectedResponseHeaders, -} from './internal-request-response' +import { getResponse } from './request-response' import { getServerFnById } from './getServerFnById' -import { createMultiplexedStream } from './frame-protocol' -import type { - LateStreamRegistration, - MultiplexedStreamOptions, - MultiplexedStreamRecord, +import { + TSS_CONTENT_TYPE_FRAMED_VERSIONED, + createMultiplexedStream, } from './frame-protocol' +import type { LateStreamRegistration } from './frame-protocol' import type { Plugin as SerovalPlugin } from 'seroval' -import type { StartEvent } from './internal-request-response' -// Serialized replies are decoded by the client from their body. With a -// helper-selected 3xx status, a Location would let fetch follow it first. -const SERIALIZED_JSON_HEADERS: ReadonlyMap = new Map([ - ['content-type', 'application/json'], - [X_TSS_SERIALIZED, 'true'], - [X_TSS_RAW_RESPONSE, null], - ['location', null], -]) -// A shared template the Response constructor copies. Never mutate it. -const SERIALIZED_JSON_HEADER_INIT = new Headers({ - 'content-type': 'application/json', - [X_TSS_SERIALIZED]: 'true', -}) +// Cache serovalPlugins at module level to avoid repeated calls +let serovalPlugins: Array> | undefined = undefined -/** Completed bytes own no stream until the request pipeline accepts them. */ -export class DeferredResponse { - constructor(private readonly body: Uint8Array) {} - - createResponse(event: StartEvent): Response { - return createFinalizedResponse( - this.body, - SERIALIZED_JSON_HEADER_INIT, - SERIALIZED_JSON_HEADERS, - event, - ) - } -} - -const SERIALIZED_FRAMED_HEADERS: ReadonlyMap = new Map([ - ['content-type', TSS_CONTENT_TYPE_FRAMED_VERSIONED], - [X_TSS_SERIALIZED, 'true'], - [X_TSS_RAW_RESPONSE, null], - ['location', null], -]) -const NOT_FOUND_HEADERS: ReadonlyMap = new Map([ - ['content-type', 'application/json'], - [X_TSS_SERIALIZED, null], - [X_TSS_RAW_RESPONSE, null], - ['location', null], -]) -const RAW_RESPONSE_HEADERS: ReadonlyMap = new Map([ - [X_TSS_RAW_RESPONSE, 'true'], -]) -// A Response the server function threw. The client rethrows it. -const THROWN_RESPONSE_HEADERS: ReadonlyMap = new Map([ - [X_TSS_RAW_RESPONSE, 'thrown'], -]) +// Known FormData 'Content-Type' header values - module-level constant +const FORM_DATA_CONTENT_TYPES = [ + 'multipart/form-data', + 'application/x-www-form-urlencoded', +] // Maximum payload size for GET requests (1MB) const MAX_PAYLOAD_SIZE = 1_000_000 -const MAX_PENDING_SERIALIZATION_RECORDS = 1024 -const MAX_PENDING_SERIALIZATION_BYTES = 32 * 1024 * 1024 -const textEncoder = new TextEncoder() - -function encodeSerializationRecord(value: unknown) { - return textEncoder.encode(JSON.stringify(value)) -} - -function exceedsPendingSerializationLimit( - record: Uint8Array, - recordCount: number, - pendingBytes: number, -) { - return ( - recordCount >= MAX_PENDING_SERIALIZATION_RECORDS || - pendingBytes + record.byteLength > MAX_PENDING_SERIALIZATION_BYTES - ) -} - -function runSerializationCleanup(dispose: () => void) { - try { - dispose() - } catch {} -} - -function cancelRawStream(stream: ReadableStream, reason?: unknown) { - void stream.cancel(reason).catch(() => {}) -} /** - * Marks a Response thrown during a server-function request so the client - * rejects the call with it. Redirects keep their own protocol. + * Default server function dispatch: extracts the function id from the URL + * path (as produced by TanStack's split RPC transport) and runs it through + * handleServerAction. The `#tanstack-start-server-fn-dispatch` virtual module + * re-exports this by default; alternative transports (e.g. the solid + * directive transport) substitute their own dispatch implementation. */ -export function toThrownServerFnResponse(response: Response): Response { - return isRedirect(response) - ? response - : setProtectedResponseHeaders(response, THROWN_RESPONSE_HEADERS) -} +export const defaultDispatchServerFnRequest = async ({ + request, + context, + serverFnBase, +}: { + request: Request + context: any + serverFnBase: string +}) => { + const url = new URL(request.url) + const serverFnId = url.pathname.slice(serverFnBase.length).split('/')[0] -/** - * Builds the reply for a server-function request that failed outside the - * function, such as in request middleware. Like a failed call, it carries - * only the thrown value under an `error` key, so the client rethrows it. - */ -export async function createServerFnErrorResponse( - error: unknown, - serovalPlugins?: Array>, -) { - if (isNotFound(error)) { - return isNotFoundResponse(error) + if (!serverFnId) { + throw new Error('Invalid server action param for serverFnId') } - // Header getters and reporting hooks can write helpers before the status - // is resolved. Error statuses are always body-bearing, as the client needs. - const headers = getErrorHeaders(error) ?? new Headers() - const { status, statusText } = resolveErrorResponseStatus(error) - headers.set('Content-Type', 'application/json') - headers.set(X_TSS_SERIALIZED, 'true') - headers.delete(X_TSS_RAW_RESPONSE) - headers.delete('location') - - const plugins = - serovalPlugins ?? getSerovalPlugins(routerDefaultSerovalPlugins) - let serializedError: string - try { - serializedError = JSON.stringify( - await toCrossJSONAsync({ error }, { refs: new Map(), plugins }), - ) - } catch (serializationError) { - // Like a result that cannot be serialized, the call rejects with the - // serialization error instead of the value it could not send. - serializedError = JSON.stringify( - await toCrossJSONAsync( - { error: serializationError }, - { refs: new Map(), plugins }, - ), - ) - } - const errorResponse = new Response(serializedError, { - status, - statusText, - headers, - }) - protectResponseHeaders(errorResponse, SERIALIZED_JSON_HEADERS) - return errorResponse + return handleServerAction({ request, context, serverFnId }) } -// The action merges the client context with the trusted server context -// (__executeServer), so the client context is passed through unmerged. export const handleServerAction = async ({ request, + context, serverFnId, }: { request: Request + context: any serverFnId: string }) => { - const methodUpper = request.method.toUpperCase() + const method = request.method + const methodUpper = method.toUpperCase() + const url = new URL(request.url) + const action = await getServerFnById(serverFnId, { origin: 'client' }) // Early method check: reject mismatched HTTP methods before parsing @@ -197,420 +88,370 @@ export const handleServerAction = async ({ ) } - const headers = request.headers - const isServerFn = headers.get('x-tsr-serverfn') === 'true' - let serovalPlugins: Array> | undefined - const getRequestSerovalPlugins = () => { - return (serovalPlugins ??= getSerovalPlugins(routerDefaultSerovalPlugins)) + const isServerFn = request.headers.get('x-tsr-serverFn') === 'true' + + // Initialize serovalPlugins lazily (cached at module level) + if (!serovalPlugins) { + serovalPlugins = getDefaultSerovalPlugins() } - const contentType = headers.get('content-type') - try { - let res: any - if ( - contentType && - (contentType.includes('multipart/form-data') || - contentType.includes('application/x-www-form-urlencoded')) - ) { - // We don't support GET requests with FormData payloads... that seems impossible - if (methodUpper === 'GET') { - if (process.env.NODE_ENV !== 'production') { - throw new Error( - 'Invariant failed: GET requests with FormData payloads are not supported', + const contentType = request.headers.get('Content-Type') + + function parsePayload(payload: any) { + const parsedPayload = fromJSON(payload, { plugins: serovalPlugins }) + return parsedPayload as any + } + + const response = await (async () => { + try { + let res = await (async () => { + // FormData + if ( + FORM_DATA_CONTENT_TYPES.some( + (type) => contentType && contentType.includes(type), ) - } + ) { + // We don't support GET requests with FormData payloads... that seems impossible + if (methodUpper === 'GET') { + if (process.env.NODE_ENV !== 'production') { + throw new Error( + 'Invariant failed: GET requests with FormData payloads are not supported', + ) + } - invariant() - } - const formData = await request.formData() - const serializedContext = formData.get(TSS_FORMDATA_CONTEXT) - formData.delete(TSS_FORMDATA_CONTEXT) - - const params: { context?: unknown; data: FormData; method: string } = { - data: formData, - method: methodUpper, - } - if (typeof serializedContext === 'string') { - try { - const parsedContext = JSON.parse(serializedContext) - const deserializedContext = fromJSON(parsedContext, { - plugins: getRequestSerovalPlugins(), - }) - if (typeof deserializedContext === 'object' && deserializedContext) { - params.context = deserializedContext + invariant() } - } catch (e) { - // Log warning for debugging but don't expose to client - if (process.env.NODE_ENV === 'development') { - console.warn('Failed to parse FormData context:', e) + const formData = await request.formData() + const serializedContext = formData.get(TSS_FORMDATA_CONTEXT) + formData.delete(TSS_FORMDATA_CONTEXT) + + const params = { + context, + data: formData, + method: methodUpper, } + if (typeof serializedContext === 'string') { + try { + const parsedContext = JSON.parse(serializedContext) + const deserializedContext = fromJSON(parsedContext, { + plugins: serovalPlugins, + }) + if ( + typeof deserializedContext === 'object' && + deserializedContext + ) { + params.context = safeObjectMerge( + deserializedContext as Record, + context, + ) + } + } catch (e) { + // Log warning for debugging but don't expose to client + if (process.env.NODE_ENV === 'development') { + console.warn('Failed to parse FormData context:', e) + } + } + } + + return await action(params) } - } - res = await action(params) - } else { - let json: any - if (methodUpper === 'GET') { - // Get payload directly from searchParams - const payloadParam = - getParsedRequestUrl(request).searchParams.get('payload') - // Reject oversized payloads to prevent DoS - if (payloadParam && payloadParam.length > MAX_PAYLOAD_SIZE) { - throw new Error('Payload too large') + // Get requests use the query string + if (methodUpper === 'GET') { + // Get payload directly from searchParams + const payloadParam = url.searchParams.get('payload') + // Reject oversized payloads to prevent DoS + if (payloadParam && payloadParam.length > MAX_PAYLOAD_SIZE) { + throw new Error('Payload too large') + } + // If there's a payload, we should try to parse it + const payload: any = payloadParam + ? parsePayload(JSON.parse(payloadParam)) + : {} + payload.context = safeObjectMerge(payload.context, context) + payload.method = methodUpper + // Send it through! + return await action(payload) } - json = payloadParam ? JSON.parse(payloadParam) : undefined - } else if (contentType?.includes('application/json')) { - json = await request.json() + + let jsonPayload + if (contentType?.includes('application/json')) { + jsonPayload = await request.json() + } + + const payload = jsonPayload ? parsePayload(jsonPayload) : {} + payload.context = safeObjectMerge(payload.context, context) + payload.method = methodUpper + return await action(payload) + })() + + const unwrapped = res.result || res.error + + if (isNotFound(res)) { + res = isNotFoundResponse(res) } - const payload: any = - json === undefined - ? undefined - : fromJSON(json, { plugins: getRequestSerovalPlugins() }) - // Pass only the fields a client sends, so a crafted `error` or - // `result` key cannot decide the outcome of the call. - res = await action({ - data: payload?.data, - context: payload?.context, - method: methodUpper, - }) - } - const failed = 'error' in res - const unwrapped = failed ? res.error : res.result - - if ( - !isServerFn && - (unwrapped instanceof Response || - unwrapped === null || - typeof unwrapped !== 'object') - ) { - return unwrapped - } - - if (unwrapped instanceof Response) { - if (failed) { - return toThrownServerFnResponse(unwrapped) - } - if (isRedirect(unwrapped)) { + if (!isServerFn) { return unwrapped } - return setProtectedResponseHeaders(unwrapped, RAW_RESPONSE_HEADERS) - } - return serializeResult(res, request, getRequestSerovalPlugins()) - } catch (error: any) { - if (error instanceof Response) { - return error - } + if (unwrapped instanceof Response) { + if (isRedirect(unwrapped)) { + return unwrapped + } + unwrapped.headers.set(X_TSS_RAW_RESPONSE, 'true') + return unwrapped + } - // Currently this server-side context has no idea how to - // build final URLs, so we need to defer that to the client. - // The client will check for __redirect and __notFound keys, - // and if they exist, it will handle them appropriately. + return serializeResult(res) - return createServerFnErrorResponse(error, serovalPlugins) - } -} + function serializeResult(res: unknown): Response { + let nonStreamingBody: any = undefined -/** - * Serializes a server-function result. A result that Seroval completes - * synchronously without RawStreams becomes plain JSON; everything else is a - * framed response whose records and raw streams are multiplexed in order. - */ -function serializeResult( - res: unknown, - request: Request, - plugins: Array>, -): Response | DeferredResponse { - const initialRecords: Array = [] - let initialBytes = 0 - const pendingRawStreams: Array = [] + const alsResponse = getResponse() + if (res !== undefined) { + // Collect raw streams encountered during initial synchronous serialization + const rawStreams = new Map>() - // Seroval replays synchronously discovered work before returning. Collect - // that first pass so a complete result can skip framing entirely. - let done = false as boolean - let initialParsed = false - let serializationFailure: [unknown] | undefined - let disposeSerialization: (() => void) | undefined - let onParse = (value: any, initial: boolean) => { - if (serializationFailure) { - return - } - initialParsed ||= initial - const record = encodeSerializationRecord(value) - if ( - exceedsPendingSerializationLimit( - record, - initialRecords.length, - initialBytes, - ) - ) { - serializationFailure = [ - new Error( - 'Server function serialization exceeded its pending output limit', + // Track whether we're still in the initial synchronous phase + // After initial phase, new RawStreams go to lateStreamWriter + let initialPhase = true + + // Late stream registration for RawStreams discovered after initial pass + // (e.g., from resolved Promises) + let lateStreamWriter: + | WritableStreamDefaultWriter + | undefined + let lateStreamReadable: + | ReadableStream + | undefined = undefined + const pendingLateStreams: Array = [] + + const rawStreamPlugin = createRawStreamRPCPlugin( + (id: number, stream: ReadableStream) => { + if (initialPhase) { + rawStreams.set(id, stream) + return + } + + if (lateStreamWriter) { + // Late stream - write to the late stream channel + lateStreamWriter.write({ id, stream }).catch(() => { + // Ignore write errors - stream may be closed + }) + return + } + + // Discovered after initial phase but before writer exists. + pendingLateStreams.push({ id, stream }) + }, + ) + + // Build plugins with RawStreamRPCPlugin first (before default SSR plugin) + const plugins = [rawStreamPlugin, ...(serovalPlugins || [])] + + // first run without the stream in case `result` does not need streaming + let done = false as boolean + const callbacks: { + onParse: (value: any) => void + onDone: () => void + onError: (error: any) => void + } = { + onParse: (value) => { + nonStreamingBody = value + }, + onDone: () => { + done = true + }, + onError: (error) => { + throw error + }, + } + toCrossJSONStream(res, { + refs: new Map(), + plugins, + onParse(value) { + callbacks.onParse(value) + }, + onDone() { + callbacks.onDone() + }, + onError: (error) => { + callbacks.onError(error) + }, + }) + + // End of initial synchronous phase - any new RawStreams are "late" + initialPhase = false + + // If any RawStreams are discovered after this point but before the + // late-stream writer exists, we buffer them and flush once the writer + // is ready. This avoids an occasional missed-stream race. + + // If no raw streams and done synchronously, return simple JSON + if (done && rawStreams.size === 0) { + return new Response( + nonStreamingBody ? JSON.stringify(nonStreamingBody) : undefined, + { + status: alsResponse.status, + statusText: alsResponse.statusText, + headers: { + 'Content-Type': 'application/json', + [X_TSS_SERIALIZED]: 'true', + }, + }, + ) + } + + // Not done synchronously or has raw streams - use framed protocol + // This supports late RawStreams from resolved Promises + const { readable, writable } = + new TransformStream() + lateStreamReadable = readable + lateStreamWriter = writable.getWriter() + + // Flush any late streams that were discovered in the small window + // between end of initial serialization and writer setup. + for (const registration of pendingLateStreams) { + lateStreamWriter.write(registration).catch(() => { + // Ignore write errors - stream may be closed + }) + } + pendingLateStreams.length = 0 + + // Create a stream of JSON chunks + const jsonStream = new ReadableStream({ + start(controller) { + callbacks.onParse = (value) => { + controller.enqueue(JSON.stringify(value) + '\n') + } + callbacks.onDone = () => { + try { + controller.close() + } catch { + // Already closed + } + // Close late stream writer when JSON serialization is done + // Any RawStreams not yet discovered won't be sent + lateStreamWriter + ?.close() + .catch(() => { + // Ignore close errors + }) + .finally(() => { + lateStreamWriter = undefined + }) + } + + callbacks.onError = (error) => { + controller.error(error) + lateStreamWriter + ?.abort(error) + .catch(() => { + // Ignore abort errors + }) + .finally(() => { + lateStreamWriter = undefined + }) + } + + // Emit initial body if we have one + if (nonStreamingBody !== undefined) { + callbacks.onParse(nonStreamingBody) + } + // If serialization already completed synchronously, close now + // This handles the case where onDone was called during toCrossJSONStream + // before we overwrote callbacks.onDone + if (done) { + callbacks.onDone() + } + }, + cancel() { + lateStreamWriter?.abort().catch(() => {}) + lateStreamWriter = undefined + }, + }) + + // Create multiplexed stream with JSON, initial raw streams, and late streams + const multiplexedStream = createMultiplexedStream( + jsonStream, + rawStreams, + lateStreamReadable, + ) + + return new Response(multiplexedStream, { + status: alsResponse.status, + statusText: alsResponse.statusText, + headers: { + 'Content-Type': TSS_CONTENT_TYPE_FRAMED_VERSIONED, + [X_TSS_SERIALIZED]: 'true', + }, + }) + } + + return new Response(undefined, { + status: alsResponse.status, + statusText: alsResponse.statusText, + }) + } + } catch (error: any) { + if (error instanceof Response) { + return error + } + // else if ( + // isPlainObject(error) && + // 'result' in error && + // error.result instanceof Response + // ) { + // return error.result + // } + + // Currently this server-side context has no idea how to + // build final URLs, so we need to defer that to the client. + // The client will check for __redirect and __notFound keys, + // and if they exist, it will handle them appropriately. + + if (isNotFound(error)) { + return isNotFoundResponse(error) + } + + console.info() + console.info('Server Fn Error!') + console.info() + console.error(error) + console.info() + + const serializedError = JSON.stringify( + await Promise.resolve( + toCrossJSONAsync(error, { + refs: new Map(), + plugins: serovalPlugins, + }), ), - ] - return - } - initialRecords.push(record) - initialBytes += record.byteLength - } - let onDone = () => { - if (initialParsed) { - done = true - } - } - let onError = (error: any) => { - serializationFailure ??= [error] - } - const rawStreamPlugin = createRawStreamRPCPlugin( - (id: number, stream: ReadableStream) => { - if (serializationFailure) { - cancelRawStream(stream, serializationFailure[0]) - return - } - if (id > MAX_FRAMED_STREAMS) { - const error = new Error( - `Too many raw streams in framed response (max ${MAX_FRAMED_STREAMS})`, - ) - cancelRawStream(stream, error) - onError(error) - return - } - pendingRawStreams.push({ id, stream }) - }, - ) - - const dispose = toCrossJSONStream(res, { - refs: new Map(), - plugins: [rawStreamPlugin, ...plugins], - onParse(value, initial) { - onParse(value, initial) - }, - onDone() { - onDone() - }, - onError: (error) => { - onError(error) - }, - }) - if (serializationFailure) { - runSerializationCleanup(dispose) - for (const registration of pendingRawStreams) { - cancelRawStream(registration.stream, serializationFailure[0]) - } - throw serializationFailure[0] - } - if (!done) { - disposeSerialization = dispose - } - - if (done && pendingRawStreams.length === 0 && initialRecords.length === 1) { - return new DeferredResponse(initialRecords[0]!) - } - - if (done && initialRecords.length === 1) { - const json = initialRecords[0]! - if (json.byteLength > MAX_FRAME_PAYLOAD_SIZE) { - const error = new Error( - 'Server function serialization exceeded its pending output limit', ) - for (const registration of pendingRawStreams) { - cancelRawStream(registration.stream, error) - } - throw error - } - - // Serialization is complete, so this one bounded record needs no writer - // or pending-serialization lifecycle. The mux still controls raw demand. - const rawStreams = pendingRawStreams.splice(0) - initialRecords.length = 0 - return createFramedResponse( - new ReadableStream({ - start(controller) { - controller.enqueue({ json, rawStreams }) - controller.close() + const response = getResponse() + return new Response(serializedError, { + status: response.status ?? 500, + statusText: response.statusText, + headers: { + 'Content-Type': 'application/json', + [X_TSS_SERIALIZED]: 'true', }, - cancel(reason) { - for (const registration of rawStreams) { - cancelRawStream(registration.stream, reason) - } - }, - }), - { signal: request.signal }, - ) - } - - // Couple every JSON patch to the RawStreams it introduces. The mux admits - // each JSON reference before it starts that stream's chunks. - const { readable, writable } = new TransformStream() - const writer = writable.getWriter() - const recordAbortController = new AbortController() - let pendingBytes = 0 - const pendingRecords = new Set() - - const abortRecordStream = (error: unknown) => { - if (serializationFailure) { - return + }) } - serializationFailure = [error] - const disposeCurrentSerialization = disposeSerialization - disposeSerialization = undefined - for (const registration of pendingRawStreams.splice(0)) { - cancelRawStream(registration.stream, error) - } - for (const record of pendingRecords) { - for (const registration of record.rawStreams) { - cancelRawStream(registration.stream, error) - } - } - pendingRecords.clear() - recordAbortController.abort(error) - void writer.abort(error).catch(() => {}) - if (disposeCurrentSerialization) { - runSerializationCleanup(disposeCurrentSerialization) - } - } + })() - const writeRecord = ( - json: Uint8Array, - rawStreams: Array, - ) => { - if (serializationFailure) { - for (const registration of rawStreams) { - cancelRawStream(registration.stream, serializationFailure[0]) - } - return false - } - - if ( - json.byteLength > MAX_FRAME_PAYLOAD_SIZE || - exceedsPendingSerializationLimit(json, pendingRecords.size, pendingBytes) - ) { - const error = new Error( - 'Server function serialization exceeded its pending output limit', - ) - for (const registration of rawStreams) { - cancelRawStream(registration.stream, error) - } - onError(error) - return false - } - - pendingBytes += json.byteLength - const record = { json, rawStreams } - pendingRecords.add(record) - void writer.write(record).then( - () => { - pendingRecords.delete(record) - pendingBytes -= json.byteLength - }, - (error) => { - const stillOwned = pendingRecords.delete(record) - pendingBytes -= json.byteLength - if (stillOwned) { - for (const registration of rawStreams) { - cancelRawStream(registration.stream, error) - } - } - }, - ) - return true - } - - onParse = (value) => { - if (serializationFailure) { - return - } - writeRecord(encodeSerializationRecord(value), pendingRawStreams.splice(0)) - } - onDone = () => { - if (serializationFailure) { - return - } - disposeSerialization = undefined - void writer.close().catch(() => {}) - } - onError = (error) => { - abortRecordStream(error) - } - - // Seroval buffers nested patches during its initial traversal. Their - // RawStream callbacks may precede the root callback, so start every - // synchronously discovered stream only after all initial records. - const initialRawStreams = pendingRawStreams.splice(0) - for (let index = 0; index < initialRecords.length; index++) { - const isLast = index === initialRecords.length - 1 - if (!writeRecord(initialRecords[index]!, isLast ? initialRawStreams : [])) { - // `writeRecord` recorded the failure. Nothing was handed to the client - // yet, so fail the whole call. - if (!isLast) { - for (const registration of initialRawStreams) { - cancelRawStream(registration.stream, serializationFailure![0]) - } - } - initialRecords.length = 0 - throw serializationFailure![0] - } - } - initialRecords.length = 0 - if (done) { - onDone() - } - - void writer.closed.catch((error) => { - abortRecordStream(error) - }) - - return createFramedResponse(readable, { - signal: AbortSignal.any([recordAbortController.signal, request.signal]), - onCancel: abortRecordStream, - }) -} - -function createFramedResponse( - records: ReadableStream, - options: MultiplexedStreamOptions, -) { - const multiplexedStream = createMultiplexedStream(records, options) - // Completed JSON reads helper state later, when the pipeline accepts it. - const { status, statusText } = getSerializedResponseState() - try { - const response = new Response(multiplexedStream, { - status, - statusText, - headers: { - 'Content-Type': TSS_CONTENT_TYPE_FRAMED_VERSIONED, - [X_TSS_SERIALIZED]: 'true', - }, - }) - protectResponseHeaders(response, SERIALIZED_FRAMED_HEADERS) - return response - } catch (error) { - cancelRawStream(multiplexedStream, error) - throw error - } + return response } function isNotFoundResponse(error: any) { const { headers, ...rest } = error - let responseHeaders: HeadersInit - if (headers) { - // Snapshot caller headers before serialization can run user callbacks. - const copiedHeaders = new Headers(headers) - copiedHeaders.set('Content-Type', 'application/json') - copiedHeaders.delete(X_TSS_SERIALIZED) - copiedHeaders.delete(X_TSS_RAW_RESPONSE) - copiedHeaders.delete('location') - responseHeaders = copiedHeaders - } else { - responseHeaders = { 'Content-Type': 'application/json' } - } - const response = new Response(JSON.stringify(rest), { + return new Response(JSON.stringify(rest), { status: 404, - headers: responseHeaders, + headers: { + 'Content-Type': 'application/json', + ...(headers || {}), + }, }) - protectResponseHeaders(response, NOT_FOUND_HEADERS) - return response } diff --git a/packages/start-server-core/src/session.ts b/packages/start-server-core/src/session.ts new file mode 100644 index 0000000000..8617cf8ae7 --- /dev/null +++ b/packages/start-server-core/src/session.ts @@ -0,0 +1,75 @@ +// TODO discuss do we want to copy this interface into Start we well? +import type { CookieSerializeOptions } from 'cookie-es' + +// TODO discuss do we want to copy this interface into Start as shown below? + +/** Algorithm used for encryption and decryption. */ +type EncryptionAlgorithm = 'aes-128-ctr' | 'aes-256-cbc' +/** Algorithm used for integrity verification. */ +type IntegrityAlgorithm = 'sha256' +/** @internal */ +type _Algorithm = EncryptionAlgorithm | IntegrityAlgorithm +/** + * Options for customizing the key derivation algorithm used to generate encryption and integrity verification keys as well as the algorithms and salt sizes used. + */ +type SealOptions = Readonly<{ + /** Encryption step options. */ + encryption: SealOptionsSub + /** Integrity step options. */ + integrity: SealOptionsSub + /* Sealed object lifetime in milliseconds where 0 means forever. Defaults to 0. */ + ttl: number + /** Number of seconds of permitted clock skew for incoming expirations. Defaults to 60 seconds. */ + timestampSkewSec: number + /** + * Local clock time offset, expressed in number of milliseconds (positive or negative). Defaults to 0. + */ + localtimeOffsetMsec: number +}> +/** `seal()` method options. */ +type SealOptionsSub = Readonly<{ + /** The length of the salt (random buffer used to ensure that two identical objects will generate a different encrypted result). Defaults to 256. */ + saltBits: number + /** The algorithm used. Defaults to 'aes-256-cbc' for encryption and 'sha256' for integrity. */ + algorithm: TAlgorithm + /** The number of iterations used to derive a key from the password. Defaults to 1. */ + iterations: number + /** Minimum password size. Defaults to 32. */ + minPasswordlength: number +}> +/** Password secret string or buffer.*/ + +type SessionDataT = Record +export type SessionData = Partial +export interface Session { + id: string + createdAt: number + data: SessionData +} + +export type SessionUpdate = + | Partial> + | ((oldData: SessionData) => Partial> | undefined) + +export interface SessionManager { + readonly id: string | undefined + readonly data: SessionData + update: (update: SessionUpdate) => Promise> + clear: () => Promise> +} +export interface SessionConfig { + /** Private key used to encrypt session tokens */ + password: string + /** Session expiration time in seconds */ + maxAge?: number + /** default is 'start' */ + name?: string + /** Default is secure, httpOnly, / */ + cookie?: false | CookieSerializeOptions + /** Default is x-start-session / x-{name}-session */ + sessionHeader?: false | string + seal?: SealOptions + crypto?: Crypto + /** Default is Crypto.randomUUID */ + generateId?: () => string +} diff --git a/packages/start-server-core/src/tanstack-start.d.ts b/packages/start-server-core/src/tanstack-start.d.ts index 651e171252..2ccc3871d9 100644 --- a/packages/start-server-core/src/tanstack-start.d.ts +++ b/packages/start-server-core/src/tanstack-start.d.ts @@ -21,3 +21,11 @@ declare module '#tanstack-start-server-fn-resolver' { access: ServerFnLookupAccess, ): Promise } + +declare module '#tanstack-start-server-fn-dispatch' { + export function dispatchServerFnRequest(opts: { + request: Request + context: any + serverFnBase: string + }): Promise +} diff --git a/packages/start-server-core/src/virtual-modules.ts b/packages/start-server-core/src/virtual-modules.ts index 6914fcce45..745ba4c540 100644 --- a/packages/start-server-core/src/virtual-modules.ts +++ b/packages/start-server-core/src/virtual-modules.ts @@ -1,5 +1,6 @@ export const VIRTUAL_MODULES = { startManifest: 'tanstack-start-manifest:v', serverFnResolver: '#tanstack-start-server-fn-resolver', + serverFnDispatch: '#tanstack-start-server-fn-dispatch', pluginAdapters: '#tanstack-start-plugin-adapters', } as const diff --git a/packages/start-server-core/tests/createCsrfMiddleware.test.ts b/packages/start-server-core/tests/createCsrfMiddleware.test.ts index 9d5ce5569e..a46aa444d2 100644 --- a/packages/start-server-core/tests/createCsrfMiddleware.test.ts +++ b/packages/start-server-core/tests/createCsrfMiddleware.test.ts @@ -264,110 +264,6 @@ describe('createCsrfMiddleware', () => { expect(next).toHaveBeenCalledTimes(1) }) - it.each([false, true])( - 'waits for an async filter returning %s before validating', - async (shouldValidate) => { - let resolveFilter!: (result: boolean) => void - const filterResult = new Promise((resolve) => { - resolveFilter = resolve - }) - const matcher = vi.fn(() => false) - const middleware = createCsrfMiddleware({ - filter: () => filterResult, - secFetchSite: matcher, - }) - const ctx = createContext({ - headers: { 'Sec-Fetch-Site': 'same-origin' }, - }) - const pending = runMiddleware(middleware, ctx) - - expect(matcher).not.toHaveBeenCalled() - resolveFilter(shouldValidate) - const { result, next } = await pending - - expect(matcher).toHaveBeenCalledTimes(shouldValidate ? 1 : 0) - expect(next).toHaveBeenCalledTimes(shouldValidate ? 0 : 1) - if (shouldValidate) { - expect((result as Response).status).toBe(403) - } - }, - ) - - it.each([ - ['secFetchSite', 'Sec-Fetch-Site', 'same-origin'], - ['origin', 'Origin', requestOrigin], - ['referer', 'Referer', `${requestOrigin}/path`], - ] as const)( - 'awaits async %s matchers before continuing or rejecting', - async (option, header, value) => { - for (const allowed of [false, true]) { - const matcher = vi.fn(async () => allowed) - const middleware = createCsrfMiddleware({ [option]: matcher }) - const ctx = createContext({ headers: { [header]: value } }) - - const { result, next } = await runMiddleware(middleware, ctx) - - expect(matcher).toHaveBeenCalledOnce() - expect(matcher).toHaveBeenCalledWith( - value, - expect.objectContaining({ request: ctx.request }), - ) - expect(next).toHaveBeenCalledTimes(allowed ? 1 : 0) - if (!allowed) { - expect((result as Response).status).toBe(403) - } - } - }, - ) - - it('matches a Referer origin with an async origin matcher', async () => { - const matcher = vi.fn(async () => true) - const middleware = createCsrfMiddleware({ origin: matcher }) - const ctx = createContext({ - headers: { Referer: `${requestOrigin}/path` }, - }) - - const { next } = await runMiddleware(middleware, ctx) - - expect(matcher).toHaveBeenCalledWith( - requestOrigin, - expect.objectContaining({ request: ctx.request }), - ) - expect(next).toHaveBeenCalledOnce() - }) - - it.each(['filter', 'secFetchSite', 'origin', 'referer', 'failureResponse'])( - 'rejects when a synchronous or async %s callback throws', - async (option) => { - const error = new Error('CSRF callback failed') - const ctx = createContext({ - headers: - option === 'secFetchSite' - ? { 'Sec-Fetch-Site': 'same-origin' } - : option === 'origin' - ? { Origin: requestOrigin } - : option === 'referer' - ? { Referer: `${requestOrigin}/path` } - : {}, - }) - - for (const callback of [ - () => { - throw error - }, - () => Promise.reject(error), - ]) { - const middleware = createCsrfMiddleware({ [option]: callback }) - const next = vi.fn() - // Synchronous callback errors must still become rejected promises. - const result = middleware.options.server!({ ...ctx, next } as any) - - await expect(result).rejects.toBe(error) - expect(next).not.toHaveBeenCalled() - } - }, - ) - it('uses custom failure responses', async () => { const middleware = createCsrfMiddleware({ failureResponse: new Response('CSRF failed', { status: 419 }), @@ -379,39 +275,6 @@ describe('createCsrfMiddleware', () => { expect((result as Response).status).toBe(419) await expect((result as Response).text()).resolves.toBe('CSRF failed') }) - - it('awaits custom failure response callbacks', async () => { - const response = new Response('CSRF failed', { status: 419 }) - const failureResponse = vi.fn(async () => response) - const middleware = createCsrfMiddleware({ failureResponse }) - const ctx = createContext({}) - - const { result, next } = await runMiddleware(middleware, ctx) - - expect(failureResponse).toHaveBeenCalledWith( - expect.objectContaining({ request: ctx.request }), - ) - expect(result).toBe(response) - expect(next).not.toHaveBeenCalled() - }) - - it('clones a configured failure response for every request', async () => { - const failureResponse = new Response('CSRF failed', { status: 419 }) - const middleware = createCsrfMiddleware({ failureResponse }) - - for (let i = 0; i < 2; i++) { - const { result, next } = await runMiddleware( - middleware, - createContext({}), - ) - - expect(result).not.toBe(failureResponse) - expect((result as Response).status).toBe(419) - await expect((result as Response).text()).resolves.toBe('CSRF failed') - expect(next).not.toHaveBeenCalled() - } - expect(failureResponse.bodyUsed).toBe(false) - }) }) function createContextFromRequest( diff --git a/packages/start-server-core/tests/createStartHandler.test.ts b/packages/start-server-core/tests/createStartHandler.test.ts index f2918ed523..54be55bf87 100644 --- a/packages/start-server-core/tests/createStartHandler.test.ts +++ b/packages/start-server-core/tests/createStartHandler.test.ts @@ -1,89 +1,29 @@ -// @vitest-environment node - -import { ReadableStream as NodeReadableStream } from 'node:stream/web' import { afterAll, afterEach, describe, expect, it, vi } from 'vitest' import { createMemoryHistory } from '@tanstack/history' -import { splitSetCookieString } from 'cookie-es' +import { createMiddleware } from '@tanstack/start-client-core' +import { BaseRootRoute, BaseRoute, RouterCore } from '@tanstack/router-core' import { - createMiddleware, - getRouterInstance, -} from '@tanstack/start-client-core' -import { - BaseRootRoute, - BaseRoute, - RouterCore, createNonReactiveMutableStore, createNonReactiveReadonlyStore, - createSerializationAdapter, - redirect, } from '@tanstack/router-core' import { attachRouterServerSsrUtils, createSsrStreamResponse, - transformReadableStreamWithRouter, } from '@tanstack/router-core/ssr/server' import { createStartHandler } from '../src/createStartHandler' import { - appendResponseHeader, - clearResponseHeaders, - createServerEntry, - getCookie, - getCookies, - getRequestHost, - getRequestIP, - getRequestProtocol, - getRequestUrl, - getResponseHeader, - getResponseHeaders, - getResponseStatus, - getStartEvent, - handleStartError, - protectResponseHeaders, - reconcileResponse, - setCookie, - setResponseHeader, - setResponseHeaders, - setResponseStatus, -} from '../src/internal-request-response' -import { - getStaticInlineCss, + getStaticHandlerInlineCssDefault, resolveInlineCssForRequest, } from '../src/inlineCss' -import type { AnyRoute, AnyRouter } from '@tanstack/router-core' -import type { - HandlersFnOpts, - RouteMethodHandlerFn, -} from '@tanstack/start-client-core' - -type TestRouteHandlerFn = RouteMethodHandlerFn< - {}, - AnyRoute, - '/', - {}, - undefined, - undefined, - TContext -> const startMocks = vi.hoisted(() => { - const hadServerFnBase = Object.prototype.hasOwnProperty.call( - process.env, - 'TSS_SERVER_FN_BASE', - ) const previousServerFnBase = process.env.TSS_SERVER_FN_BASE process.env.TSS_SERVER_FN_BASE = '/_serverFn/' return { - hadServerFnBase, previousServerFnBase, requestMiddleware: [] as Array, serverFnResult: undefined as undefined | Response | object, - serverFnHandler: undefined as - | undefined - | ((opts: { serverFnId: string }) => unknown), - serverFnCalls: [] as Array<{ context?: unknown }>, - router: undefined as undefined | AnyRouter, - routerFactory: undefined as undefined | (() => AnyRouter), - serializationAdapters: [] as Array, + router: undefined as undefined | ReturnType, } }) @@ -91,62 +31,18 @@ vi.mock('#tanstack-start-entry', () => ({ startInstance: { getOptions: () => ({ requestMiddleware: startMocks.requestMiddleware, - serializationAdapters: startMocks.serializationAdapters, + serializationAdapters: [], }), }, })) vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => startMocks.routerFactory?.() ?? startMocks.router, + getRouter: () => startMocks.router, })) -vi.mock('../src/server-functions-handler', async (importOriginal) => { - const actual = - await importOriginal() - const { getStartContext } = await import('@tanstack/start-storage-context') - return { - ...actual, - createServerFnErrorResponse: () => { - return new Response(JSON.stringify({ message: 'middleware failed' }), { - status: 500, - headers: { - 'content-type': 'application/json', - 'x-tss-serialized': 'true', - }, - }) - }, - handleServerAction: (opts: { serverFnId: string }) => { - // Server functions read the trusted server context from the start - // context, like __executeServer. - startMocks.serverFnCalls.push({ - context: getStartContext().contextAfterGlobalMiddlewares, - }) - return startMocks.serverFnHandler - ? startMocks.serverFnHandler(opts) - : startMocks.serverFnResult - }, - } -}) - -function createTestStartHandler( - options: Parameters[0], -) { - return createServerEntry({ fetch: createStartHandler(options) }).fetch -} - -// Only server-function replies carry protocol headers. -function createProtocolRequest() { - return new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }) -} - -function createResponseHandler(callback: () => Response | Promise) { - startMocks.requestMiddleware = [createMiddleware().server(callback)] - return createStartHandler(() => { - throw new Error('Response middleware should prevent rendering') - }) -} +vi.mock('#tanstack-start-server-fn-dispatch', () => ({ + dispatchServerFnRequest: () => startMocks.serverFnResult, +})) const getStoreConfig = () => ({ createMutableStore: createNonReactiveMutableStore, @@ -154,13 +50,12 @@ const getStoreConfig = () => ({ batch: (fn: () => void) => fn(), }) -function makeRouter(routeOptions: Record = {}) { +function makeRouter() { const rootRoute = new BaseRootRoute({}) const indexRoute = new BaseRoute({ getParentRoute: () => rootRoute, path: '/', component: () => null, - ...routeOptions, }) const router = new RouterCore( { @@ -173,2260 +68,35 @@ function makeRouter(routeOptions: Record = {}) { return router } -function makeRouterWithRouteWork(routeWork: { - beforeLoad?: (ctx: { abortController: AbortController }) => unknown - loader?: (ctx: { abortController: AbortController }) => unknown -}) { - const rootRoute = new BaseRootRoute({}) - const workRoute = new BaseRoute({ - getParentRoute: () => rootRoute, - path: '/work', - component: () => null, - ...routeWork, - }) - const router = new RouterCore( - { - history: createMemoryHistory({ initialEntries: ['/work'] }), - routeTree: rootRoute.addChildren([workRoute]), - }, - getStoreConfig, - ) - router.isServer = true - return router -} - -function waitForAbortOrRelease(signal: AbortSignal) { - return new Promise((resolve) => { - const release = () => { - signal.removeEventListener('abort', release) - resolve() - } - signal.addEventListener('abort', release, { once: true }) - }) -} - -function makeStreamResponse( - router: ReturnType, - onCancel?: (reason?: unknown) => void, -) { +function makeStreamResponse(router: ReturnType) { attachRouterServerSsrUtils({ router: router as any, manifest: undefined }) const stream = new ReadableStream({ start(controller) { controller.enqueue(new TextEncoder().encode('stream')) }, - cancel(reason) { - onCancel?.(reason) + cancel() { router.serverSsr?.cleanup() }, }) return createSsrStreamResponse(router as any, new Response(stream)) } -function makeCompletingStreamResponse(router: ReturnType) { - attachRouterServerSsrUtils({ router: router as any, manifest: undefined }) - router.serverSsr!.disableHydration() - const source = new NodeReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('stream')) - controller.close() - }, - }) - const stream = transformReadableStreamWithRouter(router as any, source) - return createSsrStreamResponse( - router as any, - new Response(stream as unknown as BodyInit), - ) -} - -function getSetCookieValues(headers: Headers): Array { - const headersWithSetCookie = headers as Headers & { - getSetCookie?: () => Array - } - if (typeof headersWithSetCookie.getSetCookie === 'function') { - return headersWithSetCookie.getSetCookie() - } - const value = headers.get('set-cookie') - if (value) { - return splitSetCookieString(value) - } - return [] -} - -function expectSetCookie( - cookies: Array, - name: string, - value: string, -): void { - expect( - cookies.filter((cookie) => cookie.startsWith(`${name}=${value};`)), - ).toHaveLength(1) -} - afterEach(() => { startMocks.requestMiddleware = [] startMocks.serverFnResult = undefined - startMocks.serverFnHandler = undefined - startMocks.serverFnCalls = [] startMocks.router = undefined - startMocks.routerFactory = undefined - startMocks.serializationAdapters = [] vi.unstubAllEnvs() }) afterAll(() => { - if (!startMocks.hadServerFnBase) { + if (startMocks.previousServerFnBase === undefined) { delete (process.env as Partial).TSS_SERVER_FN_BASE } else { process.env.TSS_SERVER_FN_BASE = startMocks.previousServerFnBase } }) -describe('createStartHandler response reconciliation', () => { - it('preserves returned response cookies when getSetCookie is unavailable', async () => { - const handler = createResponseHandler(() => { - setCookie('helper', '1', { path: '/' }) - const headers = new Headers() - headers.append('set-cookie', 'returned-one=1; Path=/') - headers.append('set-cookie', 'returned-two=2; Path=/') - const response = new Response('ok', { headers }) - const responseHeaders = response.headers as unknown as { - getSetCookie?: unknown - } - responseHeaders.getSetCookie = undefined - return response - }) - - const response = await handler(new Request('http://localhost/'), {}) - const cookies = getSetCookieValues(response.headers) - - expectSetCookie(cookies, 'returned-one', '1') - expectSetCookie(cookies, 'returned-two', '2') - expectSetCookie(cookies, 'helper', '1') - }) - - it('does not dedupe absent-path cookies against explicit-path cookies', async () => { - const handler = createResponseHandler(() => { - setCookie('same', 'helper', { path: '/' }) - return new Response('ok', { - headers: { 'set-cookie': 'same=returned' }, - }) - }) - - const response = await handler(new Request('http://localhost/nested'), {}) - const cookies = getSetCookieValues(response.headers) - - expect(cookies.filter((cookie) => cookie.startsWith('same='))).toEqual([ - 'same=returned', - 'same=helper; Path=/', - ]) - }) - - it('restores protected headers after direct response mutation', async () => { - const handler = createResponseHandler(() => { - const response = new Response('ok', { - headers: { - 'content-type': 'application/json', - 'x-tss-serialized': 'true', - }, - }) - protectResponseHeaders( - response, - new Map([ - ['content-type', 'application/json'], - ['x-tss-serialized', 'true'], - ]), - ) - response.headers.set('content-type', 'text/plain') - response.headers.set('x-tss-serialized', 'false') - return response - }) - - const response = await handler(createProtocolRequest(), {}) - - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - }) - - it('merges repeated protected header snapshots', async () => { - const handler = createResponseHandler(() => { - const response = new Response('ok', { - headers: { - 'content-type': 'application/json', - 'x-tss-raw': 'true', - }, - }) - protectResponseHeaders( - response, - new Map([['content-type', 'application/json']]), - ) - protectResponseHeaders(response, new Map([['x-tss-raw', 'true']])) - response.headers.set('content-type', 'text/plain') - response.headers.set('x-tss-raw', 'false') - return response - }) - - const response = await handler(createProtocolRequest(), {}) - - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-raw')).toBe('true') - }) - - it('reads protected header snapshots after direct response mutation', async () => { - let seenHeader: string | undefined - let seenHeadersHeader: string | null | undefined - const handler = createResponseHandler(() => { - const response = new Response('ok', { - headers: { 'x-transport': 'original' }, - }) - protectResponseHeaders(response, new Map([['x-transport', 'original']])) - const reconciled = reconcileResponse(response, getStartEvent()) - reconciled.headers.set('x-transport', 'mutated') - seenHeader = getResponseHeader('x-transport') - seenHeadersHeader = getResponseHeaders().get('x-transport') - return reconciled - }) - - const response = await handler(createProtocolRequest(), {}) - - expect(seenHeader).toBe('original') - expect(seenHeadersHeader).toBe('original') - expect(response.headers.get('x-transport')).toBe('original') - }) - - it('returns getResponseHeaders as a read-only snapshot after reconciliation', async () => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - const response = reconcileResponse( - new Response('ok', { - headers: { - 'x-keep': 'yes', - 'x-remove': 'remove-me', - }, - }), - getStartEvent(), - ) - const headers = getResponseHeaders() as Headers - expect(headers.get('x-remove')).toBe('remove-me') - headers.set('x-added', 'yes') - headers.delete('x-remove') - return response - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.headers.get('x-keep')).toBe('yes') - expect(response.headers.get('x-added')).toBe(null) - expect(response.headers.get('x-remove')).toBe('remove-me') - expect(warnSpy).toHaveBeenCalledTimes(2) - } finally { - warnSpy.mockRestore() - } - }) - - it('preserves empty string response header values', async () => { - let seenHeader: string | undefined - const handler = createResponseHandler(() => { - setResponseHeader('x-empty', '') - seenHeader = getResponseHeader('x-empty') - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(seenHeader).toBe('') - expect(response.headers.get('x-empty')).toBe('') - }) - - it('keeps helper headers set after clearing response headers', async () => { - const handler = createResponseHandler(() => { - clearResponseHeaders() - setResponseHeader('x-after-clear', 'yes') - return new Response('ok', { - headers: { - 'x-returned': 'removed', - }, - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.headers.get('x-returned')).toBe(null) - expect(response.headers.get('x-after-clear')).toBe('yes') - }) - - it('replaces Set-Cookie arrays and keeps later semantic cookie updates', async () => { - const handler = createResponseHandler(() => { - setResponseHeader('set-cookie', ['array=1; Path=/', 'same=first; Path=/']) - setCookie('same', 'second', { path: '/' }) - return new Response('ok', { - headers: { - 'set-cookie': 'returned=1; Path=/', - }, - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - const cookies = getSetCookieValues(response.headers) - - expect(cookies).toEqual(['array=1; Path=/', 'same=second; Path=/']) - }) - - it('appends non-cookie response headers without replacing values', async () => { - const handler = createResponseHandler(() => { - appendResponseHeader('link', '; rel=preload') - appendResponseHeader('link', ['; rel=preload']) - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.headers.get('link')).toBe( - '; rel=preload, ; rel=preload', - ) - }) - - it('merges appended raw Set-Cookie strings by cookie identity', async () => { - const handler = createResponseHandler(() => { - setCookie('helper', '1', { path: '/' }) - appendResponseHeader('set-cookie', 'external=abc; Path=/; HttpOnly') - // Same cookie identity replaces the previous value instead of - // duplicating — across calls and within one batched call. - appendResponseHeader('set-cookie', [ - 'external=def; Path=/; HttpOnly', - 'other=overwritten; Path=/', - 'other=1; Path=/', - ]) - return new Response('ok', { - headers: { 'set-cookie': 'returned=1; Path=/' }, - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - const cookies = getSetCookieValues(response.headers) - - expectSetCookie(cookies, 'returned', '1') - expectSetCookie(cookies, 'helper', '1') - expectSetCookie(cookies, 'external', 'def') - expectSetCookie(cookies, 'other', '1') - expect(cookies.filter((c) => c.startsWith('external='))).toHaveLength(1) - expect(cookies.filter((c) => c.startsWith('other='))).toHaveLength(1) - }) - - it('warns in development when setResponseStatus is out of range', async () => { - vi.stubEnv('NODE_ENV', 'development') - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(999) - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(200) - expect(warnSpy).toHaveBeenCalledTimes(1) - expect(warnSpy.mock.calls[0]![0]).toContain('setResponseStatus(999)') - } finally { - warnSpy.mockRestore() - vi.unstubAllEnvs() - } - }) - - it('returns the same response after repeated clean reconciliation', async () => { - let firstResponse: Response | undefined - let secondResponse: Response | undefined - const handler = createResponseHandler(() => { - const response = new Response('ok') - firstResponse = reconcileResponse(response, getStartEvent()) - secondResponse = reconcileResponse(firstResponse, getStartEvent()) - return secondResponse - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(secondResponse).toBe(firstResponse) - expect(response).toBe(firstResponse) - }) - - it('applies helper mutations after the same response was reconciled', async () => { - let reconciledResponse: Response | undefined - const handler = createResponseHandler(() => { - const response = new Response('ok') - reconciledResponse = reconcileResponse(response, getStartEvent()) - setResponseHeader('x-late-helper', 'true') - return reconciledResponse - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response).not.toBe(reconciledResponse) - expect(response.body).toBe(reconciledResponse?.body) - expect(reconciledResponse?.headers.get('x-late-helper')).toBeNull() - expect(response.headers.get('x-late-helper')).toBe('true') - }) - - it('reapplies helper headers after direct mutation of a reconciled response', async () => { - const handler = createResponseHandler(() => { - setResponseHeader('x-helper', 'true') - const response = reconcileResponse(new Response('ok'), getStartEvent()) - response.headers.delete('x-helper') - return response - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.headers.get('x-helper')).toBe('true') - }) - - it('applies earlier helper state to later replacement responses', async () => { - let firstResponse: Response | undefined - const handler = createResponseHandler(() => { - setResponseHeader('x-helper', 'true') - firstResponse = reconcileResponse(new Response('first'), getStartEvent()) - return new Response('second') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response).not.toBe(firstResponse) - expect(response.headers.get('x-helper')).toBe('true') - await expect(response.text()).resolves.toBe('second') - }) - - it('restores protected headers changed directly on the response as it leaves the pipeline', async () => { - let returned: Response | undefined - const handler = createResponseHandler(() => { - const response = new Response('ok', { - headers: { 'x-transport': 'original' }, - }) - protectResponseHeaders(response, new Map([['x-transport', 'original']])) - response.headers.set('x-transport', 'mutated') - returned = response - return response - }) - - const response = await handler(createProtocolRequest(), {}) - - expect(response).not.toBe(returned) - expect(response.body).toBe(returned?.body) - expect(returned?.headers.get('x-transport')).toBe('mutated') - expect(response.headers.get('x-transport')).toBe('original') - }) - - it('applies helper status to the returned response', async () => { - const handler = createResponseHandler(() => { - setResponseStatus(201, 'Created') - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(201) - expect(response.statusText).toBe('Created') - }) - - it('sanitizes helper statusText writes', async () => { - const handler = createResponseHandler(() => { - setResponseStatus(418, 'Bad\nTeapot') - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(418) - expect(response.statusText).toBe('BadTeapot') - }) - - it('returns 400 for malformed URLs that throw TypeError', async () => { - const handler = createResponseHandler(() => new Response('unused')) - const response = await handler({ url: 'http://%' } as Request, {}) - - expect(response.status).toBe(400) - expect(response.statusText).toBe('Bad Request') - }) - - it('parses request helpers from forwarded headers and cookies', async () => { - const handler = createResponseHandler(() => { - return Response.json({ - host: getRequestHost(), - forwardedHost: getRequestHost({ xForwardedHost: true }), - protocol: getRequestProtocol(), - originalProtocol: getRequestProtocol({ xForwardedProto: false }), - url: getRequestUrl({ xForwardedHost: true }).toString(), - ip: getRequestIP() ?? null, - forwardedIp: getRequestIP({ xForwardedFor: true }), - cookies: getCookies(), - encodedCookie: getCookie('encoded'), - }) - }) - - const response = await handler( - new Request('http://internal.local:3000/path?x=1', { - headers: { - cookie: 'plain=value; encoded=hello%20world', - host: 'origin.example:8080', - 'x-forwarded-for': '203.0.113.10, 10.0.0.1', - 'x-forwarded-host': 'public.example, proxy.example', - 'x-forwarded-proto': 'https, http', - }, - }), - {}, - ) - - await expect(response.json()).resolves.toEqual({ - host: 'origin.example:8080', - forwardedHost: 'public.example', - protocol: 'https', - originalProtocol: 'http', - url: 'https://public.example/path?x=1', - ip: null, - forwardedIp: '203.0.113.10', - cookies: { - plain: 'value', - encoded: 'hello world', - }, - encodedCookie: 'hello world', - }) - }) - - it('preserves HTTP-style error status, statusText, and headers', async () => { - const handler = createResponseHandler(() => { - const error = new Error('handled') as Error & { - status: number - statusText: string - headers: HeadersInit - } - error.status = 418 - error.statusText = 'Teapot' - error.headers = { 'x-error': 'handled' } - throw error - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(418) - expect(response.statusText).toBe('Teapot') - expect(response.headers.get('x-error')).toBe('handled') - expect(response.headers.get('content-type')).toBe('application/json') - }) - - it('converts errors through handleStartError', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - const handler = createResponseHandler(() => { - throw new Error('handled by default') - }) - - try { - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(500) - expect(response.headers.get('content-type')).toBe('application/json') - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }) - - it('preserves HTTP-style error headers from cause', async () => { - const handler = createResponseHandler(() => { - throw new Error('wrapped', { - cause: { - status: 409, - headers: { 'x-error-cause': 'handled' }, - }, - }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(409) - expect(response.headers.get('x-error-cause')).toBe('handled') - }) - - it.each([200, 201, 302])( - 'does not let a helper %s status hide an uncaught error', - async (helperStatus) => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(helperStatus, 'Helper Status') - throw new TypeError('unexpected failure') - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(500) - expect(response.statusText).toBe('') - await expect(response.json()).resolves.toMatchObject({ - status: 500, - unhandled: true, - }) - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }, - ) - - it('logs an error thrown after a helper selects an error status', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(401, 'Unauthorized') - throw new Error('not signed in') - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(401) - expect(response.statusText).toBe('Unauthorized') - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }) - - it('uses 500 when error metadata carries a non-error status', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - throw Object.assign(new Error('moved'), { - status: 302, - statusText: 'Found', - }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(500) - expect(response.statusText).toBe('') - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }) - - it('does not log errors whose metadata carries an HTTP error status', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(201) - throw Object.assign(new Error('conflict'), { statusCode: 409 }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(409) - expect(consoleError).not.toHaveBeenCalled() - } finally { - consoleError.mockRestore() - } - }) - - it('adopts only the status of an upstream Response cause', async () => { - const handler = createResponseHandler(() => { - throw new Error('upstream failed', { - cause: new Response('

upstream

', { - status: 502, - headers: { - 'content-encoding': 'gzip', - 'content-length': '999', - 'content-type': 'text/html', - 'set-cookie': 'upstream=1; Path=/', - 'x-upstream': 'yes', - }, - }), - }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(502) - expect(response.headers.get('x-upstream')).toBeNull() - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('content-encoding')).toBeNull() - expect(response.headers.get('content-length')).toBeNull() - expect(response.headers.getSetCookie()).toEqual([]) - await expect(response.json()).resolves.toMatchObject({ status: 502 }) - }) - - it('adopts no headers from a Response cause of another fetch implementation', async () => { - // npm undici, node-fetch, or another realm: not an instance of the global - // Response, but tagged as one. - class ForeignResponse { - readonly [Symbol.toStringTag] = 'Response' - readonly status = 502 - readonly headers = new Headers({ - 'content-type': 'text/html', - 'set-cookie': 'upstream=1; Path=/', - 'www-authenticate': 'Basic realm="upstream"', - }) - } - const handler = createResponseHandler(() => { - throw new Error('upstream failed', { cause: new ForeignResponse() }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(502) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('www-authenticate')).toBeNull() - expect(response.headers.getSetCookie()).toEqual([]) - }) - - it('strips body framing headers from explicit error headers', async () => { - const handler = createResponseHandler(() => { - throw Object.assign(new Error('handled'), { - status: 401, - headers: { - connection: 'close', - 'content-encoding': 'br', - 'content-length': '1', - 'content-range': 'bytes 0-0/1', - 'keep-alive': 'timeout=5', - 'transfer-encoding': 'chunked', - 'set-cookie': 'explicit=1; Path=/', - 'www-authenticate': 'Bearer', - }, - }) - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(401) - for (const name of [ - 'connection', - 'content-encoding', - 'content-length', - 'keep-alive', - 'transfer-encoding', - ]) { - expect(response.headers.get(name)).toBeNull() - } - // Headers an application writes for its own error status still apply. - expect(response.headers.get('content-range')).toBe('bytes 0-0/1') - expect(response.headers.get('www-authenticate')).toBe('Bearer') - expect(response.headers.getSetCookie()).toEqual(['explicit=1; Path=/']) - await expect(response.json()).resolves.toMatchObject({ status: 401 }) - }) - - it('keeps helper status over HTTP-style error status', async () => { - const handler = createResponseHandler(() => { - setResponseStatus(401, 'Unauthorized') - const error = new Error('handled') as Error & { status: number } - error.status = 418 - throw error - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(401) - expect(response.statusText).toBe('Unauthorized') - }) - - it('sends a Response thrown by request middleware on a document request unmarked', async () => { - const handler = createResponseHandler(() => { - throw new Response('teapot', { status: 418 }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(418) - expect(response.headers.get('x-tss-raw')).toBeNull() - await expect(response.text()).resolves.toBe('teapot') - }) - - it('rethrows primitive errors', async () => { - const handler = createResponseHandler(() => { - return Promise.reject('primitive failure') - }) - - await expect(handler(new Request('http://localhost/'), {})).rejects.toBe( - 'primitive failure', - ) - }) - - it('does not recover request state from an error outside the active entry', async () => { - const error = Object.assign(new Error('outside'), { - status: 409, - headers: { 'x-error': 'yes' }, - }) - const handler = createResponseHandler(() => { - setResponseHeader('x-helper', 'yes') - throw error - }) - - let caught: unknown - try { - await handler(new Request('http://localhost/'), {}) - } catch (error) { - caught = error - } - - const response = handleStartError(caught) - - expect(response.status).toBe(409) - expect(response.headers.get('x-error')).toBe('yes') - expect(response.headers.get('x-helper')).toBeNull() - }) - - it('returns response errors verbatim outside the active event', () => { - const response = new Response('handled', { status: 418 }) - - expect(handleStartError(response)).toBe(response) - }) - - it('returns a generic response for primitive errors outside the active event', () => { - const response = handleStartError('primitive failure') - - expect(response.status).toBe(500) - expect(response.headers.get('content-type')).toBe('application/json') - }) - - it('cancels returned response bodies when reconciliation drops them', async () => { - let cancelledReason: unknown - let resolveCancel!: () => void - const cancelled = new Promise((resolve) => { - resolveCancel = resolve - }) - const handler = createResponseHandler(() => { - setResponseStatus(204) - return new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([1])) - }, - cancel(reason) { - cancelledReason = reason - resolveCancel() - }, - }), - ) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(204) - expect(response.body).toBe(null) - await expect(cancelled).resolves.toBeUndefined() - expect(cancelledReason).toBe( - 'Response body dropped by Start reconciliation', - ) - }) - - it.each([204, 205, 304])( - 'drops the body of a returned %s response on runtimes that allow one', - async (status) => { - // Bun accepts a body on 204, 205, and 304 responses; Node rejects them. - // This subclass reports the bodyless status for a body-bearing response, - // as Bun would. Fields initialize after the base constructor has - // validated the body. - class BodylessStatusResponse extends Response { - reportsBodylessStatus = true - override get status() { - return this.reportsBodylessStatus ? status : super.status - } - } - let cancelledReason: unknown - const handler = createResponseHandler( - () => - new BodylessStatusResponse( - new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([1])) - }, - cancel(reason) { - cancelledReason = reason - }, - }), - { headers: { 'x-returned': 'yes' } }, - ), - ) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(status) - expect(response.body).toBeNull() - expect(response.headers.get('x-returned')).toBe('yes') - await vi.waitFor(() => - expect(cancelledReason).toBe( - 'Response body dropped by Start reconciliation', - ), - ) - }, - ) - - it('falls back from informational statuses that Fetch responses cannot use', async () => { - const handler = createResponseHandler(() => { - setResponseStatus(101) - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(200) - }) - - it('keeps the previous status when a helper write is out of range', async () => { - const handler = createResponseHandler(() => { - setResponseStatus(418) - setResponseStatus(700) - return new Response('ok') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(418) - }) - - it.each([101, 199, 600, 999, 404.5])( - 'ignores setResponseStatus(%s) instead of overriding a returned status', - async (status) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(status, 'Ignored') - return new Response('missing', { - status: 404, - statusText: 'Not Found', - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(404) - expect(response.statusText).toBe('Not Found') - expect(warnSpy).toHaveBeenCalledOnce() - expect(warnSpy.mock.calls[0]![0]).toContain( - `setResponseStatus(${status}) was ignored`, - ) - } finally { - warnSpy.mockRestore() - } - }, - ) - - it.each([0, Number.NaN])( - 'ignores setResponseStatus(%s) with its status text', - async (status) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(status, 'Ignored') - return new Response('missing', { - status: 404, - statusText: 'Not Found', - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(404) - expect(response.statusText).toBe('Not Found') - expect(warnSpy).toHaveBeenCalledOnce() - } finally { - warnSpy.mockRestore() - } - }, - ) - - it('ignores out-of-range statuses without a warning in production', async () => { - vi.stubEnv('NODE_ENV', 'production') - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(999) - return new Response('missing', { status: 404 }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(404) - expect(warnSpy).not.toHaveBeenCalled() - } finally { - warnSpy.mockRestore() - vi.unstubAllEnvs() - } - }) - - it('keeps the uncaught error status and log after an ignored status write', async () => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - try { - const handler = createResponseHandler(() => { - setResponseStatus(999) - throw new Error('unexpected failure') - }) - - const response = await createServerEntry({ fetch: handler }).fetch( - new Request('http://localhost/'), - {}, - ) - - expect(response.status).toBe(500) - await expect(response.json()).resolves.toMatchObject({ - status: 500, - unhandled: true, - }) - expect(consoleError).toHaveBeenCalledOnce() - } finally { - warnSpy.mockRestore() - consoleError.mockRestore() - } - }) -}) - -describe('createStartHandler redirect safety', () => { - it('publishes early normalized redirects with helper writes from the custom entry', async () => { - const handler = createStartHandler(() => { - throw new Error('Early redirects should not render HTML') - }) - const entry = createServerEntry({ - fetch: async (request, options) => { - setCookie('entry', 'visited') - const response = await handler(request, options) - expect(getResponseStatus()).toBe(308) - expect(getResponseHeader('location')).toBe('http://localhost/target') - expect(getResponseHeaders().getSetCookie()).toEqual([ - 'entry=visited; Path=/', - ]) - return response - }, - }) - - const response = await entry.fetch( - new Request('http://localhost//target'), - {}, - ) - - expect(response.status).toBe(308) - expect(response.headers.getSetCookie()).toEqual(['entry=visited; Path=/']) - }) - - it.each(['GET', 'HEAD'])( - 'publishes the final %s server-function redirect response to custom-entry helpers', - async (method) => { - startMocks.routerFactory = makeRouter - startMocks.serverFnResult = redirect({ to: '/login' }) - const handler = createStartHandler(() => { - throw new Error('Server function redirects should not render HTML') - }) - const entry = createServerEntry({ - fetch: async (request, options) => { - const response = await handler(request, options) - expect(getResponseStatus()).toBe(200) - expect(getResponseHeader('location')).toBeUndefined() - expect(getResponseHeaders().get('content-type')).toBe( - 'application/json', - ) - return response - }, - }) - - const response = await entry.fetch( - new Request('http://localhost/_serverFn/test', { - method, - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(response.headers.get('location')).toBeNull() - if (method === 'HEAD') { - expect(response.body).toBeNull() - } else { - await expect(response.json()).resolves.toMatchObject({ - href: '/login', - isSerializedRedirect: true, - }) - } - }, - ) - - it.each( - [false, true].flatMap((rpc) => - ['relative-to', 'functional-options'].flatMap((options) => - ['/login', 'http://localhost/login', '//evil.example'].map((href) => ({ - rpc, - options, - href, - })), - ), - ), - )( - 'uses an explicit Location before ignored $options (RPC=$rpc, href=$href)', - async ({ rpc, options, href }) => { - const factory = vi.fn(makeRouter) - const updater = vi.fn(() => ({})) - const hash = vi.fn(() => 'ignored') - startMocks.routerFactory = factory - const headers = { Location: href } - const result = - options === 'relative-to' - ? redirect({ headers, to: 'ignored' }) - : redirect({ headers, search: updater, params: updater, hash }) - if (rpc) { - startMocks.serverFnResult = result - } else { - startMocks.requestMiddleware = [createMiddleware().server(() => result)] - } - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request(`http://localhost/${rpc ? '_serverFn/test' : ''}`, { - headers: rpc ? { 'x-tsr-serverFn': 'true' } : undefined, - }), - {}, - ) - const blocked = href.startsWith('//') - expect(response.status).toBe(blocked ? 500 : rpc ? 200 : 307) - expect(response.headers.get('Location')).toBe( - blocked || rpc ? null : '/login', - ) - expect(factory).toHaveBeenCalledTimes(href === '/login' ? 0 : 1) - expect(updater).not.toHaveBeenCalled() - expect(hash).not.toHaveBeenCalled() - if (rpc && !blocked) { - expect(await response.json()).toMatchObject({ - href: '/login', - isSerializedRedirect: true, - }) - } - }, - ) - - it.each( - [undefined, ''].flatMap((location) => - ['to', 'params', 'search', 'hash'].map((option) => ({ - location, - option, - })), - ), - )( - 'still validates unresolved $option with Location=$location', - async ({ location, option }) => { - const factory = vi.fn(makeRouter) - const updater = vi.fn(() => ({})) - const hash = vi.fn(() => 'ignored') - startMocks.routerFactory = factory - const headers = - location === undefined ? undefined : { Location: location } - const result = - option === 'to' - ? redirect({ headers, to: 'relative' }) - : redirect({ - headers, - to: '/login', - params: option === 'params' ? updater : undefined, - search: option === 'search' ? updater : undefined, - hash: option === 'hash' ? hash : undefined, - }) - startMocks.requestMiddleware = [createMiddleware().server(() => result)] - const response = await createTestStartHandler( - () => new Response('unused'), - )(new Request('http://localhost/'), {}) - expect(response.status).toBe(500) - expect(response.headers.get('Location')).toBeNull() - expect(factory).not.toHaveBeenCalled() - expect(updater).not.toHaveBeenCalled() - expect(hash).not.toHaveBeenCalled() - }, - ) - - it('applies custom protocol policy to a header-only redirect with ignored options', async () => { - startMocks.routerFactory = () => { - const router = makeRouter() - router.update({ protocolAllowlist: [] }) - return router - } - startMocks.requestMiddleware = [ - createMiddleware().server(() => - redirect({ - to: 'ignored', - headers: { Location: 'https://other.example/login' }, - }), - ), - ] - const response = await createTestStartHandler(() => new Response('unused'))( - new Request('http://localhost/'), - {}, - ) - expect(response.status).toBe(500) - expect(response.headers.get('Location')).toBeNull() - }) - - it.each([ - '/login', - '../login', - '?next=https://example.com', - '#details', - '/items/a:b', - ])( - 'returns an early relative redirect to %j without initializing the router', - async (href) => { - const factory = vi.fn(makeRouter) - startMocks.routerFactory = factory - startMocks.requestMiddleware = [ - createMiddleware().server(() => redirect({ href })), - ] - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(307) - expect(response.headers.get('Location')).toBe(href) - expect(factory).not.toHaveBeenCalled() - }, - ) - - it('serializes an early relative server-function redirect without initializing the router', async () => { - const factory = vi.fn(makeRouter) - startMocks.routerFactory = factory - startMocks.serverFnResult = redirect({ - href: '/ignored', - headers: { Location: '/login', 'set-cookie': 'session=secret; HttpOnly' }, - }) - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(response.headers.get('Location')).toBeNull() - expect(response.headers.get('set-cookie')).toBe('session=secret; HttpOnly') - const body = await response.json() - expect(body).toMatchObject({ href: '/login', isSerializedRedirect: true }) - expect(body).not.toHaveProperty('headers') - expect(factory).not.toHaveBeenCalled() - }) - - it.each([ - { href: 'https://example.com/login', protocols: [], status: 500 }, - { href: 'myapp:login', protocols: ['myapp:'], status: 307 }, - { href: 'myapp:login', protocols: [], status: 500 }, - ])( - 'uses router policy for an early redirect to $href with $protocols', - async ({ href, protocols, status }) => { - const factory = vi.fn(() => { - const router = makeRouter() - router.update({ protocolAllowlist: protocols }) - return router - }) - startMocks.routerFactory = factory - startMocks.requestMiddleware = [ - createMiddleware().server(() => - redirect({ - href: '/ignored', - headers: { Location: href }, - }), - ), - ] - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(status) - expect(response.headers.get('Location')).toBe( - status === 307 ? href : null, - ) - expect(factory).toHaveBeenCalledTimes(1) - }, - ) - - it('resolves route-based early redirects through the router', async () => { - const factory = vi.fn(() => makeRouterWithRouteWork({})) - startMocks.routerFactory = factory - startMocks.requestMiddleware = [ - createMiddleware().server(() => - redirect({ - to: '/work', - search: { next: 'home' }, - }), - ), - ] - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler(new Request('http://localhost/'), {}) - expect(response.status).toBe(307) - expect(response.headers.get('Location')).toBe('/work?next=home') - expect(factory).toHaveBeenCalledTimes(1) - }) - - it('resolves redirects thrown by a server handlers factory before route middleware runs', async () => { - startMocks.router = makeRouter({ - server: { - handlers: () => { - setCookie('factory', 'visited') - throw redirect({ to: '/login' }) - }, - }, - }) - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(307) - expect(response.headers.get('Location')).toBe('/login') - expect(response.headers.getSetCookie()).toEqual(['factory=visited; Path=/']) - expect(render).not.toHaveBeenCalled() - }) - - it.each([ - { href: '/login', status: 307, factories: 0, location: '/login' }, - { href: '/\\evil.example', status: 500, factories: 1, location: null }, - { - href: 'http://localhost/login', - status: 307, - factories: 1, - location: '/login', - }, - ])( - 'validates a header-only early redirect to $href', - async ({ href, status, factories, location }) => { - const factory = vi.fn(makeRouter) - startMocks.routerFactory = factory - startMocks.requestMiddleware = [ - createMiddleware().server(() => - redirect({ - headers: { Location: href }, - throw: true, - }), - ), - ] - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler(new Request('http://localhost/'), {}) - expect(response.status).toBe(status) - expect(response.headers.get('Location')).toBe(location) - expect(factory).toHaveBeenCalledTimes(factories) - }, - ) - - it.each( - [ - '//evil.example', - '/\\evil.example', - '/\\\\evil.example', - '/\\/evil.example', - '\\/evil.example', - '\\\\evil.example', - ].flatMap((href) => [false, true].map((rpc) => ({ href, rpc }))), - )( - 'validates a resolved server function redirect to $href (RPC=$rpc)', - async ({ href, rpc }) => { - startMocks.router = makeRouter() - startMocks.serverFnResult = redirect({ href }) - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: rpc ? { 'x-tsr-serverFn': 'true' } : undefined, - }), - {}, - ) - - expect(response.status).toBe(500) - expect(response.headers.get('Location')).toBeNull() - }, - ) - - it('validates a structured redirect before returning it directly', async () => { - startMocks.router = makeRouter() - startMocks.requestMiddleware = [ - createMiddleware().server(() => redirect({ href: '/\\evil.example' })), - ] - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(500) - expect(response.headers.get('Location')).toBeNull() - }) - - it('does not serialize structured redirect headers into the response body', async () => { - startMocks.router = makeRouter() - startMocks.serverFnResult = redirect({ - href: '/safe', - headers: { 'set-cookie': 'session=secret; HttpOnly' }, - }) - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(response.headers.get('set-cookie')).toBe('session=secret; HttpOnly') - const responseText = await response.text() - expect(responseText).not.toContain('session=secret') - expect(JSON.parse(responseText)).toEqual( - expect.objectContaining({ - href: '/safe', - statusCode: 307, - isSerializedRedirect: true, - }), - ) - }) - - it.each(['href', 'to'] as const)( - 'snapshots RPC redirect headers before %s option serialization writes helpers', - async (target) => { - startMocks.routerFactory = makeRouter - const callerHeaders = new Headers([ - ['x-snapshot', 'before'], - ['set-cookie', 'first=1; Path=/'], - ['set-cookie', 'second=2; Path=/'], - ]) - const state = { - toJSON() { - source.headers.set('x-snapshot', 'after') - source.headers.append('set-cookie', 'late=3; Path=/') - setResponseHeader('x-serialization', 'complete') - appendResponseHeader('x-steps', 'serialized') - return { serialized: true } - }, - } - const options = { [target]: '/safe', headers: callerHeaders, state } - const source = redirect(options) - startMocks.serverFnResult = source - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.headers.get('x-snapshot')).toBe('before') - expect(response.headers.getSetCookie()).toEqual([ - 'first=1; Path=/', - 'second=2; Path=/', - ]) - expect(response.headers.get('x-serialization')).toBe('complete') - expect(response.headers.get('x-steps')).toBe('serialized') - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('location')).toBeNull() - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('x-tss-serialized')).toBeNull() - expect(await response.json()).toEqual( - expect.objectContaining({ - href: '/safe', - state: { serialized: true }, - isSerializedRedirect: true, - }), - ) - expect(source.headers.get('x-snapshot')).toBe('after') - expect(options.headers).toBe(callerHeaders) - expect(callerHeaders.get('x-snapshot')).toBe('before') - expect(options.state).toBe(state) - }, - ) - - it('preserves redirect headers and caller options across RPC then native form reuse', async () => { - const headers = { - Location: '/work', - 'set-cookie': 'session=secret; HttpOnly', - 'content-type': 'text/plain', - } - const options = { href: '/work', statusCode: 303, headers } - const result = redirect(options) - startMocks.serverFnResult = result - const handler = createTestStartHandler(() => new Response('unused')) - - const rpcResponse = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - expect(rpcResponse.status).toBe(200) - expect(rpcResponse.headers.get('content-type')).toBe('application/json') - expect(await rpcResponse.json()).not.toHaveProperty('headers') - expect(options.headers).toBe(headers) - expect(result.headers.get('content-type')).toBe('text/plain') - - const formResponse = await handler( - new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'content-type': 'application/x-www-form-urlencoded' }, - body: 'name=test', - }), - {}, - ) - expect(formResponse.status).toBe(303) - expect(formResponse.headers.get('Location')).toBe('/work') - expect(formResponse.headers.get('set-cookie')).toBe( - 'session=secret; HttpOnly', - ) - expect(formResponse.headers.get('content-type')).toBe('text/plain') - expect(await formResponse.text()).toBe('') - }) - - it('does not serialize an ordinary redirect with a spoofed server function header', async () => { - startMocks.router = makeRouter() - startMocks.requestMiddleware = [ - createMiddleware().server(() => redirect({ href: '/safe' })), - ] - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(307) - expect(response.headers.get('Location')).toBe('/safe') - expect(response.headers.get('content-type')).toBeNull() - expect(await response.text()).toBe('') - }) - - it.each([{ href: '/work' }, { to: '/work' }, { hash: () => 'ignored' }])( - 'preserves native form redirects for %j without the RPC header', - async (target) => { - startMocks.routerFactory = () => makeRouterWithRouteWork({}) - startMocks.serverFnResult = redirect({ - ...target, - statusCode: 303, - headers: { - 'set-cookie': 'session=secret; HttpOnly', - ...('hash' in target ? { Location: '/work' } : undefined), - }, - }) - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { - 'content-type': 'application/x-www-form-urlencoded', - accept: 'text/html', - }, - body: 'name=test', - }), - {}, - ) - - expect(response.status).toBe(303) - expect(response.headers.get('Location')).toBe('/work') - expect(response.headers.get('set-cookie')).toBe( - 'session=secret; HttpOnly', - ) - expect(response.headers.get('content-type')).not.toBe('application/json') - expect(await response.text()).toBe('') - }, - ) -}) - -describe('createStartHandler request location reuse', () => { - it.each( - ['plain', 'café'].flatMap((path) => - [false, true].map((renderApp) => ({ path, renderApp })), - ), - )( - 'rewrites once for $path (renderApp=$renderApp)', - async ({ path, renderApp }) => { - const input = vi.fn(({ url }: { url: URL }) => { - url.pathname = url.pathname.replace('/public/', '/') - return url - }) - const middlewarePathnames: Array = [] - const routeMiddleware = createMiddleware().server( - ({ pathname, next }) => { - middlewarePathnames.push(pathname) - return next() - }, - ) - const serverHandler = vi.fn() - const rootRoute = new BaseRootRoute({}) - const route = new BaseRoute({ - getParentRoute: () => rootRoute, - path, - component: () => null, - server: { - middleware: [routeMiddleware], - handlers: { - GET: ({ pathname, next }) => { - serverHandler(pathname) - return renderApp ? next() : new Response('server response') - }, - }, - }, - }) - const router = new RouterCore( - { - history: createMemoryHistory({ initialEntries: ['/'] }), - routeTree: rootRoute.addChildren([route]), - rewrite: { - input, - output: ({ url }) => { - url.pathname = `/public${url.pathname}` - return url - }, - }, - }, - getStoreConfig, - ) - router.isServer = true - startMocks.router = router - input.mockClear() - const getMatchedRoutes = vi.spyOn(router, 'getMatchedRoutes') - const render = vi.fn(() => new Response('app response')) - const handler = createStartHandler(render) - - const response = await handler( - new Request( - `http://localhost/public/${encodeURIComponent(path)}?view=full#section`, - ), - {}, - ) - - expect(response.status).toBe(200) - expect(await response.text()).toBe( - renderApp ? 'app response' : 'server response', - ) - expect(input).toHaveBeenCalledOnce() - expect(serverHandler).toHaveBeenCalledExactlyOnceWith(`/${path}`) - expect(middlewarePathnames).toEqual([`/${path}`]) - expect(render).toHaveBeenCalledTimes(renderApp ? 1 : 0) - expect( - getMatchedRoutes.mock.calls.every( - ([pathname]) => pathname === `/${path}`, - ), - ).toBe(true) - if (renderApp) { - expect(router.state.matches.at(-1)?.routeId).toBe(route.id) - } - }, - ) - - it('uses the configured origin for server route rewrites', async () => { - const input = vi.fn(({ url }: { url: URL }) => { - url.pathname = - url.hostname === 'public.example' ? '/work' : '/wrong-origin' - return url - }) - const router = makeRouterWithRouteWork({}) - router.update({ - origin: 'https://public.example', - rewrite: { - input, - output: ({ url }) => { - url.pathname = '/public' - return url - }, - }, - }) - const serverHandler = vi.fn(() => new Response('server response')) - router.routesById['/work']!.options.server = { - handlers: { GET: serverHandler }, - } - startMocks.router = router - input.mockClear() - const handler = createStartHandler(() => new Response('app response')) - - const response = await handler( - new Request('http://internal.example/public'), - {}, - ) - - expect(response.status).toBe(200) - expect(await response.text()).toBe('server response') - expect(serverHandler).toHaveBeenCalledOnce() - expect(input).toHaveBeenCalledOnce() - }) - - it('reuses search parsed after route middleware updates the router', async () => { - const parseSearch = vi.fn((search: string) => - Object.fromEntries(new URLSearchParams(search)), - ) - const middleware = createMiddleware().server(({ next }) => { - startMocks.router!.update({ - parseSearch, - stringifySearch: (search) => - `?${new URLSearchParams(search).toString()}`, - }) - return next() - }) - const root = new BaseRootRoute() - const route = new BaseRoute({ - getParentRoute: () => root, - path: '/work', - component: () => null, - loader: ({ location }) => location.search, - server: { middleware: [middleware] }, - }) - startMocks.router = new RouterCore( - { isServer: true, routeTree: root.addChildren([route]) }, - getStoreConfig, - ) - const handler = createStartHandler(({ router }) => - Response.json({ - search: router.state.location.search, - loaderData: router.state.matches.at(-1)?.loaderData, - }), - ) - - const response = await handler( - new Request('http://localhost/work?page=2'), - {}, - ) - - expect(response.status).toBe(200) - expect(await response.json()).toEqual({ - search: { page: '2' }, - loaderData: { page: '2' }, - }) - expect(parseSearch).toHaveBeenCalledExactlyOnceWith('?page=2') - }) - - // Handlers receive the router's pathname: decoded, except for characters - // that would change how the path is read. - it.each([ - ['a/b', 'a%2Fb'], - ['a%b', 'a%25b'], - ['a b', 'a b'], - ['a?b', 'a%3Fb'], - ['a#b', 'a%23b'], - ])( - 'preserves encoded params %j when a server handler continues to SSR', - async (value, pathname) => { - const handlerParams: Array = [] - const handlerPathnames: Array = [] - const root = new BaseRootRoute() - const route = new BaseRoute({ - getParentRoute: () => root, - path: '/params/$value', - component: () => null, - loader: ({ params }) => params.value, - server: { - handlers: { - GET: ({ params, pathname, next }) => { - handlerParams.push(params.value) - handlerPathnames.push(pathname) - params.value = 'changed by server handler' - return next() - }, - }, - }, - }) - startMocks.router = new RouterCore( - { isServer: true, routeTree: root.addChildren([route]) }, - getStoreConfig, - ) - const handler = createStartHandler(({ router }) => - Response.json({ - params: router.state.matches.at(-1)?.params, - loaderData: router.state.matches.at(-1)?.loaderData, - }), - ) - - const response = await handler( - new Request(`http://localhost/params/${encodeURIComponent(value)}`), - {}, - ) - - expect(response.status).toBe(200) - expect(handlerParams).toEqual([value]) - expect(handlerPathnames).toEqual([`/params/${pathname}`]) - expect(await response.json()).toEqual({ - params: { value }, - loaderData: value, - }) - }, - ) -}) - -it('keeps the request URL when server code attempts navigation', async () => { - const loader = vi.fn(async () => { - const router = startMocks.router! - router.history.push('/pushed') - router.history.replace('/replaced') - await router.navigate({ to: '/navigated' }) - return 'request data' - }) - const router = makeRouterWithRouteWork({ loader }) - startMocks.router = router - const load = vi.spyOn(router, 'load') - const handler = createTestStartHandler(({ router: loadedRouter }) => { - expect(loadedRouter.state.location.pathname).toBe('/work') - expect(loadedRouter.history.location.pathname).toBe('/work') - expect(loadedRouter.history.length).toBe(1) - return new Response(loadedRouter.state.matches.at(-1)?.loaderData as string) - }) - const response = await handler(new Request('http://localhost/work'), {}) - - expect(response.status).toBe(200) - expect(await response.text()).toBe('request data') - expect(loader).toHaveBeenCalledTimes(1) - expect(load).toHaveBeenCalledTimes(1) -}) - -describe('createStartHandler router request Accept handling', () => { - it('returns 406 JSON for router requests that do not accept HTML', async () => { - startMocks.routerFactory = vi.fn(makeRouter) - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - headers: { accept: 'application/json' }, - }), - {}, - ) - - expect(response.status).toBe(406) - expect(response.headers.get('content-type')).toContain('application/json') - expect(await response.json()).toEqual({ - error: 'Only HTML requests are supported here', - }) - expect(render).not.toHaveBeenCalled() - }) - - it.each(['text/html', '*/*', undefined])( - 'does not return 406 for Accept: %s', - async (accept) => { - startMocks.routerFactory = vi.fn(makeRouter) - const render = vi.fn(() => new Response('ok')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - headers: accept === undefined ? undefined : { accept }, - }), - {}, - ) - - expect(response.status).not.toBe(406) - expect(await response.text()).toBe('ok') - expect(render).toHaveBeenCalledTimes(1) - }, - ) -}) - describe('createStartHandler SSR cleanup ownership', () => { - it.each([204, 200])( - 'preserves cancellation helper writes when a short-circuit body is dropped and cleanup selects %s without a router', - async (status) => { - const routerFactory = vi.fn(makeRouter) - startMocks.routerFactory = routerFactory - const cancel = vi.fn(() => { - setResponseStatus(status) - setCookie('cleanup', 'visited') - setResponseHeader('x-cleanup', 'complete') - appendResponseHeader('x-cleanup-steps', 'cancelled') - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setResponseStatus(204) - return new Response(new ReadableStream({ cancel }), { - headers: { 'x-cleanup-steps': 'initial' }, - }) - }), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(routerFactory).not.toHaveBeenCalled() - expect(render).not.toHaveBeenCalled() - expect(cancel).toHaveBeenCalledOnce() - expect(response.status).toBe(status) - expect(response.body).toBeNull() - expect(response.headers.getSetCookie()).toEqual([ - 'cleanup=visited; Path=/', - ]) - expect(response.headers.get('x-cleanup')).toBe('complete') - expect(response.headers.get('x-cleanup-steps')).toBe('initial, cancelled') - }, - ) - - it('preserves cancellation helper writes when outermost middleware replaces a server-function response without a router', async () => { - const routerFactory = vi.fn(makeRouter) - startMocks.routerFactory = routerFactory - const cancel = vi.fn(() => { - setCookie('cleanup', 'visited') - setResponseHeader('x-cleanup', 'complete') - appendResponseHeader('x-cleanup-steps', 'cancelled') - }) - startMocks.serverFnHandler = () => - new Response(new ReadableStream({ cancel })) - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - await next() - return new Response('replacement', { - headers: { 'x-cleanup-steps': 'replacement' }, - }) - }), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(routerFactory).not.toHaveBeenCalled() - expect(render).not.toHaveBeenCalled() - expect(startMocks.serverFnCalls).toHaveLength(1) - expect(cancel).toHaveBeenCalledOnce() - expect(response.status).toBe(200) - expect(response.headers.getSetCookie()).toEqual(['cleanup=visited; Path=/']) - expect(response.headers.get('x-cleanup')).toBe('complete') - expect(response.headers.get('x-cleanup-steps')).toBe( - 'replacement, cancelled', - ) - await expect(response.text()).resolves.toBe('replacement') - }) - - it.each(['drop', 'replace'] as const)( - 'preserves cleanup helper writes when middleware disposes SSR through %s', - async (mode) => { - const router = makeRouter() - startMocks.router = router - const cancel = vi.fn() - const cleanup = vi.fn(() => { - setResponseHeader('x-cleanup', 'complete') - setCookie('cleanup', 'visited') - }) - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - if (mode === 'drop') { - setResponseStatus(204) - return result - } - return new Response('replacement') - }), - ] - const handler = createTestStartHandler(({ router: requestRouter }) => { - requestRouter.serverSsr!.onCleanup(cleanup) - return createSsrStreamResponse( - requestRouter, - new Response(new ReadableStream({ cancel })), - ) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(cancel).toHaveBeenCalledOnce() - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - expect(response.headers.get('x-cleanup')).toBe('complete') - expect(response.headers.getSetCookie()).toEqual([ - 'cleanup=visited; Path=/', - ]) - if (mode === 'drop') { - expect(response.status).toBe(204) - expect(response.body).toBeNull() - } else { - expect(response.status).toBe(200) - await expect(response.text()).resolves.toBe('replacement') - } - }, - ) - - it('preserves response helper writes made by eager SSR cleanup callbacks', async () => { - const router = makeRouter() - startMocks.router = router - const cleanup = vi.fn(() => { - setResponseStatus(202, 'Accepted') - setResponseHeader('x-cleanup', 'complete') - setCookie('cleanup', 'visited') - }) - const handler = createTestStartHandler(({ router: requestRouter }) => { - requestRouter.serverSsr!.onCleanup(cleanup) - return new Response('eager document') - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - expect(response.status).toBe(202) - expect(response.statusText).toBe('Accepted') - expect(response.headers.get('x-cleanup')).toBe('complete') - expect(response.headers.getSetCookie()).toEqual(['cleanup=visited; Path=/']) - await expect(response.text()).resolves.toBe('eager document') - }) - - it('preserves helper appends when an eager renderer cleans up before returning', async () => { - const router = makeRouter() - startMocks.router = router - const handler = createTestStartHandler(({ router: requestRouter }) => { - requestRouter.serverSsr!.onCleanup(() => { - setResponseStatus(202, 'Accepted') - appendResponseHeader('x-steps', 'cleanup') - setCookie('cleanup', 'visited') - }) - requestRouter.serverSsr!.cleanup() - return new Response('eager document', { - headers: { 'x-steps': 'render' }, - }) - }) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(router.serverSsr).toBeUndefined() - expect(response.status).toBe(202) - expect(response.statusText).toBe('Accepted') - expect(response.headers.get('x-steps')).toBe('render, cleanup') - expect(response.headers.getSetCookie()).toEqual(['cleanup=visited; Path=/']) - await expect(response.text()).resolves.toBe('eager document') - }) - - it.each([ - { method: 'GET', status: 204, hasBody: true }, - { method: 'HEAD', status: 200, hasBody: false }, - ])( - 'serializes $method RPC redirect options with helper status $status', - async ({ method, status, hasBody }) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const toJSON = vi.fn(() => { - clearResponseHeaders() - setResponseStatus(status) - setResponseHeader('content-type', 'text/plain') - setResponseHeader('location', '/ignored') - setResponseHeader('x-tss-serialized', 'true') - setResponseHeader('x-tss-raw', 'true') - appendResponseHeader('x-steps', 'serialized') - setCookie('serialization', 'visited') - return { serialized: true } - }) - startMocks.serverFnResult = redirect({ href: '/safe', state: { toJSON } }) - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - method, - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - warnSpy.mockRestore() - expect(toJSON).toHaveBeenCalledOnce() - // The client decodes the envelope, so a bodyless helper status is - // ignored. Only HEAD drops the body. - expect(response.status).toBe(200) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('location')).toBeNull() - expect(response.headers.get('x-tss-serialized')).toBeNull() - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('x-steps')).toBe('serialized') - expect(response.headers.getSetCookie()).toEqual([ - 'serialization=visited; Path=/', - ]) - if (hasBody) { - await expect(response.json()).resolves.toMatchObject({ - href: '/safe', - isSerializedRedirect: true, - }) - } else { - expect(response.body).toBeNull() - } - }, - ) - - it('rejects an RPC redirect whose options cannot be serialized as JSON', async () => { - const options = { href: '/safe', toJSON: () => undefined } - startMocks.serverFnResult = redirect(options) - const handler = createStartHandler(() => new Response('unused')) - - await expect( - handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ), - ).rejects.toThrow('Value is not JSON serializable') - }) - - it('does not duplicate helper cookies across repeated reconciliation', async () => { - startMocks.serverFnResult = new Response('ok') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - setCookie('first', '1', { path: '/' }) - const result = await next() - setCookie('second', '2', { path: '/' }) - return result - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - const cookies = getSetCookieValues(response.headers) - - expect( - cookies.filter((cookie) => cookie.startsWith('first=1;')), - ).toHaveLength(1) - expect( - cookies.filter((cookie) => cookie.startsWith('second=2;')), - ).toHaveLength(1) - }) - - it('does not duplicate cookies the cookie parser rejects across middleware levels', async () => { - const longValue = 'x'.repeat(5000) - startMocks.serverFnResult = new Response('ok') - const passThrough = createMiddleware().server(({ next }) => next()) - startMocks.requestMiddleware = [ - passThrough, - createMiddleware().server(({ next }) => next()), - createMiddleware().server(async ({ next }) => { - setCookie('constructor', '1', { path: '/' }) - setCookie('long', longValue, { path: '/' }) - return next() - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - const cookies = getSetCookieValues(response.headers) - - expect( - cookies.filter((cookie) => cookie.startsWith('constructor=1;')), - ).toHaveLength(1) - expect( - cookies.filter((cookie) => cookie.startsWith(`long=${longValue};`)), - ).toHaveLength(1) - }) - - it('disposes stream response when later reconciliation drops the body', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - setResponseStatus(204) - return result - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(204) - expect(response.body).toBe(null) - expect(dispose).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - it('converts middleware errors by default', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - await next() - throw new Error('middleware failed') - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(500) - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(dispose).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - it('passes request middleware context to server functions', async () => { - startMocks.serverFnResult = new Response('ok') - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => { - return next({ context: { middleware: 'yes' } }) - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(startMocks.serverFnCalls).toHaveLength(1) - expect(startMocks.serverFnCalls[0]?.context).toMatchObject({ - middleware: 'yes', - }) - }) - it('preserves serverFn stream cleanup ownership through early return', async () => { startMocks.requestMiddleware = [] const router = makeRouter() @@ -2435,7 +105,7 @@ describe('createStartHandler SSR cleanup ownership', () => { startMocks.serverFnResult = ssrResponse const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -2451,114 +121,6 @@ describe('createStartHandler SSR cleanup ownership', () => { expect(router.serverSsr).toBeUndefined() }) - it('does not cancel the returned response when an inner result settles late', async () => { - let resolveInner!: (response: Response) => void - startMocks.serverFnHandler = () => - new Promise((resolve) => { - resolveInner = resolve - }) - const timeoutCancel = vi.fn() - const timeoutResponse = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('timeout')) - controller.close() - }, - cancel: timeoutCancel, - }), - { status: 504 }, - ) - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => - Promise.race([ - next(), - new Promise((resolve) => - setTimeout(() => resolve(timeoutResponse), 5), - ), - ]), - ), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - expect(response.status).toBe(504) - - const innerCancel = vi.fn() - resolveInner(new Response(new ReadableStream({ cancel: innerCancel }))) - await new Promise((resolve) => setTimeout(resolve, 20)) - - expect(timeoutCancel).not.toHaveBeenCalled() - expect(innerCancel).toHaveBeenCalledExactlyOnceWith( - 'late middleware response', - ) - expect(await response.text()).toBe('timeout') - }) - - it.each(['shared result', 'captured response'] as const)( - 'keeps an inner fallback when the result it abandoned settles while an outer middleware awaits (%s)', - async (returned) => { - let resolveInner!: (response: Response) => void - startMocks.serverFnHandler = () => - new Promise((resolve) => { - resolveInner = resolve - }) - const timeoutCancel = vi.fn() - const timeoutResponse = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('timeout')) - controller.close() - }, - cancel: timeoutCancel, - }), - { status: 504 }, - ) - const innerCancel = vi.fn() - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - const captured = result.response - // The abandoned inner result settles while this middleware awaits. - resolveInner( - new Response(new ReadableStream({ cancel: innerCancel }), { - status: 200, - }), - ) - await new Promise((resolve) => setTimeout(resolve, 10)) - return returned === 'shared result' ? result : captured - }), - createMiddleware().server(({ next }) => - Promise.race([ - next(), - new Promise((resolve) => - setTimeout(() => resolve(timeoutResponse), 5), - ), - ]), - ), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(504) - expect(timeoutCancel).not.toHaveBeenCalled() - expect(innerCancel).toHaveBeenCalledExactlyOnceWith( - 'late middleware response', - ) - expect(await response.text()).toBe('timeout') - }, - ) - it('disposes stream response replaced by middleware result', async () => { const router = makeRouter() startMocks.router = router @@ -2573,7 +135,7 @@ describe('createStartHandler SSR cleanup ownership', () => { }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -2602,7 +164,7 @@ describe('createStartHandler SSR cleanup ownership', () => { }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -2631,7 +193,7 @@ describe('createStartHandler SSR cleanup ownership', () => { }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -2647,139 +209,6 @@ describe('createStartHandler SSR cleanup ownership', () => { expect(router.serverSsr).toBeUndefined() }) - it('adopts a replacement registered on a directly returned next promise', async () => { - startMocks.router = makeRouter() - const cancel = vi.fn() - const original = new Response(new ReadableStream({ cancel })) - const replacement = new Response('replacement') - const cancelReplacement = vi.spyOn(replacement.body!, 'cancel') - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => { - const pending = Promise.resolve(next()) - void pending.then((result) => { - result.response = replacement - }) - return pending - }), - ] - - const handler = createTestStartHandler(() => original) - const response = await handler(new Request('http://localhost/'), {}) - - expect(response).toBe(replacement) - expect(cancel).toHaveBeenCalledExactlyOnceWith( - 'middleware response replaced', - ) - expect(cancelReplacement).not.toHaveBeenCalled() - await expect(response.text()).resolves.toBe('replacement') - }) - - it('disposes SSR ownership when a directly returned next promise drops the body', async () => { - const router = makeRouter() - startMocks.router = router - const cancel = vi.fn() - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => { - const pending = Promise.resolve(next()) - void pending.then(() => { - setResponseStatus(204) - }) - return pending - }), - ] - - const handler = createTestStartHandler(({ router: requestRouter }) => - createSsrStreamResponse( - requestRouter, - new Response(new ReadableStream({ cancel })), - ), - ) - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(204) - expect(response.body).toBeNull() - expect(cancel).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - it.each(['return', 'mutate', 'throw'] as const)( - 'cancels a plain stream that outer middleware replaces via %s', - async (mode) => { - const router = makeRouter() - startMocks.router = router - const cancel = vi.fn(() => new Promise(() => {})) - startMocks.serverFnResult = new Response(new ReadableStream({ cancel })) - const replacement = new Response('replacement') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - if (mode === 'return') { - return replacement - } - if (mode === 'throw') { - throw replacement - } - result.response = replacement - return result - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - if (mode === 'throw') { - // A Response thrown on a server-function request is marked so the - // client rejects the call; the marked copy keeps the same body. - expect(response.headers.get('x-tss-raw')).toBe('thrown') - await expect(response.text()).resolves.toBe('replacement') - } else { - expect(response).toBe(replacement) - } - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith('middleware response replaced') - }, - ) - - it('preserves a plain stream when middleware pipes the body', async () => { - const router = makeRouter() - startMocks.router = router - const cancel = vi.fn() - startMocks.serverFnResult = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('stream')) - controller.close() - }, - cancel, - }), - ) - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - return new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - await expect(response.text()).resolves.toBe('stream') - expect(cancel).not.toHaveBeenCalled() - }) - it('preserves stream ownership when middleware wraps same body', async () => { const router = makeRouter() startMocks.router = router @@ -2796,7 +225,7 @@ describe('createStartHandler SSR cleanup ownership', () => { }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -2814,365 +243,20 @@ describe('createStartHandler SSR cleanup ownership', () => { expect(router.serverSsr).toBeUndefined() }) - it('keeps stream ownership when Start rebuilds a response with a wrapped Response', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - // Start rebuilds the response to apply this header. - setResponseHeader('x-after-next', 'yes') - return result - }), - ] - // A wrapped global Response that copies stream bodies into new streams, - // reading the original only once the copy is read. - vi.stubGlobal( - 'Response', - new Proxy(Response, { - construct(target, [body, init], newTarget) { - if (body instanceof ReadableStream) { - const source: ReadableStream = body - let reader: ReadableStreamDefaultReader | undefined - body = new ReadableStream({ - async pull(controller) { - reader ??= source.getReader() - const chunk = await reader.read() - if (chunk.done) { - controller.close() - } else { - controller.enqueue(chunk.value) - } - }, - cancel(reason) { - return reader ? reader.cancel(reason) : source.cancel(reason) - }, - }) - } - return Reflect.construct(target, [body, init], newTarget) - }, - }), - ) - - try { - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.headers.get('x-after-next')).toBe('yes') - expect(dispose).not.toHaveBeenCalled() - await expect(response.text()).resolves.toBe('stream') - expect(router.serverSsr).toBeUndefined() - } finally { - vi.unstubAllGlobals() - } - }) - - it('preserves stream ownership when middleware pipes the body', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - let wrappedResponse: Response | undefined - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - wrappedResponse = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - return wrappedResponse - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response).toBe(wrappedResponse) - expect(dispose).not.toHaveBeenCalled() - await expect(response.text()).resolves.toBe('stream') - expect(router.serverSsr).toBeUndefined() - }) - - it.each([false, true])( - 'cancels a derived body after handoff with a router transform: %s', - async (useRouterTransform) => { - const router = makeRouter() - startMocks.router = router - const sourceCancel = vi.fn() - const source = new ReadableStream({ cancel: sourceCancel }) - let dispose: ReturnType - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - return new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - }), - ] - const requestController = new AbortController() - const handler = createTestStartHandler( - ({ router: requestRouter, request }) => { - const responseBody = useRouterTransform - ? transformReadableStreamWithRouter(requestRouter, source, { - signal: request.signal, - }) - : source - const ssrResponse = createSsrStreamResponse( - requestRouter, - new Response(responseBody), - ) - dispose = vi.spyOn(ssrResponse, 'dispose') - return ssrResponse - }, - ) - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - const derivedCancel = vi.spyOn(response.body!, 'cancel') - const reason = new Error('request disconnected') - - expect(source.locked).toBe(true) - requestController.abort(reason) - - await vi.waitFor(() => { - expect(dispose).toHaveBeenCalledExactlyOnceWith(reason) - expect(derivedCancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(sourceCancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(source.locked).toBe(false) - expect(router.serverSsr).toBeUndefined() - }) - }, - ) - - it('preserves both Response.clone() branches when the clone is assigned', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - let siblingText!: Promise - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - const siblingResponse = result.response - result.response = siblingResponse.clone() - // The branch middleware keeps must be read or cancelled. An unread - // branch is abandoned with the stream. - siblingText = siblingResponse.text() - return result - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(dispose).not.toHaveBeenCalled() - await expect(Promise.all([response.text(), siblingText])).resolves.toEqual([ - 'stream', - 'stream', - ]) - expect(router.serverSsr).toBeUndefined() - }) - - it('disposes a piped stream that outer middleware replaces', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const replacement = new Response('replacement') - let derivedCancel!: ReturnType - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - await next() - expect(dispose).not.toHaveBeenCalled() - return replacement - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - const response = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - derivedCancel = vi.spyOn(response.body!, 'cancel') - return response - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response).toBe(replacement) - expect(dispose).toHaveBeenCalledOnce() - expect(derivedCancel).toHaveBeenCalledWith('middleware response replaced') - expect(router.serverSsr).toBeUndefined() - }) - - it('refreshes a cloned response before an outer replacement', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => undefined) - const replacement = new Response('replacement') - let ownerBody!: ReadableStream - let cloneCancellation!: Promise - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - await next() - return replacement - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - cloneCancellation = result.response.clone().body!.cancel('not used') - ownerBody = result.response.body! - vi.spyOn(ownerBody, 'cancel') - return result - }), - ] - - try { - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response).toBe(replacement) - await expect(response.text()).resolves.toBe('replacement') - expect(dispose).toHaveBeenCalledOnce() - expect(ownerBody.cancel).toHaveBeenCalledOnce() - await cloneCancellation - expect(router.serverSsr).toBeUndefined() - await Promise.resolve() - await Promise.resolve() - expect(consoleError).not.toHaveBeenCalled() - } finally { - consoleError.mockRestore() - } - }) - - it('disposes a locked stream that middleware replaces with no body', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - let reader: ReadableStreamDefaultReader | undefined - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - reader = result.response.body!.getReader() - return new Response(null, { status: 204 }) - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(204) - expect(response.body).toBeNull() - expect(dispose).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - reader?.releaseLock() - }) - - it('leaves a stream that middleware reads to the response that replaces it', async () => { + it('disposes stream response on middleware error after next', async () => { const router = makeRouter() startMocks.router = router const ssrResponse = makeStreamResponse(router) startMocks.serverFnResult = ssrResponse const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const replacement = new Response('replacement') - const requestController = new AbortController() - let reader: ReadableStreamDefaultReader | undefined startMocks.requestMiddleware = [ createMiddleware().server(async ({ next }) => { - const result = await next() - // A reader is indistinguishable from a pipe that feeds the - // replacement, so Start must not dispose the stream under it. - reader = result.response.body!.getReader() - return replacement - }), - ] - - try { - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - signal: requestController.signal, - }), - {}, - ) - - expect(response).toBe(replacement) - expect(dispose).not.toHaveBeenCalled() - expect(router.serverSsr).toBeDefined() - - const reason = new Error('request disconnected') - requestController.abort(reason) - expect(dispose).toHaveBeenCalledExactlyOnceWith(reason) - expect(router.serverSsr).toBeUndefined() - } finally { - reader?.releaseLock() - } - }) - - it('disposes an in-place replacement on middleware error', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const cancel = vi.fn() - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - result.response = new Response(new ReadableStream({ cancel })) + await next() throw new Error('middleware failed') }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -3182,7 +266,6 @@ describe('createStartHandler SSR cleanup ownership', () => { expect(response.status).toBe(500) expect(dispose).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledOnce() expect(router.serverSsr).toBeUndefined() }) @@ -3195,13 +278,12 @@ describe('createStartHandler SSR cleanup ownership', () => { const replacement = new Response('handled', { status: 418 }) startMocks.requestMiddleware = [ createMiddleware().server(async ({ next }) => { - const result = await next() - result.response = result.response.clone() + await next() throw replacement }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -3209,49 +291,11 @@ describe('createStartHandler SSR cleanup ownership', () => { {}, ) - // The client-facing copy is marked as thrown and keeps the same body. - expect(response.status).toBe(418) - expect(response.headers.get('x-tss-raw')).toBe('thrown') - await expect(response.text()).resolves.toBe('handled') + expect(response).toBe(replacement) expect(dispose).toHaveBeenCalledOnce() expect(router.serverSsr).toBeUndefined() }) - it('disposes a side-cloned stream before an unrelated thrown response', async () => { - const router = makeRouter() - startMocks.router = router - const ssrResponse = makeCompletingStreamResponse(router) - startMocks.serverFnResult = ssrResponse - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - const replacement = new Response('handled', { status: 418 }) - let cloneCancellation!: Promise - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - cloneCancellation = result.response.clone().body!.cancel('not used') - throw replacement - }), - ] - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - // The client-facing copy is marked as thrown and keeps the same body. - expect(response.status).toBe(418) - expect(response.headers.get('x-tss-raw')).toBe('thrown') - await expect(response.text()).resolves.toBe('handled') - expect(dispose).toHaveBeenCalledOnce() - // The clone's cancellation races Start's disposal of the shared source: it - // resolves, or rejects with the cleanup's abort. Either way it settles. - await cloneCancellation.catch(() => {}) - expect(router.serverSsr).toBeUndefined() - }) - it('honors in-place response assignment on returned context', async () => { const router = makeRouter() startMocks.router = router @@ -3267,7 +311,7 @@ describe('createStartHandler SSR cleanup ownership', () => { }), ] - const handler = createTestStartHandler(() => new Response('unused')) + const handler = createStartHandler(() => new Response('unused')) const response = await handler( new Request('http://localhost/_serverFn/test', { headers: { 'x-tsr-serverFn': 'true' }, @@ -3281,1505 +325,6 @@ describe('createStartHandler SSR cleanup ownership', () => { }) }) -describe('createStartHandler router initialization', () => { - it('keeps adapter order and router adapters isolated to their request', async () => { - const adapter = (key: string) => - createSerializationAdapter({ - key, - test: (value: unknown): value is Date => value instanceof Date, - toSerializable: (value: Date) => value.toISOString(), - fromSerializable: (value: string) => new Date(value), - }) - const startAdapter = adapter('start') - const routerAdapter = adapter('router') - const startAdapters = [startAdapter] - startMocks.serializationAdapters = startAdapters - let requestCount = 0 - startMocks.routerFactory = () => { - const router = makeRouter() - router.options.serializationAdapters = - requestCount++ === 0 ? [routerAdapter] : [] - return router - } - const handler = createStartHandler(({ router }) => - Response.json( - router.options.serializationAdapters?.map(({ key }) => key), - ), - ) - - const first = await handler(new Request('http://localhost/'), {}) - const second = await handler(new Request('http://localhost/'), {}) - - expect(await first.json()).toEqual(['start', '$TSS/serverfn', 'router']) - expect(await second.json()).toEqual(['start', '$TSS/serverfn']) - expect(startAdapters).toEqual([startAdapter]) - }) - - it('normalizes a server function router URL while preserving the incoming URL', async () => { - const requestUrl = - 'http://localhost/_serverFn/test?space=a%20b&tilde=~&bad=%GG&a=1&a=2#part' - let middlewarePathname: string | undefined - let middlewareRequestUrl: string | undefined - let factoryCalls = 0 - startMocks.requestMiddleware = [ - createMiddleware().server(({ pathname, request, next }) => { - middlewarePathname = pathname - middlewareRequestUrl = request.url - return next() - }), - ] - startMocks.routerFactory = () => { - factoryCalls++ - return makeRouter() - } - startMocks.serverFnHandler = async () => { - const [first, second] = await Promise.all([ - getRouterInstance(), - getRouterInstance(), - ]) - return Response.json({ - href: first.history.location.href, - origin: first.options.origin, - requestUrl: getRequestUrl().href, - sameRouter: first === second, - }) - } - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request(requestUrl, { headers: { 'x-tsr-serverFn': 'true' } }), - {}, - ) - - expect(response.status).toBe(200) - expect(await response.json()).toEqual({ - href: '/_serverFn/test?space=a+b&tilde=%7E&bad=%25GG&a=1&a=2#part', - origin: 'http://localhost', - requestUrl, - sameRouter: true, - }) - expect(middlewarePathname).toBe('/_serverFn/test') - expect(middlewareRequestUrl).toBe(requestUrl) - expect(factoryCalls).toBe(1) - }) - - it.each(['/%5FserverFn/test', '/_serverFn/%74est'])( - 'dispatches an encoded server function pathname: %s', - async (pathname) => { - let middlewarePathname: string | undefined - startMocks.requestMiddleware = [ - createMiddleware().server(({ pathname: currentPathname, next }) => { - middlewarePathname = currentPathname - return next() - }), - ] - startMocks.serverFnHandler = ({ serverFnId }) => { - return Response.json({ serverFnId, requestUrl: getRequestUrl().href }) - } - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request(`http://localhost${pathname}`, { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(await response.json()).toEqual({ - serverFnId: 'test', - requestUrl: `http://localhost${pathname}`, - }) - expect(middlewarePathname).toBe('/_serverFn/test') - }, - ) - - it('redirects a protocol-relative server function pathname before dispatch', async () => { - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost//_serverFn/test?space=a%20b', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(308) - expect(response.headers.get('location')).toBe( - 'http://localhost/_serverFn/test?space=a+b', - ) - expect(startMocks.serverFnCalls).toHaveLength(0) - }) - - it('shares one router between concurrent request-context reads', async () => { - let factoryCalls = 0 - let instances: Array = [] - startMocks.routerFactory = () => { - factoryCalls++ - return makeRouter() - } - startMocks.serverFnHandler = async () => { - instances = await Promise.all([getRouterInstance(), getRouterInstance()]) - return new Response('ok') - } - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - await expect(response.text()).resolves.toBe('ok') - expect(factoryCalls).toBe(1) - expect(instances[0]).toBe(instances[1]) - }) - - it('shares one router failure between sequential request-context reads', async () => { - const factoryError = new Error('router factory failed') - const errors: Array = [] - let factoryCalls = 0 - startMocks.routerFactory = () => { - factoryCalls++ - throw factoryError - } - startMocks.serverFnHandler = async () => { - for (let attempt = 0; attempt < 2; attempt++) { - try { - await getRouterInstance() - } catch (error) { - errors.push(error) - } - } - return new Response('ok') - } - - const handler = createTestStartHandler(() => new Response('unused')) - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - await expect(response.text()).resolves.toBe('ok') - expect(factoryCalls).toBe(1) - expect(errors).toEqual([factoryError, factoryError]) - }) - - it('does not start the router factory from a continuation after request abort', async () => { - const requestController = new AbortController() - const reason = new Error('request aborted') - let factoryCalls = 0 - let lateError: unknown - let continueServerFn!: () => void - const serverFnCanContinue = new Promise((resolve) => { - continueServerFn = resolve - }) - let notifyServerFnStarted!: () => void - const serverFnStarted = new Promise((resolve) => { - notifyServerFnStarted = resolve - }) - let notifyLateReadFinished!: () => void - const lateReadFinished = new Promise((resolve) => { - notifyLateReadFinished = resolve - }) - - startMocks.routerFactory = () => { - factoryCalls++ - return makeRouter() - } - startMocks.serverFnHandler = async () => { - notifyServerFnStarted() - await serverFnCanContinue - try { - await getRouterInstance() - } catch (error) { - lateError = error - } - notifyLateReadFinished() - return new Response('late') - } - - const handler = createTestStartHandler(() => new Response('unused')) - const response = handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - signal: requestController.signal, - }), - {}, - ) - - await serverFnStarted - requestController.abort(reason) - expect((await response).status).toBe(500) - - continueServerFn() - await lateReadFinished - expect(factoryCalls).toBe(0) - expect(lateError).toBe(reason) - }) -}) - -describe('createStartHandler direct server routes', () => { - it.each([false, true])( - 'runs shared route middleware once and preserves its context (global=%s)', - async (global) => { - const runMiddleware = vi.fn(({ next }) => - next({ context: { message: 'trusted middleware' } }), - ) - const middleware = createMiddleware().server(runMiddleware) - startMocks.requestMiddleware = global ? [middleware] : [] - const root = new BaseRootRoute({ - server: { middleware: [middleware] }, - }) - startMocks.router = new RouterCore( - { - isServer: true, - routeTree: root.addChildren([ - new BaseRoute({ - getParentRoute: () => root, - path: '/', - component: () => null, - }), - ]), - }, - getStoreConfig, - ) - const handler = createStartHandler<{ - server: { requestContext: { message: string; requestValue: string } } - }>(({ router }) => - Response.json(router.options.additionalContext?.serverContext), - ) - - const response = await handler(new Request('http://localhost/'), { - context: { message: 'request context', requestValue: 'retained' }, - }) - - expect(response.status).toBe(200) - expect(await response.json()).toEqual({ - message: 'trusted middleware', - requestValue: 'retained', - }) - expect(runMiddleware).toHaveBeenCalledOnce() - }, - ) - - it('disposes a thrown sole-terminal response when the request aborts after the fast-path check', async () => { - const requestController = new AbortController() - const cancellation = new Error('request disconnected') - const cancel = vi.fn() - const thrownResponse = new Response( - new ReadableStream({ cancel }), - ) - // Abort during the `instanceof Response` check, immediately after the - // fast path's first abort check has passed. - const responsePrototype = new Proxy(Response.prototype, { - getPrototypeOf() { - requestController.abort(cancellation) - return Response.prototype - }, - }) - Object.setPrototypeOf(thrownResponse, responsePrototype) - startMocks.serverFnHandler = () => { - throw thrownResponse - } - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - signal: requestController.signal, - }), - {}, - ) - - expect(response.status).toBe(500) - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(cancellation) - }) - }) - - it.each([ - ['Response', 'sole-terminal'], - ['SsrResponse', 'sole-terminal'], - ['Response', 'middleware-chain'], - ['SsrResponse', 'middleware-chain'], - ] as const)( - 'does not read context from a direct %s result in the %s path', - async (resultType, executionPath) => { - if (executionPath === 'middleware-chain') { - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => next()), - ] - } - const directResponse = new Response(resultType, { status: 202 }) - const directResult = - resultType === 'Response' - ? directResponse - : { response: directResponse, serverSsrCleanup: 'none' as const } - const contextGetter = vi.fn(() => { - throw new Error('direct response context must not be read') - }) - Object.defineProperty(directResult, 'context', { - get: contextGetter, - }) - startMocks.serverFnHandler = () => directResult - const handler = createTestStartHandler(() => new Response('unused')) - - const response = await handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(202) - await expect(response.text()).resolves.toBe(resultType) - expect(contextGetter).not.toHaveBeenCalled() - }, - ) - - it('does not invoke the sole terminal after abort while copying request context', async () => { - const requestController = new AbortController() - const cancellation = new Error('request disconnected') - const serverFnHandler = vi.fn(() => new Response('must not run')) - const requestContext = {} as { abort: boolean } - Object.defineProperty(requestContext, 'abort', { - enumerable: true, - get() { - requestController.abort(cancellation) - return true - }, - }) - startMocks.serverFnHandler = serverFnHandler - const handler = createStartHandler<{ - server: { requestContext: { abort: boolean } } - }>(() => new Response('unused')) - - await expect( - handler( - new Request('http://localhost/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - signal: requestController.signal, - }), - { context: requestContext }, - ), - ).rejects.toBe(cancellation) - expect(serverFnHandler).not.toHaveBeenCalled() - }) - - it('does not invoke a direct handler when its handler factory aborts', async () => { - const requestController = new AbortController() - const cancellation = new Error('request disconnected') - const routeHandler = vi.fn(() => new Response('must not run')) - const handlers = vi.fn(() => { - requestController.abort(cancellation) - return { GET: routeHandler } - }) - const router = makeRouter({ - component: undefined, - server: { handlers }, - }) - startMocks.router = router - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - expect(response.status).toBe(500) - expect(handlers).toHaveBeenCalledOnce() - expect(routeHandler).not.toHaveBeenCalled() - expect(render).not.toHaveBeenCalled() - }) - - it('returns an exact non-component handler response without rendering a document', async () => { - const routeHandler = vi.fn(() => new Response('direct', { status: 201 })) - const router = makeRouter({ - component: undefined, - server: { - handlers: { - GET: routeHandler, - }, - }, - }) - startMocks.router = router - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(201) - await expect(response.text()).resolves.toBe('direct') - expect(routeHandler).toHaveBeenCalledOnce() - expect(render).not.toHaveBeenCalled() - expect(router.serverSsr).toBeUndefined() - }) - - it('preserves request context, params, and pathname for a direct handler', async () => { - const routeHandler = vi.fn( - ({ context, params, pathname, handlerType, request }: any) => - Response.json({ - context, - params, - pathname, - handlerType, - requestUrl: request.url, - }), - ) - const router = makeRouter({ - path: '/items/$itemId', - component: undefined, - server: { - handlers: { - GET: routeHandler, - }, - }, - }) - startMocks.router = router - const render = vi.fn(() => new Response('must not render')) - const handler = createStartHandler<{ - server: { requestContext: { requestValue: string } } - }>(render) - - const response = await handler( - new Request('http://localhost/items/42?source=test'), - { context: { requestValue: 'preserved' } }, - ) - - await expect(response.json()).resolves.toMatchObject({ - context: { requestValue: 'preserved' }, - params: { itemId: '42' }, - pathname: '/items/42', - handlerType: 'router', - requestUrl: 'http://localhost/items/42?source=test', - }) - 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) => { - const events: Array = [] - const middleware = createMiddleware().server(async ({ next }) => { - events.push('middleware before') - const result = await next({ - context: { middlewarePlacement: placement }, - }) - events.push('middleware after') - result.response.headers.set('x-middleware', placement) - return result - }) - const routeHandler = vi.fn(({ context }: any) => { - events.push('handler') - return Response.json(context) - }) - const handlers = { - GET: - placement === 'handler' - ? { middleware: [middleware], handler: routeHandler } - : routeHandler, - } - const router = makeRouter({ - component: undefined, - server: { - ...(placement === 'route' ? { middleware: [middleware] } : {}), - handlers, - }, - }) - startMocks.router = router - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.headers.get('x-middleware')).toBe(placement) - await expect(response.json()).resolves.toMatchObject({ - middlewarePlacement: placement, - }) - expect(events).toEqual([ - 'middleware before', - 'handler', - 'middleware after', - ]) - expect(render).not.toHaveBeenCalled() - }, - ) - - it('rejects a missing direct response before middleware resumes', async () => { - const afterNext = vi.fn() - const middleware = createMiddleware().server(async ({ next }) => { - await next() - afterNext() - return new Response('must not return') - }) - const router = makeRouter({ - component: undefined, - server: { - middleware: [middleware], - handlers: { GET: () => undefined }, - }, - }) - startMocks.router = router - const handler = createTestStartHandler( - () => new Response('must not render'), - ) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(response.status).toBe(500) - expect(afterNext).not.toHaveBeenCalled() - }) - - it.each(['function', 'object'] as const)( - 'preserves the non-component %s handler next callback', - async (handlerKind) => { - const events: Array = [] - let observedNext: unknown - let caught: unknown - const middleware = createMiddleware().server(async ({ next }) => { - events.push('middleware before') - try { - return await next() - } catch (error) { - caught = error - events.push('middleware caught') - return new Response('cannot defer', { status: 409 }) - } - }) - const routeHandler = vi.fn(({ next }) => { - events.push('handler') - observedNext = next - return next() - }) - startMocks.router = makeRouter({ - component: undefined, - server: { - middleware: [middleware], - handlers: - handlerKind === 'function' - ? { GET: routeHandler } - : ({ - createHandlers, - }: HandlersFnOpts<{}, AnyRoute, '/', {}, undefined>) => - createHandlers({ GET: { handler: routeHandler } }), - }, - }) - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), {}) - - expect(observedNext).toBeTypeOf('function') - expect(caught).toBeInstanceOf(Error) - expect(caught).not.toBeInstanceOf(TypeError) - expect(response.status).toBe(409) - await expect(response.text()).resolves.toBe('cannot defer') - expect(events).toEqual([ - 'middleware before', - 'handler', - 'middleware caught', - ]) - expect(routeHandler).toHaveBeenCalledOnce() - expect(render).not.toHaveBeenCalled() - }, - ) - - it('lets a component route handler defer context to document rendering with next', async () => { - const events: Array = [] - const requestContext = Object.freeze({ nonce: 'request' }) - const globalContext = Object.freeze({ global: 'yes', shared: 'global' }) - const routeContext = Object.freeze({ route: 'yes', shared: 'route' }) - const handlerContext = Object.freeze({ handler: 'yes', shared: 'handler' }) - let loadedContext: unknown - let resumedContext: unknown - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - events.push('global before') - const result = await next({ context: globalContext }) - events.push('global after') - appendResponseHeader('x-after', 'global') - return result - }), - ] - const middleware = createMiddleware().server(async ({ next }) => { - events.push('route before') - const result = await next({ context: routeContext }) - resumedContext = result.context - events.push('route after') - appendResponseHeader('x-after', 'route') - return result - }) - const routeHandler = vi.fn>( - async ({ next }) => { - events.push('handler before') - const result = await next({ context: handlerContext }) - events.push('handler after') - appendResponseHeader('x-after', 'handler') - return result - }, - ) - const loader = vi.fn( - ({ serverContext }: { serverContext?: Record }) => { - events.push('loader') - loadedContext = serverContext - return 'loaded' - }, - ) - const router = makeRouter({ - loader, - server: { - middleware: [middleware], - handlers: { - GET: routeHandler, - }, - }, - }) - startMocks.router = router - const render = vi.fn(() => { - events.push('render') - return Response.json({ context: loadedContext }) - }) - const handler = createTestStartHandler(render) - - const response = await handler(new Request('http://localhost/'), { - context: requestContext, - }) - - const expectedContext = { - nonce: 'request', - global: 'yes', - route: 'yes', - handler: 'yes', - shared: 'handler', - } - expect(response.status).toBe(200) - await expect(response.json()).resolves.toEqual({ context: expectedContext }) - expect(resumedContext).toEqual(expectedContext) - expect(response.headers.get('x-after')).toBe('handler, route, global') - expect(events).toEqual([ - 'global before', - 'route before', - 'handler before', - 'loader', - 'render', - 'handler after', - 'route after', - 'global after', - ]) - expect(requestContext).toEqual({ nonce: 'request' }) - expect(globalContext).toEqual({ global: 'yes', shared: 'global' }) - expect(routeContext).toEqual({ route: 'yes', shared: 'route' }) - expect(handlerContext).toEqual({ handler: 'yes', shared: 'handler' }) - expect(routeHandler).toHaveBeenCalledOnce() - expect(loader).toHaveBeenCalledOnce() - expect(render).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - it('cancels a direct handler body that resolves after request abort', async () => { - const requestController = new AbortController() - const cancellation = new Error('request disconnected') - let notifyHandlerStarted!: () => void - const handlerStarted = new Promise((resolve) => { - notifyHandlerStarted = resolve - }) - let resolveHandler!: (response: Response) => void - const handlerResult = new Promise((resolve) => { - resolveHandler = resolve - }) - const routeHandler = vi.fn(() => { - notifyHandlerStarted() - return handlerResult - }) - const router = makeRouter({ - component: undefined, - server: { - handlers: { - GET: routeHandler, - }, - }, - }) - startMocks.router = router - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await handlerStarted - requestController.abort(cancellation) - expect((await response).status).toBe(500) - - const cancel = vi.fn((_reason: unknown) => new Promise(() => {})) - resolveHandler(new Response(new ReadableStream({ cancel }))) - - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(cancellation) - }) - expect(render).not.toHaveBeenCalled() - }) -}) - -describe('createStartHandler HEAD fallback', () => { - it('strips and disposes the rendered document body', async () => { - const router = makeRouter() - startMocks.router = router - const cancel = vi.fn() - let cleanupEffects = 0 - - const handler = createTestStartHandler(({ router: requestRouter }) => { - requestRouter.serverSsr!.onCleanup(() => { - cleanupEffects++ - }) - return createSsrStreamResponse( - requestRouter, - new Response(new ReadableStream({ cancel }), { - headers: { 'x-rendered': 'true' }, - status: 201, - }), - ) - }) - const response = await handler( - new Request('http://localhost/', { method: 'HEAD' }), - {}, - ) - - expect(response.status).toBe(201) - expect(response.headers.get('x-rendered')).toBe('true') - expect(response.body).toBeNull() - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith('HEAD body stripped') - expect(cleanupEffects).toBe(1) - expect(router.serverSsr).toBeUndefined() - }) - - it('cancels a plain streaming GET body before stripping it', async () => { - const cancel = vi.fn() - const router = makeRouter({ - server: { - handlers: { - GET: () => - new Response( - new ReadableStream({ - cancel, - }), - ), - }, - }, - }) - startMocks.router = router - - const handler = createTestStartHandler( - () => new Response('must not render'), - ) - const response = await handler( - new Request('http://localhost/', { method: 'HEAD' }), - {}, - ) - - expect(response.body).toBeNull() - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith('HEAD body stripped') - }) -}) - -describe('createStartHandler request cancellation', () => { - it.each(['beforeLoad', 'loader'] as const)( - 'aborts route %s work and does not render HTML', - async (hook) => { - let routeSignal: AbortSignal | undefined - let notifyStarted: (() => void) | undefined - const started = new Promise((resolve) => { - notifyStarted = resolve - }) - const routeWork = ({ - abortController, - }: { - abortController: AbortController - }) => { - routeSignal = abortController.signal - notifyStarted?.() - return waitForAbortOrRelease(abortController.signal) - } - const router = makeRouterWithRouteWork({ [hook]: routeWork }) - startMocks.router = router - const requestController = new AbortController() - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - const response = handler( - new Request('http://localhost/work', { - signal: requestController.signal, - }), - {}, - ) - - await started - const cancellation = new Error('request disconnected') - requestController.abort(cancellation) - - expect((await response).status).toBe(500) - expect(routeSignal?.aborted).toBe(true) - expect(routeSignal?.reason).toBe(cancellation) - expect(render).not.toHaveBeenCalled() - }, - ) - - it('settles and cleans up while the render callback is still pending', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let notifyRenderStarted!: () => void - const renderStarted = new Promise((resolve) => { - notifyRenderStarted = resolve - }) - let resolveRender!: ( - value: ReturnType, - ) => void - const renderResult = new Promise< - ReturnType - >((resolve) => { - resolveRender = resolve - }) - let cleanupEffects = 0 - let cancelCalls = 0 - let lateStreamResponse!: ReturnType - const handler = createTestStartHandler(({ router: requestRouter }) => { - const serverSsr = requestRouter.serverSsr! - serverSsr.onCleanup(() => { - cleanupEffects++ - }) - lateStreamResponse = createSsrStreamResponse( - requestRouter, - new Response( - new ReadableStream({ - cancel() { - cancelCalls++ - return new Promise(() => {}) - }, - }), - ), - ) - notifyRenderStarted() - return renderResult - }) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await renderStarted - requestController.abort(new Error('request disconnected')) - - expect((await response).status).toBe(500) - expect(cleanupEffects).toBe(1) - expect(router.serverSsr).toBeUndefined() - - resolveRender(lateStreamResponse) - await Promise.resolve() - await Promise.resolve() - expect(cleanupEffects).toBe(1) - expect(cancelCalls).toBe(1) - expect(router.serverSsr).toBeUndefined() - }) - - it('cancels a plain response resolved by the render callback later', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let notifyRenderStarted!: () => void - const renderStarted = new Promise((resolve) => { - notifyRenderStarted = resolve - }) - let resolveRender!: (value: Response) => void - const renderResult = new Promise((resolve) => { - resolveRender = resolve - }) - const cancel = vi.fn((_reason: unknown) => new Promise(() => {})) - const handler = createTestStartHandler(() => { - notifyRenderStarted() - return renderResult - }) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await renderStarted - const cancellation = new Error('request disconnected') - requestController.abort(cancellation) - - expect((await response).status).toBe(500) - resolveRender(new Response(new ReadableStream({ cancel }))) - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledTimes(1) - expect(cancel).toHaveBeenCalledWith(cancellation) - }) - }) - - it.each(['resolves', 'rejects'] as const)( - 'cancels a plain response when request middleware %s later', - async (settlement) => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let notifyMiddlewareStarted!: () => void - const middlewareStarted = new Promise((resolve) => { - notifyMiddlewareStarted = resolve - }) - let settleMiddleware!: (value: Response) => void - const middlewareResult = new Promise((resolve, reject) => { - settleMiddleware = settlement === 'resolves' ? resolve : reject - }) - const cancel = vi.fn((_reason: unknown) => new Promise(() => {})) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - notifyMiddlewareStarted() - return middlewareResult - }), - ] - const handler = createTestStartHandler( - () => new Response('must not render'), - ) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await middlewareStarted - const cancellation = new Error('request disconnected') - requestController.abort(cancellation) - - expect((await response).status).toBe(500) - settleMiddleware(new Response(new ReadableStream({ cancel }))) - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledTimes(1) - expect(cancel).toHaveBeenCalledWith(cancellation) - }) - }, - ) - - it('cancels a stream resolved by the render callback later', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let notifyRenderStarted!: () => void - const renderStarted = new Promise((resolve) => { - notifyRenderStarted = resolve - }) - let resolveRender!: ( - value: ReturnType, - ) => void - const renderResult = new Promise< - ReturnType - >((resolve) => { - resolveRender = resolve - }) - const cancel = vi.fn((_reason: unknown) => new Promise(() => {})) - let streamResponse!: ReturnType - - const handler = createTestStartHandler(({ router: requestRouter }) => { - streamResponse = createSsrStreamResponse( - requestRouter, - new Response(new ReadableStream({ cancel })), - ) - notifyRenderStarted() - return renderResult - }) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await renderStarted - const cancellation = new Error('request disconnected') - requestController.abort(cancellation) - expect((await response).status).toBe(500) - - resolveRender(streamResponse) - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledTimes(1) - expect(cancel).toHaveBeenCalledWith(cancellation) - }) - }) - - it('disposes a side-cloned stream when the request aborts after handoff', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let cancelCalls = 0 - let siblingResponse!: Response - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - siblingResponse = result.response.clone() - return result - }), - ] - const handler = createTestStartHandler(({ router: requestRouter }) => - createSsrStreamResponse( - requestRouter, - new Response( - new ReadableStream({ - cancel() { - cancelCalls++ - return new Promise(() => {}) - }, - }), - ), - ), - ) - - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - expect(response.body).not.toBeNull() - expect(router.serverSsr).toBeDefined() - const cancel = vi.spyOn(response.body!, 'cancel') - const reason = new Error('request disconnected') - - requestController.abort(reason) - void siblingResponse.body!.cancel(reason) - - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledWith(reason) - expect(cancelCalls).toBe(1) - expect(router.serverSsr).toBeUndefined() - }) - }) - - it('unwinds nested middleware when an inner operation ignores cancellation', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const outerFinally = vi.fn() - let notifyInnerStarted!: () => void - const innerStarted = new Promise((resolve) => { - notifyInnerStarted = resolve - }) - const pending = new Promise(() => {}) - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => next()), - createMiddleware().server(async ({ next }) => { - try { - return await next() - } finally { - outerFinally() - } - }), - createMiddleware().server(() => { - notifyInnerStarted() - return pending - }), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await innerStarted - requestController.abort(new Error('request disconnected')) - - expect((await response).status).toBe(500) - expect(outerFinally).toHaveBeenCalledOnce() - expect(render).not.toHaveBeenCalled() - }) - - it('cancels an all-synchronous direct next chain', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - let notifyInnerStarted!: () => void - const innerStarted = new Promise((resolve) => { - notifyInnerStarted = resolve - }) - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => next()), - createMiddleware().server(({ next }) => next()), - createMiddleware().server(() => { - notifyInnerStarted() - return new Promise(() => {}) - }), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - const response = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await innerStarted - requestController.abort(new Error('request disconnected')) - - expect((await response).status).toBe(500) - expect(render).not.toHaveBeenCalled() - }) - - it('preserves the abort reason when direct next rejects during abort', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const reason = new Error('request disconnected') - const cancel = vi.fn() - const ssrResponse = makeStreamResponse(router, cancel) - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(({ next }) => next()), - createMiddleware().server(async ({ next }) => { - const result = await next() - requestController.abort(reason) - throw result.response - }), - createMiddleware().server(() => ssrResponse as any), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - expect(response.status).toBe(500) - await vi.waitFor(() => { - expect(dispose).toHaveBeenCalledWith(reason) - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(reason) - }) - expect(render).not.toHaveBeenCalled() - }) - - it('preserves aborts that race with a fulfilled direct next promise', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const reason = new Error('request disconnected') - const observedErrors: Array = [] - const afterNext = vi.fn() - const cancel = vi.fn() - const ssrResponse = makeStreamResponse(router, cancel) - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - try { - const result = await next() - afterNext() - return result - } catch (error) { - observedErrors.push(error) - throw error - } - }), - createMiddleware().server(({ next }) => { - const pending = next() - void Promise.resolve(pending).then(() => - requestController.abort(reason), - ) - return pending - }), - createMiddleware().server(() => ssrResponse as any), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - expect(response.status).toBe(500) - await vi.waitFor(() => expect(observedErrors).toEqual([reason])) - await vi.waitFor(() => { - expect(dispose).toHaveBeenCalledWith(reason) - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(reason) - }) - expect(afterNext).not.toHaveBeenCalled() - expect(render).not.toHaveBeenCalled() - }) - - it('disposes a tagged final response when abort wins handoff', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const reason = new Error('request disconnected') - const cancel = vi.fn() - const ssrResponse = makeStreamResponse(router, cancel) - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - queueMicrotask(() => { - queueMicrotask(() => requestController.abort(reason)) - }) - return ssrResponse as any - }), - ] - const render = vi.fn(() => new Response('must not render')) - const handler = createTestStartHandler(render) - - const response = await handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - expect(response.status).toBe(500) - await vi.waitFor(() => { - expect(dispose).toHaveBeenCalledWith(reason) - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(reason) - }) - expect(router.serverSsr).toBeUndefined() - expect(render).not.toHaveBeenCalled() - }) - - it('keeps late same-body disposal idempotent after abort', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const reason = new Error('request disconnected') - let notifyResponseCaptured!: () => void - const responseCaptured = new Promise((resolve) => { - notifyResponseCaptured = resolve - }) - let releaseMiddleware!: () => void - const middlewareRelease = new Promise((resolve) => { - releaseMiddleware = resolve - }) - let notifyLateResultDelivered!: () => void - const lateResultDelivered = new Promise((resolve) => { - notifyLateResultDelivered = resolve - }) - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - const wrapped = new Response(result.response.body, result.response) - notifyResponseCaptured() - await middlewareRelease - queueMicrotask(() => { - queueMicrotask(notifyLateResultDelivered) - }) - return wrapped - }), - ] - const sourceCancel = vi.fn() - const response = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('stream')) - }, - cancel: sourceCancel, - }), - ) - let ssrResponse!: ReturnType - const render = vi.fn(({ router: requestRouter }) => { - ssrResponse = createSsrStreamResponse(requestRouter, response) - return ssrResponse - }) - const handler = createTestStartHandler(render) - const result = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await responseCaptured - const dispose = vi.spyOn(ssrResponse as any, 'dispose') - requestController.abort(reason) - - expect((await result).status).toBe(500) - releaseMiddleware() - await lateResultDelivered - await vi.waitFor(() => { - expect(dispose).toHaveBeenCalledWith(reason) - expect(sourceCancel).toHaveBeenCalledOnce() - expect(sourceCancel).toHaveBeenCalledWith(reason) - }) - expect(router.serverSsr).toBeUndefined() - }) - - it('cancels a piped body that middleware returns after abort', async () => { - const router = makeRouter() - startMocks.router = router - const requestController = new AbortController() - const reason = new Error('request disconnected') - let notifyResponseCaptured!: () => void - const responseCaptured = new Promise((resolve) => { - notifyResponseCaptured = resolve - }) - let releaseMiddleware!: () => void - const middlewareRelease = new Promise((resolve) => { - releaseMiddleware = resolve - }) - let derivedBody!: ReadableStream - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - const derived = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - derivedBody = derived.body! - notifyResponseCaptured() - await middlewareRelease - return derived - }), - ] - const sourceCancel = vi.fn() - const response = new Response( - new ReadableStream({ cancel: sourceCancel }), - ) - const handler = createTestStartHandler(({ router: requestRouter }) => - createSsrStreamResponse(requestRouter, response), - ) - const result = handler( - new Request('http://localhost/', { - signal: requestController.signal, - }), - {}, - ) - - await responseCaptured - const derivedCancel = vi.spyOn(derivedBody, 'cancel') - requestController.abort(reason) - - expect((await result).status).toBe(500) - expect(sourceCancel).not.toHaveBeenCalled() - releaseMiddleware() - await vi.waitFor(() => { - expect(derivedCancel).toHaveBeenCalledWith(reason) - expect(sourceCancel).toHaveBeenCalledOnce() - expect(sourceCancel).toHaveBeenCalledWith(reason) - }) - expect(router.serverSsr).toBeUndefined() - }) -}) - describe('createStartHandler inlineCss option', () => { const request = new Request('https://example.com/') @@ -4836,208 +381,9 @@ describe('createStartHandler inlineCss option', () => { }) it('returns a static inline CSS default only for non-callback options', () => { - expect(getStaticInlineCss(undefined, undefined)).toBe(true) - expect(getStaticInlineCss(undefined, true)).toBe(true) - expect(getStaticInlineCss(undefined, false)).toBe(false) - expect(getStaticInlineCss(undefined, () => true)).toBe(undefined) - expect(getStaticInlineCss(false, () => true)).toBe(false) - expect(getStaticInlineCss(true, false)).toBe(true) - }) -}) - -describe('setResponseHeaders', () => { - it('should set a single header via Headers object', async () => { - const headers = new Headers() - headers.set('X-Custom-Header', 'test-value') - - const handler = createResponseHandler(() => { - setResponseHeaders(headers) - const responseHeaders = getResponseHeaders() - expect(responseHeaders.get('X-Custom-Header')).toBe('test-value') - return new Response('OK') - }) - - const request = new Request('http://localhost:3000/test') - await handler(request, {}) - }) - - it('should set multiple headers via Headers object', async () => { - const headers = new Headers() - headers.set('X-Custom-Header', 'test-value') - headers.set('X-Another-Header', 'another-value') - headers.set('Content-Type', 'application/json') - - const handler = createResponseHandler(() => { - setResponseHeaders(headers) - const responseHeaders = getResponseHeaders() - expect(responseHeaders.get('X-Custom-Header')).toBe('test-value') - expect(responseHeaders.get('X-Another-Header')).toBe('another-value') - expect(responseHeaders.get('Content-Type')).toBe('application/json') - return new Response('OK') - }) - - const request = new Request('http://localhost:3000/test') - await handler(request, {}) - }) - - it('should handle empty Headers object', async () => { - const handler = createResponseHandler(() => { - const headers = new Headers() - setResponseHeaders(headers) - const responseHeaders = getResponseHeaders() - expect(responseHeaders).toBeDefined() - expect(Array.from(responseHeaders.entries()).length).toEqual(0) - return new Response('OK') - }) - - const request = new Request('http://localhost:3000/test') - await handler(request, {}) - }) - - it('should preserve response header values when a snapshot is passed back', async () => { - const cookies = ['session=abc123; Path=/', 'user=john; Path=/'] - const handler = createResponseHandler(() => { - setResponseHeader('set-cookie', cookies) - setResponseHeader('x-custom', 'keep') - const headers = getResponseHeaders() - const entries = Array.from(headers) - - setResponseHeaders(headers) - - expect(Array.from(getResponseHeaders())).toEqual(entries) - expect(Array.from(headers)).toEqual(entries) - expect(headers.getSetCookie()).toEqual(cookies) - return new Response('OK') - }) - - const response = await handler( - new Request('http://localhost:3000/test'), - {}, - ) - expect(response.headers.getSetCookie()).toEqual(cookies) - expect(response.headers.get('x-custom')).toBe('keep') - }) - - it('should replace existing headers with the same name', async () => { - const handler = createResponseHandler(() => { - setResponseHeaders( - new Headers({ - 'X-Custom-Header': 'old-value', - }), - ) - expect(getResponseHeader('X-Custom-Header')).toEqual('old-value') - setResponseHeaders( - new Headers({ - 'X-Custom-Header': 'new-value', - }), - ) - expect(getResponseHeader('X-Custom-Header')).toEqual('new-value') - - return new Response('OK') - }) - - const request = new Request('http://localhost:3000/test') - await handler(request, {}) - }) - - it('should handle multiple headers with the same name added via headers.append()', async () => { - const headers = new Headers() - headers.append('Set-Cookie', 'session=abc123; Path=/; HttpOnly') - headers.append('Set-Cookie', 'user=john; Path=/; Secure') - - const handler = createResponseHandler(() => { - setResponseHeaders(headers) - - // Set-Cookie values remain separate during Headers iteration. - const setCookieValue = getResponseHeader('Set-Cookie') - - expect(setCookieValue).toBeDefined() - - // Both cookie values should be present in the result - expect(setCookieValue).toContain('session=abc123') - expect(setCookieValue).toContain('user=john') - expect(getResponseHeaders().getSetCookie()).toEqual([ - 'session=abc123; Path=/; HttpOnly', - 'user=john; Path=/; Secure', - ]) - - return new Response('OK') - }) - - const request = new Request('http://localhost:3000/test') - await handler(request, {}) - }) - - it.each(['constructor', '__proto__'])( - 'should replace the %s header', - async (name) => { - const handler = createResponseHandler(() => { - setResponseHeader(name, 'old-value') - setResponseHeaders(new Headers([[name, 'new-value']])) - expect(getResponseHeader(name)).toBe('new-value') - return new Response('OK') - }) - - await handler(new Request('http://localhost:3000/test'), {}) - }, - ) - - it('should replace cookies on each call while preserving unrelated headers', async () => { - const cookies = [ - 'session=new; Expires=Wed, 21 Oct 2030 07:28:00 GMT; Path=/', - 'user=john; Path=/', - 'user=john; Path=/', - ] as const - const headers = new Headers([ - ['X-Last', 'last'], - ['Set-Cookie', cookies[0]], - ['X-First', 'first'], - ['set-cookie', cookies[1]], - ['SET-COOKIE', cookies[2]], - ]) - const handler = createResponseHandler(() => { - setResponseHeader('set-cookie', ['old=1', 'old=2']) - setResponseHeader('x-keep', 'keep') - setResponseHeaders(headers) - - expect(getResponseHeaders().getSetCookie()).toEqual(cookies) - expect(headers.getSetCookie()).toEqual(cookies) - expect(getResponseHeader('x-first')).toBe('first') - expect(getResponseHeader('x-last')).toBe('last') - expect(getResponseHeader('x-keep')).toBe('keep') - - setResponseHeaders(new Headers({ 'set-cookie': 'next=1' })) - expect(getResponseHeaders().getSetCookie()).toEqual(['next=1']) - expect(getResponseHeader('x-keep')).toBe('keep') - - setResponseHeaders(new Headers()) - expect(getResponseHeaders().getSetCookie()).toEqual(['next=1']) - return new Response('OK') - }) - - const response = await handler( - new Request('http://localhost:3000/test'), - {}, - ) - expect(response.headers.getSetCookie()).toEqual(['next=1']) - expect(response.headers.get('x-keep')).toBe('keep') - }) - - it('should replace combined values for ordinary headers', async () => { - const handler = createResponseHandler(() => { - setResponseHeader('x-custom', 'old-value') - setResponseHeaders( - new Headers([ - ['X-Custom', 'first'], - ['x-custom', 'second'], - ['x-empty', ''], - ]), - ) - expect(getResponseHeader('x-custom')).toBe('first, second') - expect(getResponseHeaders().get('x-empty')).toBe('') - return new Response('OK') - }) - - await handler(new Request('http://localhost:3000/test'), {}) + expect(getStaticHandlerInlineCssDefault(undefined)).toBe(true) + expect(getStaticHandlerInlineCssDefault(true)).toBe(true) + expect(getStaticHandlerInlineCssDefault(false)).toBe(false) + expect(getStaticHandlerInlineCssDefault(() => true)).toBe(undefined) }) }) diff --git a/packages/start-server-core/tests/early-hints.test.ts b/packages/start-server-core/tests/early-hints.test.ts index 22366eba0d..d56824a828 100644 --- a/packages/start-server-core/tests/early-hints.test.ts +++ b/packages/start-server-core/tests/early-hints.test.ts @@ -76,24 +76,18 @@ describe('early hints', () => { }, } - const hints = collectStaticHintsFromManifest(manifest, [ - { id: '__root__' }, - { id: '/posts' }, - ] as Array) - - expect(hints).toEqual([ - { - href: '/assets/root.js', - rel: 'modulepreload', - as: 'script', - fetchPriority: 'low', - }, + expect( + collectStaticHintsFromManifest(manifest, [ + { id: '__root__' }, + { id: '/posts' }, + ] as Array), + ).toEqual([ + { href: '/assets/root.js', rel: 'modulepreload', as: 'script' }, { href: '/assets/shared.js', rel: 'modulepreload', as: 'script', crossOrigin: 'anonymous', - fetchPriority: 'low', }, { href: '/assets/root.css', @@ -101,21 +95,9 @@ describe('early hints', () => { as: 'style', crossOrigin: 'use-credentials', }, - { - href: '/assets/posts.js', - rel: 'modulepreload', - as: 'script', - fetchPriority: 'low', - }, + { href: '/assets/posts.js', rel: 'modulepreload', as: 'script' }, { href: '/assets/posts.css', rel: 'preload', as: 'style' }, ]) - expect(hints.map(serializeEarlyHint)).toEqual([ - '; rel=modulepreload; as=script; fetchpriority=low', - '; rel=modulepreload; as=script; crossorigin=anonymous; fetchpriority=low', - '; rel=preload; as=style; crossorigin=use-credentials', - '; rel=modulepreload; as=script; fetchpriority=low', - '; rel=preload; as=style', - ]) }) it('skips static stylesheet hints when inline CSS is enabled', () => { @@ -138,12 +120,7 @@ describe('early hints', () => { { id: '/posts' }, ] as Array), ).toEqual([ - { - href: '/assets/posts.js', - rel: 'modulepreload', - as: 'script', - fetchPriority: 'low', - }, + { href: '/assets/posts.js', rel: 'modulepreload', as: 'script' }, ]) }) @@ -172,12 +149,7 @@ describe('early hints', () => { { id: '/posts' }, ] as Array), ).toEqual([ - { - href: '/assets/posts.js', - rel: 'modulepreload', - as: 'script', - fetchPriority: 'low', - }, + { href: '/assets/posts.js', rel: 'modulepreload', as: 'script' }, ]) }) @@ -199,18 +171,12 @@ describe('early hints', () => { { id: '/posts' }, ] as Array), ).toEqual([ - { - href: '/assets/posts.js', - rel: 'preload', - as: 'script', - fetchPriority: 'low', - }, + { href: '/assets/posts.js', rel: 'preload', as: 'script' }, { href: '/assets/shared.js', rel: 'preload', as: 'script', crossOrigin: 'anonymous', - fetchPriority: 'low', }, ]) }) @@ -429,7 +395,7 @@ describe('early hints', () => { expect(events).toHaveLength(2) expect(headers.get('Link')).toBe( - '; rel=modulepreload; as=script; fetchpriority=low', + '; rel=modulepreload; as=script', ) }) diff --git a/packages/start-server-core/tests/error-entry-isolation.test.ts b/packages/start-server-core/tests/error-entry-isolation.test.ts deleted file mode 100644 index 6eb2feab5e..0000000000 --- a/packages/start-server-core/tests/error-entry-isolation.test.ts +++ /dev/null @@ -1,550 +0,0 @@ -// @vitest-environment node - -import { afterEach, describe, expect, it, vi } from 'vitest' -import { createMiddleware } from '@tanstack/start-client-core' -import { createStartHandler } from '../src/createStartHandler' -import { - appendResponseHeader, - clearResponseHeaders, - createServerEntry, - getRequest, - getRequestHeader, - getResponseHeader, - handleStartError, - removeResponseHeader, - setCookie, - setResponseHeader, - setResponseStatus, -} from '../src/request-response' - -const startMocks = vi.hoisted(() => ({ - requestMiddleware: [] as Array, -})) - -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ - requestMiddleware: startMocks.requestMiddleware, - serializationAdapters: [], - }), - }, -})) - -vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => { - throw new Error('These middleware responses do not render a router') - }, -})) - -function createHandler() { - return createStartHandler(() => new Response('unused')) -} - -function request(marker: string, method = 'GET') { - return new Request('http://localhost/', { - method, - headers: { 'x-request-marker': marker }, - }) -} - -function setRequestResponseState() { - setResponseStatus(418, 'Example Error') - setResponseHeader('x-response-marker', getRequestHeader('x-request-marker')!) -} - -afterEach(() => { - startMocks.requestMiddleware = [] -}) - -describe('generic error response finalization', () => { - it.each(['cookie', 'status', 'bodyless'] as const)( - 'includes %s helper writes made by a lazy error headers getter', - async (effect) => { - const error = Object.assign(new Error('refresh required'), { - status: 401, - }) - Object.defineProperty(error, 'headers', { - get() { - setCookie('refresh', 'value') - if (effect === 'status') { - setResponseStatus(429, 'Retry Later') - } else if (effect === 'bodyless') { - setResponseStatus(204) - } - return new Headers({ 'www-authenticate': 'Bearer' }) - }, - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - throw error - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const response = await entry.fetch(request(effect)) - - // A bodyless helper status does not describe the failure, so the - // error's own status applies. - const status = effect === 'status' ? 429 : 401 - expect(response.status).toBe(status) - expect(response.headers.get('www-authenticate')).toBe('Bearer') - expect(response.headers.getSetCookie()).toEqual(['refresh=value; Path=/']) - expect(await response.json()).toMatchObject({ - status, - statusText: effect === 'status' ? 'Retry Later' : '', - }) - }, - ) - - it('does not evaluate error statusText when a helper already supplies it', async () => { - const error = Object.assign(new Error('handled'), { status: 409 }) - const statusText = vi.fn(() => { - throw new Error('The overridden metadata must not be read') - }) - Object.defineProperty(error, 'statusText', { get: statusText }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setResponseStatus(418, 'Helper Status') - throw error - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const response = await entry.fetch(request('status text')) - - expect(statusText).not.toHaveBeenCalled() - expect(response.status).toBe(418) - expect(response.statusText).toBe('Helper Status') - expect(await response.json()).toMatchObject({ statusText: 'Helper Status' }) - }) - - it('includes synchronous helper writes made while reporting an error', async () => { - const error = new Error('reported failure') - const report = vi.spyOn(console, 'error').mockImplementation(() => { - setResponseStatus(503, 'Reported Failure') - setCookie('reported', 'yes') - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - throw error - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - try { - const response = await entry.fetch(request('reporting')) - - expect(report).toHaveBeenCalledExactlyOnceWith(error) - expect(response.status).toBe(503) - expect(response.headers.getSetCookie()).toEqual(['reported=yes; Path=/']) - expect(await response.json()).toMatchObject({ - status: 503, - statusText: 'Reported Failure', - }) - } finally { - report.mockRestore() - } - }) - - it.each(['clear', 'remove', 'empty'] as const)( - 'preserves the %s Content-Type helper operation on a generic error', - async (operation) => { - const errorHeaders = new Headers({ - 'content-type': 'application/problem+json', - }) - const error = Object.assign(new Error('private error message'), { - status: 418, - statusText: 'Teapot', - headers: errorHeaders, - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - if (operation === 'clear') { - clearResponseHeaders() - } else if (operation === 'remove') { - removeResponseHeader('content-type') - } else { - setResponseHeader('content-type', '') - } - setResponseHeader('x-response-marker', 'preserved') - throw error - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const response = await entry.fetch(request(operation)) - - expect(response.status).toBe(418) - expect(response.statusText).toBe('Teapot') - expect(response.headers.get('content-type')).toBe( - operation === 'empty' ? '' : null, - ) - expect(response.headers.get('x-response-marker')).toBe('preserved') - expect(await response.json()).toEqual({ - status: 418, - statusText: 'Teapot', - unhandled: true, - message: 'HTTPError', - }) - expect(errorHeaders.get('content-type')).toBe('application/problem+json') - }, - ) - - it('applies helper appends once when a converted error returns through middleware', async () => { - const error = Object.assign(new Error('handled'), { - status: 409, - headers: { vary: 'Accept-Encoding' }, - }) - startMocks.requestMiddleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - expect(getResponseHeader('vary')).toBe( - 'Accept-Encoding, Origin, User-Agent', - ) - return result - }), - createMiddleware().server(() => { - appendResponseHeader('vary', 'Origin') - const response = handleStartError(error) - expect(getResponseHeader('vary')).toBe('Accept-Encoding, Origin') - appendResponseHeader('vary', 'User-Agent') - return response - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const response = await entry.fetch(request('appends')) - - expect(response.headers.get('vary')).toBe( - 'Accept-Encoding, Origin, User-Agent', - ) - expect(await response.json()).toMatchObject({ status: 409 }) - }) - - it.each([204, 205, 304])( - 'ignores bodyless helper status %i for an uncaught error', - async (status) => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setResponseStatus(status) - setResponseHeader('x-response-marker', 'bodyless') - throw new Error('bodyless failure') - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - try { - const response = await entry.fetch(request('bodyless')) - - expect(response.status).toBe(500) - expect(response.headers.get('x-response-marker')).toBe('bodyless') - expect(await response.json()).toMatchObject({ status: 500 }) - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }, - ) - - it('keeps shared error headers and cookies isolated from each invocation', async () => { - const errorHeaders = new Headers([ - ['vary', 'Accept-Encoding'], - ['set-cookie', 'session=original; Path=/'], - ['set-cookie', 'independent=preserved; Path=/'], - ]) - const error = Object.assign(new Error('shared failure'), { - status: 409, - headers: errorHeaders, - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - const marker = getRequestHeader('x-request-marker')! - appendResponseHeader('vary', marker) - setCookie('session', marker, { path: '/' }) - throw error - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const responses = await Promise.all([ - entry.fetch(request('first')), - entry.fetch(request('second')), - ]) - - for (const [index, marker] of ['first', 'second'].entries()) { - const response = responses[index]! - expect(response.headers.get('vary')).toBe(`Accept-Encoding, ${marker}`) - expect(response.headers.getSetCookie()).toEqual([ - 'independent=preserved; Path=/', - `session=${marker}; Path=/`, - ]) - expect(await response.json()).toMatchObject({ status: 409 }) - } - expect(errorHeaders.get('vary')).toBe('Accept-Encoding') - expect(errorHeaders.getSetCookie()).toEqual([ - 'session=original; Path=/', - 'independent=preserved; Path=/', - ]) - }) -}) - -describe('server entry request ownership', () => { - it.each(['GET', 'HEAD'])( - 'finalizes a primitive error in the %s request context', - async (method) => { - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw 'example failure' - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const response = await entry.fetch(request('primitive', method)) - - expect(response.status).toBe(418) - expect(response.statusText).toBe('Example Error') - expect(response.headers.get('x-response-marker')).toBe('primitive') - if (method === 'HEAD') { - expect(response.body).toBeNull() - } else { - expect(await response.json()).toMatchObject({ status: 418 }) - } - }, - ) - - it('preserves the original rejection from the raw Start handler', async () => { - const error = new Error('example failure') - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw error - }), - ] - - await expect(createHandler()(request('raw'))).rejects.toBe(error) - }) - - it('removes a thrown Response body for HEAD without a helper write', async () => { - const cancel = vi.fn() - const body = new ReadableStream({ cancel }) - const entry = createServerEntry({ - fetch() { - throw new Response(body, { status: 400 }) - }, - }) - - const response = await entry.fetch(request('response failure', 'HEAD')) - - expect(response.status).toBe(400) - expect(response.body).toBeNull() - expect(cancel).toHaveBeenCalledOnce() - }) - - it.each(['handleStartError', 'rethrow'])( - 'keeps a reporting catch in the request context with %s', - async (conversion) => { - const error = new Error('example failure') - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw error - }), - ] - const handler = createHandler() - let caught: unknown - let caughtRequest: Request | undefined - const entry = createServerEntry({ - async fetch(input, opts) { - setResponseHeader('x-entry-marker', 'entry') - try { - return await handler(input, opts) - } catch (value) { - caught = value - caughtRequest = getRequest() - if (conversion === 'rethrow') { - throw value - } - return handleStartError(value) - } - }, - }) - const input = request('custom') - - const response = await entry.fetch(input) - - expect(caught).toBe(error) - expect(caughtRequest).toBe(input) - expect(response.status).toBe(418) - expect(response.headers.get('x-entry-marker')).toBe('entry') - expect(response.headers.get('x-response-marker')).toBe('custom') - }, - ) - - it('allows a custom catch to replace the response without Start helper state', async () => { - const error = new Error('example failure') - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw error - }), - ] - const handler = createHandler() - let caught: unknown - const replacement = new Response('custom response', { status: 202 }) - const entry = createServerEntry({ - async fetch(input, opts) { - try { - return await handler(input, opts) - } catch (value) { - caught = value - return replacement - } - }, - }) - - const response = await entry.fetch(request('custom replacement')) - - expect(caught).toBe(error) - expect(response).toBe(replacement) - expect(response.status).toBe(202) - expect(response.headers.get('x-response-marker')).toBeNull() - expect(await response.text()).toBe('custom response') - }) - - it('finalizes each overlapping invocation in its own context', async () => { - const error = new Error('shared example failure') - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw error - }), - ] - const handler = createHandler() - let caughtCount = 0 - let release!: () => void - const bothCaught = new Promise((resolve) => { - release = resolve - }) - const entry = createServerEntry({ - async fetch(input, opts) { - try { - return await handler(input, opts) - } catch (value) { - caughtCount++ - if (caughtCount === 2) { - release() - } - await bothCaught - return handleStartError(value) - } - }, - }) - - const responses = await Promise.all([ - entry.fetch(request('first')), - entry.fetch(request('second')), - ]) - - expect(responses.map((response) => response.status)).toEqual([418, 418]) - expect( - responses.map((response) => response.headers.get('x-response-marker')), - ).toEqual(['first', 'second']) - }) - - it.each(['return', 'throw'])( - 'does not mutate a reusable bodyless Response when middleware uses %s', - async (result) => { - const source = new Response(null, { - headers: { 'x-source-marker': 'source' }, - }) - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setResponseHeader( - 'x-response-marker', - getRequestHeader('x-request-marker')!, - ) - if (result === 'throw') { - throw source - } - return source - }), - ] - const entry = createServerEntry({ fetch: createHandler() }) - - const first = await entry.fetch(request('first')) - const second = await entry.fetch(request('second')) - - expect(first.headers.get('x-response-marker')).toBe('first') - expect(second.headers.get('x-response-marker')).toBe('second') - expect(first.headers.get('x-source-marker')).toBe('source') - expect(second.headers.get('x-source-marker')).toBe('source') - expect(source.headers.get('x-response-marker')).toBeNull() - expect(source.headers.get('x-source-marker')).toBe('source') - }, - ) - - it('isolates overlapping top-level entry invocations that reuse the same Request', async () => { - let invocationCount = 0 - let release!: () => void - const bothStarted = new Promise((resolve) => { - release = resolve - }) - const entry = createServerEntry({ - async fetch() { - invocationCount++ - setResponseStatus(418) - setResponseHeader('x-invocation-marker', String(invocationCount)) - if (invocationCount === 2) { - release() - } - await bothStarted - throw 'example failure' - }, - }) - const input = request('shared input') - - const responses = await Promise.all([ - entry.fetch(input), - entry.fetch(input), - ]) - - expect(responses.map((response) => response.status)).toEqual([418, 418]) - expect( - responses.map((response) => response.headers.get('x-invocation-marker')), - ).toEqual(['1', '2']) - }) - - it('restores the outer request context after a nested entry handles another request', async () => { - startMocks.requestMiddleware = [ - createMiddleware().server(() => { - setRequestResponseState() - throw 'example failure' - }), - ] - const handler = createHandler() - const inner = createServerEntry({ fetch: handler }) - let innerResponse: Response | undefined - let restoredRequest: Request | undefined - const outer = createServerEntry({ - async fetch(input, opts) { - setResponseHeader('x-outer-marker', 'outer') - innerResponse = await inner.fetch(request('inner')) - restoredRequest = getRequest() - return handler(input, opts) - }, - }) - const input = request('outer') - - const outerResponse = await outer.fetch(input) - - expect(restoredRequest).toBe(input) - expect(innerResponse?.headers.get('x-response-marker')).toBe('inner') - expect(innerResponse?.headers.get('x-outer-marker')).toBeNull() - expect(outerResponse.headers.get('x-response-marker')).toBe('outer') - expect(outerResponse.headers.get('x-outer-marker')).toBe('outer') - }) -}) diff --git a/packages/start-server-core/tests/external-sessions.test.ts b/packages/start-server-core/tests/external-sessions.test.ts deleted file mode 100644 index b4a32bb6b1..0000000000 --- a/packages/start-server-core/tests/external-sessions.test.ts +++ /dev/null @@ -1,174 +0,0 @@ -// @vitest-environment node - -import { afterEach, describe, expect, it, vi } from 'vitest' -import { createMiddleware } from '@tanstack/start-client-core' -import { getIronSession } from 'iron-session' -import { createStartHandler } from '../src/createStartHandler' -import * as server from '../src/request-response' - -const startMocks = vi.hoisted(() => ({ - requestMiddleware: [] as Array, -})) -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ - requestMiddleware: startMocks.requestMiddleware, - serializationAdapters: [], - }), - }, -})) -vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => { - throw new Error('The request middleware must handle the request') - }, -})) - -function handler(run: (request: Request) => Promise) { - startMocks.requestMiddleware = [ - createMiddleware().server(({ request }) => run(request)), - ] - return createStartHandler(() => { - throw new Error('The request middleware must return a response') - }) -} - -function request(cookie?: string, path = '/') { - return new Request(`https://start.example${path}`, { - headers: cookie ? { cookie } : undefined, - }) -} - -function cookies(response: Response) { - return response.headers - .getSetCookie() - .map((c) => c.split(';', 1)[0]) - .join('; ') -} - -const password = 'external-session-test-password-at-least-32-characters' -function iron(name = 'iron') { - return getIronSession<{ user?: string; visits?: number }>( - { read: server.getCookie, write: server.setCookie }, - { cookieName: name, password, ttl: 3600 }, - ) -} - -afterEach(() => { - startMocks.requestMiddleware = [] -}) - -describe('external sessions through public Start request middleware', () => { - it('leaves session ownership to the application', () => { - for (const name of [ - 'defineSession', - 'useSession', - 'getSession', - 'updateSession', - 'clearSession', - 'sealSession', - 'unsealSession', - ]) { - expect(server).not.toHaveProperty(name) - } - }) - - it('loads, saves and destroys an iron-session with the public cookie helpers', async () => { - const app = handler(async (req) => { - const session = await iron() - if (req.url.endsWith('/login')) { - session.user = 'alice' - await session.save() - } else if (req.url.endsWith('/logout')) { - session.destroy() - } - return Response.json({ user: session.user ?? null }) - }) - const anonymous = await app(request(), {}) - expect(anonymous.headers.getSetCookie()).toEqual([]) - const login = await app(request(undefined, '/login'), {}) - expect(login.headers.getSetCookie()[0]).toMatch(/HttpOnly/i) - expect(login.headers.getSetCookie()[0]).toMatch(/Secure/i) - expect(await (await app(request(cookies(login)), {})).json()).toEqual({ - user: 'alice', - }) - const logout = await app(request(cookies(login), '/logout'), {}) - expect(logout.headers.getSetCookie()[0]).toMatch(/Max-Age=0/i) - expect(await (await app(request(cookies(logout)), {})).json()).toEqual({ - user: null, - }) - }) - - it('keeps each request and each separately named iron-session independent', async () => { - const app = handler(async (req) => { - const [auth, preferences] = await Promise.all([ - iron(), - iron('preferences'), - ]) - auth.user = new URL(req.url).searchParams.get('user')! - preferences.visits = 3 - await Promise.all([auth.save(), preferences.save()]) - return Response.json({ user: auth.user }) - }) - const [alice, bob] = await Promise.all([ - app(request(undefined, '/?user=alice'), {}), - app(request(undefined, '/?user=bob'), {}), - ]) - expect(alice.headers.getSetCookie()).toHaveLength(2) - expect(bob.headers.getSetCookie()).toHaveLength(2) - const read = handler(async () => Response.json({ ...(await iron()) })) - expect(await (await read(request(cookies(alice)), {})).json()).toEqual({ - user: 'alice', - }) - expect(await (await read(request(cookies(bob)), {})).json()).toEqual({ - user: 'bob', - }) - }) - - it('keeps the last cookie write when a session is saved and then destroyed', async () => { - const app = handler(async () => { - const session = await iron() - session.user = 'alice' - await session.save() - session.destroy() - server.setCookie('other', 'value') - return new Response('logged out') - }) - const response = await app(request(), {}) - expect(response.headers.getSetCookie()).toHaveLength(2) - expect( - response.headers.getSetCookie().find((c) => c.startsWith('iron=')), - ).toMatch(/Max-Age=0/i) - }) - - it('preserves committed external cookies and response metadata on error responses', async () => { - const app = handler(async () => { - const session = await iron() - session.user = 'alice' - await session.save() - server.setResponseHeader('x-session-test', 'retained') - return new Response('validation failed', { status: 422 }) - }) - const response = await app(request(), {}) - expect(response.status).toBe(422) - expect(response.headers.get('x-session-test')).toBe('retained') - expect(response.headers.getSetCookie()).toHaveLength(1) - const read = handler(async () => Response.json({ ...(await iron()) })) - expect(await (await read(request(cookies(response)), {})).json()).toEqual({ - user: 'alice', - }) - }) - - it('preserves a committed cookie through the default thrown-error conversion', async () => { - const app = handler(async () => { - const session = await iron() - session.visits = 1 - await session.save() - throw new Error('application failure') - }) - const response = await server - .createServerEntry({ fetch: app }) - .fetch(request(), {}) - expect(response.status).toBe(500) - expect(response.headers.getSetCookie()).toHaveLength(1) - }) -}) diff --git a/packages/start-server-core/tests/finalManifest.test.ts b/packages/start-server-core/tests/finalManifest.test.ts index a41f64b576..dabcb19a3d 100644 --- a/packages/start-server-core/tests/finalManifest.test.ts +++ b/packages/start-server-core/tests/finalManifest.test.ts @@ -135,51 +135,6 @@ describe('final manifest resolver', () => { expect(transformAssets).toHaveBeenCalledTimes(1) }) - it('returns a settled cached manifest without a promise', async () => { - const getBaseManifest = vi.fn(async () => baseManifest) - const resolver = createFinalManifestResolver({ cacheCreateTransform: true }) - const request = new Request('http://localhost/') - - const first = await resolver.resolveCached({ - request, - requestInlineCss: undefined, - getBaseManifest, - }) - const second = resolver.resolveCached({ - request, - requestInlineCss: undefined, - getBaseManifest, - }) - - expect(second).toBe(first) - expect(getBaseManifest).toHaveBeenCalledTimes(1) - }) - - it('resolves each request when inline CSS is decided per request', async () => { - const getBaseManifest = vi.fn(async () => baseManifest) - const inlineCss = vi.fn(() => false) - const resolver = createFinalManifestResolver({ - cacheCreateTransform: true, - inlineCss, - }) - const request = new Request('http://localhost/') - - const first = await resolver.resolveCached({ - request, - requestInlineCss: undefined, - getBaseManifest, - }) - const second = resolver.resolveCached({ - request, - requestInlineCss: undefined, - getBaseManifest, - }) - - expect(second).toBeInstanceOf(Promise) - await expect(second).resolves.toBe(first) - expect(inlineCss).toHaveBeenCalledTimes(2) - }) - it('does not warm up when the inline CSS default is request-dependent', () => { const getBaseManifest = vi.fn(async () => baseManifest) const transformAssets: TransformAssetsFn = ({ url }) => url diff --git a/packages/start-server-core/tests/frame-protocol.test.ts b/packages/start-server-core/tests/frame-protocol.test.ts index dd9f41cf4e..380f3a8351 100644 --- a/packages/start-server-core/tests/frame-protocol.test.ts +++ b/packages/start-server-core/tests/frame-protocol.test.ts @@ -1,150 +1,137 @@ -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it } from 'vitest' import { FRAME_HEADER_SIZE, - FRAME_TYPE_CHUNK, - FRAME_TYPE_END, - FRAME_TYPE_ERROR, - FRAME_TYPE_JSON, - MAX_FRAME_PAYLOAD_SIZE, -} from '@tanstack/start-client-core/client-rpc' -import { createMultiplexedStream } from '../src/frame-protocol' -import type { - LateStreamRegistration, - MultiplexedStreamRecord, + FrameType, + createMultiplexedStream, + encodeChunkFrame, + encodeEndFrame, + encodeErrorFrame, + encodeFrame, + encodeJSONFrame, } from '../src/frame-protocol' -function createRecord( - json: string, - rawStreams: Array = [], -): MultiplexedStreamRecord { - return { json: new TextEncoder().encode(json), rawStreams } -} - -function createRecordStream( - records: Array, -): ReadableStream { - return new ReadableStream({ - start(controller) { - for (const record of records) { - controller.enqueue(record) - } - controller.close() - }, - }) -} - -async function readFrames(stream: ReadableStream) { - const reader = stream.getReader() - const frames: Array = [] - for (;;) { - const { done, value } = await reader.read() - if (done) { - return frames - } - frames.push(value) - } -} - describe('frame-protocol', () => { - describe('frame encoding', () => { - it('should encode JSON, chunk, and end frames', async () => { + describe('encodeFrame', () => { + it('should encode frame with header and payload', () => { const payload = new Uint8Array([1, 2, 3, 4]) - const rawStream = new ReadableStream({ - start(controller) { - controller.enqueue(payload) - controller.close() - }, - }) - const frames = await readFrames( - createMultiplexedStream( - createRecordStream([ - createRecord('{"result":"ok"}', [{ id: 42, stream: rawStream }]), - ]), - ), - ) + const frame = encodeFrame(FrameType.CHUNK, 42, payload) - expect(frames).toHaveLength(3) - const jsonView = new DataView(frames[0]!.buffer, frames[0]!.byteOffset) - expect(jsonView.getUint8(0)).toBe(FRAME_TYPE_JSON) - expect(jsonView.getUint32(1, false)).toBe(0) + expect(frame.length).toBe(FRAME_HEADER_SIZE + payload.length) - const chunkView = new DataView(frames[1]!.buffer, frames[1]!.byteOffset) - expect(frames[1]!.length).toBe(FRAME_HEADER_SIZE + payload.length) - expect(chunkView.getUint8(0)).toBe(FRAME_TYPE_CHUNK) - expect(chunkView.getUint32(1, false)).toBe(42) - expect(chunkView.getUint32(5, false)).toBe(payload.length) - expect(frames[1]!.slice(FRAME_HEADER_SIZE)).toEqual(payload) + // Check header + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.CHUNK) + expect(view.getUint32(1, false)).toBe(42) // streamId big-endian + expect(view.getUint32(5, false)).toBe(4) // length big-endian - const endView = new DataView(frames[2]!.buffer, frames[2]!.byteOffset) - expect(frames[2]!.length).toBe(FRAME_HEADER_SIZE) - expect(endView.getUint8(0)).toBe(FRAME_TYPE_END) - expect(endView.getUint32(1, false)).toBe(42) - expect(endView.getUint32(5, false)).toBe(0) + // Check payload + expect(frame.slice(FRAME_HEADER_SIZE)).toEqual(payload) }) - it.each([ - [new Error('Something went wrong'), 'Something went wrong'], - ['string error', 'string error'], - [undefined, 'Unknown error'], - ])('should encode raw stream error payload %j', async (error, message) => { - const errorStream = new ReadableStream({ - start(controller) { - controller.error(error) - }, - }) - const frames = await readFrames( - createMultiplexedStream( - createRecordStream([ - createRecord('{}', [{ id: 789, stream: errorStream }]), - ]), - ), - ) - const frame = frames.find((value) => value[0] === FRAME_TYPE_ERROR)! - const view = new DataView(frame.buffer, frame.byteOffset) - expect(view.getUint8(0)).toBe(FRAME_TYPE_ERROR) - expect(view.getUint32(1, false)).toBe(789) - expect(new TextDecoder().decode(frame.slice(FRAME_HEADER_SIZE))).toBe( - message, - ) + it('should handle empty payload', () => { + const frame = encodeFrame(FrameType.END, 1, new Uint8Array(0)) + + expect(frame.length).toBe(FRAME_HEADER_SIZE) + + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.END) + expect(view.getUint32(5, false)).toBe(0) // length is 0 }) + }) + + describe('encodeJSONFrame', () => { + it('should encode JSON string as frame type 0 with streamId 0', () => { + const json = '{"hello":"world"}' + const frame = encodeJSONFrame(json) + + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.JSON) + expect(view.getUint32(1, false)).toBe(0) // streamId always 0 for JSON + + const encoder = new TextEncoder() + const expectedPayload = encoder.encode(json) + expect(view.getUint32(5, false)).toBe(expectedPayload.length) - it('should bound oversized raw-stream error messages', async () => { - const errorStream = new ReadableStream({ - start(controller) { - controller.error(new Error('x'.repeat(MAX_FRAME_PAYLOAD_SIZE + 1))) - }, - }) - const frames = await readFrames( - createMultiplexedStream( - createRecordStream([ - createRecord('{}', [{ id: 1, stream: errorStream }]), - ]), - ), - ) - const frame = frames.find((value) => value[0] === FRAME_TYPE_ERROR)! const payload = frame.slice(FRAME_HEADER_SIZE) - expect(payload.byteLength).toBeLessThan(MAX_FRAME_PAYLOAD_SIZE) - expect(new TextDecoder().decode(payload)).toMatch(/…$/) + expect(new TextDecoder().decode(payload)).toBe(json) + }) + }) + + describe('encodeChunkFrame', () => { + it('should encode binary chunk with frame type CHUNK', () => { + const chunk = new Uint8Array([0xff, 0xfe, 0xfd]) + const frame = encodeChunkFrame(123, chunk) + + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.CHUNK) + expect(view.getUint32(1, false)).toBe(123) + expect(view.getUint32(5, false)).toBe(3) + + expect(frame.slice(FRAME_HEADER_SIZE)).toEqual(chunk) + }) + }) + + describe('encodeEndFrame', () => { + it('should encode end frame with empty payload', () => { + const frame = encodeEndFrame(456) + + expect(frame.length).toBe(FRAME_HEADER_SIZE) + + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.END) + expect(view.getUint32(1, false)).toBe(456) + expect(view.getUint32(5, false)).toBe(0) + }) + }) + + describe('encodeErrorFrame', () => { + it('should encode Error message', () => { + const frame = encodeErrorFrame(789, new Error('Something went wrong')) + + const view = new DataView(frame.buffer) + expect(view.getUint8(0)).toBe(FrameType.ERROR) + expect(view.getUint32(1, false)).toBe(789) + + const payload = frame.slice(FRAME_HEADER_SIZE) + expect(new TextDecoder().decode(payload)).toBe('Something went wrong') + }) + + it('should handle non-Error values', () => { + const frame = encodeErrorFrame(1, 'string error') + + const payload = frame.slice(FRAME_HEADER_SIZE) + expect(new TextDecoder().decode(payload)).toBe('string error') + }) + + it('should handle undefined error', () => { + const frame = encodeErrorFrame(1, undefined) + + const payload = frame.slice(FRAME_HEADER_SIZE) + expect(new TextDecoder().decode(payload)).toBe('Unknown error') }) }) describe('createMultiplexedStream', () => { it('should multiplex JSON stream only', async () => { + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{"data":1}') + controller.enqueue('{"data":2}') + controller.close() + }, + }) + const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"data":1}'), - createRecord('{"data":2}'), - ]), + jsonStream, + new Map(), // no raw streams ) const reader = multiplexed.getReader() const chunks: Array = [] - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -153,11 +140,18 @@ describe('frame-protocol', () => { // Both should be JSON frames for (const chunk of chunks) { const view = new DataView(chunk.buffer, chunk.byteOffset) - expect(view.getUint8(0)).toBe(FRAME_TYPE_JSON) + expect(view.getUint8(0)).toBe(FrameType.JSON) } }) it('should multiplex JSON and raw streams', async () => { + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{"result":"ok"}') + controller.close() + }, + }) + const rawStream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array([1, 2, 3])) @@ -165,20 +159,17 @@ describe('frame-protocol', () => { }, }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"result":"ok"}', [{ id: 5, stream: rawStream }]), - ]), - ) + const rawStreams = new Map>() + rawStreams.set(5, rawStream) + + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() const chunks: Array = [] - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -190,349 +181,51 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types).toEqual([FRAME_TYPE_JSON, FRAME_TYPE_CHUNK, FRAME_TYPE_END]) - }) - - it('splits raw chunks at the wire payload limit', async () => { - const payload = new Uint8Array(MAX_FRAME_PAYLOAD_SIZE + 1) - const rawStream = new ReadableStream({ - start(controller) { - controller.enqueue(payload) - controller.close() - }, - }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"ref":1}', [{ id: 1, stream: rawStream }]), - ]), - ) - const reader = multiplexed.getReader() - const frames: Array = [] - for (;;) { - const { done, value } = await reader.read() - if (done) { - break - } - frames.push(value) - } - - expect(frames.map((frame) => frame[0])).toEqual([ - FRAME_TYPE_JSON, - FRAME_TYPE_CHUNK, - FRAME_TYPE_CHUNK, - FRAME_TYPE_END, - ]) - expect(frames[1]!.byteLength - FRAME_HEADER_SIZE).toBe( - MAX_FRAME_PAYLOAD_SIZE, - ) - expect(frames[2]!.byteLength - FRAME_HEADER_SIZE).toBe(1) - }) - - it('bounds upstream reads and copies chunks only when output has demand', async () => { - const first = new Uint8Array([1]) - const second = new Uint8Array([2]) - const chunks = [first, second] - let pullCount = 0 - let chunkIndex = 0 - const rawStream = new ReadableStream( - { - pull(controller) { - pullCount++ - const chunk = chunks[chunkIndex++] - if (chunk) { - controller.enqueue(chunk) - } else { - controller.close() - } - }, - }, - { highWaterMark: 0 }, - ) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"ref":1}', [{ id: 1, stream: rawStream }]), - ]), - ) - - // Let every currently runnable pump microtask settle without consuming - // the output. One chunk is queued and one is held unencoded by its pump. - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(pullCount).toBe(1) - - // The second frame must copy its payload only after the first frame is - // consumed and output capacity becomes available. - second[0] = 9 - const reader = multiplexed.getReader() - const jsonFrame = (await reader.read()).value! - expect(new DataView(jsonFrame.buffer).getUint8(0)).toBe(FRAME_TYPE_JSON) - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(pullCount).toBe(2) - const firstFrame = (await reader.read()).value! - const secondFrame = (await reader.read()).value! - expect(firstFrame.slice(FRAME_HEADER_SIZE)).toEqual(new Uint8Array([1])) - expect(secondFrame.slice(FRAME_HEADER_SIZE)).toEqual(new Uint8Array([9])) - - const endFrame = (await reader.read()).value! - expect(new DataView(endFrame.buffer).getUint8(0)).toBe(FRAME_TYPE_END) - await expect(reader.read()).resolves.toEqual({ - done: true, - value: undefined, - }) - }) - - it('bounds concurrent pumps while a late record waits for output demand', async () => { - const sources = Array.from({ length: 5 }, (_, index) => { - const chunks: Array = [] - const cancel = vi.fn() - const stream = new ReadableStream( - { - pull(controller) { - const chunk = new Uint8Array([index + 1, 1]) - chunks.push(chunk) - controller.enqueue(chunk) - }, - cancel, - }, - { highWaterMark: 0 }, - ) - return { id: index + 1, stream, chunks, cancel } - }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"refs":[1,2,3,4]}', sources.slice(0, 4)), - createRecord('{"ref":5}', [sources[4]!]), - ]), - ) - const reader = multiplexed.getReader() - - // The first JSON frame fills the output. Each active pump holds one - // unencoded chunk; the late stream waits for its own JSON admission. - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(sources.map(({ chunks }) => chunks.length)).toEqual([ - 1, 1, 1, 1, 0, - ]) - expect((await reader.read()).value![0]).toBe(FRAME_TYPE_JSON) - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(sources.map(({ chunks }) => chunks.length)).toEqual([ - 2, 1, 1, 1, 0, - ]) - - // Only the first raw frame has been copied into the output queue. - for (const source of sources.slice(0, 4)) { - source.chunks[0]![1] = 9 - } - for (let streamId = 1; streamId <= 4; streamId++) { - const frame = (await reader.read()).value! - expect(frame[0]).toBe(FRAME_TYPE_CHUNK) - expect(frame.slice(FRAME_HEADER_SIZE)).toEqual( - new Uint8Array([streamId, streamId === 1 ? 1 : 9]), - ) - } - expect((await reader.read()).value![0]).toBe(FRAME_TYPE_JSON) - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(sources[4]!.chunks).toHaveLength(1) - - const reason = new Error('client disconnected') - await reader.cancel(reason) - await new Promise((resolve) => setTimeout(resolve, 0)) - for (const { stream, cancel } of sources) { - expect(cancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(stream.locked).toBe(false) - } - }) - - it.each(['cancel', 'abort'] as const)( - 'releases active and unadmitted raw streams on %s while output is full', - async (mode) => { - const reason = new Error('request ended') - const abortController = new AbortController() - const sources = Array.from({ length: 3 }, (_, index) => { - const cancel = vi.fn(() => new Promise(() => {})) - const pull = vi.fn( - (controller: ReadableStreamDefaultController) => { - controller.enqueue(new Uint8Array([index])) - }, - ) - const stream = new ReadableStream( - { pull, cancel }, - { highWaterMark: 0 }, - ) - return { id: index + 1, stream, pull, cancel } - }) - const recordCancel = vi.fn(() => new Promise(() => {})) - const records = new ReadableStream({ - start(controller) { - controller.enqueue( - createRecord('{"refs":[1,2]}', sources.slice(0, 2)), - ) - controller.enqueue(createRecord('{"ref":3}', [sources[2]!])) - }, - cancel: recordCancel, - }) - const reader = createMultiplexedStream(records, { - signal: abortController.signal, - }).getReader() - - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(sources.map(({ pull }) => pull.mock.calls.length)).toEqual([ - 1, 1, 0, - ]) - if (mode === 'abort') { - abortController.abort(reason) - await expect(reader.read()).rejects.toBe(reason) - } else { - await reader.cancel(reason) - } - await new Promise((resolve) => setTimeout(resolve, 0)) - - expect(recordCancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(records.locked).toBe(false) - for (const { stream, cancel } of sources) { - expect(cancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(stream.locked).toBe(false) - } - expect(sources.map(({ pull }) => pull.mock.calls.length)).toEqual([ - 1, 1, 0, - ]) - }, - ) - - it('does not let a ready frame overtake one waiting for demand', async () => { - let secondController: ReadableStreamDefaultController - const firstRawStream = new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([1])) - controller.close() - }, - }) - const secondRawStream = new ReadableStream({ - start(controller) { - secondController = controller - }, - }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"refs":[1,2]}', [ - { id: 1, stream: firstRawStream }, - { id: 2, stream: secondRawStream }, - ]), - ]), - ) - const reader = multiplexed.getReader() - - // The JSON frame fills the output queue. The first raw frame then waits - // for demand while the second raw-stream read remains pending. - await new Promise((resolve) => setTimeout(resolve, 0)) - secondController!.enqueue(new Uint8Array([2])) - secondController!.close() - - // Fulfilling the second read is already queued when consuming the JSON - // creates demand. It must not bypass the first frame's admission. - const jsonFrame = (await reader.read()).value! - expect(jsonFrame[0]).toBe(FRAME_TYPE_JSON) - const firstFrame = (await reader.read()).value! - const secondFrame = (await reader.read()).value! - expect(firstFrame[0]).toBe(FRAME_TYPE_CHUNK) - expect(secondFrame[0]).toBe(FRAME_TYPE_CHUNK) - expect( - new DataView(firstFrame.buffer, firstFrame.byteOffset).getUint32( - 1, - false, - ), - ).toBe(1) - expect( - new DataView(secondFrame.buffer, secondFrame.byteOffset).getUint32( - 1, - false, - ), - ).toBe(2) - - await reader.cancel() + expect(types).toContain(FrameType.JSON) + expect(types).toContain(FrameType.CHUNK) + expect(types).toContain(FrameType.END) }) it('should handle cancel without errors', async () => { - let recordStreamCancelled = false + // Create slow streams that won't complete before cancel + let jsonCancelled = false let rawCancelled = false + const jsonStream = new ReadableStream({ + async start(controller) { + await new Promise((r) => setTimeout(r, 100)) + controller.enqueue('{}\n') + controller.close() + }, + cancel() { + jsonCancelled = true + }, + }) + const rawStream = new ReadableStream({ - pull() { - return new Promise(() => {}) + async start(controller) { + await new Promise((r) => setTimeout(r, 100)) + controller.enqueue(new Uint8Array([1, 2, 3])) + controller.close() }, cancel() { rawCancelled = true - return new Promise(() => {}) }, }) - const recordStream = new ReadableStream({ - start(controller) { - controller.enqueue(createRecord('{}', [{ id: 1, stream: rawStream }])) - }, - cancel() { - recordStreamCancelled = true - return new Promise(() => {}) - }, - }) + const rawStreams = new Map>() + rawStreams.set(1, rawStream) - const multiplexed = createMultiplexedStream(recordStream) + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() - await reader.read() - - // Output cancellation must not adopt a user cancellation promise that - // is allowed to remain pending forever. + // Cancel immediately before streams complete + // Should not throw ERR_INVALID_STATE await reader.cancel() - expect(recordStreamCancelled).toBe(true) + // Underlying reader.cancel should propagate to sources + expect(jsonCancelled).toBe(true) expect(rawCancelled).toBe(true) - expect(recordStream.locked).toBe(false) - expect(rawStream.locked).toBe(false) - }) - - it('cancels raw streams from a record fulfilled as the request aborts', async () => { - const reason = new Error('request aborted') - let cancelReason: unknown - let cancelCount = 0 - const rawStream = new ReadableStream({ - cancel(value) { - cancelCount++ - cancelReason = value - }, - }) - const abortController = new AbortController() - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{}', [{ id: 1, stream: rawStream }]), - ]), - { signal: abortController.signal }, - ) - - // The record read is already fulfilled, but its pump has not resumed. - abortController.abort(reason) - - await expect(multiplexed.getReader().read()).rejects.toBe(reason) - expect(cancelCount).toBe(1) - expect(cancelReason).toBe(reason) - expect(rawStream.locked).toBe(false) - }) - - it('cancels a stream source for an already-aborted request', async () => { - const reason = new Error('request already aborted') - const cancel = vi.fn() - const recordStream = new ReadableStream({ - cancel, - }) - const abortController = new AbortController() - abortController.abort(reason) - - const multiplexed = createMultiplexedStream(recordStream, { - signal: abortController.signal, - }) - - await expect(multiplexed.getReader().read()).rejects.toBe(reason) - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(reason) - expect(recordStream.locked).toBe(false) }) it('should interleave multiple raw streams correctly', async () => { @@ -542,6 +235,13 @@ describe('frame-protocol', () => { const gate1 = new Promise((r) => (resolve1 = r)) const gate2 = new Promise((r) => (resolve2 = r)) + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{"streams":[1,2]}') + controller.close() + }, + }) + const rawStream1 = new ReadableStream({ async start(controller) { controller.enqueue(new Uint8Array([0x11])) @@ -560,25 +260,19 @@ describe('frame-protocol', () => { }, }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{"streams":[1,2]}', [ - { id: 1, stream: rawStream1 }, - { id: 2, stream: rawStream2 }, - ]), - ]), - ) + const rawStreams = new Map>() + rawStreams.set(1, rawStream1) + rawStreams.set(2, rawStream2) + + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() const chunks: Array = [] // Read first batch (JSON + first chunks from both streams) for (let i = 0; i < 3; i++) { - const next = await reader.read() - if (next.done) { - break - } - chunks.push(next.value) + const { value } = await reader.read() + if (value) chunks.push(value) } // Release gates to let streams continue @@ -586,11 +280,9 @@ describe('frame-protocol', () => { resolve2!() // Read remaining chunks - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -603,50 +295,63 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types.filter((t) => t === FRAME_TYPE_JSON).length).toBe(1) - expect(types.filter((t) => t === FRAME_TYPE_CHUNK).length).toBe(4) - expect(types.filter((t) => t === FRAME_TYPE_END).length).toBe(2) + expect(types.filter((t) => t === FrameType.JSON).length).toBe(1) + expect(types.filter((t) => t === FrameType.CHUNK).length).toBe(4) + expect(types.filter((t) => t === FrameType.END).length).toBe(2) }) it('should handle late stream registration', async () => { - // The record containing the late reference is emitted after a delay. - let resolveGate: () => void - const gate = new Promise((r) => (resolveGate = r)) - - const recordStream = new ReadableStream({ - async start(controller) { - await gate - controller.enqueue( - createRecord('{"ref":99}', [ - { - id: 99, - stream: new ReadableStream({ - start(c) { - c.enqueue(new Uint8Array([0xaa, 0xbb])) - c.close() - }, - }), - }, - ]), - ) + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{"ref":99}') controller.close() }, }) - const multiplexed = createMultiplexedStream(recordStream) + // Late stream source that emits a registration after a delay + // (ensures framed protocol doesn't miss late-stream messages) + let resolveGate: () => void + const gate = new Promise((r) => (resolveGate = r)) + + const lateStreamSource = new ReadableStream<{ + id: number + stream: ReadableStream + }>({ + async start(controller) { + await gate + controller.enqueue({ + id: 99, + stream: new ReadableStream({ + start(c) { + c.enqueue(new Uint8Array([0xaa, 0xbb])) + c.close() + }, + }), + }) + controller.close() + }, + }) + + const multiplexed = createMultiplexedStream( + jsonStream, + new Map(), + lateStreamSource, + ) const reader = multiplexed.getReader() const chunks: Array = [] + // Read JSON frame first + const { value: jsonChunk } = await reader.read() + if (jsonChunk) chunks.push(jsonChunk) + // Release gate to let late stream arrive resolveGate!() // Read remaining frames - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -658,7 +363,7 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types).toEqual([FRAME_TYPE_JSON, FRAME_TYPE_CHUNK, FRAME_TYPE_END]) + expect(types).toEqual([FrameType.JSON, FrameType.CHUNK, FrameType.END]) // Verify late stream data const chunkFrame = chunks[1]! @@ -673,41 +378,49 @@ describe('frame-protocol', () => { let startJson: () => void const jsonGate = new Promise((r) => (startJson = r)) - const recordStream = new ReadableStream({ + const jsonStream = new ReadableStream({ async start(controller) { await jsonGate - controller.enqueue( - createRecord('{"ref":1}', [ - { - id: 1, - stream: new ReadableStream({ - start(c) { - c.enqueue(new Uint8Array([0x01])) - c.close() - }, - }), - }, - ]), - ) + controller.enqueue('{"ref":1}') controller.close() }, }) - const multiplexed = createMultiplexedStream(recordStream) + // Late stream registers immediately (before JSON starts) + const lateStreamSource = new ReadableStream<{ + id: number + stream: ReadableStream + }>({ + start(controller) { + controller.enqueue({ + id: 1, + stream: new ReadableStream({ + start(c) { + c.enqueue(new Uint8Array([0x01])) + c.close() + }, + }), + }) + controller.close() + }, + }) + + const multiplexed = createMultiplexedStream( + jsonStream, + new Map(), + lateStreamSource, + ) const reader = multiplexed.getReader() const chunks: Array = [] - // The stream exists before its delayed JSON record, but the mux must not - // start it until after that record is admitted. + // Allow late stream to run before JSON await Promise.resolve() startJson!() - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -716,13 +429,27 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types).toEqual([FRAME_TYPE_JSON, FRAME_TYPE_CHUNK, FRAME_TYPE_END]) + // Order is not strictly guaranteed, but all frames must be present. + expect(types.filter((t) => t === FrameType.JSON).length).toBe(1) + expect(types.filter((t) => t === FrameType.CHUNK).length).toBe(1) + expect(types.filter((t) => t === FrameType.END).length).toBe(1) }) it('should handle multiple late stream registrations', async () => { - const recordStream = createRecordStream([ - createRecord('{}', [ - { + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{}') + controller.close() + }, + }) + + const lateStreamSource = new ReadableStream<{ + id: number + stream: ReadableStream + }>({ + start(controller) { + // Register two streams + controller.enqueue({ id: 10, stream: new ReadableStream({ start(c) { @@ -730,8 +457,8 @@ describe('frame-protocol', () => { c.close() }, }), - }, - { + }) + controller.enqueue({ id: 20, stream: new ReadableStream({ start(c) { @@ -739,20 +466,23 @@ describe('frame-protocol', () => { c.close() }, }), - }, - ]), - ]) + }) + controller.close() + }, + }) - const multiplexed = createMultiplexedStream(recordStream) + const multiplexed = createMultiplexedStream( + jsonStream, + new Map(), + lateStreamSource, + ) const reader = multiplexed.getReader() const chunks: Array = [] - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -765,15 +495,24 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types.filter((t) => t === FRAME_TYPE_JSON).length).toBe(1) - expect(types.filter((t) => t === FRAME_TYPE_CHUNK).length).toBe(2) - expect(types.filter((t) => t === FRAME_TYPE_END).length).toBe(2) + expect(types.filter((t) => t === FrameType.JSON).length).toBe(1) + expect(types.filter((t) => t === FrameType.CHUNK).length).toBe(2) + expect(types.filter((t) => t === FrameType.END).length).toBe(2) }) it('should interleave initial and late streams', async () => { let resolveJson: () => void const jsonGate = new Promise((r) => (resolveJson = r)) + const jsonStream = new ReadableStream({ + async start(controller) { + controller.enqueue('{"first":true}') + await jsonGate + controller.enqueue('{"second":true}') + controller.close() + }, + }) + // Initial raw stream const initialRaw = new ReadableStream({ start(controller) { @@ -782,52 +521,51 @@ describe('frame-protocol', () => { }, }) - const recordStream = new ReadableStream({ - async start(controller) { - controller.enqueue( - createRecord('{"first":true}', [{ id: 1, stream: initialRaw }]), - ) - await jsonGate - controller.enqueue( - createRecord('{"second":true}', [ - { - id: 2, - stream: new ReadableStream({ - start(c) { - c.enqueue(new Uint8Array([2])) - c.close() - }, - }), + const rawStreams = new Map>() + rawStreams.set(1, initialRaw) + + // Late stream arrives after first JSON + const lateStreamSource = new ReadableStream<{ + id: number + stream: ReadableStream + }>({ + start(controller) { + controller.enqueue({ + id: 2, + stream: new ReadableStream({ + start(c) { + c.enqueue(new Uint8Array([2])) + c.close() }, - ]), - ) + }), + }) controller.close() }, }) - const multiplexed = createMultiplexedStream(recordStream) + const multiplexed = createMultiplexedStream( + jsonStream, + rawStreams, + lateStreamSource, + ) const reader = multiplexed.getReader() const chunks: Array = [] - // Read the first record and its stream. - for (let i = 0; i < 3; i++) { + // Read a few frames + for (let i = 0; i < 4; i++) { const { value, done } = await reader.read() - if (done) { - break - } - chunks.push(value) + if (done) break + if (value) chunks.push(value) } // Release JSON to complete resolveJson!() // Read remaining - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -839,32 +577,36 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types.filter((t) => t === FRAME_TYPE_JSON).length).toBe(2) - expect(types.filter((t) => t === FRAME_TYPE_CHUNK).length).toBe(2) - expect(types.filter((t) => t === FRAME_TYPE_END).length).toBe(2) + expect(types.filter((t) => t === FrameType.JSON).length).toBe(2) + expect(types.filter((t) => t === FrameType.CHUNK).length).toBe(2) + expect(types.filter((t) => t === FrameType.END).length).toBe(2) }) it('should handle raw stream error', async () => { + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{}') + controller.close() + }, + }) + const errorStream = new ReadableStream({ start(controller) { controller.error(new Error('Stream failed')) }, }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{}', [{ id: 10, stream: errorStream }]), - ]), - ) + const rawStreams = new Map>() + rawStreams.set(10, errorStream) + + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() const chunks: Array = [] - for (;;) { + while (true) { const { done, value } = await reader.read() - if (done) { - break - } + if (done) break chunks.push(value) } @@ -874,13 +616,13 @@ describe('frame-protocol', () => { return view.getUint8(0) }) - expect(types).toContain(FRAME_TYPE_JSON) - expect(types).toContain(FRAME_TYPE_ERROR) + expect(types).toContain(FrameType.JSON) + expect(types).toContain(FrameType.ERROR) // Find ERROR frame and check content const errorFrame = chunks.find((chunk) => { const view = new DataView(chunk.buffer, chunk.byteOffset) - return view.getUint8(0) === FRAME_TYPE_ERROR + return view.getUint8(0) === FrameType.ERROR }) expect(errorFrame).toBeDefined() @@ -889,10 +631,11 @@ describe('frame-protocol', () => { }) it('should propagate JSON stream error to output (fatal)', async () => { - let errorController: ReadableStreamDefaultController - const recordStream = new ReadableStream({ + let errorController: ReadableStreamDefaultController + const jsonStream = new ReadableStream({ start(controller) { errorController = controller + controller.enqueue('{"first":true}') }, }) @@ -905,18 +648,17 @@ describe('frame-protocol', () => { }, }) - errorController!.enqueue( - createRecord('{"first":true}', [{ id: 1, stream: rawStream }]), - ) + const rawStreams = new Map>() + rawStreams.set(1, rawStream) - const multiplexed = createMultiplexedStream(recordStream) + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() // Should be able to read first JSON frame const { value: firstChunk } = await reader.read() expect(firstChunk).toBeDefined() const view = new DataView(firstChunk!.buffer, firstChunk!.byteOffset) - expect(view.getUint8(0)).toBe(FRAME_TYPE_JSON) + expect(view.getUint8(0)).toBe(FrameType.JSON) // Now error the JSON stream errorController!.error(new Error('JSON serialization failed')) @@ -927,6 +669,13 @@ describe('frame-protocol', () => { it('should not hang when raw stream never ends', async () => { // This tests the fix for hanging requests + const jsonStream = new ReadableStream({ + start(controller) { + controller.enqueue('{}') + controller.close() + }, + }) + let rawStreamCancelled = false const neverEndingStream = new ReadableStream({ start(controller) { @@ -938,11 +687,10 @@ describe('frame-protocol', () => { }, }) - const multiplexed = createMultiplexedStream( - createRecordStream([ - createRecord('{}', [{ id: 1, stream: neverEndingStream }]), - ]), - ) + const rawStreams = new Map>() + rawStreams.set(1, neverEndingStream) + + const multiplexed = createMultiplexedStream(jsonStream, rawStreams) const reader = multiplexed.getReader() // Read first two frames (JSON and CHUNK) diff --git a/packages/start-server-core/tests/header-contracts.test-d.ts b/packages/start-server-core/tests/header-contracts.test-d.ts deleted file mode 100644 index 6db9aaef5e..0000000000 --- a/packages/start-server-core/tests/header-contracts.test-d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { expectTypeOf, test } from 'vitest' -import { - createServerEntry, - getResponseHeaders, - setResponseHeaders, -} from '../src/request-response' -import type { ReadonlyResponseHeaders } from '../src/request-response' -import type { RequestHandler } from '../src/request-handler' - -function checkSnapshot(headers: ReturnType) { - expectTypeOf(headers).toEqualTypeOf() - expectTypeOf(headers.get('content-type')).toExtend() - expectTypeOf(headers.getSetCookie()).toEqualTypeOf>() - expectTypeOf(Array.from(headers)).toEqualTypeOf>() - setResponseHeaders(headers) - - // @ts-expect-error A snapshot cannot change outgoing response headers. - headers.set('vary', 'Origin') - // @ts-expect-error Use appendResponseHeader for outgoing appends. - headers.append('vary', 'Origin') - // @ts-expect-error Use removeResponseHeader for outgoing removals. - headers.delete('vary') - - headers.forEach((_value, _name, parent) => { - expectTypeOf(parent).toEqualTypeOf() - // @ts-expect-error The callback does not expose mutable outgoing headers. - parent.set('vary', 'Origin') - }) -} - -test('response header snapshots expose read methods and explicit copy-back', () => { - expectTypeOf(checkSnapshot).toBeFunction() -}) - -type RequiredContextRegister = { - server: { requestContext: { tenantId: string } } -} - -function checkRequiredEntryContext( - handler: RequestHandler, - request: Request, -) { - const entry = createServerEntry({ fetch: handler }) - expectTypeOf(entry.fetch).toEqualTypeOf< - RequestHandler - >() - entry.fetch(request, { context: { tenantId: 'example' } }) - // @ts-expect-error The wrapped handler still requires request options. - entry.fetch(request) - // @ts-expect-error The wrapped handler still requires its request context. - entry.fetch(request, {}) - // @ts-expect-error The wrapped handler still requires the tenant identifier. - entry.fetch(request, { context: {} }) -} - -function checkOptionalEntryContext( - handler: RequestHandler, - request: Request, -) { - const entry = createServerEntry({ fetch: handler }) - expectTypeOf(entry.fetch).toEqualTypeOf>() - entry.fetch(request) - entry.fetch(request, {}) - entry.fetch(request, { context: { nonce: 'example' } }) -} - -test('server entries preserve inferred required and optional request context', () => { - expectTypeOf(checkRequiredEntryContext).toBeFunction() - expectTypeOf(checkOptionalEntryContext).toBeFunction() -}) diff --git a/packages/start-server-core/tests/header-contracts.test.ts b/packages/start-server-core/tests/header-contracts.test.ts deleted file mode 100644 index 446ff084b3..0000000000 --- a/packages/start-server-core/tests/header-contracts.test.ts +++ /dev/null @@ -1,547 +0,0 @@ -// @vitest-environment node - -import { afterEach, describe, expect, it, vi } from 'vitest' -import { createMiddleware } from '@tanstack/start-client-core' -import { createStartHandler } from '../src/createStartHandler' -import { - appendResponseHeader, - clearResponseHeaders, - getRequestHost, - getRequestUrl, - getResponseHeader, - getResponseHeaders, - getResponseStatus, - removeResponseHeader, - setCookie, - setResponseHeader, - setResponseStatus, -} from '../src/request-response' -import type { AnyRequestMiddleware } from '@tanstack/start-client-core' - -const startMocks = vi.hoisted(() => ({ - requestMiddleware: [] as Array, -})) -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ - requestMiddleware: startMocks.requestMiddleware, - serializationAdapters: [], - }), - }, -})) -vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => { - throw new Error('The request middleware must handle the request') - }, -})) - -function handler(...middleware: Array) { - startMocks.requestMiddleware = middleware - return createStartHandler(() => { - throw new Error('The request middleware must return a response') - }) -} - -function returnedHeader(value = 'Accept-Encoding') { - return createMiddleware().server(() => { - return new Response(null, { headers: { vary: value } }) - }) -} - -afterEach(() => { - startMocks.requestMiddleware = [] -}) - -describe('response helpers through public Start request middleware', () => { - it('keeps append intent when an invalid replacement value is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - expect(() => setResponseHeader('vary', 'invalid\r\nvalue')).toThrow( - TypeError, - ) - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe('Accept-Encoding, Origin') - }) - - it('keeps removal intent when an invalid replacement value is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - removeResponseHeader('vary') - expect(() => setResponseHeader('vary', 'invalid\r\nvalue')).toThrow( - TypeError, - ) - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBeNull() - }) - - it('keeps cookie merging when an invalid replacement value is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - setCookie('helper', '1') - expect(() => - setResponseHeader('set-cookie', 'invalid\r\nvalue'), - ).toThrow(TypeError) - return next() - }), - createMiddleware().server(() => { - return new Response(null, { - headers: { 'set-cookie': 'returned=2; Path=/' }, - }) - }), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.getSetCookie()).toEqual([ - 'returned=2; Path=/', - 'helper=1; Path=/', - ]) - }) - - it('keeps an earlier cookie when an invalid serialized-cookie append is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - appendResponseHeader('set-cookie', 'helper=1; Path=/') - expect(() => - appendResponseHeader('set-cookie', 'helper=invalid\r\nvalue; Path=/'), - ).toThrow(TypeError) - return next() - }), - createMiddleware().server(() => { - return new Response(null, { - headers: { 'set-cookie': 'returned=2; Path=/' }, - }) - }), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.getSetCookie()).toEqual([ - 'returned=2; Path=/', - 'helper=1; Path=/', - ]) - }) - - it('keeps cookie removal when an invalid serialized-cookie append is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - removeResponseHeader('set-cookie') - expect(() => - appendResponseHeader('set-cookie', 'helper=invalid\r\nvalue; Path=/'), - ).toThrow(TypeError) - return next() - }), - createMiddleware().server(() => { - return new Response(null, { - headers: { 'set-cookie': 'returned=2; Path=/' }, - }) - }), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.getSetCookie()).toEqual([]) - }) - - it('does not retain a removal for an invalid header name after the error is caught', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - expect(() => removeResponseHeader('invalid name')).toThrow(TypeError) - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.status).toBe(200) - expect(response.headers.get('vary')).toBe('Accept-Encoding') - }) - - it.each(['before', 'after'])( - 'appends to a returned header %s next without duplicating at outer boundaries', - async (timing) => { - const reads: Array = [] - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - reads.push(getResponseHeader('vary')) - reads.push(getResponseHeaders().get('vary')) - return result - }), - createMiddleware().server(async ({ next }) => { - if (timing === 'before') { - appendResponseHeader('vary', 'Origin') - } - const result = await next() - if (timing === 'after') { - appendResponseHeader('vary', 'Origin') - } - reads.push(getResponseHeader('vary')) - reads.push(getResponseHeaders().get('vary')) - return result - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe('Accept-Encoding, Origin') - expect(reads).toEqual(Array(4).fill('Accept-Encoding, Origin')) - }, - ) - - it('preserves direct appends and only applies newly added helper values', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - result.response.headers.append('vary', 'Accept-Language') - appendResponseHeader('vary', 'User-Agent') - expect(getResponseHeader('vary')).toBe( - 'Accept-Encoding, Origin, Accept-Language, User-Agent', - ) - return result - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe( - 'Accept-Encoding, Origin, Accept-Language, User-Agent', - ) - }) - - it('preserves helper writes when middleware pipes the response body', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - setResponseHeader('x-response-marker', 'helper') - const result = await next() - return new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - }), - createMiddleware().server(() => new Response('stream body')), - ) - - const response = await app(new Request('https://start.example/'), {}) - - expect(response.headers.get('x-response-marker')).toBe('helper') - expect(await response.text()).toBe('stream body') - }) - - it('applies append intent to a replacement response without copying its old base', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - await next() - return new Response(null, { headers: { vary: 'Accept-Language' } }) - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe('Accept-Language, Origin') - }) - - it('treats application copies of materialized headers as explicit replacement input', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - return new Response(null, { headers: result.response.headers }) - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe('Accept-Encoding, Origin, Origin') - }) - - it('keeps deliberate repeated values exactly once per helper append', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - appendResponseHeader('vary', 'Origin') - return result - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', ['Origin', 'Origin']) - return next() - }), - returnedHeader('Origin'), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe('Origin, Origin, Origin, Origin') - }) - - it('preserves append ownership when a status change reconstructs a response', async () => { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - setResponseStatus(201) - return result - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.status).toBe(201) - expect(response.headers.get('vary')).toBe('Accept-Encoding, Origin') - }) - - it('applies an append once when stripping a HEAD response body', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app( - new Request('https://start.example/', { method: 'HEAD' }), - {}, - ) - expect(response.body).toBeNull() - expect(response.headers.get('vary')).toBe('Accept-Encoding, Origin') - }) - - it('appends to immutable response headers once', async () => { - const app = handler( - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - createMiddleware().server(() => - Response.redirect('https://start.example/login'), - ), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.status).toBe(302) - expect(response.headers.get('vary')).toBe('Origin') - expect(response.headers.get('location')).toBe('https://start.example/login') - }) - - it.each(['set', 'remove', 'clear'])( - 'respects an explicit %s before a later append', - async (operation) => { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - if (operation === 'set') { - setResponseHeader('vary', 'User-Agent') - } else if (operation === 'remove') { - removeResponseHeader('vary') - } else { - clearResponseHeaders() - } - appendResponseHeader('vary', 'Accept-Language') - return result - }), - createMiddleware().server(({ next }) => { - appendResponseHeader('vary', 'Origin') - return next() - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.get('vary')).toBe( - operation === 'set' ? 'User-Agent, Accept-Language' : 'Accept-Language', - ) - }, - ) - - it.each(['remove', 'clear'])( - 'keeps an append after %s before next across outer boundaries', - async (operation) => { - const reads: Array = [] - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - reads.push(result.response.headers.get('vary')) - return result - }), - createMiddleware().server(async ({ next }) => { - if (operation === 'remove') { - removeResponseHeader('vary') - } else { - clearResponseHeaders() - } - appendResponseHeader('vary', 'Origin') - const result = await next() - reads.push(result.response.headers.get('vary')) - return result - }), - returnedHeader(), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(reads).toEqual(['Origin', 'Origin']) - expect(response.headers.get('vary')).toBe('Origin') - }, - ) - - it('reads the same merged cookie values from both response header getters', async () => { - const reads: Array = [] - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - setCookie('helper', 'new') - reads.push(getResponseHeader('set-cookie')) - reads.push(getResponseHeaders().get('set-cookie')) - return result - }), - createMiddleware().server(() => { - return new Response(null, { - headers: { - 'set-cookie': - 'returned=1; Expires=Wed, 21 Oct 2030 07:28:00 GMT; Path=/', - }, - }) - }), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(response.headers.getSetCookie()).toEqual([ - 'returned=1; Expires=Wed, 21 Oct 2030 07:28:00 GMT; Path=/', - 'helper=new; Path=/', - ]) - expect(reads).toEqual(Array(2).fill(response.headers.get('set-cookie'))) - }) - - it('reads the effective returned status before an explicit helper override', async () => { - const statuses: Array = [] - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - statuses.push(getResponseStatus()) - setResponseStatus(202) - statuses.push(getResponseStatus()) - return result - }), - createMiddleware().server(() => new Response(null, { status: 404 })), - ) - const response = await app(new Request('https://start.example/'), {}) - expect(statuses).toEqual([404, 202]) - expect(response.status).toBe(202) - }) - - it.each(['set', 'append', 'delete'] as const)( - 'warns when the getResponseHeaders() snapshot is changed with %s', - async (method) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const app = handler( - createMiddleware().server(async ({ next }) => { - const result = await next() - setCookie('helper', 'one') - const snapshot = getResponseHeaders() as unknown as Headers - expect(snapshot.getSetCookie()).toEqual([ - 'returned=1; Path=/', - 'helper=one; Path=/', - ]) - expect(warnSpy).not.toHaveBeenCalled() - if (method === 'delete') { - snapshot.delete('vary') - } else { - snapshot[method]('x-snapshot', 'changed') - } - expect(warnSpy).toHaveBeenCalledOnce() - expect(warnSpy.mock.calls[0]![0]).toContain( - `getResponseHeaders().${method}()`, - ) - return result - }), - createMiddleware().server(() => { - return new Response(null, { - headers: [ - ['vary', 'Accept-Encoding'], - ['set-cookie', 'returned=1; Path=/'], - ], - }) - }), - ) - - const response = await app(new Request('https://start.example/'), {}) - - expect(response.headers.get('x-snapshot')).toBeNull() - expect(response.headers.get('vary')).toBe('Accept-Encoding') - } finally { - warnSpy.mockRestore() - } - }, - ) - - it('does not warn about getResponseHeaders() snapshot changes in production', async () => { - vi.stubEnv('NODE_ENV', 'production') - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - const app = handler( - createMiddleware().server(() => { - const snapshot = getResponseHeaders() as unknown as Headers - snapshot.set('x-snapshot', 'changed') - return new Response('ok') - }), - ) - - const response = await app(new Request('https://start.example/'), {}) - - expect(response.headers.get('x-snapshot')).toBeNull() - expect(warnSpy).not.toHaveBeenCalled() - } finally { - warnSpy.mockRestore() - vi.unstubAllEnvs() - } - }) -}) - -describe('forwarded request URL helpers', () => { - it.each([ - ['https://start.example:8443/path?search=1', {}], - ['https://[::1]:8443/path?search=1', { 'x-forwarded-host': '' }], - ])( - 'keeps the request URL host when proxy and Host headers are absent: %s', - async (url, headers) => { - const app = handler( - createMiddleware().server(() => - Response.json({ - host: getRequestHost({ xForwardedHost: true }), - url: getRequestUrl({ xForwardedHost: true }).href, - }), - ), - ) - const response = await app(new Request(url, { headers }), {}) - expect(await response.json()).toEqual({ host: new URL(url).host, url }) - }, - ) - - it('uses the first forwarded host and drops an internal port when no external port is provided', async () => { - const app = handler( - createMiddleware().server(() => - Response.json({ - url: getRequestUrl({ xForwardedHost: true }).href, - }), - ), - ) - const response = await app( - new Request('http://internal.example:3000/path', { - headers: { - host: 'origin.example:4000', - 'x-forwarded-host': 'public.example, proxy.example', - 'x-forwarded-proto': 'https', - }, - }), - {}, - ) - expect(await response.json()).toEqual({ - url: 'https://public.example/path', - }) - }) -}) diff --git a/packages/start-server-core/tests/redirect-protocol-reconciliation.test.ts b/packages/start-server-core/tests/redirect-protocol-reconciliation.test.ts deleted file mode 100644 index 95c5f2fa23..0000000000 --- a/packages/start-server-core/tests/redirect-protocol-reconciliation.test.ts +++ /dev/null @@ -1,664 +0,0 @@ -// @vitest-environment node - -import { afterAll, afterEach, describe, expect, it, vi } from 'vitest' -import { createMemoryHistory } from '@tanstack/history' -import { - BaseRootRoute, - BaseRoute, - RawStream, - RouterCore, - createNonReactiveMutableStore, - createNonReactiveReadonlyStore, - isRedirect, - notFound, - redirect, -} from '@tanstack/router-core' -import { createMiddleware } from '@tanstack/start-client-core' -import { serverFnFetcher } from '../../start-client-core/dist/esm/client-rpc/serverFnFetcher.js' -import { createStartHandler } from '../src/createStartHandler' -import { - appendResponseHeader, - clearResponseHeaders, - removeResponseHeader, - getResponseHeader, - setCookie, - setResponseHeader, - setResponseStatus, -} from '../src/request-response' - -const mocks = vi.hoisted(() => { - const previousServerFnBase = process.env.TSS_SERVER_FN_BASE - process.env.TSS_SERVER_FN_BASE = '/_serverFn/' - return { - previousServerFnBase, - middleware: [] as Array, - action: undefined as undefined | (() => unknown), - } -}) - -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ - requestMiddleware: mocks.middleware, - serializationAdapters: [], - }), - }, -})) -vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => makeRouter(), -})) -vi.mock('#tanstack-start-server-fn-resolver', () => ({ - getServerFnById: () => mocks.action, -})) -// This test runs the client decoder in Node without the compiler's browser -// replacement for the isomorphic Start-options accessor. -vi.mock('../../start-client-core/dist/esm/getStartOptions.js', () => ({ - getStartOptions: () => undefined, -})) - -function makeRouter() { - const root = new BaseRootRoute({}) - const index = new BaseRoute({ - getParentRoute: () => root, - path: '/', - component: () => null, - }) - return new RouterCore( - { - history: createMemoryHistory({ initialEntries: ['/'] }), - routeTree: root.addChildren([index]), - isServer: true, - }, - () => ({ - createMutableStore: createNonReactiveMutableStore, - createReadonlyStore: createNonReactiveReadonlyStore, - batch: (fn: () => void) => fn(), - }), - ) -} - -function app() { - return createStartHandler(() => { - throw new Error('This request should not render HTML') - }) -} - -async function callServerFn() { - const handler = app() - return serverFnFetcher( - '/_serverFn/test', - [{ method: 'GET' }], - async (url: string, init: RequestInit) => - handler(new Request(new URL(url, 'https://start.example'), init), {}), - ) -} - -afterEach(() => { - mocks.middleware = [] - mocks.action = undefined -}) - -afterAll(() => { - if (mocks.previousServerFnBase === undefined) { - Reflect.deleteProperty(process.env, 'TSS_SERVER_FN_BASE') - } else { - process.env.TSS_SERVER_FN_BASE = mocks.previousServerFnBase - } -}) - -describe('Router redirects through public request middleware', () => { - it.each([ - { target: 'to', throws: false, status: 302, statusText: undefined }, - { target: 'to', throws: true, status: 302, statusText: undefined }, - { target: 'to', throws: false, status: 307, statusText: 'Continue' }, - { target: 'to', throws: true, status: 307, statusText: 'Continue' }, - { target: 'href', throws: false, status: 302, statusText: undefined }, - { target: 'href', throws: true, status: 307, statusText: 'Continue' }, - ] as const)( - 'resolves $target redirects with throws=$throws and helper status $status/$statusText', - async ({ target, throws, status, statusText }) => { - mocks.middleware = [ - createMiddleware().server(() => { - setResponseStatus(status, statusText) - setCookie('session', 'committed') - const response = redirect({ [target]: '/login' }) - if (throws) { - throw response - } - return response - }), - ] - - const response = await app()(new Request('https://start.example'), {}) - - expect(response.status).toBe(status) - if (statusText !== undefined) { - expect(response.statusText).toBe(statusText) - } - expect(response.headers.get('location')).toBe('/login') - expect(response.headers.getSetCookie()).toEqual([ - 'session=committed; Path=/', - ]) - }, - ) - - it.each([false, true])( - 'keeps the server-function redirect envelope when throws=%s and helper status changes', - async (throws) => { - mocks.middleware = [ - createMiddleware().server(({ next }) => { - setResponseStatus(302, 'Continue') - return next() - }), - ] - mocks.action = () => { - const response = redirect({ to: '/login', statusCode: 303 }) - if (throws) { - throw response - } - return { result: response } - } - - await expect(callServerFn()).rejects.toSatisfy((value: unknown) => { - return ( - isRedirect(value) && - value.options.href === '/login' && - value.status === 303 - ) - }) - }, - ) -}) - -const mutations = [ - { - name: 'a different content type', - run: () => setResponseHeader('content-type', 'text/plain'), - }, - { name: 'cleared headers', run: () => clearResponseHeaders() }, - { - name: 'the raw response marker', - run: () => setResponseHeader('x-tss-raw', 'true'), - }, - { - name: 'the serialized marker', - run: () => setResponseHeader('x-tss-serialized', 'true'), - }, -] - -describe('server-function protocol headers through public request middleware', () => { - it.each(['constructor', 'toString', '__proto__'])( - 'allows helpers to write and clear the %s header on protocol responses', - async (name) => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - expect(result.response.headers.get(name)).toBe('from-helper') - expect(getResponseHeader(name)).toBe('from-helper') - clearResponseHeaders() - expect(getResponseHeader(name)).toBeUndefined() - return result - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - setResponseHeader(name, 'from-helper') - expect(getResponseHeader(name)).toBe('from-helper') - return result - }), - ] - mocks.action = () => ({ - result: new Response('raw result', { - headers: [[name, 'from-response']], - }), - }) - - const response = await callServerFn() - expect(response).toBeInstanceOf(Response) - expect(response.headers.get(name)).toBeNull() - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(await response.text()).toBe('raw result') - }, - ) - - it('restores direct protocol header mutations as the response leaves the pipeline', async () => { - const mutateHeaders = (response: Response) => { - response.headers.set('content-type', 'text/plain') - response.headers.delete('x-tss-serialized') - response.headers.append('x-tss-raw', 'true') - } - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - // Outer middleware sees an inner middleware's direct change until - // Start sends the response. - expect(result.response.headers.get('content-type')).toBe('text/plain') - expect(result.response.headers.get('x-tss-serialized')).toBeNull() - mutateHeaders(result.response) - return result - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - mutateHeaders(result.response) - return result - }), - ] - mocks.action = () => ({ result: { answer: 42 } }) - - await expect(callServerFn()).resolves.toEqual({ result: { answer: 42 } }) - }) - - it('restores a raw response marker directly removed by middleware as the response leaves the pipeline', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - expect(result.response.headers.get('x-tss-raw')).toBeNull() - result.response.headers.delete('x-tss-raw') - return result - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - result.response.headers.delete('x-tss-raw') - return result - }), - ] - mocks.action = () => ({ result: new Response('raw result') }) - - const response = await callServerFn() - expect(response).toBeInstanceOf(Response) - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(await response.text()).toBe('raw result') - }) - - it('wraps raw responses without changing their headers or duplicating their body', async () => { - const cancel = vi.fn() - const source = new Response(new ReadableStream({ cancel }), { - status: 201, - statusText: 'Created', - headers: [ - ['content-type', 'application/octet-stream'], - ['set-cookie', 'session=one; Path=/'], - ['set-cookie', 'session=two; Path=/admin'], - ], - }) - mocks.action = () => ({ result: source }) - - const response = await callServerFn() - expect(response).toBeInstanceOf(Response) - expect(response).not.toBe(source) - expect(response.body).toBe(source.body) - expect(response.status).toBe(201) - expect(response.statusText).toBe('Created') - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(source.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.getSetCookie()).toEqual([ - 'session=one; Path=/', - 'session=two; Path=/admin', - ]) - response.headers.set('content-type', 'text/plain') - expect(source.headers.get('content-type')).toBe('application/octet-stream') - - const reason = new Error('client disconnected') - await response.body!.cancel(reason) - expect(cancel).toHaveBeenCalledExactlyOnceWith(reason) - }) - - it('marks raw responses with immutable headers without modifying their source', async () => { - const source = Response.redirect('https://start.example/login', 303) - mocks.action = () => ({ result: source }) - - const response = await callServerFn() - - expect(response).toBeInstanceOf(Response) - expect(response.status).toBe(303) - expect(response.body).toBeNull() - expect(response.headers.get('location')).toBe('https://start.example/login') - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(source.headers.get('x-tss-raw')).toBeNull() - }) - - it('keeps Location absent from RPC redirect JSON despite a helper override', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - setResponseStatus(302) - setResponseHeader('location', '/middleware-target') - return result - }), - ] - mocks.action = () => ({ result: redirect({ href: '/login' }) }) - - const response = await app()( - new Request('https://start.example/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - - expect(response.status).toBe(302) - expect(response.headers.get('location')).toBeNull() - expect(await response.json()).toMatchObject({ - href: '/login', - isSerializedRedirect: true, - }) - }) - - it.each(mutations)( - 'decodes redirects despite $name before or after next()', - async ({ run }) => { - for (const afterNext of [false, true]) { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - if (!afterNext) { - run() - } - const result = await next() - if (afterNext) { - run() - } - return result - }), - ] - mocks.action = () => ({ result: redirect({ href: '/login' }) }) - - await expect(callServerFn()).rejects.toSatisfy((value: unknown) => { - return isRedirect(value) && value.options.href === '/login' - }) - } - }, - ) - - it.each(mutations)( - 'decodes serialized values despite $name', - async ({ run }) => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - run() - return result - }), - ] - mocks.action = () => ({ result: { answer: 42 } }) - - await expect(callServerFn()).resolves.toEqual({ - result: { answer: 42 }, - }) - }, - ) - - // Setting the serialized marker cannot break a serialized reply, so that - // mutation would pass without the protection this test covers. - it.each(mutations.filter(({ name }) => name !== 'the serialized marker'))( - 'decodes serialized values wrapped in a same-body response despite $name', - async ({ run }) => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - run() - return result - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - // An ordinary wrapper that keeps the body stream and response init. - return new Response(result.response.body, result.response) - }), - ] - mocks.action = () => ({ result: { answer: 42 } }) - - await expect(callServerFn()).resolves.toEqual({ - result: { answer: 42 }, - }) - }, - ) - - it('keeps a raw result raw when a same-body wrapper loses its marker', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - removeResponseHeader('x-tss-raw') - return result - }), - createMiddleware().server(async ({ next }) => { - const result = await next() - const headers = new Headers(result.response.headers) - headers.delete('x-tss-raw') - return new Response(result.response.body, { - status: result.response.status, - headers, - }) - }), - ] - mocks.action = () => ({ result: new Response('raw result') }) - - const response = await callServerFn() - expect(response).toBeInstanceOf(Response) - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(await response.text()).toBe('raw result') - }) - - it('decodes framed RawStream results despite a raw response marker', async () => { - mocks.middleware = [ - createMiddleware().server(({ next }) => { - setResponseHeader('x-tss-raw', 'true') - return next() - }), - ] - mocks.action = () => ({ - result: new RawStream( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('stream result')) - controller.close() - }, - }), - ), - }) - - const decoded = await callServerFn() - expect(decoded).not.toBeInstanceOf(Response) - expect(await new Response(decoded.result).text()).toBe('stream result') - }) - - it('decodes action errors despite a raw response marker', async () => { - mocks.middleware = [ - createMiddleware().server(({ next }) => { - setResponseHeader('x-tss-raw', 'true') - return next() - }), - ] - mocks.action = () => { - setResponseStatus(409) - throw new Error('Session update conflict') - } - - await expect(callServerFn()).resolves.toEqual({ - error: new Error('Session update conflict'), - }) - }) - - it('decodes not-found results despite a raw response marker', async () => { - mocks.middleware = [ - createMiddleware().server(({ next }) => { - setResponseHeader('x-tss-raw', 'true') - return next() - }), - ] - mocks.action = () => { - throw notFound({ data: 'missing' }) - } - - await expect(callServerFn()).rejects.toMatchObject({ - isNotFound: true, - data: 'missing', - }) - }) - - it('owns protocol markers supplied in redirect headers', async () => { - mocks.action = () => ({ - result: redirect({ - href: '/login', - headers: { 'x-tss-raw': 'true', 'x-tss-serialized': 'true' }, - }), - }) - - await expect(callServerFn()).rejects.toSatisfy((value: unknown) => { - return isRedirect(value) && value.options.href === '/login' - }) - }) - - it('owns protocol markers supplied in error headers', async () => { - mocks.action = () => { - throw Object.assign(new Error('Session update conflict'), { - status: 409, - headers: { 'x-tss-raw': 'true' }, - }) - } - - await expect(callServerFn()).resolves.toEqual({ - error: new Error('Session update conflict'), - }) - }) - - it('owns protocol markers supplied in not-found headers', async () => { - mocks.action = () => { - throw notFound({ - data: 'missing', - headers: { 'x-tss-raw': 'true', 'x-tss-serialized': 'true' }, - }) - } - - await expect(callServerFn()).rejects.toMatchObject({ - isNotFound: true, - data: 'missing', - }) - }) - - it('keeps an explicitly returned response raw after middleware clears headers', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - clearResponseHeaders() - setResponseHeader('x-tss-serialized', 'true') - return result - }), - ] - mocks.action = () => ({ result: new Response('raw result') }) - - const response = await callServerFn() - expect(response).toBeInstanceOf(Response) - expect(await response.text()).toBe('raw result') - }) -}) - -it('preserves protocol requirements when request middleware rejects a HEAD RPC', async () => { - mocks.middleware = [ - createMiddleware().server(() => { - setResponseHeader('content-type', 'text/plain') - setResponseHeader('x-tss-raw', 'true') - appendResponseHeader('vary', 'Origin') - throw Object.assign(new Error('HEAD request rejected'), { status: 401 }) - }), - ] - const response = await app()( - new Request('https://start.example/_serverFn/test', { - method: 'HEAD', - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - expect(response.status).toBe(401) - expect(response.body).toBeNull() - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('vary')).toBe('Origin') -}) - -it('unwinds aborted request middleware error serialization', async () => { - let resolvePending!: () => void - const pending = new Promise((resolve) => { - resolvePending = resolve - }) - let serializationStarted!: () => void - const started = new Promise((resolve) => { - serializationStarted = resolve - }) - const failure = { - status: 500, - get pending() { - serializationStarted() - return pending - }, - } - mocks.middleware = [ - createMiddleware().server(() => { - throw failure - }), - ] - const controller = new AbortController() - const reason = new Error('request disconnected') - let outcome: { response: Response } | { error: unknown } | undefined - const request = app()( - new Request('https://start.example/_serverFn/test', { - signal: controller.signal, - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - const settled = Promise.resolve(request).then( - (response) => { - outcome = { response } - }, - (error) => { - outcome = { error } - }, - ) - - await started - controller.abort(reason) - try { - // Abort propagation is promise work. Drain this turn without imposing a - // timing deadline or resolving the application-owned pending value. - await new Promise((resolve) => setImmediate(resolve)) - expect(outcome).toEqual({ error: reason }) - } finally { - resolvePending() - await settled - } -}) - -it('keeps RPC protocol metadata through a same-body wrapper', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - setResponseHeader('content-type', 'text/plain') - const result = await next() - return new Response(result.response.body, result.response) - }), - ] - mocks.action = () => ({ result: 'still serialized' }) - - await expect(callServerFn()).resolves.toEqual({ result: 'still serialized' }) -}) - -it('applies helper appends to the fresh headers of a same-body wrapper', async () => { - mocks.middleware = [ - createMiddleware().server(async ({ next }) => { - appendResponseHeader('vary', 'Origin') - const result = await next() - return new Response(result.response.body, { - headers: { vary: 'Accept-Language' }, - }) - }), - ] - mocks.action = () => ({ result: 'still serialized' }) - - const response = await app()( - new Request('https://start.example/_serverFn/test', { - headers: { 'x-tsr-serverFn': 'true' }, - }), - {}, - ) - expect(response.headers.get('vary')).toBe('Accept-Language, Origin') - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - await response.body?.cancel() -}) diff --git a/packages/start-server-core/tests/request-response.test.ts b/packages/start-server-core/tests/request-response.test.ts deleted file mode 100644 index 913407be36..0000000000 --- a/packages/start-server-core/tests/request-response.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { describe, expect, it, vi } from 'vitest' -import { createServerEntry, getRequestUrl } from '../src/request-response' - -describe('server entry pathname validation', () => { - it.each([ - '/malformed/%E0%A4', - '/malformed/%80', - '/malformed/%FF', - '/malformed/%', - '/malformed/%2', - '/malformed/%GG', - ])('rejects %s before calling the entry', async (pathname) => { - const fetch = vi.fn(() => new Response('unused')) - const entry = createServerEntry({ fetch }) - - const response = await entry.fetch( - new Request(`http://localhost${pathname}`), - ) - - expect(response.status).toBe(400) - expect(response.statusText).toBe('Bad Request') - expect(response.body).toBeNull() - expect(fetch).not.toHaveBeenCalled() - }) - - it.each([ - '/plain', - '/%2Fdocs', - '/%25', - '/%5Cdocs', - '/%E2%9C%93', - '/%252Fdocs', - '/%2Fdocs?searchParam=%E0%A4', - '/plain?searchParam=%GG', - ])('preserves the pathname and search of %s', async (path) => { - const fetch = vi.fn(() => { - const url = getRequestUrl() - return new Response(url.pathname + url.search) - }) - const entry = createServerEntry({ fetch }) - - const response = await entry.fetch(new Request(`http://localhost${path}`)) - - expect(response.status).toBe(200) - await expect(response.text()).resolves.toBe(path) - expect(fetch).toHaveBeenCalledTimes(1) - }) -}) diff --git a/packages/start-server-core/tests/response-reconciliation.bench.md b/packages/start-server-core/tests/response-reconciliation.bench.md deleted file mode 100644 index a9a6c09172..0000000000 --- a/packages/start-server-core/tests/response-reconciliation.bench.md +++ /dev/null @@ -1,40 +0,0 @@ -# Response reconciliation benchmarks - -Run this local Vitest suite separately from the historical built-app SSR -benchmarks. It does not enable CodSpeed instrumentation: - -```sh -CI=1 NX_DAEMON=false pnpm nx run @tanstack/start-server-core:test:perf --outputStyle=stream --skipRemoteCache -- --run -``` - -These cases call the public Start handler, middleware, and response helpers. Only -the compiler's virtual entry modules and server-function resolver are supplied by -the fixture. Request dispatch, CSRF, serialization, and reconciliation use their -real implementations. Workspace dependencies are built by Nx; this package's -source is loaded through its existing Vitest aliases. - -Each case runs assertions before measurement, then dispatches 160 deterministic -GET requests per batch with eight workers and drains every response body. The -cases cover unchanged protocol headers, repairs in two middleware layers, helper -set/append/cookie writes before and after `next()`, and raw responses with three -separate cookies and 0, 4, or 20 extra headers. Each raw size runs with both -unchanged and repaired protocol headers, so an optimization that scans all -headers cannot hide its cost behind the repair cases' early exit. - -Two additional cases throw the public `notFound()` error, with and without -supplied headers, through the same handler and protocol-repair middleware. The -supplied-header case reuses caller-owned headers with a normal header, incorrect -transport headers, and three cookies. Assertions before measurement check the -404 status, JSON body, transport normalization, cookie preservation, and caller -header immutability. Timed batches validate the 404 status and drain each body, -using the same request count, concurrency, and seed as the existing nine cases. - -Copy the same benchmark and config to both revisions for a comparison. Keep the -Node version, V8 flags, batch size, and case names unchanged; compare against the -unoptimized response-reconciliation branch to measure these newly introduced -mechanisms. These focused source benchmarks supplement the production SSR app -suite; they do not replace its cross-framework or CodSpeed results. - -Use `--reporter=json --outputFile=/tmp/response-baseline.json` and a separate -candidate output file to preserve both runs' timing statistics; each test case -in the JSON report carries its `benchmarks` results. diff --git a/packages/start-server-core/tests/response-reconciliation.bench.ts b/packages/start-server-core/tests/response-reconciliation.bench.ts deleted file mode 100644 index 389b6af847..0000000000 --- a/packages/start-server-core/tests/response-reconciliation.bench.ts +++ /dev/null @@ -1,391 +0,0 @@ -import { afterAll, describe, expect, test, vi } from 'vitest' -import { fromCrossJSON } from 'seroval' -import { notFound, redirect } from '@tanstack/router-core' -import { - createCsrfMiddleware, - createMiddleware, -} from '@tanstack/start-client-core' -import { runRequestLoop } from '../../../benchmarks/ssr/bench-utils' -import { createStartHandler } from '../src/createStartHandler' -import { - appendResponseHeader, - setCookie, - setResponseHeader, - setResponseStatus, -} from '../src/request-response' - -const fixture = vi.hoisted(() => { - const previousServerFnBase = process.env.TSS_SERVER_FN_BASE - process.env.TSS_SERVER_FN_BASE = '/_serverFn/' - return { previousServerFnBase } -}) - -// Supply the compiler's virtual entries while keeping the real request, -// server-function transport, serialization, and reconciliation implementations. -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ requestMiddleware, serializationAdapters: [] }), - }, -})) -vi.mock('#tanstack-router-entry', () => ({ - getRouter: () => { - throw new Error('Server-function requests should not create a router') - }, -})) -vi.mock('#tanstack-start-server-fn-resolver', () => ({ - getServerFnById: (id: string) => { - const action = actions.get(id) - if (!action) { - throw new Error(`Unknown benchmark function: ${id}`) - } - return action - }, -})) - -function responseMiddleware(layer: string) { - return createMiddleware().server(async ({ request, next }) => { - const helpers = request.url.includes('/serialized-helpers?') - if (helpers) { - setResponseHeader('x-helper', layer) - appendResponseHeader('x-steps', `${layer}-before`) - setCookie(layer, 'before') - } - - const result = await next() - - if (helpers) { - appendResponseHeader('x-steps', `${layer}-after`) - setCookie(layer, 'after') - } - if (request.url.includes('/raw-')) { - if (!request.url.includes('/raw-unchanged-')) { - result.response.headers.delete('x-tss-raw') - } - } else if (!request.url.includes('/serialized-unchanged?')) { - result.response.headers.set('content-type', 'text/plain') - result.response.headers.delete('x-tss-serialized') - result.response.headers.set('x-tss-raw', 'true') - } - - return result - }) -} - -const requestMiddleware = [ - createCsrfMiddleware(), - responseMiddleware('outer'), - responseMiddleware('inner'), -] -const cookies = [ - 'first=one; Path=/', - 'second=two; Path=/', - 'third=three; Path=/', -] -const result = { answer: 42, label: 'response-reconciliation' } -const scenarios = [ - { - id: 'serialized-unchanged', - name: 'serialized response with unchanged protocol headers', - extraHeaders: undefined, - action: () => ({ result }), - }, - { - id: 'serialized-repaired', - name: 'serialized response with two protocol repairs', - extraHeaders: undefined, - action: () => ({ result }), - }, - { - id: 'serialized-helpers', - name: 'serialized response with two protocol repairs and helper writes', - extraHeaders: undefined, - action: () => ({ result }), - }, - { - id: 'serialized-protected-helpers', - name: 'serialized response with two protocol repairs and only protected helper writes', - extraHeaders: undefined, - action: () => { - // These writes create helper state but cannot change the JSON transport. - // Compare with serialized-repaired to expose needless header allocation - // while preserving every established middleware path and workload. - setResponseHeader('content-type', 'text/plain') - setResponseHeader('x-tss-serialized', 'false') - setResponseHeader('x-tss-raw', 'true') - return { result } - }, - }, - ...[0, 4, 20].flatMap((extraHeaders) => - [false, true].map((repair) => ({ - id: `raw-${repair ? 'repaired' : 'unchanged'}-${extraHeaders}`, - name: `raw response with ${repair ? 'two protocol repairs' : 'unchanged protocol headers'}, ${extraHeaders} extra headers and three cookies`, - extraHeaders, - action: () => { - const headers = new Headers({ 'content-type': 'text/plain' }) - for (let index = 0; index < extraHeaders; index++) { - headers.set(`x-extra-${index}`, `value-${index}`) - } - for (const cookie of cookies) { - headers.append('set-cookie', cookie) - } - return { result: new Response('raw-response', { headers }) } - }, - })), - ), -] -const notFoundHeaders = new Headers({ - 'content-type': 'text/plain', - 'x-tss-serialized': 'true', - 'x-tss-raw': 'true', - 'x-not-found': 'preserved', -}) -for (const cookie of cookies) { - notFoundHeaders.append('set-cookie', cookie) -} -const originalNotFoundHeaders = Array.from(notFoundHeaders) -const notFoundScenarios = [ - { - id: 'not-found-without-headers', - name: 'not-found response without supplied headers', - headers: undefined, - action: () => { - throw notFound() - }, - }, - { - id: 'not-found-with-headers', - name: 'not-found response with supplied headers and three cookies', - headers: notFoundHeaders, - action: () => { - throw notFound({ headers: notFoundHeaders }) - }, - }, -] -const redirectHref = '/redirect-target' -const redirectHeaders = new Headers({ - 'content-type': 'text/plain', - 'x-tss-serialized': 'true', - 'x-tss-raw': 'true', - 'x-redirect': 'preserved', - 'x-helper': 'caller', - 'x-steps': 'source', -}) -for (const cookie of cookies) { - redirectHeaders.append('set-cookie', cookie) -} -const originalRedirectHeaders = Array.from(redirectHeaders) -const redirectScenarios = [ - { - id: 'redirect-without-helpers', - name: 'RPC href redirect without helper writes', - status: 200, - statusText: '', - headers: undefined, - action: () => { - throw redirect({ href: redirectHref }) - }, - }, - { - id: 'redirect-with-headers-and-helpers', - name: 'RPC href redirect with supplied headers, three cookies and helper writes', - status: 202, - statusText: 'Accepted', - headers: redirectHeaders, - action: () => { - // Keep these writes out of the shared middleware so the established - // eleven workloads remain unchanged. - setResponseStatus(202, 'Accepted') - setResponseHeader('x-helper', 'complete') - setResponseHeader('content-type', 'text/plain') - setResponseHeader('location', '/ignored') - setResponseHeader('x-tss-serialized', 'true') - setResponseHeader('x-tss-raw', 'true') - appendResponseHeader('x-steps', 'before') - appendResponseHeader('x-steps', 'after') - setCookie('first', 'updated') - setCookie('helper', 'added') - throw redirect({ href: redirectHref, headers: redirectHeaders }) - }, - }, -] -const actions = new Map( - [...scenarios, ...notFoundScenarios, ...redirectScenarios].map((scenario) => [ - scenario.id, - scenario.action, - ]), -) - -const fetch = createStartHandler(() => { - throw new Error('Server-function requests should not render HTML') -}) -const handler = { fetch: (request: Request) => fetch(request, {}) } -const requestHeaders = { - 'x-tsr-serverFn': 'true', - 'sec-fetch-site': 'same-origin', - accept: 'application/json', -} - -function requestFor(id: string, sample: number) { - return new Request(`http://localhost/_serverFn/${id}?sample=${sample}`, { - headers: requestHeaders, - }) -} - -// Assertions run once before timed batches. The hot loops only dispatch and -// drain responses; they never decode JSON or run assertion-library matchers. -for (const scenario of scenarios) { - const response = await handler.fetch(requestFor(scenario.id, 0)) - expect(response.status).toBe(200) - if (scenario.extraHeaders === undefined) { - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(fromCrossJSON(await response.json(), {})).toEqual({ result }) - if (scenario.id === 'serialized-helpers') { - expect(response.headers.get('x-helper')).toBe('inner') - expect(response.headers.get('x-steps')).toBe( - 'outer-before, inner-before, inner-after, outer-after', - ) - expect(response.headers.getSetCookie().sort()).toEqual([ - 'inner=after; Path=/', - 'outer=after; Path=/', - ]) - } - } else { - expect(response.headers.get('content-type')).toBe('text/plain') - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(response.headers.get('x-tss-serialized')).toBeNull() - expect(response.headers.getSetCookie()).toEqual(cookies) - for (let index = 0; index < scenario.extraHeaders; index++) { - expect(response.headers.get(`x-extra-${index}`)).toBe(`value-${index}`) - } - expect(await response.text()).toBe('raw-response') - } -} - -for (const scenario of notFoundScenarios) { - const response = await handler.fetch(requestFor(scenario.id, 0)) - expect(response.status).toBe(404) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBeNull() - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('x-not-found')).toBe( - scenario.headers ? 'preserved' : null, - ) - expect(response.headers.getSetCookie()).toEqual( - scenario.headers ? cookies : [], - ) - expect(Array.from(notFoundHeaders)).toEqual(originalNotFoundHeaders) - expect(await response.json()).toEqual({ isNotFound: true }) -} - -for (const scenario of redirectScenarios) { - const response = await handler.fetch(requestFor(scenario.id, 0)) - expect(response.status).toBe(scenario.status) - expect(response.statusText).toBe(scenario.statusText) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('location')).toBeNull() - expect(response.headers.get('x-tss-serialized')).toBeNull() - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('x-redirect')).toBe( - scenario.headers ? 'preserved' : null, - ) - expect(response.headers.get('x-helper')).toBe( - scenario.headers ? 'complete' : null, - ) - expect(response.headers.get('x-steps')).toBe( - scenario.headers ? 'source, before, after' : null, - ) - expect(response.headers.getSetCookie()).toEqual( - scenario.headers - ? [ - 'second=two; Path=/', - 'third=three; Path=/', - 'first=updated; Path=/', - 'helper=added; Path=/', - ] - : [], - ) - expect(Array.from(redirectHeaders)).toEqual(originalRedirectHeaders) - expect(await response.json()).toEqual({ - href: redirectHref, - statusCode: 307, - isSerializedRedirect: true, - }) -} - -function validateNotFoundResponse(response: Response) { - if (response.status !== 404) { - throw new Error(`Expected not-found response, received ${response.status}`) - } -} - -afterAll(() => { - if (fixture.previousServerFnBase === undefined) { - Reflect.deleteProperty(process.env, 'TSS_SERVER_FN_BASE') - } else { - process.env.TSS_SERVER_FN_BASE = fixture.previousServerFnBase - } -}) - -describe('response reconciliation', () => { - for (const scenario of scenarios) { - test(scenario.name, async ({ bench }) => { - await bench(scenario.name, () => - runRequestLoop(handler, { - seed: 0xdecafbad, - concurrency: 8, - totalRequests: 160, - buildRequest: (random) => - requestFor(scenario.id, Math.floor(random() * 1_000_000)), - }), - ).run({ - warmupIterations: 100, - time: 5_000, - throws: true, - }) - }) - } - for (const scenario of notFoundScenarios) { - test(scenario.name, async ({ bench }) => { - await bench(scenario.name, () => - runRequestLoop(handler, { - seed: 0xdecafbad, - concurrency: 8, - totalRequests: 160, - buildRequest: (random) => - requestFor(scenario.id, Math.floor(random() * 1_000_000)), - validateResponse: validateNotFoundResponse, - }), - ).run({ - warmupIterations: 100, - time: 5_000, - throws: true, - }) - }) - } - for (const scenario of redirectScenarios) { - test(scenario.name, async ({ bench }) => { - await bench(scenario.name, () => - runRequestLoop(handler, { - seed: 0xdecafbad, - concurrency: 8, - totalRequests: 160, - buildRequest: (random) => - requestFor(scenario.id, Math.floor(random() * 1_000_000)), - validateResponse: (response) => { - if (response.status !== scenario.status) { - throw new Error( - `Expected redirect envelope status ${scenario.status}, received ${response.status}`, - ) - } - }, - }), - ).run({ - warmupIterations: 100, - time: 5_000, - throws: true, - }) - }) - } -}) diff --git a/packages/start-server-core/tests/server-functions-handler.test.ts b/packages/start-server-core/tests/server-functions-handler.test.ts deleted file mode 100644 index 434a06efca..0000000000 --- a/packages/start-server-core/tests/server-functions-handler.test.ts +++ /dev/null @@ -1,554 +0,0 @@ -// @vitest-environment node - -import { beforeEach, expect, test, vi } from 'vitest' -import { createStream, fromCrossJSON } from 'seroval' -import { - TSS_CONTENT_TYPE_FRAMED_VERSIONED, - X_TSS_SERIALIZED, -} from '@tanstack/start-client-core' -import { - FRAME_HEADER_SIZE, - FRAME_TYPE_CHUNK, - FRAME_TYPE_JSON, - MAX_FRAMED_STREAMS, -} from '@tanstack/start-client-core/client-rpc' -import { RawStream } from '@tanstack/router-core' -import { defaultSerovalDeserializerPlugins } from '@tanstack/router-core/ssr/server' -import { - DeferredResponse, - handleServerAction, -} from '../src/server-functions-handler' -import { createServerEntry, setResponseStatus } from '../src/request-response' -import { getStartEvent } from '../src/internal-request-response' -import type * as StartClientCore from '@tanstack/start-client-core' - -const mocks = vi.hoisted(() => ({ - action: vi.fn(), -})) - -vi.mock('../src/getServerFnById', () => ({ - getServerFnById: () => mocks.action, -})) - -vi.mock('@tanstack/start-client-core', async (importOriginal) => { - const actual = await importOriginal() - const { defaultSerovalDeserializerPlugins } = - await import('@tanstack/router-core/ssr/server') - return { - ...actual, - getSerovalPlugins: () => defaultSerovalDeserializerPlugins, - } -}) - -beforeEach(() => { - mocks.action.mockReset() -}) - -function callServerAction(options: Parameters[0]) { - return createServerEntry({ - fetch: async () => { - const result = await handleServerAction(options) - return result instanceof DeferredResponse - ? result.createResponse(getStartEvent()) - : result - }, - }).fetch(options.request) -} - -async function readFrames(response: Response) { - const frames: Array<{ type: number; payload: Uint8Array }> = [] - const reader = response.body!.getReader() - for (;;) { - const { done, value } = await reader.read() - if (done) { - return frames - } - frames.push({ - type: value[0]!, - payload: value.slice(FRAME_HEADER_SIZE), - }) - } -} - -function expectRawReferenceBeforeChunk( - frames: Array<{ type: number; payload: Uint8Array }>, -) { - const chunkIndex = frames.findIndex( - (frame) => frame.type === FRAME_TYPE_CHUNK, - ) - const referenceIndex = frames.findIndex( - (frame) => - frame.type === FRAME_TYPE_JSON && - new TextDecoder().decode(frame.payload).includes('tss/RawStream'), - ) - expect(referenceIndex).toBeGreaterThanOrEqual(0) - expect(chunkIndex).toBeGreaterThan(referenceIndex) -} - -test.each([false, 0, '', null])( - 'preserves the direct server-function result %j', - async (result) => { - mocks.action.mockResolvedValue({ result }) - - await expect( - handleServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - }), - serverFnId: 'test', - }), - ).resolves.toBe(result) - }, -) - -test('serializes a complete direct JSON record without LF', async () => { - mocks.action.mockResolvedValue({ result: { value: 'complete' } }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - const encoded = await response.text() - const parsed = JSON.parse(encoded) - expect(encoded).toBe(JSON.stringify(parsed)) - expect(encoded).not.toContain('\n') -}) - -test('cancelling a framed response disposes its serializer', async () => { - const cancel = vi.fn() - const source = new ReadableStream({ - cancel, - }) - mocks.action.mockResolvedValue({ result: source }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expect(source.locked).toBe(true) - await response.body!.cancel('client disconnected') - expect(cancel).toHaveBeenCalledOnce() - expect(source.locked).toBe(false) -}) - -test('aborting the request disposes a handed-off framed response', async () => { - const abortController = new AbortController() - const reason = new Error('request aborted') - const cancel = vi.fn() - const source = new ReadableStream({ cancel }) - mocks.action.mockResolvedValue({ result: new RawStream(source) }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - signal: abortController.signal, - }), - serverFnId: 'test', - }) - - await vi.waitFor(() => { - expect(source.locked).toBe(true) - }) - abortController.abort(reason) - await vi.waitFor(() => { - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(reason) - expect(source.locked).toBe(false) - }) - await expect(response.body!.getReader().read()).rejects.toBe(reason) -}) - -test('cancels synchronous RawStreams without pulling when the request is already aborted', async () => { - const abortController = new AbortController() - const reason = new Error('request already aborted') - abortController.abort(reason) - const sources = Array.from({ length: 3 }, () => { - const cancel = vi.fn(() => new Promise(() => {})) - const pull = vi.fn() - const stream = new ReadableStream( - { pull, cancel }, - { highWaterMark: 0 }, - ) - return { stream, pull, cancel } - }) - mocks.action.mockResolvedValue({ - result: sources.map(({ stream }) => new RawStream(stream)), - }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - signal: abortController.signal, - }), - serverFnId: 'test', - }) - - await expect(response.body!.getReader().read()).rejects.toBe(reason) - await new Promise((resolve) => setTimeout(resolve, 0)) - for (const { stream, pull, cancel } of sources) { - expect(pull).not.toHaveBeenCalled() - expect(cancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(stream.locked).toBe(false) - } -}) - -test('bounds and cancels synchronous RawStreams when their response remains unread', async () => { - const sources = Array.from({ length: 3 }, () => { - const cancel = vi.fn() - const pull = vi.fn( - (controller: ReadableStreamDefaultController) => { - controller.enqueue(new Uint8Array(64 * 1024)) - }, - ) - const stream = new ReadableStream( - { pull, cancel }, - { highWaterMark: 0 }, - ) - return { stream, pull, cancel } - }) - mocks.action.mockResolvedValue({ - result: sources.map(({ stream }) => new RawStream(stream)), - }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - await new Promise((resolve) => setTimeout(resolve, 0)) - expect(sources.map(({ pull }) => pull.mock.calls.length)).toEqual([1, 1, 1]) - const reason = new Error('client disconnected') - await response.body!.cancel(reason) - await new Promise((resolve) => setTimeout(resolve, 0)) - for (const { stream, pull, cancel } of sources) { - expect(pull).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledExactlyOnceWith(reason) - expect(stream.locked).toBe(false) - } -}) - -test('a synchronous serialization failure cancels registered raw streams', async () => { - const cancel = vi.fn() - const source = new ReadableStream({ cancel }) - mocks.action.mockResolvedValue({ - result: { - raw: new RawStream(source), - unsupported: () => {}, - }, - }) - const consoleInfo = vi.spyOn(console, 'info').mockImplementation(() => {}) - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - - try { - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expect(cancel).toHaveBeenCalledOnce() - expect(cancel).toHaveBeenCalledWith(expect.any(Error)) - expect(source.locked).toBe(false) - expect(response.headers.get(X_TSS_SERIALIZED)).toBe('true') - expect(response.headers.get('content-type')).toBe('application/json') - expect( - fromCrossJSON<{ error: unknown }>(await response.json(), { - plugins: defaultSerovalDeserializerPlugins, - }).error, - ).toBeInstanceOf(Error) - } finally { - consoleInfo.mockRestore() - consoleError.mockRestore() - } -}) - -test('admits replayed nested RawStream references before their chunks', async () => { - const source = new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([1])) - controller.close() - }, - }) - const replayed = createStream() - replayed.next(new RawStream(source)) - replayed.return(undefined) - mocks.action.mockResolvedValue({ result: { replayed } }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expectRawReferenceBeforeChunk(await readFrames(response)) -}) - -test('frames every record from a synchronously replayed Seroval stream', async () => { - const replayed = createStream() - replayed.next(1) - replayed.return(undefined) - mocks.action.mockResolvedValue({ result: { replayed } }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expect(response.headers.get('content-type')).toBe( - TSS_CONTENT_TYPE_FRAMED_VERSIONED, - ) - const frames = await readFrames(response) - expect(frames.every((frame) => frame.type === FRAME_TYPE_JSON)).toBe(true) - expect(frames.length).toBeGreaterThan(1) - - const refs = new Map() - let result: any - for (let index = 0; index < frames.length; index++) { - const encoded = new TextDecoder().decode(frames[index]!.payload) - const parsed = JSON.parse(encoded) - expect(encoded).toBe(JSON.stringify(parsed)) - expect(encoded).not.toContain('\n') - const value = fromCrossJSON(parsed, { - refs, - plugins: defaultSerovalDeserializerPlugins, - }) - if (index === 0) { - result = value - } - } - - const events: Array<[string, unknown]> = [] - result.result.replayed.on({ - next(value: unknown) { - events.push(['next', value]) - }, - throw(error: unknown) { - events.push(['throw', error]) - }, - return(value: unknown) { - events.push(['return', value]) - }, - }) - expect(events).toEqual([ - ['next', 1], - ['return', undefined], - ]) -}) - -test('keeps work discovered after a transient synchronous completion', async () => { - const replayed = createStream() - replayed.return(undefined) - let resolveLate!: (value: RawStream) => void - const late = new Promise((resolve) => { - resolveLate = resolve - }) - mocks.action.mockResolvedValue({ result: { replayed, late } }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - resolveLate( - new RawStream( - new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([1])) - controller.close() - }, - }), - ), - ) - - expectRawReferenceBeforeChunk(await readFrames(response)) -}) - -test('bounds synchronously replayed Seroval records before framing', async () => { - const replayed = createStream() - for (let index = 0; index < 1025; index++) { - replayed.next(index) - } - replayed.return(undefined) - mocks.action.mockResolvedValue({ result: { replayed } }) - const consoleInfo = vi.spyOn(console, 'info').mockImplementation(() => {}) - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - - try { - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - const { error } = fromCrossJSON<{ error: unknown }>(await response.json(), { - plugins: defaultSerovalDeserializerPlugins, - }) - expect(error).toBeInstanceOf(Error) - expect((error as Error).message).toContain('pending output limit') - } finally { - consoleInfo.mockRestore() - consoleError.mockRestore() - } -}) - -test('admits late RawStream references before their chunks', async () => { - let resolveRawStream!: (value: RawStream) => void - const lateRawStream = new Promise((resolve) => { - resolveRawStream = resolve - }) - mocks.action.mockResolvedValue({ result: { lateRawStream } }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - resolveRawStream( - new RawStream( - new ReadableStream({ - start(controller) { - controller.enqueue(new Uint8Array([2])) - controller.close() - }, - }), - ), - ) - - expectRawReferenceBeforeChunk(await readFrames(response)) -}) - -test('rejects a non-ASCII JSON record larger than the wire limit', async () => { - const cancel = vi.fn() - const source = new ReadableStream({ cancel }) - mocks.action.mockResolvedValue({ - result: { - // UTF-16 length is within the old limit, but UTF-8 is over 16 MiB. - value: 'é'.repeat(8 * 1024 * 1024), - raw: new RawStream(source), - }, - }) - - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expect(cancel).toHaveBeenCalledOnce() - expect(source.locked).toBe(false) - // Nothing reached the client yet, so the whole call fails. - expect(response.status).toBe(500) - expect(response.headers.get('content-type')).toBe('application/json') - expect(await response.text()).toContain('pending output limit') -}) - -test.each(['RawStream', 'ReadableStream'])( - 'serializes %s results despite a bodyless helper status', - async (kind) => { - const cancel = vi.fn() - const source = new ReadableStream({ cancel }) - mocks.action.mockImplementation(() => { - setResponseStatus(204, 'No Content') - return { - result: kind === 'RawStream' ? new RawStream(source) : source, - } - }) - const consoleInfo = vi.spyOn(console, 'info').mockImplementation(() => {}) - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - const consoleWarn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - - try { - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - // Serialized replies always carry a body for the client to decode. - expect(response.status).toBe(200) - expect(response.statusText).toBe('') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(consoleWarn).toHaveBeenCalledOnce() - const reason = new Error('client disconnected') - await response.body!.cancel(reason) - await vi.waitFor(() => expect(cancel).toHaveBeenCalledOnce()) - } finally { - consoleInfo.mockRestore() - consoleError.mockRestore() - consoleWarn.mockRestore() - } - }, -) - -test('rejects excess RawStreams before starting their readers', async () => { - let pullCount = 0 - let cancelCount = 0 - const sources = Array.from( - { length: MAX_FRAMED_STREAMS + 1 }, - () => - new ReadableStream( - { - pull() { - pullCount++ - }, - cancel() { - cancelCount++ - }, - }, - { highWaterMark: 0 }, - ), - ) - mocks.action.mockResolvedValue({ - result: sources.map((source) => new RawStream(source)), - }) - const consoleInfo = vi.spyOn(console, 'info').mockImplementation(() => {}) - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - - try { - const response = await callServerAction({ - request: new Request('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'x-tsr-serverFn': 'true' }, - }), - serverFnId: 'test', - }) - - expect(response.headers.get('content-type')).toBe('application/json') - expect(pullCount).toBe(0) - expect(cancelCount).toBe(MAX_FRAMED_STREAMS + 1) - expect(sources.every((source) => !source.locked)).toBe(true) - } finally { - consoleInfo.mockRestore() - consoleError.mockRestore() - } -}) diff --git a/packages/start-server-core/tests/server-functions-reconciliation.test.ts b/packages/start-server-core/tests/server-functions-reconciliation.test.ts deleted file mode 100644 index a924fa96e4..0000000000 --- a/packages/start-server-core/tests/server-functions-reconciliation.test.ts +++ /dev/null @@ -1,1588 +0,0 @@ -// @vitest-environment node - -import { afterAll, afterEach, describe, expect, it, vi } from 'vitest' -import { fromCrossJSON, toJSON } from 'seroval' -import { - RawStream, - isNotFound, - isRedirect, - notFound, - redirect, -} from '@tanstack/router-core' -import { - TSS_FORMDATA_CONTEXT, - TSS_CONTENT_TYPE_FRAMED_VERSIONED, - createCsrfMiddleware, - createMiddleware, - createServerFn, -} from '@tanstack/start-client-core' -import { createStartHandler } from '../src/createStartHandler' -import { - FRAME_HEADER_SIZE, - FRAME_TYPE_CHUNK, - FRAME_TYPE_END, - FRAME_TYPE_JSON, - createClientRpc, -} from '@tanstack/start-client-core/client-rpc' -import { - appendResponseHeader, - getRequestUrl, - getResponseHeader, - setCookie, - setResponseHeader, - setResponseStatus, -} from '../src/request-response' -import { createServerRpc } from '../src/createServerRpc' -import { createSsrRpc } from '../src/createSsrRpc' -import { ServerFunctionSerializationAdapter } from '../src/serializer/ServerFunctionSerializationAdapter' -import type { AnyFunctionMiddleware } from '@tanstack/start-client-core' - -const serverFnMocks = vi.hoisted(() => { - const previousServerFnBase = process.env.TSS_SERVER_FN_BASE - process.env.TSS_SERVER_FN_BASE = '/_serverFn/' - return { - previousServerFnBase, - middleware: [] as Array, - action: undefined as - | undefined - | (ReturnType & { method: string }), - } -}) - -vi.mock('#tanstack-start-entry', () => ({ - startInstance: { - getOptions: () => ({ - requestMiddleware: serverFnMocks.middleware, - serializationAdapters: [], - }), - }, -})) - -vi.mock('../src/getServerFnById', () => ({ - getServerFnById: () => serverFnMocks.action, -})) - -// Run the public client RPC in Node without the compiler's browser replacement. -vi.mock('../../start-client-core/dist/esm/getStartOptions.js', () => ({ - getStartOptions: () => undefined, -})) - -function createServerFunctionRequest( - input = 'http://localhost/_serverFn/test', - init?: RequestInit, -) { - const headers = new Headers(init?.headers) - headers.set('x-tsr-serverFn', 'true') - return new Request(input, { ...init, headers }) -} - -function createAction(method = 'GET') { - return Object.assign(vi.fn(), { method }) -} - -function createHandler() { - return createStartHandler(() => { - throw new Error('Server function requests should not render HTML') - }) -} - -type CallServerFn = (opts?: { - data?: unknown - fetch?: (input: string, init: RequestInit) => Promise -}) => Promise -type AttachHandler = (...args: Array) => CallServerFn & { - __executeServer: (opts: unknown) => Promise -} - -// Calls server function `test` through the client stub a compiled GET call -// site uses, which rethrows failed calls. -function callClientServerFn( - fetch: (input: string, init: RequestInit) => Promise, -) { - return (createServerFn().handler as unknown as AttachHandler)( - createClientRpc('test'), - )({ fetch }) -} - -// Compiled shape of a server function: the provider module registers the -// RPC entry, and callers get a client or server-side stub with the same -// middleware. -function defineServerFn( - method: 'GET' | 'POST', - handler: () => unknown, - middleware: Array = [], -) { - const attach = (extractedFn: unknown, serverFn?: unknown) => - ( - createServerFn({ method }).middleware(middleware) - .handler as unknown as AttachHandler - )(extractedFn, serverFn) - const rpc = createServerRpc( - { id: 'test', name: 'test', filename: 'test.ts' }, - (opts: unknown) => provider.__executeServer(opts), - ) - const provider = attach(rpc, handler) - serverFnMocks.action = rpc as unknown as typeof serverFnMocks.action - const client = attach(createClientRpc('test')) - const onServer = attach(createSsrRpc('test')) - let response: Response | undefined - - return { - call: (data?: unknown) => - client({ - data, - fetch: async (input, init) => { - response = await createHandler()( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - return response - }, - }), - onServer, - response: () => response!, - } -} - -async function readFrames(response: Response) { - const reader = response.body!.getReader() - const frames: Array<{ - type: number - streamId: number - payload: Uint8Array - }> = [] - - while (true) { - const { done, value } = await reader.read() - if (done) { - break - } - const view = new DataView(value.buffer, value.byteOffset) - const length = view.getUint32(5, false) - frames.push({ - type: view.getUint8(0), - streamId: view.getUint32(1, false), - payload: value.slice(FRAME_HEADER_SIZE, FRAME_HEADER_SIZE + length), - }) - } - - return frames -} - -async function settle(promise: Promise) { - try { - return { resolved: await promise } - } catch (rejected) { - return { rejected } - } -} - -afterEach(() => { - serverFnMocks.action = undefined - serverFnMocks.middleware = [] -}) - -afterAll(() => { - if (serverFnMocks.previousServerFnBase === undefined) { - Reflect.deleteProperty(process.env, 'TSS_SERVER_FN_BASE') - } else { - process.env.TSS_SERVER_FN_BASE = serverFnMocks.previousServerFnBase - } -}) - -describe('server function response reconciliation', () => { - it.each(['GET', 'POST'] as const)( - 'preserves request middleware context through the %s RPC terminal', - async (method) => { - const requestContext = Object.freeze({ nonce: 'request' }) - const globalContext = Object.freeze({ - trusted: 'server', - global: 'yes', - }) - const clientContext = Object.freeze({ - trusted: 'client', - client: 'yes', - }) - const events: Array = [] - let resumedContext: unknown - serverFnMocks.middleware = [ - createMiddleware().server(async ({ next }) => { - events.push('outer before') - const result = await next({ context: globalContext }) - resumedContext = result.context - events.push('outer after') - appendResponseHeader('x-steps', 'outer after') - return result - }), - createMiddleware().server(({ next }) => { - events.push('inner') - return next({ context: { inner: 'yes' } }) - }), - ] - // A real server function merges the client context with the trusted - // server context, which wins. - defineServerFn(method, (({ context }: { context: unknown }) => { - events.push('action') - appendResponseHeader('x-steps', 'action') - return context - }) as () => unknown) - const payload = JSON.stringify(toJSON({ context: clientContext })) - const request = createServerFunctionRequest( - method === 'GET' - ? `http://localhost/_serverFn/test?payload=${encodeURIComponent(payload)}` - : 'http://localhost/_serverFn/test', - method === 'GET' - ? undefined - : { - method, - headers: { 'content-type': 'application/json' }, - body: payload, - }, - ) - - const response = await createHandler()(request, { - context: requestContext, - }) - - expect(response.status).toBe(200) - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-steps')).toBe('action, outer after') - expect(fromCrossJSON(await response.json(), {})).toEqual({ - result: { - nonce: 'request', - trusted: 'server', - global: 'yes', - client: 'yes', - inner: 'yes', - }, - }) - expect(resumedContext).toEqual({ - nonce: 'request', - trusted: 'server', - global: 'yes', - inner: 'yes', - }) - expect(events).toEqual(['outer before', 'inner', 'action', 'outer after']) - expect(requestContext).toEqual({ nonce: 'request' }) - expect(globalContext).toEqual({ trusted: 'server', global: 'yes' }) - expect(clientContext).toEqual({ trusted: 'client', client: 'yes' }) - }, - ) - - it.each([202, 204, 205, 304])( - 'includes helper writes made while serializing a synchronous result with status %s', - async (status) => { - const serialized = vi.fn(() => { - setResponseStatus(status, 'Serialized status') - setResponseHeader('x-serialized', 'yes') - appendResponseHeader('x-steps', 'serialized') - setCookie('session', 'serialized', { path: '/' }) - setResponseHeader('content-type', 'text/plain') - setResponseHeader('x-tss-raw', 'true') - return 'serialized value' - }) - const action = createAction() - action.mockReturnValue({ - result: { - get value() { - return serialized() - }, - }, - }) - serverFnMocks.action = action - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(serialized).toHaveBeenCalledOnce() - // A serialized reply always carries a body, so a bodyless helper status - // is ignored together with its status text. - expect(response.status).toBe(status === 202 ? 202 : 200) - expect(response.statusText).toBe( - status === 202 ? 'Serialized status' : '', - ) - expect(response.headers.get('x-serialized')).toBe('yes') - expect(response.headers.get('x-steps')).toBe('serialized') - expect(response.headers.getSetCookie()).toEqual([ - 'session=serialized; Path=/', - ]) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(fromCrossJSON(await response.json(), {})).toEqual({ - result: { value: 'serialized value' }, - }) - }, - ) - - it('keeps a returned fallback when the action it abandoned completes while an outer middleware awaits', async () => { - let releaseAction!: () => void - const actionCanFinish = new Promise((resolve) => { - releaseAction = resolve - }) - let pendingAction: Promise | undefined - const cancelFallback = vi.fn() - const fallback = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('fallback')) - controller.close() - }, - cancel: cancelFallback, - }), - { status: 504 }, - ) - serverFnMocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - releaseAction() - await pendingAction - return result - }), - createMiddleware().server(({ next }) => { - pendingAction = Promise.resolve(next()) - return fallback - }), - ] - const action = createAction() - action.mockImplementation(async () => { - await actionCanFinish - appendResponseHeader('x-steps', 'action') - return { result: 'completed' } - }) - serverFnMocks.action = action - - try { - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(action).toHaveBeenCalledOnce() - expect(cancelFallback).not.toHaveBeenCalled() - expect(response.status).toBe(504) - expect(response.headers.get('x-tss-serialized')).toBeNull() - // Helper writes belong to the request, so the abandoned action's - // writes still apply to the response that replaced its result. - expect(response.headers.get('x-steps')).toBe('action') - await expect(response.text()).resolves.toBe('fallback') - } finally { - releaseAction() - await pendingAction - } - }) - - it('keeps an early middleware response readable after a late JSON action completes', async () => { - let releaseAction!: () => void - const actionCanFinish = new Promise((resolve) => { - releaseAction = resolve - }) - let pendingAction: Promise | undefined - const cancelFallback = vi.fn() - const fallback = new Response( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('fallback')) - controller.close() - }, - cancel: cancelFallback, - }), - { status: 504, headers: { 'x-fallback': 'yes' } }, - ) - serverFnMocks.middleware = [ - createMiddleware().server(({ next }) => { - pendingAction = Promise.resolve(next()) - return fallback - }), - ] - const action = createAction() - action.mockImplementation(async () => { - await actionCanFinish - return { result: 'late' } - }) - serverFnMocks.action = action - - try { - const response = await createHandler()(createServerFunctionRequest(), {}) - expect(response.status).toBe(504) - - releaseAction() - await pendingAction - - expect(action).toHaveBeenCalledOnce() - expect(cancelFallback).not.toHaveBeenCalled() - expect(response.headers.get('x-fallback')).toBe('yes') - expect(response.headers.get('x-tss-serialized')).toBeNull() - await expect(response.text()).resolves.toBe('fallback') - } finally { - releaseAction() - await pendingAction - } - }) - - it('does not publish late JSON after a pending request is aborted', async () => { - const controller = new AbortController() - const reason = new Error('Request disconnected') - let releaseAction!: () => void - const actionCanFinish = new Promise((resolve) => { - releaseAction = resolve - }) - let actionStarted!: () => void - const started = new Promise((resolve) => { - actionStarted = resolve - }) - let observeResponse!: (value: string | undefined) => void - const observedResponse = new Promise((resolve) => { - observeResponse = resolve - }) - const serialized = vi.fn(() => { - // Observe the request after all late promise continuations have settled. - setImmediate(() => observeResponse(getResponseHeader('x-tss-serialized'))) - return 'late' - }) - const action = createAction() - action.mockImplementation(async () => { - actionStarted() - await actionCanFinish - return { - result: { - get value() { - return serialized() - }, - }, - } - }) - serverFnMocks.action = action - const pending = createHandler()( - createServerFunctionRequest('http://localhost/_serverFn/test', { - signal: controller.signal, - }), - {}, - ) - const rejected = expect(pending).rejects.toBe(reason) - try { - await started - controller.abort(reason) - await rejected - releaseAction() - await expect(observedResponse).resolves.toBeUndefined() - expect(serialized).toHaveBeenCalledOnce() - } finally { - releaseAction() - } - }) - - it('decodes a serialized reply that middleware pipes through a transform', async () => { - const action = createAction() - action.mockReturnValue({ result: 'delegated' }) - serverFnMocks.action = action - serverFnMocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - const response = new Response( - result.response.body!.pipeThrough(new TransformStream()), - result.response, - ) - response.headers.set('x-delegated', 'yes') - appendResponseHeader('x-steps', 'delegated') - return response - }), - ] - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-delegated')).toBe('yes') - expect(response.headers.get('x-steps')).toBe('delegated') - expect(fromCrossJSON(await response.json(), {})).toEqual({ - result: 'delegated', - }) - }) - - it('repairs protocol mutations attached to a directly returned next promise', async () => { - const action = createAction() - action.mockReturnValue({ result: 'completed' }) - serverFnMocks.action = action - serverFnMocks.middleware = [ - createMiddleware().server(({ next }) => { - const pending = next() - void Promise.resolve(pending).then((result) => { - result.response.headers.set('content-type', 'text/plain') - result.response.headers.delete('x-tss-serialized') - result.response.headers.set('x-tss-raw', 'true') - appendResponseHeader('x-steps', 'after-next') - }) - return pending - }), - ] - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(response.headers.get('x-steps')).toBe('after-next') - expect(fromCrossJSON(await response.json(), {})).toEqual({ - result: 'completed', - }) - }) - - it('round-trips GET input without normalizing the original query encoding', async () => { - const data = { - spaces: 'one two three', - plus: 'one+two', - tilde: 'one~two', - unicode: 'Grüße 🌍', - percent: '100%', - } - const action = createAction() - action.mockImplementation((payload) => ({ - result: { data: payload.data, requestUrl: getRequestUrl().href }, - })) - serverFnMocks.action = action - const handler = createHandler() - let originalUrl = '' - - const result = await createClientRpc('test')({ - method: 'GET', - data, - fetch: async (input: string, init: RequestInit) => { - const url = new URL(input, 'http://localhost') - const payload = url.searchParams.get('payload')! - // Mix equivalent space encodings and retain literal ~. URLSearchParams - // serialization would canonicalize these even though decoding must not. - const encoded = encodeURIComponent(payload).replace('%20', '+') - const request = new Request( - `http://localhost/_serverFn/test?payload=${encoded}&space=a%20b+c&plus=%2b&tilde=~&unicode=%e2%98%83&percent=%25`, - init, - ) - originalUrl = request.url - return handler(request, {}) - }, - }) - - expect(action).toHaveBeenCalledOnce() - expect(action.mock.calls[0]?.[0].data).toEqual(data) - expect(result).toEqual({ result: { data, requestUrl: originalUrl } }) - }) - - it('does not execute the action when an async CSRF matcher allows an aborted request', async () => { - const controller = new AbortController() - const reason = new Error('Request disconnected') - let resolveMatcher!: (allowed: boolean) => void - let matcherStarted!: () => void - const started = new Promise((resolve) => { - matcherStarted = resolve - }) - const matching = new Promise((resolve) => { - resolveMatcher = resolve - }) - const matcher = vi.fn(() => { - matcherStarted() - return matching - }) - serverFnMocks.middleware = [createCsrfMiddleware({ origin: matcher })] - const action = createAction() - action.mockReturnValue({ result: 'must not execute' }) - serverFnMocks.action = action - - const pending = createHandler()( - createServerFunctionRequest('http://localhost/_serverFn/test', { - signal: controller.signal, - headers: { Origin: 'http://localhost' }, - }), - {}, - ) - const rejected = expect(pending).rejects.toBe(reason) - - try { - await started - expect(action).not.toHaveBeenCalled() - controller.abort(reason) - await rejected - resolveMatcher(true) - // Let the late matcher continuation attempt to enter the next middleware. - await new Promise((resolve) => setImmediate(resolve)) - - expect(matcher).toHaveBeenCalledOnce() - expect(action).not.toHaveBeenCalled() - } finally { - resolveMatcher(true) - } - }) - - it('preserves HTTP-style action error metadata', async () => { - const action = createAction() - const error = Object.assign(new Error('conflict'), { - status: 409, - statusText: 'Conflict', - headers: { 'x-error': 'yes' }, - }) - action.mockImplementation(() => { - throw error - }) - serverFnMocks.action = action - const handler = createHandler() - - const response = await handler(createServerFunctionRequest(), {}) - - expect(response.status).toBe(409) - expect(response.statusText).toBe('Conflict') - expect(response.headers.get('x-error')).toBe('yes') - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe('true') - }) - - it('does not copy upstream Response cause framing or cookies onto serialized errors', async () => { - const action = createAction() - serverFnMocks.middleware = [ - createMiddleware().server(() => { - throw new Error('upstream failed', { - cause: new Response('

upstream

', { - status: 502, - headers: { - 'content-encoding': 'gzip', - 'content-length': '999', - 'content-type': 'text/html', - 'set-cookie': 'upstream=1; Path=/', - 'x-upstream': 'yes', - }, - }), - }) - }), - ] - serverFnMocks.action = action - const handler = createHandler() - let response: Response | undefined - - const call = callClientServerFn(async (input, init) => { - response = await handler( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - return response - }) - - await expect(call).rejects.toThrow('upstream failed') - expect(action).not.toHaveBeenCalled() - expect(response!.status).toBe(502) - expect(response!.headers.get('x-upstream')).toBeNull() - expect(response!.headers.get('content-type')).toBe('application/json') - expect(response!.headers.get('content-encoding')).toBeNull() - expect(response!.headers.get('content-length')).toBeNull() - expect(response!.headers.getSetCookie()).toEqual([]) - }) - - describe('keeps Location off serialized replies', () => { - async function callWithResponse() { - let response: Response | undefined - const call = callClientServerFn(async (input, init) => { - response = await createHandler()( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - return response - }) - return { call, response: () => response! } - } - - it('for JSON results with a helper redirect status', async () => { - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(302) - setResponseHeader('location', '/elsewhere') - return { result: { ok: true } } - }) - serverFnMocks.action = action - - const { call, response } = await callWithResponse() - - await expect(call).resolves.toEqual({ ok: true }) - expect(response().status).toBe(302) - expect(response().headers.get('location')).toBeNull() - }) - - it('for framed results with a helper redirect status', async () => { - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(303) - setResponseHeader('location', '/elsewhere') - return { result: { stream: new RawStream(new ReadableStream()) } } - }) - serverFnMocks.action = action - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.headers.get('content-type')).toBe( - TSS_CONTENT_TYPE_FRAMED_VERSIONED, - ) - expect(response.headers.get('location')).toBeNull() - await response.body!.cancel() - }) - - it('for errors that carry a redirect status and Location', async () => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - serverFnMocks.action = createAction() - serverFnMocks.middleware = [ - createMiddleware().server(() => { - throw Object.assign(new Error('moved'), { - status: 302, - headers: { location: 'https://evil.example/' }, - }) - }), - ] - - try { - const { call, response } = await callWithResponse() - - await expect(call).rejects.toThrow('moved') - expect(response().headers.get('location')).toBeNull() - } finally { - consoleError.mockRestore() - } - }) - - it('for not-found envelopes', async () => { - serverFnMocks.action = createAction() - serverFnMocks.middleware = [ - createMiddleware().server(() => { - setResponseStatus(302) - setResponseHeader('location', '/helper') - throw notFound({ headers: { location: '/not-found' } }) - }), - ] - - const { call, response } = await callWithResponse() - - await expect(call).rejects.toSatisfy((value: unknown) => - isNotFound(value), - ) - expect(response().headers.get('location')).toBeNull() - }) - }) - - it('does not let a helper success status hide a request middleware crash', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - serverFnMocks.action = createAction() - serverFnMocks.middleware = [ - createMiddleware().server(() => { - setResponseStatus(201, 'Created') - throw new TypeError('middleware crashed') - }), - ] - let response: Response | undefined - - try { - await expect( - callClientServerFn(async (input, init) => { - response = await createHandler()( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - return response - }), - ).rejects.toThrow('middleware crashed') - expect(response!.status).toBe(500) - expect(response!.statusText).toBe('') - expect(consoleError).toHaveBeenCalledOnce() - } finally { - consoleError.mockRestore() - } - }) - - it('applies helper headers to serialized action errors', async () => { - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(500) - setResponseHeader('x-error-header', 'yes') - throw new Error('server function failed') - }) - serverFnMocks.action = action - const handler = createHandler() - - const response = await handler(createServerFunctionRequest(), {}) - - expect(response.status).toBe(500) - expect(response.headers.get('x-error-header')).toBe('yes') - expect(response.headers.get('x-tss-serialized')).toBe('true') - }) - - it('protects not-found transport headers from helper overrides', async () => { - const action = createAction() - action.mockImplementation(() => { - setResponseHeader('content-type', 'text/plain') - setResponseHeader('x-tss-serialized', 'true') - throw { isNotFound: true, data: 'missing' } - }) - serverFnMocks.action = action - const handler = createHandler() - - const response = await handler(createServerFunctionRequest(), {}) - - expect(response.status).toBe(404) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe(null) - await expect(response.json()).resolves.toEqual({ - isNotFound: true, - data: 'missing', - }) - }) - - it('preserves caller not-found headers and cookies while normalizing transport headers', async () => { - const cookies = [ - 'session=one; Path=/; Expires=Wed, 21 Oct 2030 07:28:00 GMT', - 'preferences=two; Path=/', - ] - const headers = new Headers({ - 'content-type': 'text/plain', - 'x-tss-serialized': 'true', - 'x-tss-raw': 'true', - 'x-not-found': 'preserved', - }) - for (const cookie of cookies) { - headers.append('set-cookie', cookie) - } - const originalHeaders = Array.from(headers) - const action = createAction() - action.mockImplementation(() => { - setResponseHeader('x-helper', 'also preserved') - throw notFound({ data: 'missing', headers }) - }) - serverFnMocks.action = action - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.status).toBe(404) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-serialized')).toBe(null) - expect(response.headers.get('x-tss-raw')).toBe(null) - expect(response.headers.get('x-not-found')).toBe('preserved') - expect(response.headers.get('x-helper')).toBe('also preserved') - expect(response.headers.getSetCookie()).toEqual(cookies) - expect(Array.from(headers)).toEqual(originalHeaders) - await expect(response.json()).resolves.toEqual({ - isNotFound: true, - data: 'missing', - }) - }) - - it('captures not-found headers before serializing data', async () => { - const headers = new Headers({ 'x-snapshot': 'original' }) - const action = createAction() - action.mockImplementation(() => { - throw notFound({ - headers, - data: { - toJSON() { - headers.set('x-snapshot', 'changed during serialization') - setResponseHeader('x-helper', 'written during serialization') - setResponseHeader('content-type', 'text/plain') - setResponseHeader('x-tss-raw', 'true') - return 'missing' - }, - }, - }) - }) - serverFnMocks.action = action - - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.status).toBe(404) - expect(response.headers.get('x-snapshot')).toBe('original') - expect(response.headers.get('x-helper')).toBe( - 'written during serialization', - ) - expect(response.headers.get('content-type')).toBe('application/json') - expect(response.headers.get('x-tss-raw')).toBeNull() - expect(headers.get('x-snapshot')).toBe('changed during serialization') - await expect(response.json()).resolves.toEqual({ - isNotFound: true, - data: 'missing', - }) - }) - - it.each([204, 205, 304])( - 'keeps serialized success bodies when a helper selects %s', - async (status) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(status) - return { result: { ok: true } } - }) - serverFnMocks.action = action - const handler = createHandler() - let response: Response | undefined - - try { - const result = await createClientRpc('test')({ - method: 'GET', - fetch: async (input: string, init: RequestInit) => { - response = await handler( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - return response - }, - }) - - expect(result).toEqual({ result: { ok: true } }) - expect(response!.status).toBe(200) - expect(response!.headers.get('x-tss-serialized')).toBe('true') - expect(warnSpy).toHaveBeenCalledOnce() - expect(warnSpy.mock.calls[0]![0]).toContain( - `setResponseStatus(${status})`, - ) - } finally { - warnSpy.mockRestore() - } - }, - ) - - it('applies a bodyless helper status to a raw Response result without a warning', async () => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(204) - return { result: new Response('raw body') } - }) - serverFnMocks.action = action - - try { - const response = await createHandler()(createServerFunctionRequest(), {}) - - expect(response.status).toBe(204) - expect(response.body).toBeNull() - expect(response.headers.get('x-tss-raw')).toBe('true') - expect(warnSpy).not.toHaveBeenCalled() - } finally { - warnSpy.mockRestore() - } - }) - - it.each([204, 205, 304])( - 'keeps serialized redirect and not-found envelopes when a helper selects %s', - async (status) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const fetchResponse = async (input: string, init: RequestInit) => - createHandler()( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - - try { - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(status) - throw redirect({ href: '/login' }) - }) - serverFnMocks.action = action - await expect( - createClientRpc('test')({ method: 'GET', fetch: fetchResponse }), - ).rejects.toSatisfy( - (value: unknown) => - isRedirect(value) && value.options.href === '/login', - ) - - serverFnMocks.middleware = [ - createMiddleware().server(() => { - setResponseStatus(status) - throw notFound({ data: 'missing' }) - }), - ] - await expect( - createClientRpc('test')({ method: 'GET', fetch: fetchResponse }), - ).rejects.toSatisfy((value: unknown) => isNotFound(value)) - } finally { - warnSpy.mockRestore() - } - }, - ) - - it('converts oversized GET payload errors', async () => { - const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}) - const action = createAction() - serverFnMocks.action = action - const handler = createHandler() - - try { - const response = await handler( - createServerFunctionRequest( - `http://localhost/_serverFn/test?payload=${'x'.repeat(1_000_001)}`, - ), - {}, - ) - - expect(response.status).toBe(500) - expect(response.headers.get('x-tss-serialized')).toBe('true') - expect(action).not.toHaveBeenCalled() - } finally { - consoleError.mockRestore() - } - }) - - it('falls back to default context for malformed FormData context', async () => { - let receivedContext: unknown - defineServerFn('POST', (({ context }: { context: unknown }) => { - receivedContext = context - return { ok: true } - }) as () => unknown) - const handler = createHandler() - const formData = new FormData() - formData.set(TSS_FORMDATA_CONTEXT, '{not json') - formData.set('field', 'value') - - const response = await handler( - createServerFunctionRequest('http://localhost/_serverFn/test', { - method: 'POST', - body: formData, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(receivedContext).toEqual({}) - }) - - it('streams RawStreams discovered after initial serialization', async () => { - const action = createAction() - action.mockImplementation(() => { - const stream = new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode('late')) - controller.close() - }, - }) - return { - result: { - stream: Promise.resolve(new RawStream(stream)), - }, - } - }) - serverFnMocks.action = action - const handler = createHandler() - - const response = await handler(createServerFunctionRequest(), {}) - const frames = await readFrames(response) - const chunkFrame = frames.find((frame) => frame.type === FRAME_TYPE_CHUNK) - - expect(response.headers.get('content-type')).toBe( - TSS_CONTENT_TYPE_FRAMED_VERSIONED, - ) - expect(frames.some((frame) => frame.type === FRAME_TYPE_JSON)).toBe(true) - expect(chunkFrame).toBeDefined() - expect(new TextDecoder().decode(chunkFrame?.payload)).toBe('late') - expect( - frames.some( - (frame) => - frame.type === FRAME_TYPE_END && - frame.streamId === chunkFrame?.streamId, - ), - ).toBe(true) - }) - - it.each([204, 205, 304])( - 'keeps serialized error bodies when a helper or the error selects %s', - async (status) => { - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - const fetchResponse = async (input: string, init: RequestInit) => { - const response = await createHandler()( - new Request(new URL(input, 'http://localhost'), init), - {}, - ) - expect(response.status).toBe(500) - return response - } - - try { - const action = createAction() - action.mockImplementation(() => { - setResponseStatus(status) - throw new Error('helper status error') - }) - serverFnMocks.action = action - await expect(callClientServerFn(fetchResponse)).rejects.toThrow( - 'helper status error', - ) - - action.mockImplementation(() => { - throw Object.assign(new Error('error status error'), { status }) - }) - await expect(callClientServerFn(fetchResponse)).rejects.toThrow( - 'error status error', - ) - } finally { - warnSpy.mockRestore() - consoleError.mockRestore() - } - }, - ) -}) - -describe('server function throws reach the caller', () => { - // Calls the server function from inside its own handler, as a nested - // server-side call would, and records how the inner call settled. - async function settleOnServer(throwInner: () => never) { - let outcome: { resolved?: unknown; rejected?: unknown } | undefined - let nested = false - const { call, onServer } = defineServerFn('POST', async () => { - if (nested) { - throwInner() - } - nested = true - outcome = await settle(onServer()) - return { ok: true } - }) - - await expect(call()).resolves.toEqual({ ok: true }) - return outcome! - } - - const falsyValues = [undefined, null, 0, '', false, Number.NaN, BigInt(0)] - - describe.each(['GET', 'POST'] as const)('falsy throws over %s', (method) => { - it.each(falsyValues)('rejects with a thrown %s', async (value) => { - const { call } = defineServerFn(method, () => { - throw value - }) - - const outcome = await settle(call()) - - expect(outcome).toHaveProperty('rejected') - expect(Object.is(outcome.rejected, value)).toBe(true) - }) - - it.each(falsyValues)( - 'rejects with %s thrown by function middleware and lets outer middleware catch it', - async (value) => { - let caught: { value: unknown } | undefined - const { call } = defineServerFn(method, () => ({ ok: true }), [ - createMiddleware({ type: 'function' }).server(async ({ next }) => { - try { - return await next() - } catch (error) { - caught = { value: error } - throw error - } - }), - createMiddleware({ type: 'function' }).server(() => { - throw value - }), - ]) - - const outcome = await settle(call()) - - expect(outcome).toHaveProperty('rejected') - expect(Object.is(outcome.rejected, value)).toBe(true) - expect(caught).toBeDefined() - expect(Object.is(caught!.value, value)).toBe(true) - }, - ) - - it('still resolves with a returned undefined', async () => { - const { call } = defineServerFn(method, () => undefined) - - await expect(call()).resolves.toBeUndefined() - }) - }) - - it.each(['GET', 'POST'] as const)( - 'ignores error and result keys a client adds to the %s payload', - async (method) => { - let received: unknown - defineServerFn(method, ((opts: { data: unknown }) => { - received = opts.data - return { ok: true } - }) as () => unknown) - const payload = JSON.stringify( - toJSON({ data: 'input', error: 'crafted', result: 'crafted' }), - ) - - const response = await createHandler()( - method === 'GET' - ? createServerFunctionRequest( - `http://localhost/_serverFn/test?payload=${encodeURIComponent(payload)}`, - ) - : createServerFunctionRequest('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'content-type': 'application/json' }, - body: payload, - }), - {}, - ) - - expect(response.status).toBe(200) - expect(received).toBe('input') - expect(await response.text()).not.toContain('crafted') - }, - ) - - it('rejects a server function received as data when its call fails', async () => { - let outcome: { resolved?: unknown; rejected?: unknown } | undefined - let nested = false - const receivedFn = ServerFunctionSerializationAdapter.fromSerializable({ - functionId: 'test', - }) as unknown as (opts: { data: unknown }) => Promise - const { call } = defineServerFn('POST', async () => { - if (nested) { - throw 0 - } - nested = true - outcome = await settle(receivedFn({ data: 1 })) - return { ok: true } - }) - - await expect(call()).resolves.toEqual({ ok: true }) - expect(outcome).toEqual({ rejected: 0 }) - }) - - it('rejects a server-side call with a thrown 0', async () => { - const outcome = await settleOnServer(() => { - throw 0 - }) - - expect(outcome).toEqual({ rejected: 0 }) - }) - describe.each(['GET', 'POST'] as const)( - 'thrown Responses over %s', - (method) => { - it('rejects with a thrown Response and keeps its status and body', async () => { - const { call, response } = defineServerFn(method, () => { - throw new Response('teapot', { status: 418 }) - }) - - const outcome = await settle(call()) - - expect(outcome.rejected).toBeInstanceOf(Response) - const thrown = outcome.rejected as Response - expect(thrown.status).toBe(418) - await expect(thrown.text()).resolves.toBe('teapot') - expect(response().status).toBe(418) - }) - - it('rejects with a Response thrown by function middleware', async () => { - const { call } = defineServerFn(method, () => ({ ok: true }), [ - createMiddleware({ type: 'function' }).server(() => { - throw Response.json({ denied: true }, { status: 403 }) - }), - ]) - - const outcome = await settle(call()) - - expect(outcome.rejected).toBeInstanceOf(Response) - const thrown = outcome.rejected as Response - expect(thrown.status).toBe(403) - await expect(thrown.json()).resolves.toEqual({ denied: true }) - }) - - it('still resolves with a returned Response', async () => { - const { call } = defineServerFn( - method, - () => new Response('returned', { status: 202 }), - ) - - const outcome = await settle(call()) - - expect(outcome.resolved).toBeInstanceOf(Response) - const returned = outcome.resolved as Response - expect(returned.status).toBe(202) - await expect(returned.text()).resolves.toBe('returned') - }) - }, - ) - - it('rejects a server-side call with a thrown Response', async () => { - const outcome = await settleOnServer(() => { - throw new Response('server-side', { status: 409 }) - }) - - expect(outcome.rejected).toBeInstanceOf(Response) - expect((outcome.rejected as Response).status).toBe(409) - }) - describe('from global request middleware', () => { - function throwFromRequestMiddleware(value: unknown) { - serverFnMocks.middleware = [ - createMiddleware().server(() => { - throw value - }), - ] - return defineServerFn('POST', () => ({ handler: 'ran' })) - } - - it.each([ - ['a string', 'boom'], - ['a plain object', { code: 'E_DENIED' }], - ['an object shaped like a result', { result: 'looks-like-success' }], - ['an object shaped like an error envelope', { error: 'inner' }], - ['zero', 0], - ['undefined', undefined], - ])('rejects with %s', async (_, value) => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - try { - const { call, response } = throwFromRequestMiddleware(value) - - const outcome = await settle(call()) - - expect(outcome).toHaveProperty('rejected') - expect(outcome.rejected).toEqual(value) - expect(response().status).toBe(500) - expect(response().headers.get('x-tss-serialized')).toBe('true') - } finally { - consoleError.mockRestore() - } - }) - - it('rejects with the serialization error for a value that cannot be sent', async () => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - try { - const { call, response } = throwFromRequestMiddleware({ - notSerializable: () => 1, - }) - - const outcome = await settle(call()) - - expect(outcome.rejected).toBeInstanceOf(Error) - expect(response().status).toBe(500) - expect(response().headers.get('x-tss-serialized')).toBe('true') - } finally { - consoleError.mockRestore() - } - }) - - it('re-sends the reply of next() when request middleware throws it', async () => { - serverFnMocks.middleware = [ - createMiddleware().server(async ({ next }) => { - const result = await next() - throw result.response - }), - ] - const { call } = defineServerFn('POST', () => ({ handler: 'ran' })) - - await expect(call()).resolves.toEqual({ handler: 'ran' }) - }) - - it('rejects with an Error and keeps its message', async () => { - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - try { - const { call } = throwFromRequestMiddleware(new Error('denied')) - - await expect(call()).rejects.toThrow('denied') - } finally { - consoleError.mockRestore() - } - }) - - it.each([ - ['text', () => new Response('nope', { status: 403 })], - ['JSON', () => Response.json({ nope: true }, { status: 403 })], - ])('rejects with a thrown %s Response', async (_, createResponse) => { - const { call, response } = throwFromRequestMiddleware(createResponse()) - - const outcome = await settle(call()) - - expect(outcome.rejected).toBeInstanceOf(Response) - expect((outcome.rejected as Response).status).toBe(403) - expect(response().status).toBe(403) - }) - }) -}) - -describe('function middleware', () => { - it('passes data and context between client middleware, server middleware and the handler', async () => { - let clientContext: unknown - let serverResult: unknown - const { call } = defineServerFn( - 'POST', - (({ data, context }: { data: unknown; context: object }) => ({ - data, - context: { ...context }, - })) as () => unknown, - [ - createMiddleware({ type: 'function' }) - .validator((data: number) => data + 1) - .client(async ({ next }) => { - const result = await next({ - context: { local: 'client' }, - sendContext: { sent: 'client' }, - }) - clientContext = { ...result.context } - return result - }) - .server(async ({ next }) => { - const result = await next({ - context: { added: 'server' }, - sendContext: { sent: 'server' }, - }) - serverResult = { - context: { ...result.context }, - sendContext: { ...result.sendContext }, - } - return result - }), - ], - ) - - await expect(call(1)).resolves.toEqual({ - data: 2, - context: { sent: 'client', added: 'server' }, - }) - expect(serverResult).toEqual({ - context: { sent: 'client', added: 'server' }, - sendContext: { sent: 'server' }, - }) - expect(clientContext).toEqual({ local: 'client', sent: 'server' }) - }) - - it.each([ - ['leaves out context without sendContext', [], { result: 'ok' }], - [ - 'sends back sendContext as context', - [ - createMiddleware({ type: 'function' }).server(({ next }) => - next({ sendContext: { sent: 'server' } }), - ), - ], - { result: 'ok', context: { sent: 'server' } }, - ], - ])('%s in a reply', async (_, middleware, reply) => { - defineServerFn('POST', () => 'ok', middleware) - - const response = await createHandler()( - createServerFunctionRequest('http://localhost/_serverFn/test', { - method: 'POST', - headers: { 'content-type': 'application/json' }, - body: JSON.stringify(toJSON({ data: 'input' })), - }), - {}, - ) - - const received = fromCrossJSON(await response.json(), {}) - expect(Object.keys(received)).toEqual(Object.keys(reply)) - expect(received).toEqual(reply) - }) - - it('runs the validator of middleware that has no server function', async () => { - const { call } = defineServerFn( - 'POST', - (({ data }: { data: unknown }) => data) as () => unknown, - [ - createMiddleware({ type: 'function' }) - .validator((data: number) => data * 10) - .client(({ next }) => next()), - ], - ) - - await expect(call(2)).resolves.toBe(20) - }) - - it('skips middleware that already ran as request middleware', async () => { - const runs: Array = [] - const shared = createMiddleware().server(({ next }) => { - runs.push('shared') - return next() - }) - serverFnMocks.middleware = [shared] - const { call } = defineServerFn('POST', () => 'ok', [ - shared as unknown as AnyFunctionMiddleware, - createMiddleware({ type: 'function' }) - .middleware([shared]) - .server(({ next }) => { - runs.push('function') - return next() - }), - ]) - - await expect(call()).resolves.toBe('ok') - expect(runs).toEqual(['shared', 'function']) - }) - - it('resolves with a Response that server middleware returns', async () => { - const handler = vi.fn(() => 'unused') - const { call } = defineServerFn('POST', handler, [ - createMiddleware({ type: 'function' }).server(async ({ next }) => next()), - createMiddleware({ type: 'function' }).server( - (() => new Response('from middleware', { status: 202 })) as never, - ), - ]) - - const outcome = await settle(call()) - - expect(outcome.resolved).toBeInstanceOf(Response) - const returned = outcome.resolved as Response - expect(returned.status).toBe(202) - await expect(returned.text()).resolves.toBe('from middleware') - expect(handler).not.toHaveBeenCalled() - }) - - it('rejects with a redirect that server middleware returns', async () => { - let caught: unknown - const { call } = defineServerFn('POST', () => 'unused', [ - createMiddleware({ type: 'function' }).server(async ({ next }) => { - try { - return await next() - } catch (error) { - caught = error - throw error - } - }), - createMiddleware({ type: 'function' }).server((() => - redirect({ href: '/login' })) as never), - ]) - - const outcome = await settle(call()) - - expect(isRedirect(caught)).toBe(true) - expect(outcome.rejected).toSatisfy( - (value: unknown) => isRedirect(value) && value.options.href === '/login', - ) - }) - - it('lets outer middleware recover from a failure in inner middleware', async () => { - const { call } = defineServerFn('POST', () => 'unused', [ - createMiddleware({ type: 'function' }).server((async ({ - next, - }: { - next: () => Promise - }) => { - try { - return await next() - } catch (error) { - return { result: `recovered from ${(error as Error).message}` } - } - }) as never), - createMiddleware({ type: 'function' }).server(() => { - throw new Error('inner') - }), - ]) - - await expect(call()).resolves.toBe('recovered from inner') - }) - - it('resolves with the handler result even when middleware passed a result to next()', async () => { - const { call } = defineServerFn('POST', () => undefined, [ - createMiddleware({ type: 'function' }).server(({ next }) => - next({ result: 'from middleware' } as never), - ), - ]) - - await expect(call()).resolves.toBeUndefined() - }) - - it('rejects when server middleware returns undefined', async () => { - const { call } = defineServerFn('POST', () => 'unused', [ - createMiddleware({ type: 'function' }).server((() => undefined) as never), - ]) - - await expect(call()).rejects.toThrow( - 'User middleware returned undefined. You must call next() or return a result in your middlewares.', - ) - }) -}) diff --git a/packages/start-server-core/tsconfig.json b/packages/start-server-core/tsconfig.json index b142331a03..ac28a482bf 100644 --- a/packages/start-server-core/tsconfig.json +++ b/packages/start-server-core/tsconfig.json @@ -9,7 +9,6 @@ "src", "tests", "vite.config.ts", - "vitest.bench.config.ts", "../start-client-core/src/start-entry.d.ts" ] } diff --git a/packages/start-server-core/vite.config.ts b/packages/start-server-core/vite.config.ts index 09e3bf9539..350b03176f 100644 --- a/packages/start-server-core/vite.config.ts +++ b/packages/start-server-core/vite.config.ts @@ -24,12 +24,6 @@ const fakeRouterEntry = fileURLToPath( const fakeStartManifest = fileURLToPath( new URL('./tests/fixtures/start-manifest.ts', import.meta.url), ) -const fakePluginAdapters = fileURLToPath( - new URL('./src/empty-plugin-adapters.ts', import.meta.url), -) -const fakeServerFnResolver = fileURLToPath( - new URL('./src/fake-start-server-fn-resolver.ts', import.meta.url), -) export default mergeConfig( config, @@ -42,13 +36,11 @@ export default mergeConfig( './src/createServerRpc.ts', './src/createSsrRpc.ts', './src/request-response.ts', - './src/constants.ts', - './src/virtual-modules.ts', './src/fake-start-server-fn-resolver.ts', + './src/default-server-fn-dispatch.ts', './src/empty-plugin-adapters.ts', ], externalDeps: [ - 'cookie-es', ...Object.values(VIRTUAL_MODULES), '#tanstack-start-entry', '#tanstack-router-entry', @@ -62,8 +54,6 @@ export default mergeConfig( alias: { '#tanstack-start-entry': fakeStartEntry, '#tanstack-router-entry': fakeRouterEntry, - '#tanstack-start-plugin-adapters': fakePluginAdapters, - '#tanstack-start-server-fn-resolver': fakeServerFnResolver, 'tanstack-start-manifest:v': fakeStartManifest, }, }, diff --git a/packages/start-server-core/vitest.bench.config.ts b/packages/start-server-core/vitest.bench.config.ts deleted file mode 100644 index e3152437cc..0000000000 --- a/packages/start-server-core/vitest.bench.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig, mergeConfig } from 'vitest/config' -import { cpuSimulationExecArgv } from '../../benchmarks/cpu-simulation' -import config from './vite.config' - -export default mergeConfig( - config, - defineConfig({ - test: { - environment: 'node', - execArgv: cpuSimulationExecArgv(), - fileParallelism: false, - benchmark: { - include: ['tests/response-reconciliation.bench.ts'], - }, - }, - }), -) diff --git a/packages/start-static-server-functions/CHANGELOG.md b/packages/start-static-server-functions/CHANGELOG.md index 9e64280e30..1191099aa4 100644 --- a/packages/start-static-server-functions/CHANGELOG.md +++ b/packages/start-static-server-functions/CHANGELOG.md @@ -1,263 +1,5 @@ # @tanstack/start-static-server-functions -## 1.167.44 - -### Patch Changes - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/react-start@1.169.4 - - @tanstack/solid-start@1.169.4 - - @tanstack/start-client-core@1.170.39 - -## 1.167.43 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.38 - - @tanstack/react-start@1.169.3 - - @tanstack/solid-start@1.169.3 - -## 1.167.42 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/react-start@1.169.1 - - @tanstack/solid-start@1.169.1 - - @tanstack/start-client-core@1.170.37 - -## 1.167.41 - -### Patch Changes - -- Updated dependencies [[`550f478`](https://github.com/TanStack/router/commit/550f47881070c0558a87e1acce7f38fbc85b9549), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`f243c61`](https://github.com/TanStack/router/commit/f243c61e95dae64fe04da4499c0c4ec44f26abae), [`f243c61`](https://github.com/TanStack/router/commit/f243c61e95dae64fe04da4499c0c4ec44f26abae)]: - - @tanstack/start-client-core@1.170.36 - - @tanstack/react-start@1.169.0 - - @tanstack/solid-start@1.169.0 - -## 1.167.40 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.35 - - @tanstack/react-start@1.168.61 - - @tanstack/solid-start@1.168.58 - -## 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 - -- [#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 - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.32 - - @tanstack/react-start@1.168.56 - - @tanstack/solid-start@1.168.54 - -## 1.167.36 - -### Patch Changes - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26)]: - - @tanstack/start-client-core@1.170.31 - - @tanstack/react-start@1.168.55 - - @tanstack/solid-start@1.168.53 - -## 1.167.35 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.30 - - @tanstack/react-start@1.168.53 - - @tanstack/solid-start@1.168.51 - -## 1.167.34 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.29 - - @tanstack/react-start@1.168.51 - - @tanstack/solid-start@1.168.49 - -## 1.167.33 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.28 - - @tanstack/react-start@1.168.50 - - @tanstack/solid-start@1.168.48 - -## 1.167.32 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.27 - - @tanstack/solid-start@1.168.47 - - @tanstack/react-start@1.168.49 - -## 1.167.31 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.26 - - @tanstack/react-start@1.168.48 - - @tanstack/solid-start@1.168.46 - -## 1.167.30 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/react-start@1.168.47 - - @tanstack/solid-start@1.168.45 - - @tanstack/start-client-core@1.170.25 - -## 1.167.29 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.24 - - @tanstack/react-start@1.168.46 - - @tanstack/solid-start@1.168.44 - -## 1.167.28 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/react-start@1.168.45 - - @tanstack/start-client-core@1.170.23 - - @tanstack/solid-start@1.168.43 - -## 1.167.27 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.22 - - @tanstack/react-start@1.168.43 - - @tanstack/solid-start@1.168.42 - -## 1.167.26 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.21 - - @tanstack/react-start@1.168.42 - - @tanstack/solid-start@1.168.41 - -## 1.167.25 - -### Patch Changes - -- Updated dependencies [[`c59788c`](https://github.com/TanStack/router/commit/c59788ca20f2d2e7f264a859ebe01b7646ba3154)]: - - @tanstack/start-client-core@1.170.20 - - @tanstack/react-start@1.168.41 - - @tanstack/solid-start@1.168.40 - -## 1.167.24 - -### Patch Changes - -- Updated dependencies [[`2fbc99f`](https://github.com/TanStack/router/commit/2fbc99f2c262b057cb957e6ebba1ee073c655186), [`6bede65`](https://github.com/TanStack/router/commit/6bede65d7074dcd83455151b66b4574268bc782c)]: - - @tanstack/start-client-core@1.170.19 - - @tanstack/react-start@1.168.40 - - @tanstack/solid-start@1.168.39 - -## 1.167.23 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/react-start@1.168.39 - - @tanstack/start-client-core@1.170.18 - - @tanstack/solid-start@1.168.38 - -## 1.167.22 - -### Patch Changes - -- Updated dependencies [[`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b)]: - - @tanstack/start-client-core@1.170.17 - - @tanstack/react-start@1.168.38 - - @tanstack/solid-start@1.168.37 - -## 1.167.21 - -### Patch Changes - -- [#7962](https://github.com/TanStack/router/pull/7962) [`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5) - Update Seroval dependencies to version 1.6.2. - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/start-client-core@1.170.16 - - @tanstack/react-start@1.168.37 - - @tanstack/solid-start@1.168.36 - -## 1.167.20 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.15 - - @tanstack/react-start@1.168.36 - - @tanstack/solid-start@1.168.35 - -## 1.167.19 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.14 - - @tanstack/react-start@1.168.28 - - @tanstack/solid-start@1.168.28 - ## 1.167.18 ### Patch Changes diff --git a/packages/start-static-server-functions/package.json b/packages/start-static-server-functions/package.json index 603d7524fb..61196bffdf 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.44", + "version": "1.167.18", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -30,12 +30,12 @@ "test:unit:dev": "vitest --watch", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -60,17 +60,11 @@ }, "dependencies": { "@tanstack/start-client-core": "workspace:*", - "seroval": "^1.6.7" + "seroval": "^1.5.4" }, "devDependencies": { "vite": "*", - "@types/node": ">=20", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@types/node": ">=20" }, "peerDependencies": { "@tanstack/react-start": "workspace:^", diff --git a/packages/start-static-server-functions/src/staticFunctionMiddleware.ts b/packages/start-static-server-functions/src/staticFunctionMiddleware.ts index ff20ab1ba2..e6681fce1d 100644 --- a/packages/start-static-server-functions/src/staticFunctionMiddleware.ts +++ b/packages/start-static-server-functions/src/staticFunctionMiddleware.ts @@ -2,9 +2,7 @@ import fs from 'node:fs/promises' import path from 'node:path' import { createMiddleware, - defaultSerovalDeserializerPlugins, getDefaultSerovalPlugins, - getSerovalPlugins, } from '@tanstack/start-client-core' import { fromJSON, toJSONAsync } from 'seroval' @@ -71,6 +69,9 @@ const jsonToFilenameSafeString = (json: any) => { .replace(/\s+/g, '_') // Optionally replace whitespace with underscores } +const staticClientCache = + typeof document !== 'undefined' ? new Map() : null + async function addItemToCache({ functionId, data, @@ -80,25 +81,27 @@ async function addItemToCache({ data: any response: StaticCachedResult }): Promise { - const hash = jsonToFilenameSafeString(data) - const url = await getStaticCacheUrl({ functionId, hash }) - const clientUrl = process.env.TSS_CLIENT_OUTPUT_DIR! - const filePath = path.join(clientUrl, url) + { + const hash = jsonToFilenameSafeString(data) + const url = await getStaticCacheUrl({ functionId, hash }) + const clientUrl = process.env.TSS_CLIENT_OUTPUT_DIR! + const filePath = path.join(clientUrl, url) - // Ensure the directory exists - await fs.mkdir(path.dirname(filePath), { recursive: true }) + // Ensure the directory exists + await fs.mkdir(path.dirname(filePath), { recursive: true }) - // Store the result with fs - const stringifiedResult = JSON.stringify( - await toJSONAsync( - { - result: response.result, - context: response.context.sendContext, - }, - { plugins: getDefaultSerovalPlugins() }, - ), - ) - await fs.writeFile(filePath, stringifiedResult, 'utf-8') + // Store the result with fs + const stringifiedResult = JSON.stringify( + await toJSONAsync( + { + result: response.result, + context: response.context.sendContext, + }, + { plugins: getDefaultSerovalPlugins() }, + ), + ) + await fs.writeFile(filePath, stringifiedResult, 'utf-8') + } } const fetchItem = async ({ @@ -111,16 +114,15 @@ const fetchItem = async ({ const hash = jsonToFilenameSafeString(data) const url = await getStaticCacheUrl({ functionId, hash }) - return fetch(url, { + let result: any = staticClientCache?.get(url) + + result = await fetch(url, { method: 'GET', }) .then((r) => r.json()) - .then((d) => - fromJSON(d, { - // Cached responses may carry RawStream nodes. - plugins: getSerovalPlugins(defaultSerovalDeserializerPlugins), - }), - ) + .then((d) => fromJSON(d, { plugins: getDefaultSerovalPlugins() })) + + return result } export const staticFunctionMiddleware = createMiddleware({ type: 'function' }) diff --git a/packages/start-static-server-functions/tsconfig.json b/packages/start-static-server-functions/tsconfig.json index 8542a25320..c1b13c11d7 100644 --- a/packages/start-static-server-functions/tsconfig.json +++ b/packages/start-static-server-functions/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "esnext", "types": ["node"] }, diff --git a/packages/start-storage-context/CHANGELOG.md b/packages/start-storage-context/CHANGELOG.md index c8669ed975..0d28073b4f 100644 --- a/packages/start-storage-context/CHANGELOG.md +++ b/packages/start-storage-context/CHANGELOG.md @@ -1,186 +1,5 @@ # @tanstack/start-storage-context -## 1.167.41 - -### Patch Changes - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - -## 1.167.40 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - -## 1.167.39 - -### Patch Changes - -- [#8451](https://github.com/TanStack/router/pull/8451) [`740b0ce`](https://github.com/TanStack/router/commit/740b0ce17737d1f7398740136acdbeabe80df7d8) - Skip request middleware bookkeeping when no request middleware is configured, and stop copying serialization adapters when the router adds none. - - Server route handlers and route middleware now receive the router's decoded pathname, the same one used for route matching. Characters that would change how the path is read, such as `%2F`, `%3F`, and `%23`, stay encoded. - -- Updated dependencies [[`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/router-core@1.171.37 - -## 1.167.38 - -### Patch Changes - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Reduce per-request work in Start: `getNormalizedURL` reads a `URL` input without cloning it, and `runWithStartContext` returns the callback's own result instead of wrapping it in a promise, so a synchronous throw from the callback now propagates synchronously. - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - -## 1.167.37 - -### Patch Changes - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/router-core@1.171.35 - -## 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 - -- 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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - -## 1.167.33 - -### Patch Changes - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - -## 1.167.32 - -### Patch Changes - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - -## 1.167.31 - -### Patch Changes - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - -## 1.167.30 - -### Patch Changes - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - -## 1.167.29 - -### Patch Changes - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - -## 1.167.28 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - -## 1.167.27 - -### Patch Changes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - -## 1.167.26 - -### Patch Changes - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - -## 1.167.25 - -### Patch Changes - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90)]: - - @tanstack/router-core@1.171.23 - -## 1.167.24 - -### Patch Changes - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13)]: - - @tanstack/router-core@1.171.22 - -## 1.167.23 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - -## 1.167.22 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - -## 1.167.21 - -### Patch Changes - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - -## 1.167.20 - -### Patch Changes - -- Updated dependencies [[`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/router-core@1.171.18 - -## 1.167.19 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - -## 1.167.18 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - -## 1.167.17 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - ## 1.167.16 ### Patch Changes diff --git a/packages/start-storage-context/package.json b/packages/start-storage-context/package.json index 083facb749..0fa3359847 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.41", + "version": "1.167.16", "description": "Modern and scalable routing for React applications", "author": "Tanner Linsley", "license": "MIT", @@ -30,12 +30,12 @@ "test:unit:dev": "vitest --watch", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -63,12 +63,6 @@ }, "devDependencies": { "vite": "*", - "@types/node": ">=20", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@types/node": ">=20" } } diff --git a/packages/start-storage-context/src/async-local-storage.ts b/packages/start-storage-context/src/async-local-storage.ts index bbde704629..21aabd6cdf 100644 --- a/packages/start-storage-context/src/async-local-storage.ts +++ b/packages/start-storage-context/src/async-local-storage.ts @@ -16,7 +16,7 @@ export interface StartStorageContext { contextAfterGlobalMiddlewares: any // Track middlewares that have already executed in the request phase // to prevent duplicate execution - executedRequestMiddlewares?: Set + executedRequestMiddlewares: Set // Type of handler processing this request handlerType: StartHandlerType @@ -42,10 +42,10 @@ if (!globalObj[GLOBAL_STORAGE_KEY]) { const startStorage = globalObj[GLOBAL_STORAGE_KEY] -export function runWithStartContext( +export async function runWithStartContext( context: StartStorageContext, - fn: () => T, -): T { + fn: () => T | Promise, +): Promise { return startStorage.run(context, fn) } diff --git a/packages/start-storage-context/tsconfig.json b/packages/start-storage-context/tsconfig.json index 8542a25320..c1b13c11d7 100644 --- a/packages/start-storage-context/tsconfig.json +++ b/packages/start-storage-context/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", - "jsxImportSource": "solid-js", + "jsxImportSource": "@solidjs/web", "module": "esnext", "types": ["node"] }, diff --git a/packages/valibot-adapter/package.json b/packages/valibot-adapter/package.json index f59bec55a4..a1831967a3 100644 --- a/packages/valibot-adapter/package.json +++ b/packages/valibot-adapter/package.json @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", @@ -64,21 +64,13 @@ "node": ">=20.19" }, "devDependencies": { - "@testing-library/jest-dom": "catalog:", - "@testing-library/react": "catalog:", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.2.0", "@tanstack/react-router": "workspace:*", "valibot": "1.0.0-beta.15", - "react": "catalog:", - "react-dom": "catalog:", - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "react": "^19.0.0", + "react-dom": "^19.0.0", + "vite": "*" }, "peerDependencies": { "valibot": "^1.0.0 || ^1.0.0-beta.5 || ^1.0.0-rc", diff --git a/packages/valibot-adapter/tests/index.test.tsx b/packages/valibot-adapter/tests/index.test.tsx index b59c29d075..327de3093e 100644 --- a/packages/valibot-adapter/tests/index.test.tsx +++ b/packages/valibot-adapter/tests/index.test.tsx @@ -9,6 +9,7 @@ import { import { cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, test, vi } from 'vitest' import { valibotValidator } from '../src' +import '@testing-library/jest-dom/vitest' afterEach(() => { vi.resetAllMocks() diff --git a/packages/valibot-adapter/tests/jest-dom.setup.ts b/packages/valibot-adapter/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/packages/valibot-adapter/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/packages/valibot-adapter/vite.config.ts b/packages/valibot-adapter/vite.config.ts index 8d553e0a59..8c8c0c519f 100644 --- a/packages/valibot-adapter/vite.config.ts +++ b/packages/valibot-adapter/vite.config.ts @@ -9,7 +9,6 @@ const config = defineConfig({ watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts'], }, }) diff --git a/packages/virtual-file-routes/package.json b/packages/virtual-file-routes/package.json index 5d682e1db2..af2a4d8d30 100644 --- a/packages/virtual-file-routes/package.json +++ b/packages/virtual-file-routes/package.json @@ -58,12 +58,6 @@ "node": ">=20.19" }, "devDependencies": { - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vite": "*" } } diff --git a/packages/virtual-file-routes/skills/_artifacts/domain_map.yaml b/packages/virtual-file-routes/skills/_artifacts/domain_map.yaml index 0841238c5e..db82f87ec0 100644 --- a/packages/virtual-file-routes/skills/_artifacts/domain_map.yaml +++ b/packages/virtual-file-routes/skills/_artifacts/domain_map.yaml @@ -1,12 +1,12 @@ # domain_map.yaml # Library: @tanstack/virtual-file-routes -# Version: 1.162.0 +# Version: 1.161.4 # Date: 2026-03-08 # Status: reviewed library: name: '@tanstack/virtual-file-routes' - version: '1.162.0' + version: '1.161.4' repository: 'https://github.com/TanStack/router' description: >- Programmatic route tree building as an alternative to filesystem @@ -63,11 +63,4 @@ skills: priority: MEDIUM status: active - - mistake: 'Creating duplicate effective paths or physical mounts' - mechanism: >- - Virtual nodes and mounted physical subtrees can resolve to the same - path or ID. Regenerate and inspect the full tree after every refactor. - priority: HIGH - status: active - gaps: [] diff --git a/packages/virtual-file-routes/skills/_artifacts/skill_spec.md b/packages/virtual-file-routes/skills/_artifacts/skill_spec.md index 02f2942727..834294f8f6 100644 --- a/packages/virtual-file-routes/skills/_artifacts/skill_spec.md +++ b/packages/virtual-file-routes/skills/_artifacts/skill_spec.md @@ -12,14 +12,13 @@ Programmatic route tree building as an alternative to filesystem conventions. Pr | Skill | Type | Domain | What it covers | Failure modes | | ------------------- | ---- | -------------------- | ---------------------------------------------------------- | ------------- | -| virtual-file-routes | core | virtual-route-config | rootRoute, index, route, layout, physical, subtree configs | 3 | +| virtual-file-routes | core | virtual-route-config | rootRoute, index, route, layout, physical, subtree configs | 2 | ## Failure Mode Inventory -### virtual-file-routes (3 failure modes) +### virtual-file-routes (2 failure modes) -| # | Mistake | Priority | Source | -| --- | -------------------------------------------- | -------- | ----------------- | -| 1 | Forgetting rootRoute wrapper | HIGH | source/docs | -| 2 | Using physical() path outside routesDir | MEDIUM | source/docs | -| 3 | Creating duplicate effective paths or mounts | HIGH | consistency audit | +| # | Mistake | Priority | Source | +| --- | --------------------------------------- | -------- | ----------- | +| 1 | Forgetting rootRoute wrapper | HIGH | source/docs | +| 2 | Using physical() path outside routesDir | MEDIUM | source/docs | diff --git a/packages/virtual-file-routes/skills/_artifacts/skill_tree.yaml b/packages/virtual-file-routes/skills/_artifacts/skill_tree.yaml index 7d8b510ca9..f615e46c8f 100644 --- a/packages/virtual-file-routes/skills/_artifacts/skill_tree.yaml +++ b/packages/virtual-file-routes/skills/_artifacts/skill_tree.yaml @@ -1,6 +1,6 @@ library: name: '@tanstack/virtual-file-routes' - version: '1.162.0' + version: '1.161.4' repository: 'https://github.com/TanStack/router' description: >- Programmatic route tree building as an alternative to filesystem diff --git a/packages/virtual-file-routes/skills/virtual-file-routes/SKILL.md b/packages/virtual-file-routes/skills/virtual-file-routes/SKILL.md index 8e2c497fa2..093d73c0ba 100644 --- a/packages/virtual-file-routes/skills/virtual-file-routes/SKILL.md +++ b/packages/virtual-file-routes/skills/virtual-file-routes/SKILL.md @@ -5,10 +5,9 @@ description: >- conventions: rootRoute, index, route, layout, physical, defineVirtualSubtreeConfig. Use with TanStack Router plugin's virtualRouteConfig option. -metadata: - type: core - library: tanstack-router - library_version: '1.162.0' +type: core +library: tanstack-router +library_version: '1.161.4' sources: - TanStack/router:packages/virtual-file-routes/src - TanStack/router:docs/router/routing/virtual-file-routes.md @@ -18,8 +17,6 @@ sources: Build route trees programmatically instead of relying on filesystem conventions. Useful when you want explicit control over route structure, need to mix virtual and physical routes, or want to define route subtrees within file-based routing directories. -Use this skill only when the project config contains `virtualRouteConfig`, a virtual route config file, or `__virtual.ts`. Ordinary file-route changes belong to Router Core and the Router Plugin. - > **CRITICAL**: Types are FULLY INFERRED. Never cast, never annotate inferred values. ## Install @@ -219,13 +216,3 @@ layout('dashboardLayout.tsx', [route('/dashboard', 'dashboard.tsx')]) // The URL is /dashboard, and dashboardLayout.tsx wraps it ``` - -## Refactor Audit - -After changing a virtual tree: - -1. Confirm there is exactly one `rootRoute` and that every referenced file exists relative to `routesDirectory`. -2. Check each `route`, `layout`, and `physical` node for duplicate effective paths or IDs. -3. Confirm each `physical()` directory is mounted once at the intended path prefix and does not overlap a virtual child. -4. Regenerate `routeTree.gen.ts` and inspect parentage, full paths, and imports. Do not edit generated output. -5. Update links, redirects, params, and `from` narrowing, then run generator tests, type tests, and a production build. diff --git a/packages/vue-router-devtools/CHANGELOG.md b/packages/vue-router-devtools/CHANGELOG.md index ff72e56c32..2c444eeaa3 100644 --- a/packages/vue-router-devtools/CHANGELOG.md +++ b/packages/vue-router-devtools/CHANGELOG.md @@ -1,30 +1,5 @@ # @tanstack/vue-router-devtools -## 1.167.3 - -### Patch Changes - -- Updated dependencies [[`bbf9b75`](https://github.com/TanStack/router/commit/bbf9b75808d8eee497a6dd1663f0cf08426512e0)]: - - @tanstack/router-devtools-core@1.168.3 - -## 1.167.2 - -### Patch Changes - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`cb8749e`](https://github.com/TanStack/router/commit/cb8749e9fcd32d2290bf6c957b2701c3c0a14da5), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/vue-router@1.170.33 - - @tanstack/router-devtools-core@1.168.2 - -## 1.167.1 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - - @tanstack/vue-router@1.170.18 - - @tanstack/router-devtools-core@1.168.1 - ## 1.167.0 ### Minor Changes diff --git a/packages/vue-router-devtools/README.md b/packages/vue-router-devtools/README.md index 4ee1f0f38b..f88118caa5 100644 --- a/packages/vue-router-devtools/README.md +++ b/packages/vue-router-devtools/README.md @@ -1,22 +1,5 @@ -
- - - - TanStack Vue Router - -
# TanStack Vue Router Devtools See https://tanstack.com/router/latest/docs/framework/vue/devtools diff --git a/packages/vue-router-devtools/package.json b/packages/vue-router-devtools/package.json index 411dd289be..7bfd075319 100644 --- a/packages/vue-router-devtools/package.json +++ b/packages/vue-router-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-router-devtools", - "version": "1.167.3", + "version": "1.167.0", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -61,14 +61,9 @@ "vite": "*" }, "devDependencies": { - "@vitejs/plugin-vue-jsx": "catalog:", - "vue": "catalog:", - "@types/node": ">=20", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "@vitejs/plugin-vue-jsx": "^4.1.2", + "vue": "^3.5.13", + "@types/node": ">=20" }, "peerDependencies": { "@tanstack/vue-router": "workspace:^", diff --git a/packages/vue-router-ssr-query/CHANGELOG.md b/packages/vue-router-ssr-query/CHANGELOG.md index a85b193dd8..0d063edf7e 100644 --- a/packages/vue-router-ssr-query/CHANGELOG.md +++ b/packages/vue-router-ssr-query/CHANGELOG.md @@ -1,39 +1,5 @@ # @tanstack/vue-router-ssr-query -## 1.167.3 - -### Patch Changes - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26)]: - - @tanstack/router-ssr-query-core@1.169.3 - -## 1.167.2 - -### Patch Changes - -- Updated dependencies [[`79e3533`](https://github.com/TanStack/router/commit/79e35335b4bb1c3b5e2275a8df5181aa05036628)]: - - @tanstack/router-ssr-query-core@1.169.2 - ## 1.167.1 ### Patch Changes diff --git a/packages/vue-router-ssr-query/README.md b/packages/vue-router-ssr-query/README.md index 8629d6abf3..a0c0b4928c 100644 --- a/packages/vue-router-ssr-query/README.md +++ b/packages/vue-router-ssr-query/README.md @@ -1,20 +1,3 @@ -
- - - - TanStack Vue Router - -
# @tanstack/vue-router-ssr-query SSR Query integration for TanStack Vue Router. diff --git a/packages/vue-router-ssr-query/package.json b/packages/vue-router-ssr-query/package.json index 73e6dd1cc3..5e43e5a22d 100644 --- a/packages/vue-router-ssr-query/package.json +++ b/packages/vue-router-ssr-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-router-ssr-query", - "version": "1.167.3", + "version": "1.167.1", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "exit 0; vitest", "test:unit:dev": "pnpm run test:unit --watch", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", @@ -63,19 +63,14 @@ }, "devDependencies": { "@tanstack/vue-router": "workspace:*", - "@vitejs/plugin-vue-jsx": "catalog:", + "@vitejs/plugin-vue-jsx": "^4.1.2", "vite": "*", - "vue": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vue": "^3.5.25" }, "peerDependencies": { - "@tanstack/query-core": ">=5.102.0", - "@tanstack/vue-query": ">=5.102.0", - "@tanstack/vue-router": ">=1.170.30", + "@tanstack/query-core": ">=5.90.0", + "@tanstack/vue-query": ">=5.90.0", + "@tanstack/vue-router": ">=1.127.0", "vue": "^3.3.0" } } diff --git a/packages/vue-router-ssr-query/src/index.tsx b/packages/vue-router-ssr-query/src/index.tsx index 42a97b7df1..c9b666acad 100644 --- a/packages/vue-router-ssr-query/src/index.tsx +++ b/packages/vue-router-ssr-query/src/index.tsx @@ -31,13 +31,6 @@ export function setupRouterSsrQueryIntegration( if (OGWrap) { return Vue.h(OGWrap, null, () => children) } - - // Returning the slot array creates an implicit Vue Fragment around the - // document. Preserve its sole VNode so `` remains the outer root. - if (children?.length === 1) { - return children[0] - } - return children } }, diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md index a9cdeb2b70..6ae02b6762 100644 --- a/packages/vue-router/CHANGELOG.md +++ b/packages/vue-router/CHANGELOG.md @@ -1,313 +1,5 @@ # @tanstack/vue-router -## 1.170.42 - -### Patch Changes - -- [#8670](https://github.com/TanStack/router/pull/8670) [`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c) - Reference agent skills in other packages by their `intent load` identifier (`@tanstack/#`) instead of relative file links that break once packages are installed. - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - -## 1.170.41 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - -## 1.170.40 - -### Patch Changes - -- Updated dependencies [[`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/router-core@1.171.37 - -## 1.170.39 - -### Patch Changes - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - -## 1.170.38 - -### Patch Changes - -- [#8602](https://github.com/TanStack/router/pull/8602) [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb) - 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. - -- [#8579](https://github.com/TanStack/router/pull/8579) [`d35aab4`](https://github.com/TanStack/router/commit/d35aab425b07b46e222a507c0f0239644669757b) - Cancel pending link preload timers when starting navigation to avoid redundant preloading while the destination is loading. - -- [#8602](https://github.com/TanStack/router/pull/8602) [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb) - 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. - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/history@1.162.5 - - @tanstack/router-core@1.171.35 - -## 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 - -- [#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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - -## 1.170.34 - -### Patch Changes - -- [#8418](https://github.com/TanStack/router/pull/8418) [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387) - `deepEqual` now takes its flags as positional arguments — `deepEqual(a, b, partial?, explicitUndefined?)` — instead of an options object. The router's hot callers (Link option stabilization and active-state checks, `matchRoute`) no longer allocate an options object per comparison, and the comparator reads two booleans instead of a polymorphic object. `explicitUndefined` replaces `ignoreUndefined: false`. `deepEqual` is an internal helper; it stays exported for compatibility of two-argument calls. - -- [#8419](https://github.com/TanStack/router/pull/8419) [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd) - `resolvePath` (internal helper) now takes positional arguments — `resolvePath(base, to, trailingSlash?, cache?)` — so `buildLocation` and `matchRoute` no longer allocate an options object per path resolution. - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - -## 1.170.33 - -### Patch Changes - -- [#8326](https://github.com/TanStack/router/pull/8326) [`cb8749e`](https://github.com/TanStack/router/commit/cb8749e9fcd32d2290bf6c957b2701c3c0a14da5) - Remove an unnecessary match Fragment to reduce VNode allocation and transient JIT compilation memory while preserving route content and scroll restoration. - -- [#8318](https://github.com/TanStack/router/pull/8318) [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8) - Allow active and inactive Link props to override base element props in React and Solid while preserving class/style merging. Keep React's `href`, `target`, and `disabled` values controlled by routing options. Preserve Vue object and nested-array class bindings, including reactive updates and server rendering, without mutating cached bindings during VNode normalization. - -- [#8327](https://github.com/TanStack/router/pull/8327) [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef) - Make `pathParamsAllowedCharacters` initialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches. - -- [#8370](https://github.com/TanStack/router/pull/8370) [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5) - Stop exporting the internal `isPlainObject` and `isPlainArray` helpers. - -- [#8318](https://github.com/TanStack/router/pull/8318) [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8) - Reduce Link bundle size by sharing exact/fuzzy active-path checks and resolving only the selected active or inactive props. Avoid unnecessary class/style allocations while preserving reactive style updates, server rendering, and each framework's prop-override behavior. - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`8fff7fa`](https://github.com/TanStack/router/commit/8fff7fa1f2e6f061916b0bf5e0ec486b2e732f94), [`f021f6d`](https://github.com/TanStack/router/commit/f021f6d1c6dce6c9b54d70766f1d636d8fd9e184), [`ae68535`](https://github.com/TanStack/router/commit/ae68535929043607d4ee9438f8ae401f3a064862), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/history@1.162.4 - -## 1.170.32 - -### Patch Changes - -- [#7824](https://github.com/TanStack/router/pull/7824) [`8c43c71`](https://github.com/TanStack/router/commit/8c43c712523fc63dc3a814f3a19617e270ce8ed1) - Upgrade TanStack Store to 0.11 and migrate router subscriptions to useSelector, preserving selector comparisons and Vue subscription cleanup. - -## 1.170.31 - -### Patch Changes - -- [#8308](https://github.com/TanStack/router/pull/8308) [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8) - Validate navigation and redirect destinations, keep ambiguous relative URLs on the current origin, and constrain prerender requests and output paths. Prevent redirect headers from appearing in serialized server function response bodies. - - Preserve native form HTTP redirects, route error handling and masks for document redirects, and per-navigation destinations for shared loader redirects. Avoid redundant origin parsing and reduce link styling and server-rendering work. Configured origins must already be normalized. - - Keep blocked-link inactive props consistent during React hydration, honor explicit redirect Location headers before checking route options, and refresh Vue link state when destinations become internal. Reuse the protocol-relative URL check while parsing redirect schemes once. - - Reduce React link bundle size by sharing pathname comparisons, state-prop selection, and element creation. - - Share normalized pathname comparisons in Solid and Vue links to reduce bundle size. - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - - @tanstack/history@1.162.3 - -## 1.170.30 - -### Patch Changes - -- [#8165](https://github.com/TanStack/router/pull/8165) [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2) - Exclude structural descendants below error and not-found boundaries from route lifecycle callbacks. Preserve lifecycle membership through invalidation, hydration, background reloads, and superseded navigation publication. - -- [#8209](https://github.com/TanStack/router/pull/8209) [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f) - Preserve falsy thrown values in React and Vue error boundaries. Type React and Vue boundary error components and `onCatch` callbacks as `unknown`. Solid boundary errors remain typed as `Error`; SSR now wraps non-`Error` loader errors to match Solid’s native boundary behavior, preserving the original value in `cause`. Router state and loader `onError` values are unchanged. - - When upgrading React or Vue, narrow boundary errors (for example, with `error instanceof Error`) before reading `message` or `stack`. `ErrorComponentProps` remains available for values narrowed to a specific error type. Route `onError` types are unchanged. - -- [#8161](https://github.com/TanStack/router/pull/8161) [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96) - Retain successful not-found matches as terminal shared boundaries during client navigation, preserving route context while the destination loads. - -- [#8251](https://github.com/TanStack/router/pull/8251) [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b) - Use URL.canParse for absolute URL checks in links, navigation, redirects, and build configuration. Preserve a URL constructor fallback for older browsers. - -- [#8169](https://github.com/TanStack/router/pull/8169) [`0caf6b9`](https://github.com/TanStack/router/commit/0caf6b9a2b7e14b0b146c74cc27cb05c19d700a5) - Fix route-scoped `useMatch`, `useSearch`, and `useParams` APIs to forward the `shouldThrow` option and preserve optional return types when `shouldThrow: false`. - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`9035abc`](https://github.com/TanStack/router/commit/9035abc41163d83409ef582f7743a3c7be57dd93), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - - @tanstack/history@1.162.2 - -## 1.170.29 - -### Patch Changes - -- [#8132](https://github.com/TanStack/router/pull/8132) [`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c) - Build client preload locations on demand and remove the prebuilt-location argument used by framework links. - -- [#8130](https://github.com/TanStack/router/pull/8130) [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b) - preserve context during reloads - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - -## 1.170.28 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - -## 1.170.27 - -### Patch Changes - -- [#8084](https://github.com/TanStack/router/pull/8084) [`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175) - preserve pending UI across retained routes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - -## 1.170.26 - -### Patch Changes - -- [#8073](https://github.com/TanStack/router/pull/8073) [`0fdf9ff`](https://github.com/TanStack/router/commit/0fdf9ff16fc532de9fc131d18df167ebd8038720) - inline isCtrlKey inside Link component for byte shaving - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - -## 1.170.25 - -### Patch Changes - -- [#8054](https://github.com/TanStack/router/pull/8054) [`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90) - Reuse resolved lazy route components when revisiting code-split routes, preventing unnecessary pending UI. - -- [#8002](https://github.com/TanStack/router/pull/8002) [`3848503`](https://github.com/TanStack/router/commit/38485038c52ff898777cabeeeb2eaaa29c93f789) - Keep active route components mounted by default when route params change. - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90)]: - - @tanstack/router-core@1.171.23 - -## 1.170.24 - -### Patch Changes - -- [#8045](https://github.com/TanStack/router/pull/8045) [`f500760`](https://github.com/TanStack/router/commit/f5007607d62e932b8df19de866cdc6bddcff8db3) - Warn when an Outlet is rendered inside a pending, error, or not-found component. - -- [#8043](https://github.com/TanStack/router/pull/8043) [`1aafca9`](https://github.com/TanStack/router/commit/1aafca9b45d24f8f0dba78e716fc9582346c6ca1) - remove the undocumented Link `isTransitioning` state and `data-transitioning` attribute - -- [#8044](https://github.com/TanStack/router/pull/8044) [`aa10b65`](https://github.com/TanStack/router/commit/aa10b6589eeda215f5a60ea0af95a3101d8c414e) - Apply `preloadDelay` to viewport link preloading and cancel pending preloads when links leave the viewport. - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13)]: - - @tanstack/router-core@1.171.22 - -## 1.170.23 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - -## 1.170.22 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - -## 1.170.21 - -### Patch Changes - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - -## 1.170.20 - -### Patch Changes - -- [#7970](https://github.com/TanStack/router/pull/7970) [`2435885`](https://github.com/TanStack/router/commit/2435885fa8b5e31c8c4b74d93920919f27316ebf) - createFileRoute does not rely on FileRoute class - -- [#7985](https://github.com/TanStack/router/pull/7985) [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b) - perf: compact private bundle boundaries- [#7975](https://github.com/TanStack/router/issues/7975) - -- [#7971](https://github.com/TanStack/router/pull/7971) [`86bf510`](https://github.com/TanStack/router/commit/86bf510c2923afb76804223bd04afc2a809b33e7) - clean intersection observer options in link component - -- [#7967](https://github.com/TanStack/router/pull/7967) [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c) - Preserve path params in their raw string form while matching routes so structured values returned by `params.parse` produce stable match IDs and do not reuse stale loader data. - - `RouterCore.getMatchedRoutes()` now returns `[matchedRoutes, rawParams, foundRoute]` instead of an object. - -- Updated dependencies [[`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/router-core@1.171.18 - - @tanstack/history@1.162.1 - -## 1.170.19 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - -## 1.170.18 - -### Patch Changes - -- [#7805](https://github.com/TanStack/router/pull/7805) [`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd) - Rewrite match loading around a lane-based scheduler that tracks each navigation, preload, and background reload as an ordered unit of work. This fixes pending/redirect/retry state leaking between overlapping navigations, restores correct SSR status codes for redirects, errors, and not-found responses, and closes hydration gaps where the client re-ran work the server had already completed. - - Invalidation now retires matching active preloads so older speculative loader results cannot become fresh cache data after invalidation. - - Route `headers()` now only runs on the server, matching the documented behavior — it is no longer invoked during client-side asset projection. - - The documented default `gcTime` and `preloadGcTime` now match the existing runtime default of 5 minutes (`300_000`). - - **Removed / changed exported internals** - - `RouterState` no longer includes `loadedAt`, `isTransitioning`, `statusCode`, or `redirect`. Use `match.updatedAt` in place of `loadedAt`; subscribe to `router.state.status` / `router.state.isLoading` in place of `isTransitioning`; server response status and redirect handling are now internal to the server loader and are no longer exposed on `router.state`. - - `RouteMatch.fetchCount` has been removed, with no replacement — it was purely informational. - - `RouteMatch.status` no longer includes `'redirected'` (it remains `'pending' | 'success' | 'error' | 'notFound'`) — redirected matches are dropped from the match list instead of being rendered. - - `RouteMatch.globalNotFound` has been renamed and privatized to the internal `_notFound` field. Use `match.status === 'notFound'` instead. - - The exported React, Solid, and Vue `Match` components now accept `routeId` instead of `matchId`. - - The exported `RouterStores` adapter contract now uses route-keyed presentation stores: `matchesId` is replaced by `ids`, `matchStores` by `byRoute`, and `getRouteMatchStore()` by `getMatchStore()`. The separate `loadedAt`, `isLoading`, `isTransitioning`, `statusCode`, and `redirect` stores have been removed, along with the pending/cache stores and their setters. `StoreConfig.init` has also been removed. Read application-facing state from `router.state`; preload and cache coordination are now internal. - - Removed `RouterCore` members `getMatch()`, `updateMatch()`, `cancelMatch()`, and `cancelMatches()` — read matches from `router.state.matches` (e.g. `router.state.matches.find((m) => m.id === id)`); there is no replacement for mutating or cancelling an individual in-flight match from outside the router. - - Removed `RouterCore.hasNotFoundMatch()` — use `router.state.matches.some((m) => m.status === 'notFound')`. - - Removed `RouterCore.looseRoutesById` — use `routesById`. - - Removed `RouterCore.isPrerendering()`, `RouterCore.isViewTransitionTypesSupported`, and `RouterCore.viewTransitionPromise`, with no replacement. - - Removed `RouterCore.getParsedLocationHref()` and `RouterCore.clearExpiredCache()`, with no replacement — expired cache entries are now reconciled automatically as part of match commit. - - Removed `RouterCore.latestLoadPromise` and `RouterCore.beforeLoad()`, with no replacement. - - `RouterCore.commitLocationPromise` and `RouterCore.pendingBuiltLocation` have been replaced by the internal `_commitPromise` and `_pendingLocation` fields. - - Removed the exported `GetMatchFn` and `UpdateMatchFn` types, along with the methods they typed. - - Removed the standalone `getMatchedRoutes()` export from `@tanstack/router-core` — use the `router.getMatchedRoutes()` instance method instead. - - `RouterCore.loadRouteChunk()` no longer accepts an array of component types as its second argument. One-argument usage is unchanged; the optional second argument is now `'errorComponent'`, `'notFoundComponent'`, or `false` for internal boundary loading. - - Removed `Redirect.redirectHandled`, which was internal redirect bookkeeping. - - `MatchRoutesOpts.preload` and `MatchRoutesOpts.dest` have been removed. - - `StartTransitionFn` is now `(fn, expected) => Promise` (previously `(fn) => void`). This only affects custom framework adapters that implement `startTransition`. - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - -## 1.170.17 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - ## 1.170.16 ### Patch Changes diff --git a/packages/vue-router/README.md b/packages/vue-router/README.md index 4c71e74654..383a15d84d 100644 --- a/packages/vue-router/README.md +++ b/packages/vue-router/README.md @@ -2,21 +2,7 @@ # TanStack Vue Router - - - - TanStack Vue Router - +![TanStack Router Header](https://raw.githubusercontent.com/TanStack/router/main/media/header_router.png) 🤖 Type-safe router w/ built-in caching & URL state management for Vue! diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index 93ae8fdeed..c302ba4600 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-router", - "version": "1.170.42", + "version": "1.170.16", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -75,26 +75,19 @@ "dependencies": { "@tanstack/history": "workspace:*", "@tanstack/router-core": "workspace:*", - "@tanstack/vue-store": "^0.11.2", + "@tanstack/vue-store": "^0.9.3", "@vue/runtime-dom": "^3.5.25", - "isbot": "catalog:" + "isbot": "^5.1.22" }, "devDependencies": { - "@testing-library/jest-dom": "catalog:", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/vue": "^8.1.0", "@types/node": ">=20", - "@vitejs/plugin-vue-jsx": "catalog:", - "combinate": "catalog:", + "@vitejs/plugin-vue-jsx": "^4.1.2", + "combinate": "^1.1.11", "vite": "*", - "vue": "catalog:", - "zod": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@vitest/ui": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vue": "^3.5.25", + "zod": "^4.4.3" }, "peerDependencies": { "vue": "^3.3.0" diff --git a/packages/vue-router/skills/vue-router/SKILL.md b/packages/vue-router/skills/vue-router/SKILL.md index 61c13bef1f..17108957aa 100644 --- a/packages/vue-router/skills/vue-router/SKILL.md +++ b/packages/vue-router/skills/vue-router/SKILL.md @@ -8,11 +8,10 @@ description: >- Outlet, CatchBoundary, ErrorComponent, Html, Body. Vue-specific patterns with Ref returns, defineComponent, h() render functions, provide/inject, and computed refs. -metadata: - type: framework - library: tanstack-router - library_version: '1.166.2' - framework: vue +type: framework +library: tanstack-router +library_version: '1.166.2' +framework: vue requires: - router-core sources: @@ -21,7 +20,7 @@ sources: # Vue Router (`@tanstack/vue-router`) -This skill builds on router-core. Read `@tanstack/router-core#router-core` first for foundational concepts. +This skill builds on router-core. Read [router-core](../../../router-core/skills/router-core/SKILL.md) first for foundational concepts. This skill covers the Vue-specific bindings, components, composables, and setup for TanStack Router. @@ -390,4 +389,4 @@ Must set `target: 'vue'` in the router plugin config. Default is `'react'`. ## Cross-References -- `@tanstack/router-core#router-core` — all sub-skills for domain-specific patterns (search params, data loading, navigation, auth, SSR, etc.) +- [router-core/SKILL.md](../../../router-core/skills/router-core/SKILL.md) — all sub-skills for domain-specific patterns (search params, data loading, navigation, auth, SSR, etc.) diff --git a/packages/vue-router/src/CatchBoundary.tsx b/packages/vue-router/src/CatchBoundary.tsx index 2b4f66e78f..5d75de8d6d 100644 --- a/packages/vue-router/src/CatchBoundary.tsx +++ b/packages/vue-router/src/CatchBoundary.tsx @@ -1,39 +1,43 @@ import * as Vue from 'vue' -import { renderInNonRouteComponentContext } from './nonRouteComponentContext' import type { ErrorRouteComponent } from './route' +interface ErrorComponentProps { + error: Error + reset: () => void +} + type CatchBoundaryProps = { - getResetKey: () => unknown + getResetKey: () => number | string children: Vue.VNode errorComponent?: ErrorRouteComponent | Vue.Component - onCatch?: (error: unknown) => void + onCatch?: (error: Error) => void } const VueErrorBoundary = Vue.defineComponent({ name: 'VueErrorBoundary', props: { onError: Function, - resetKey: [String, Number, Object], - children: null, - errorComponent: null, + resetKey: [String, Number], }, - setup(props) { - const error = Vue.shallowRef<[unknown] | 0>(0) + emits: ['catch'], + setup(props, { slots }) { + const error = Vue.ref(null) + const resetFn = Vue.ref<(() => void) | null>(null) const reset = () => { - error.value = 0 + error.value = null } Vue.watch( () => props.resetKey, - () => { - if (error.value) { + (newKey, oldKey) => { + if (newKey !== oldKey && error.value) { reset() } }, ) - Vue.onErrorCaptured((err: unknown) => { + Vue.onErrorCaptured((err: Error) => { if ( err instanceof Promise || (err && typeof (err as any).then === 'function') @@ -41,7 +45,8 @@ const VueErrorBoundary = Vue.defineComponent({ return false } - error.value = [err] + error.value = err + resetFn.value = reset if (props.onError) { props.onError(err) @@ -51,42 +56,60 @@ const VueErrorBoundary = Vue.defineComponent({ }) return () => { - if (!error.value) { - return props.children as Vue.VNode + if (error.value && slots.fallback) { + const fallbackContent = slots.fallback({ + error: error.value, + reset, + }) + return Array.isArray(fallbackContent) && fallbackContent.length === 1 + ? fallbackContent[0] + : fallbackContent } - const errorComponent = props.errorComponent ?? ErrorComponent - const errorProps = { - error: error.value[0], - reset, - } + const defaultContent = slots.default && slots.default() + return Array.isArray(defaultContent) && defaultContent.length === 1 + ? defaultContent[0] + : defaultContent + } + }, +}) - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - errorComponent, - errorProps, - 'errorComponent', - ) - : Vue.h(errorComponent, errorProps) +const CatchBoundaryWrapper = Vue.defineComponent({ + name: 'CatchBoundary', + inheritAttrs: false, + props: ['getResetKey', 'children', 'errorComponent', 'onCatch'] as any, + setup(props: CatchBoundaryProps) { + const resetKey = Vue.computed(() => props.getResetKey()) + + return () => { + return Vue.h( + VueErrorBoundary, + { + resetKey: resetKey.value, + onError: props.onCatch, + }, + { + default: () => props.children, + fallback: ({ error, reset }: ErrorComponentProps) => { + if (props.errorComponent) { + return Vue.h(props.errorComponent, { error, reset }) + } + return Vue.h(ErrorComponent, { error, reset }) + }, + }, + ) } }, }) export function CatchBoundary(props: CatchBoundaryProps) { - return Vue.h(VueErrorBoundary, { - resetKey: props.getResetKey() as any, - onError: props.onCatch, - children: props.children, - errorComponent: props.errorComponent, - }) + return Vue.h(CatchBoundaryWrapper, props as any) } -CatchBoundary.inheritAttrs = false -CatchBoundary.props = ['getResetKey', 'children', 'errorComponent', 'onCatch'] export const ErrorComponent = Vue.defineComponent({ name: 'ErrorComponent', props: { - error: null as unknown as Vue.PropType, + error: Object, reset: Function, }, setup(props) { @@ -140,12 +163,8 @@ export const ErrorComponent = Vue.defineComponent({ }, }, [ - (props.error as { message?: string } | null)?.message - ? Vue.h( - 'code', - {}, - (props.error as { message: string }).message, - ) + props.error?.message + ? Vue.h('code', {}, props.error.message) : null, ], ), diff --git a/packages/vue-router/src/Match.tsx b/packages/vue-router/src/Match.tsx index 0c3ff40f1d..44e9aca0cd 100644 --- a/packages/vue-router/src/Match.tsx +++ b/packages/vue-router/src/Match.tsx @@ -1,25 +1,32 @@ import * as Vue from 'vue' -import { isNotFound, rootRouteId } from '@tanstack/router-core' +import { + createControlledPromise, + getLocationChangeInfo, + invariant, + isNotFound, + isRedirect, + rootRouteId, +} from '@tanstack/router-core' import { isServer } from '@tanstack/router-core/isServer' -import { useSelector } from '@tanstack/vue-store' -import { CatchBoundary } from './CatchBoundary' +import { useStore } from '@tanstack/vue-store' +import { CatchBoundary, ErrorComponent } from './CatchBoundary' import { ClientOnly } from './ClientOnly' import { useRouter } from './useRouter' import { CatchNotFound } from './not-found' -import { provideLinkLocation, routeIdContext } from './matchContext' +import { + matchContext, + pendingMatchContext, + routeIdContext, +} from './matchContext' import { renderRouteNotFound } from './renderRouteNotFound' import { ScrollRestoration } from './scroll-restoration' -import { - nonRouteComponentContext, - renderInNonRouteComponentContext, -} from './nonRouteComponentContext' import type { VNode } from 'vue' import type { AnyRoute, RootRouteOptions } from '@tanstack/router-core' export const Match = Vue.defineComponent({ name: 'Match', props: { - routeId: { + matchId: { type: String, required: true, }, @@ -27,58 +34,127 @@ export const Match = Vue.defineComponent({ setup(props) { const router = useRouter() - const routeId = props.routeId + // Derive routeId from initial props.matchId — stable for this component's + // lifetime. The routeId never changes for a given route position in the + // tree, even when matchId changes (loaderDepsHash, etc). + const routeId = router.stores.matchStores.get(props.matchId)?.routeId - const activeMatch = useSelector( - router.stores.getMatchStore(routeId), + if (!routeId) { + if (process.env.NODE_ENV !== 'production') { + throw new Error( + `Invariant failed: Could not find routeId for matchId "${props.matchId}". Please file an issue!`, + ) + } + + invariant() + } + + // Static route-tree check: is this route a direct child of the root? + // parentRoute is set at build time, so no reactive tracking needed. + const isChildOfRoot = + (router.routesById[routeId] as AnyRoute)?.parentRoute?.id === rootRouteId + + // Single stable store subscription — getRouteMatchStore returns a + // cached computed store that resolves routeId → current match state + // through the signal graph. No bridge needed. + const activeMatch = useStore( + router.stores.getRouteMatchStore(routeId), (value) => value, - { compare: Object.is }, ) + const isPendingMatchRef = useStore( + router.stores.pendingRouteIds, + (pendingRouteIds) => Boolean(pendingRouteIds[routeId]), + { equal: Object.is }, + ) + const loadedAt = useStore(router.stores.loadedAt, (value) => value) + + const matchData = Vue.computed(() => { + const match = activeMatch.value + if (!match) { + return null + } + + return { + matchId: match.id, + routeId, + loadedAt: loadedAt.value, + ssr: match.ssr, + _displayPending: match._displayPending, + } + }) + + const route = Vue.computed(() => + matchData.value ? router.routesById[matchData.value.routeId] : null, + ) + + const PendingComponent = Vue.computed( + () => + route.value?.options?.pendingComponent ?? + router?.options?.defaultPendingComponent, + ) + + const pendingElement = Vue.computed(() => + PendingComponent.value ? Vue.h(PendingComponent.value) : undefined, + ) + + const routeErrorComponent = Vue.computed( + () => + route.value?.options?.errorComponent ?? + router?.options?.defaultErrorComponent, + ) + + const routeOnCatch = Vue.computed( + () => route.value?.options?.onCatch ?? router?.options?.defaultOnCatch, + ) + + const routeNotFoundComponent = Vue.computed(() => + route.value?.isRoot + ? // If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component + (route.value?.options?.notFoundComponent ?? + router?.options?.notFoundRoute?.options?.component) + : route.value?.options?.notFoundComponent, + ) + + const hasShellComponent = Vue.computed(() => { + if (!route.value?.isRoot) return false + return !!(route.value.options as RootRouteOptions).shellComponent + }) + + const ShellComponent = Vue.computed(() => + hasShellComponent.value + ? ((route.value!.options as RootRouteOptions).shellComponent as any) + : null, + ) + // Provide routeId context (stable string) for children. // MatchInner, Outlet, and useMatch all consume this. Vue.provide(routeIdContext, routeId) - // This match's links hold their location while a navigation leaves it. - // Server links read the live location. - if (!(isServer ?? router.isServer)) { - provideLinkLocation(router, routeId) - } + + // Provide reactive nearest-match context for hooks that slice the active + // matches array relative to the current match. + const matchIdRef = Vue.computed( + () => activeMatch.value?.id ?? props.matchId, + ) + Vue.provide(matchContext, matchIdRef) + + Vue.provide(pendingMatchContext, isPendingMatchRef) return (): VNode => { - const match = activeMatch.value - const route = match ? (router.routesById[routeId] as AnyRoute) : undefined - const PendingComponent = - route?.options.pendingComponent ?? - router.options.defaultPendingComponent - const pendingElement = PendingComponent - ? process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - PendingComponent, - undefined, - 'pendingComponent', - ) - : Vue.h(PendingComponent) - : undefined - const routeErrorComponent = - route?.options.errorComponent ?? router.options.defaultErrorComponent - const routeOnCatch = - route?.options.onCatch ?? router.options.defaultOnCatch - const routeNotFoundComponent = route?.isRoot - ? (route.options.notFoundComponent ?? - router.options.notFoundRoute?.options.component) - : route?.options.notFoundComponent - const ShellComponent = route?.isRoot - ? ((route.options as RootRouteOptions).shellComponent as any) - : undefined - const resolvedNoSsr = match?.ssr === false || match?.ssr === 'data-only' + const actualMatchId = matchData.value?.matchId ?? props.matchId + + const resolvedNoSsr = + matchData.value?.ssr === false || matchData.value?.ssr === 'data-only' + const shouldClientOnly = + resolvedNoSsr || !!matchData.value?._displayPending const renderMatchContent = (): VNode => { - const matchInner = Vue.h(MatchInner) + const matchInner = Vue.h(MatchInner, { matchId: actualMatchId }) - let content: VNode = resolvedNoSsr + let content: VNode = shouldClientOnly ? Vue.h( ClientOnly, { - fallback: pendingElement, + fallback: pendingElement.value, }, { default: () => matchInner, @@ -87,64 +163,73 @@ export const Match = Vue.defineComponent({ : matchInner // Wrap in NotFound boundary if needed - if (routeNotFoundComponent) { + if (routeNotFoundComponent.value) { content = Vue.h(CatchNotFound, { fallback: (error: any) => { - error.routeId ??= routeId + error.routeId ??= matchData.value?.routeId - if (error.routeId !== routeId) { + // If the current not found handler doesn't exist or it has a + // route ID which doesn't match the current route, rethrow the error + if ( + !routeNotFoundComponent.value || + (error.routeId && error.routeId !== matchData.value?.routeId) || + (!error.routeId && route.value && !route.value.isRoot) + ) throw error - } - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - routeNotFoundComponent, - error, - 'notFoundComponent', - ) - : Vue.h(routeNotFoundComponent, error) + return Vue.h(routeNotFoundComponent.value, error) }, children: content, }) } // Wrap in error boundary if needed - if (routeErrorComponent) { + if (routeErrorComponent.value) { content = CatchBoundary({ - getResetKey: () => activeMatch.value, - errorComponent: routeErrorComponent, - onCatch: (error: unknown) => { + getResetKey: () => matchData.value?.loadedAt ?? 0, + errorComponent: routeErrorComponent.value || ErrorComponent, + onCatch: (error: Error) => { // Forward not found errors (we don't want to show the error component for these) if (isNotFound(error)) { - error.routeId ??= routeId + error.routeId ??= matchData.value?.routeId throw error } if (process.env.NODE_ENV !== 'production') { - console.warn(`Warning: Error in route match: ${match?.id}`) + console.warn(`Warning: Error in route match: ${actualMatchId}`) } - routeOnCatch?.(error) + routeOnCatch.value?.(error) }, children: content, }) } - if (route?.parentRoute?.id !== rootRouteId) { - return content + // Add scroll restoration if needed + const withScrollRestoration: Array = [ + content, + isChildOfRoot + ? Vue.h(Vue.Fragment, null, [ + Vue.h(OnRendered), + router.options.scrollRestoration && + (isServer ?? router.isServer) + ? Vue.h(ScrollRestoration) + : null, + ]) + : null, + ].filter(Boolean) as Array + + // Return single child directly to avoid Fragment wrapper that causes hydration mismatch + if (withScrollRestoration.length === 1) { + return withScrollRestoration[0]! } - return Vue.h(Vue.Fragment, null, [ - content, - (isServer ?? router.isServer) && router.options.scrollRestoration - ? Vue.h(ScrollRestoration) - : null, - ]) + return Vue.h(Vue.Fragment, null, withScrollRestoration) } - if (!ShellComponent) { + if (!hasShellComponent.value) { return renderMatchContent() } - return Vue.h(ShellComponent, null, { + return Vue.h(ShellComponent.value, null, { // Important: return a fresh VNode on each slot invocation so that shell // components can re-render without reusing a cached VNode instance. default: () => renderMatchContent(), @@ -154,14 +239,65 @@ export const Match = Vue.defineComponent({ }) // On Rendered can't happen above the root layout because it actually +// renders a dummy dom element to track the rendered state of the app. +// We render a script tag with a key that changes based on the current +// location state.__TSR_key. Also, because it's below the root layout, it +// allows us to fire onRendered events even after a hydration mismatch +// error that occurred above the root layout (like bad head/link tags, +// which is common). +const OnRendered = Vue.defineComponent({ + name: 'OnRendered', + setup() { + const router = useRouter() + + const location = useStore( + router.stores.resolvedLocation, + (resolvedLocation) => resolvedLocation?.state.__TSR_key, + ) + + let prevHref: string | undefined + + Vue.watch( + location, + () => { + if (location.value) { + const currentHref = router.latestLocation.href + if (prevHref === undefined || prevHref !== currentHref) { + router.emit({ + type: 'onRendered', + ...getLocationChangeInfo( + router.stores.location.get(), + router.stores.resolvedLocation.get(), + ), + }) + prevHref = currentHref + } + } + }, + { immediate: true }, + ) + + return () => null + }, +}) + export const MatchInner = Vue.defineComponent({ name: 'MatchInner', - setup() { + props: { + matchId: { + type: String, + required: true, + }, + }, + setup(props) { const router = useRouter() // Use routeId from context (provided by parent Match) — stable string. const routeId = Vue.inject(routeIdContext)! - const activeMatch = useSelector(router.stores.getMatchStore(routeId)) + const activeMatch = useStore( + router.stores.getRouteMatchStore(routeId), + (value) => value, + ) // Combined selector for match state AND remount key // This ensures both are computed in the same selector call with consistent data @@ -179,80 +315,156 @@ export const MatchInner = Vue.defineComponent({ (router.routesById[matchRouteId] as AnyRoute).options.remountDeps ?? router.options.defaultRemountDeps - const remountKey = remountFn - ? JSON.stringify( - remountFn({ - routeId: matchRouteId, - loaderDeps: match.loaderDeps, - params: match._strictParams, - search: match._strictSearch, - }), - ) - : undefined + let remountKey: string | undefined + if (remountFn) { + const remountDeps = remountFn({ + routeId: matchRouteId, + loaderDeps: match.loaderDeps, + params: match._strictParams, + search: match._strictSearch, + }) + remountKey = remountDeps ? JSON.stringify(remountDeps) : undefined + } - return [match, remountKey] as const + return { + routeId: matchRouteId, + match: { + id: match.id, + status: match.status, + error: match.error, + ssr: match.ssr, + _forcePending: match._forcePending, + _displayPending: match._displayPending, + _nonReactive: match._nonReactive, + }, + remountKey, + } }) + const route = Vue.computed(() => { + if (!combinedState.value) return null + return router.routesById[combinedState.value.routeId]! + }) + + const match = Vue.computed(() => combinedState.value?.match) + const remountKey = Vue.computed(() => combinedState.value?.remountKey) + + const getMatchPromise = ( + match: { + id: string + _nonReactive: { + displayPendingPromise?: Promise + minPendingPromise?: Promise + loadPromise?: Promise + } + }, + key: 'displayPendingPromise' | 'minPendingPromise' | 'loadPromise', + ) => { + return ( + router.getMatch(match.id)?._nonReactive[key] ?? match._nonReactive[key] + ) + } + return (): VNode | null => { // If match doesn't exist, return null (component is being unmounted or not ready) - const state = combinedState.value - if (!state) { - return null - } - const [match, remountKey] = state - const route = router.routesById[match.routeId]! + if (!combinedState.value || !match.value || !route.value) return null // Handle different match statuses - if (match.status === 'notFound') { - return renderRouteNotFound(router, route, match.error) + if (match.value._displayPending) { + const PendingComponent = + route.value.options.pendingComponent ?? + router.options.defaultPendingComponent + + return PendingComponent ? Vue.h(PendingComponent) : null } - if (match.status === 'error') { + if (match.value._forcePending) { + const PendingComponent = + route.value.options.pendingComponent ?? + router.options.defaultPendingComponent + + return PendingComponent ? Vue.h(PendingComponent) : null + } + + if (match.value.status === 'notFound') { + if (!isNotFound(match.value.error)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error('Invariant failed: Expected a notFound error') + } + + invariant() + } + return renderRouteNotFound(router, route.value, match.value.error) + } + + if (match.value.status === 'redirected') { + if (!isRedirect(match.value.error)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error('Invariant failed: Expected a redirect error') + } + + invariant() + } + throw getMatchPromise(match.value, 'loadPromise') + } + + if (match.value.status === 'error') { // Check if this route or any parent has an error component const RouteErrorComponent = - route.options.errorComponent ?? router.options.defaultErrorComponent + route.value.options.errorComponent ?? + router.options.defaultErrorComponent // If this route has an error component, render it directly // This is more reliable than relying on Vue's error boundary if (RouteErrorComponent) { - const errorProps = { - error: match.error, + return Vue.h(RouteErrorComponent, { + error: match.value.error, reset: () => { router.invalidate() }, info: { componentStack: '', }, - } - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - RouteErrorComponent, - errorProps, - 'errorComponent', - ) - : Vue.h(RouteErrorComponent, errorProps) + }) } // If there's no error component for this route, throw the error // so it can bubble up to the nearest parent with an error component - throw match.error + throw match.value.error } - if (match.status === 'pending') { + if (match.value.status === 'pending') { + const pendingMinMs = + route.value.options.pendingMinMs ?? router.options.defaultPendingMinMs + + const routerMatch = router.getMatch(match.value.id) + if ( + pendingMinMs && + routerMatch && + !routerMatch._nonReactive.minPendingPromise + ) { + // Create a promise that will resolve after the minPendingMs + if (!(isServer ?? router.isServer)) { + const minPendingPromise = createControlledPromise() + + routerMatch._nonReactive.minPendingPromise = minPendingPromise + + setTimeout(() => { + minPendingPromise.resolve() + // We've handled the minPendingPromise, so we can delete it + routerMatch._nonReactive.minPendingPromise = undefined + }, pendingMinMs) + } + } + // In Vue, we render the pending component directly instead of throwing a promise // because Vue's Suspense doesn't catch thrown promises like React does const PendingComponent = - route.options.pendingComponent ?? + route.value.options.pendingComponent ?? router.options.defaultPendingComponent if (PendingComponent) { - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - PendingComponent, - undefined, - 'pendingComponent', - ) - : Vue.h(PendingComponent) + return Vue.h(PendingComponent) } // If no pending component, return null while loading @@ -260,19 +472,16 @@ export const MatchInner = Vue.defineComponent({ } // Success status - render the component with remount key - const Comp = route.options.component ?? router.options.defaultComponent + const Comp = + route.value.options.component ?? router.options.defaultComponent + const key = remountKey.value + if (Comp) { // Pass key as a prop - Vue.h properly handles 'key' as a special prop - return Vue.h( - Comp, - remountKey !== undefined ? { key: remountKey } : undefined, - ) + return Vue.h(Comp, key !== undefined ? { key } : undefined) } - return Vue.h( - Outlet, - remountKey !== undefined ? { key: remountKey } : undefined, - ) + return Vue.h(Outlet, key !== undefined ? { key } : undefined) } }, }) @@ -280,48 +489,67 @@ export const MatchInner = Vue.defineComponent({ export const Outlet = Vue.defineComponent({ name: 'Outlet', setup() { - if (process.env.NODE_ENV !== 'production') { - const nonRouteComponent = Vue.inject(nonRouteComponentContext!, undefined) - if (nonRouteComponent) { - Vue.watch( - nonRouteComponent, - (component) => { - console.warn( - `Warning: An was rendered inside a ${component}. should only be rendered inside a route component.`, - ) - }, - { immediate: true }, - ) - } + const router = useRouter() + const parentRouteId = Vue.inject(routeIdContext) + + if (!parentRouteId) { + return (): VNode | null => null } - const router = useRouter() - const parentRouteId = Vue.inject(routeIdContext)! + // Parent state via stable routeId store — single subscription + const parentMatch = useStore( + router.stores.getRouteMatchStore(parentRouteId), + (v) => v, + ) - const parentMatch = useSelector(router.stores.getMatchStore(parentRouteId)) + const route = Vue.computed(() => + parentMatch.value + ? router.routesById[parentMatch.value.routeId as string]! + : undefined, + ) - const route = router.routesById[parentRouteId]! + const parentGlobalNotFound = Vue.computed( + () => parentMatch.value?.globalNotFound ?? false, + ) - const childRouteId = useSelector(router.stores.matches, (matches) => { - const index = matches.findIndex( - (match) => match.routeId === parentRouteId, - ) - return matches[index + 1]?.routeId + // Child match lookup: read the child matchId from the shared derived + // map (one reactive node for the whole tree), then grab match state + // directly from the pool. + const childMatchIdMap = useStore( + router.stores.childMatchIdByRouteId, + (v) => v, + ) + + const childMatchData = Vue.computed(() => { + const childId = childMatchIdMap.value[parentRouteId] + if (!childId) return null + const child = router.stores.matchStores.get(childId)?.get() + if (!child) return null + + return { + id: child.id, + // Key based on routeId + params only (not loaderDeps) + // This ensures component recreates when params change, + // but NOT when only loaderDeps change + paramsKey: child.routeId + JSON.stringify(child._strictParams), + } }) return (): VNode | null => { - if (parentMatch.value?._notFound) { - return renderRouteNotFound(router, route, parentMatch.value.error) + if (parentGlobalNotFound.value) { + if (!route.value) { + return null + } + return renderRouteNotFound(router, route.value, undefined) } - const child = childRouteId.value - if (!child) { + if (!childMatchData.value) { return null } const nextMatch = Vue.h(Match, { - routeId: child, - key: child, + matchId: childMatchData.value.id, + key: childMatchData.value.paramsKey, }) // Note: We intentionally do NOT wrap in Suspense here. diff --git a/packages/vue-router/src/Matches.tsx b/packages/vue-router/src/Matches.tsx index a22ec82e82..da8220db29 100644 --- a/packages/vue-router/src/Matches.tsx +++ b/packages/vue-router/src/Matches.tsx @@ -1,12 +1,11 @@ import * as Vue from 'vue' import { isServer } from '@tanstack/router-core/isServer' -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { CatchBoundary } from './CatchBoundary' import { useRouter } from './useRouter' import { useTransitionerSetup } from './Transitioner' -import { routeIdContext } from './matchContext' +import { matchContext } from './matchContext' import { Match } from './Match' -import { renderInNonRouteComponentContext } from './nonRouteComponentContext' import type { AnyRouter, DeepPartial, @@ -33,37 +32,51 @@ declare module '@tanstack/router-core' { } } +// Create a component that renders MatchesInner with Transitioner's setup logic inlined. +// This is critical for proper hydration - we call useTransitionerSetup() as a composable +// rather than rendering it as a component, which avoids Fragment/element mismatches. +const MatchesContent = Vue.defineComponent({ + name: 'MatchesContent', + setup() { + // IMPORTANT: We need to ensure Transitioner's setup() runs. + // Transitioner sets up critical functionality: + // - router.startTransition + // - History subscription via router.history.subscribe(router.load) + // - Watchers for router events + // + // We inline Transitioner's setup logic here. Since Transitioner returns null, + // we can call its setup function directly without affecting the render tree. + // This is done by importing and calling useTransitionerSetup. + useTransitionerSetup() + + return () => Vue.h(MatchesInner) + }, +}) + export const Matches = Vue.defineComponent({ name: 'Matches', setup() { const router = useRouter() - useTransitionerSetup() return () => { - const pendingElement = router.options.defaultPendingComponent - ? process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - router.options.defaultPendingComponent, - undefined, - 'pendingComponent', - ) - : Vue.h(router.options.defaultPendingComponent) + const pendingElement = router?.options?.defaultPendingComponent + ? Vue.h(router.options.defaultPendingComponent) : null // Do not render a root Suspense during SSR or hydrating from SSR const inner = - (isServer ?? router.isServer) || - (typeof document !== 'undefined' && router.ssr) - ? Vue.h(MatchesInner) + (isServer ?? router?.isServer ?? false) || + (typeof document !== 'undefined' && router?.ssr) + ? Vue.h(MatchesContent) : Vue.h( Vue.Suspense, { fallback: pendingElement }, { - default: () => Vue.h(MatchesInner), + default: () => Vue.h(MatchesContent), }, ) - return router.options.InnerWrap + return router?.options?.InnerWrap ? Vue.h(router.options.InnerWrap, null, { default: () => inner }) : inner } @@ -76,12 +89,7 @@ const errorComponentFn: ErrorRouteComponentType = ( ) => { return Vue.h('div', { class: 'error' }, [ Vue.h('h1', null, 'Error'), - Vue.h( - 'p', - null, - (props.error as { message?: string } | null)?.message || - String(props.error), - ), + Vue.h('p', null, props.error.message || String(props.error)), Vue.h('button', { onClick: props.reset }, 'Try Again'), ]) } @@ -91,13 +99,19 @@ const MatchesInner = Vue.defineComponent({ setup() { const router = useRouter() - const matches = useSelector(router.stores.matches) - const routeId = Vue.computed(() => matches.value[0]?.routeId) + const matchId = useStore(router.stores.firstId, (id) => id) + const resetKey = useStore(router.stores.loadedAt, (loadedAt) => loadedAt) + + // Create a ref for the match id to provide + const matchIdRef = Vue.computed(() => matchId.value) + + // Provide the matchId for child components using the InjectionKey + Vue.provide(matchContext, matchIdRef) return () => { - // Generate a placeholder element if routeId.value is not present - const childElement = routeId.value - ? Vue.h(Match, { routeId: routeId.value }) + // Generate a placeholder element if matchId.value is not present + const childElement = matchId.value + ? Vue.h(Match, { matchId: matchId.value }) : Vue.h('div') // If disableGlobalCatchBoundary is true, don't wrap in CatchBoundary @@ -106,15 +120,15 @@ const MatchesInner = Vue.defineComponent({ } return Vue.h(CatchBoundary, { - getResetKey: () => matches.value, + getResetKey: () => resetKey.value, errorComponent: errorComponentFn, onCatch: process.env.NODE_ENV !== 'production' - ? (error: unknown) => { + ? (error: 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) + console.warn(`Warning: ${error.message || error.toString()}`) } : undefined, children: childElement, @@ -138,12 +152,7 @@ export type UseMatchRouteOptions< export function useMatchRoute() { const router = useRouter() - const location = useSelector(router.stores.location, (value) => value.href) - const resolvedLocation = useSelector( - router.stores.resolvedLocation, - (value) => value?.href, - ) - const status = useSelector(router.stores.status) + const routerState = useStore(router.stores.matchRouteDeps, (value) => value) return < const TFrom extends string = string, @@ -155,11 +164,12 @@ export function useMatchRoute() { ): Vue.Ref< false | ResolveRoute['types']['allParams'] > => { + const { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts + const matchRoute = Vue.computed(() => { - location.value - resolvedLocation.value - status.value - const { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts + // Access routerState to establish dependency + + routerState.value return router.matchRoute(rest as any, { pending, caseSensitive, @@ -238,20 +248,27 @@ export const MatchRoute = Vue.defineComponent({ }, }, setup(props, { slots }) { - const params = useMatchRoute()(props) + const router = useRouter() + const status = useStore( + router.stores.matchRouteDeps, + (value) => value.status, + ) return () => { - const match = params.value as boolean + if (!status.value) return null + + const matchRoute = useMatchRoute() + const params = matchRoute(props).value as boolean // Create a component that renders the slot in a reactive manner - if (!match || !slots.default) { + if (!params || !slots.default) { return null } // For function slots, pass the params if (typeof slots.default === 'function') { // Use h to create a wrapper component that will call the slot function - return Vue.h(Vue.Fragment, null, slots.default(match)) + return Vue.h(Vue.Fragment, null, slots.default(params)) } // For normal slots, just render them @@ -276,7 +293,7 @@ export function useMatches< opts?: UseMatchesBaseOptions, ): Vue.Ref> { const router = useRouter() - return useSelector(router.stores.matches, (matches) => { + return useStore(router.stores.matches, (matches) => { return opts?.select ? opts.select(matches as Array>) : (matches as any) @@ -289,13 +306,15 @@ export function useParentMatches< >( opts?: UseMatchesBaseOptions, ): Vue.Ref> { - const contextRouteId = Vue.inject(routeIdContext) + // Use matchContext with proper type + const contextMatchId = Vue.inject>(matchContext) + const safeMatchId = Vue.computed(() => contextMatchId?.value || '') return useMatches({ select: (matches: Array>) => { matches = matches.slice( 0, - matches.findIndex((d) => d.routeId === contextRouteId), + matches.findIndex((d) => d.id === safeMatchId.value), ) return opts?.select ? opts.select(matches) : matches }, @@ -308,12 +327,14 @@ export function useChildMatches< >( opts?: UseMatchesBaseOptions, ): Vue.Ref> { - const contextRouteId = Vue.inject(routeIdContext) + // Use matchContext with proper type + const contextMatchId = Vue.inject>(matchContext) + const safeMatchId = Vue.computed(() => contextMatchId?.value || '') return useMatches({ select: (matches: Array>) => { matches = matches.slice( - matches.findIndex((d) => d.routeId === contextRouteId) + 1, + matches.findIndex((d) => d.id === safeMatchId.value) + 1, ) return opts?.select ? opts.select(matches) : matches }, diff --git a/packages/vue-router/src/RouterProvider.tsx b/packages/vue-router/src/RouterProvider.tsx index 874a24fef0..3a4fe63261 100644 --- a/packages/vue-router/src/RouterProvider.tsx +++ b/packages/vue-router/src/RouterProvider.tsx @@ -1,8 +1,6 @@ import * as Vue from 'vue' -import { isServer } from '@tanstack/router-core/isServer' import { Matches } from './Matches' import { provideRouter } from './routerContext' -import { provideLinkLocation } from './matchContext' import type { AnyRouter, RegisteredRouter, @@ -23,24 +21,20 @@ export const RouterContextProvider = Vue.defineComponent({ const router = props.router as AnyRouter const restAttrs = attrs + // Allow the router to update options on the router instance + router.update({ + ...router.options, + ...restAttrs, + context: { + ...router.options.context, + ...(restAttrs.context || {}), + }, + }) + // Provide router to all child components provideRouter(router) - // Links outside every match follow the live location. - if (!(isServer ?? router.isServer)) { - provideLinkLocation(router) - } return () => { - // Allow the router to update options on the router instance - router.update({ - ...router.options, - ...restAttrs, - context: { - ...router.options.context, - ...(restAttrs.context || {}), - }, - }) - // Get child content const childContent = slots.default?.() @@ -96,7 +90,10 @@ export const RouterProvider = Vue.defineComponent({ } & Record, ): Vue.VNode new (): { - $props: RouterProps + $props: { + router: AnyRouter + routeTree?: AnyRouter['routeTree'] + } } } @@ -111,7 +108,7 @@ export type RouterProps< TRouter['history'], TDehydrated >, - 'context' | 'pathParamsAllowedCharacters' + 'context' > & { router: TRouter context?: Partial< diff --git a/packages/vue-router/src/Scripts.tsx b/packages/vue-router/src/Scripts.tsx index 729441d28c..32c9eef8b5 100644 --- a/packages/vue-router/src/Scripts.tsx +++ b/packages/vue-router/src/Scripts.tsx @@ -1,27 +1,70 @@ import * as Vue from 'vue' -import { - composeSsrBodyScripts, - getSsrBodyScriptParts, -} from '@tanstack/router-core' +import { useStore } from '@tanstack/vue-store' import { isServer } from '@tanstack/router-core/isServer' -import { useSelector } from '@tanstack/vue-store' import { Asset } from './Asset' import { useRouter } from './useRouter' import type { RouterManagedTag } from '@tanstack/router-core' -/** - * During streaming SSR, `` marks where late hydration scripts may - * begin to be inserted. - */ +type ScriptsRenderState = { + scripts: Array + assetScripts: Array + mounted: boolean + nonce?: string +} + export const Scripts = Vue.defineComponent({ name: 'Scripts', setup() { const router = useRouter() const nonce = router.options.ssr?.nonce - const matches = useSelector(router.stores.matches, (value) => value) + const matches = useStore(router.stores.matches, (value) => value) - const scripts = Vue.computed(() => - getSsrBodyScriptParts(matches.value, router.ssr?.manifest, nonce), + const getAssetScripts = (matches: Array) => { + const assetScripts: Array = [] + const manifest = router.ssr?.manifest + + if (!manifest) { + return [] + } + + matches.forEach((match) => { + const routeManifest = manifest.routes[match.routeId] + + routeManifest?.scripts?.forEach((asset) => { + assetScripts.push({ + tag: 'script', + attrs: { ...asset.attrs, nonce }, + children: asset.children, + }) + }) + }) + + return assetScripts + } + + const getScripts = (matches: Array): Array => + ( + matches + .map((match) => match.scripts!) + .flat(1) + .filter(Boolean) as Array + ).map( + ({ children, ...script }) => + ({ + tag: 'script', + attrs: { + ...script, + nonce, + }, + children, + }) satisfies RouterManagedTag, + ) + + const assetScripts = Vue.computed>(() => + getAssetScripts(matches.value), + ) + const scripts = Vue.computed>(() => + getScripts(matches.value), ) const mounted = Vue.ref(false) @@ -29,29 +72,27 @@ export const Scripts = Vue.defineComponent({ mounted.value = true }) - return () => { - return renderScripts(router, scripts.value, mounted.value, nonce) - } + return () => + renderScripts(router, { + scripts: scripts.value, + assetScripts: assetScripts.value, + mounted: mounted.value, + nonce, + }) }, }) function renderScripts( router: ReturnType, - scriptParts: ReturnType, - mounted: boolean, - nonce?: string, + { scripts, assetScripts, mounted, nonce }: ScriptsRenderState, ) { const allScripts: Array = [] - let streamBoundary: RouterManagedTag | undefined - const [scripts, assetScripts] = scriptParts if ((isServer ?? router.isServer) && router.serverSsr) { - const initialHydrationScripts = - router.serverSsr.takeInitialHydrationScriptTags() - allScripts.push( - ...composeSsrBodyScripts(scriptParts, initialHydrationScripts), - ) - return renderScriptTags(allScripts) + const serverBufferedScript = router.serverSsr.takeBufferedScripts() + if (serverBufferedScript) { + allScripts.push(serverBufferedScript) + } } else if (router.ssr && !mounted) { allScripts.push({ tag: 'script', @@ -59,14 +100,15 @@ function renderScripts( children: '', } satisfies RouterManagedTag) - streamBoundary = { + allScripts.push({ tag: 'script', attrs: { nonce, + id: '$tsr-stream-barrier', 'data-allow-mismatch': true, }, children: '', - } satisfies RouterManagedTag + } satisfies RouterManagedTag) for (const asset of assetScripts) { allScripts.push({ @@ -82,18 +124,10 @@ function renderScripts( allScripts.push(...scripts) - if (mounted) { + if (mounted || ((isServer ?? router.isServer) && router.serverSsr)) { allScripts.push(...assetScripts) } - if (streamBoundary) { - allScripts.push(streamBoundary) - } - - return renderScriptTags(allScripts) -} - -function renderScriptTags(allScripts: Array) { return ( <> {allScripts.map((asset, i) => ( diff --git a/packages/vue-router/src/Transitioner.tsx b/packages/vue-router/src/Transitioner.tsx index 9f177184a2..b0133d965c 100644 --- a/packages/vue-router/src/Transitioner.tsx +++ b/packages/vue-router/src/Transitioner.tsx @@ -1,25 +1,109 @@ import * as Vue from 'vue' import { getLocationChangeInfo, trimPathRight } from '@tanstack/router-core' import { isServer } from '@tanstack/router-core/isServer' +import { batch, useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' -import type { AnyRouteMatch } from '@tanstack/router-core' +import { usePrevious } from './utils' +// Track mount state per router to avoid double-loading +let mountLoadForRouter = { router: null as any, mounted: false } + +/** + * Composable that sets up router transition logic. + * This is called from MatchesContent to set up: + * - router.startTransition + * - router.startViewTransition + * - History subscription + * - Router event watchers + * + * Must be called during component setup phase. + */ export function useTransitionerSetup() { const router = useRouter() + + // Skip on server - no transitions needed if (isServer ?? router.isServer) { return } - let transitionOwner: Array | undefined - router.startTransition = async (fn, expected) => { - transitionOwner = expected + const isLoading = useStore(router.stores.isLoading, (value) => value) + + // Track if we're in a transition - using a ref to track async transitions + const isTransitioning = Vue.ref(false) + + // Track pending state changes + const hasPending = useStore(router.stores.hasPending, (value) => value) + + const previousIsLoading = usePrevious(() => isLoading.value) + + const isAnyPending = Vue.computed( + () => isLoading.value || isTransitioning.value || hasPending.value, + ) + const previousIsAnyPending = usePrevious(() => isAnyPending.value) + + const isPagePending = Vue.computed(() => isLoading.value || hasPending.value) + const previousIsPagePending = usePrevious(() => isPagePending.value) + + // Implement startTransition similar to React/Solid + // Vue doesn't have a native useTransition like React 18, so we simulate it + // We also update the router state's isTransitioning flag so useMatch can check it + router.startTransition = (fn: () => void | Promise) => { + isTransitioning.value = true + // Also update the router state so useMatch knows we're transitioning + try { + router.stores.isTransitioning.set(true) + } catch { + // Ignore errors if component is unmounted + } + + // Helper to end the transition + const endTransition = () => { + // Use nextTick to ensure Vue has processed all reactive updates + Vue.nextTick(() => { + try { + isTransitioning.value = false + router.stores.isTransitioning.set(false) + } catch { + // Ignore errors if component is unmounted + } + }) + } + + // Execute the function synchronously + // The function internally may call startViewTransition which schedules async work + // via document.startViewTransition, but we don't need to wait for it here + // because Vue's reactivity will trigger re-renders when state changes fn() - await Vue.nextTick() - return transitionOwner === expected + + // End the transition on next tick to allow Vue to process reactive updates + endTransition() } + // Vue updates DOM asynchronously (next tick). The View Transitions API expects the + // update callback promise to resolve only after the DOM has been updated. + // Wrap the router-core implementation to await a Vue flush before resolving. + const originalStartViewTransition: + | undefined + | ((fn: () => Promise) => void) = + (router as any).__tsrOriginalStartViewTransition ?? + router.startViewTransition + + ;(router as any).__tsrOriginalStartViewTransition = + originalStartViewTransition + + router.startViewTransition = (fn: () => Promise) => { + return originalStartViewTransition?.(async () => { + await fn() + await Vue.nextTick() + }) + } + + // Subscribe to location changes + // and try to load the new location + let unsubscribe: (() => void) | undefined + Vue.onMounted(() => { - Vue.onUnmounted(router.history.subscribe(router.load)) + unsubscribe = router.history.subscribe(router.load) const nextLocation = router.buildLocation({ to: router.latestLocation.pathname, @@ -30,34 +114,130 @@ export function useTransitionerSetup() { _includeValidateSearch: true, }) + // Check if the current URL matches the canonical form. + // Compare publicHref (browser-facing URL) for consistency with + // the server-side redirect check in router.beforeLoad. if ( trimPathRight(router.latestLocation.publicHref) !== trimPathRight(nextLocation.publicHref) ) { - router.commitLocation({ - ...nextLocation, - replace: true, - ignoreBlocker: true, - }) + router.commitLocation({ ...nextLocation, replace: true }) + } + }) + + // Track if component is mounted to prevent updates after unmount + const isMounted = Vue.ref(false) + + Vue.onMounted(() => { + isMounted.value = true + if (!isAnyPending.value) { + if (router.stores.status.get() === 'pending') { + batch(() => { + router.stores.status.set('idle') + router.stores.resolvedLocation.set(router.stores.location.get()) + }) + } + } + }) + + Vue.onUnmounted(() => { + isMounted.value = false + if (unsubscribe) { + unsubscribe() + } + }) + + // Try to load the initial location + Vue.onMounted(() => { + if ( + (typeof window !== 'undefined' && router.ssr) || + (mountLoadForRouter.router === router && mountLoadForRouter.mounted) + ) { return } + mountLoadForRouter = { router, mounted: true } + const tryLoad = async () => { + try { + await router.load() + } catch (err) { + console.error(err) + } + } + tryLoad() + }) - const resolvedLocation = router.stores.resolvedLocation.get() - if ( - resolvedLocation?.href === router.latestLocation.href && - resolvedLocation.state.__TSR_key === router.latestLocation.state.__TSR_key - ) { - router.emit({ - type: 'onRendered', - ...getLocationChangeInfo(resolvedLocation, resolvedLocation), - }) - } else if (!router._tx) { - router.load().catch(console.error) + // Setup watchers for emitting events + // All watchers check isMounted to prevent updates after unmount + Vue.watch( + () => isLoading.value, + (newValue) => { + if (!isMounted.value) return + try { + if (previousIsLoading.value.previous && !newValue) { + router.emit({ + type: 'onLoad', + ...getLocationChangeInfo( + router.stores.location.get(), + router.stores.resolvedLocation.get(), + ), + }) + } + } catch { + // Ignore errors if component is unmounted + } + }, + ) + + Vue.watch(isPagePending, (newValue) => { + if (!isMounted.value) return + try { + // emit onBeforeRouteMount + if (previousIsPagePending.value.previous && !newValue) { + router.emit({ + type: 'onBeforeRouteMount', + ...getLocationChangeInfo( + router.stores.location.get(), + router.stores.resolvedLocation.get(), + ), + }) + } + } catch { + // Ignore errors if component is unmounted + } + }) + + Vue.watch(isAnyPending, (newValue) => { + if (!isMounted.value) return + try { + if (!newValue && router.stores.status.get() === 'pending') { + batch(() => { + router.stores.status.set('idle') + router.stores.resolvedLocation.set(router.stores.location.get()) + }) + } + + // The router was pending and now it's not + if (previousIsAnyPending.value.previous && !newValue) { + const changeInfo = getLocationChangeInfo( + router.stores.location.get(), + router.stores.resolvedLocation.get(), + ) + router.emit({ + type: 'onResolved', + ...changeInfo, + }) + } + } catch { + // Ignore errors if component is unmounted } }) } -/** @deprecated Use useTransitionerSetup() instead. */ +/** + * @deprecated Use useTransitionerSetup() composable instead. + * This component is kept for backwards compatibility but the setup logic + * has been moved to useTransitionerSetup() for better SSR hydration. + */ export const Transitioner = Vue.defineComponent({ name: 'Transitioner', setup() { diff --git a/packages/vue-router/src/awaited.tsx b/packages/vue-router/src/awaited.tsx index 136d7bbc6e..ca20035c7d 100644 --- a/packages/vue-router/src/awaited.tsx +++ b/packages/vue-router/src/awaited.tsx @@ -9,7 +9,7 @@ export type AwaitOptions = { export function useAwaited({ promise: _promise, -}: AwaitOptions): [data: T, promise: DeferredPromise] { +}: AwaitOptions): [T, DeferredPromise] { const promise = defer(_promise) if (promise[TSR_DEFERRED_PROMISE].status === 'pending') { diff --git a/packages/vue-router/src/fileRoute.ts b/packages/vue-router/src/fileRoute.ts index 69334b79ee..672328b560 100644 --- a/packages/vue-router/src/fileRoute.ts +++ b/packages/vue-router/src/fileRoute.ts @@ -43,14 +43,11 @@ export function createFileRoute< TFullPath extends RouteConstraints['TFullPath'] = FileRoutesByPath[TFilePath]['fullPath'], >( - // eslint-disable-next-line unused-imports/no-unused-vars path?: TFilePath, ): FileRoute['createRoute'] { - return (options) => { - const route = createRoute(options as any) - ;(route as any).isRoot = false - return route as any - } + return new FileRoute(path, { + silent: true, + }).createRoute } /** @@ -208,7 +205,10 @@ export class LazyRoute { } useMatch: UseMatchRoute = (opts) => { - return useMatch({ ...opts, from: this.options.id } as any) as any + return useMatch({ + select: opts?.select, + from: this.options.id, + } as any) as any } useRouteContext: UseRouteContextRoute = (opts) => { @@ -216,11 +216,17 @@ export class LazyRoute { } useSearch: UseSearchRoute = (opts) => { - return useSearch({ ...opts, from: this.options.id } as any) + return useSearch({ + select: opts?.select, + from: this.options.id, + } as any) as any } useParams: UseParamsRoute = (opts) => { - return useParams({ ...opts, from: this.options.id } as any) + return useParams({ + select: opts?.select, + from: this.options.id, + } as any) as any } useLoaderDeps: UseLoaderDepsRoute = (opts) => { diff --git a/packages/vue-router/src/headContentUtils.tsx b/packages/vue-router/src/headContentUtils.tsx index b597d74c0c..1f1f8ff973 100644 --- a/packages/vue-router/src/headContentUtils.tsx +++ b/packages/vue-router/src/headContentUtils.tsx @@ -1,13 +1,12 @@ import * as Vue from 'vue' import { - _getAssetMatches, appendUniqueUserTags, escapeHtml, getAssetCrossOrigin, getScriptPreloadAttrs, resolveManifestCssLink, } from '@tanstack/router-core' -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' import type { AssetCrossOriginConfig, @@ -16,16 +15,132 @@ import type { export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => { const router = useRouter() - const matches = useSelector(router.stores.matches, _getAssetMatches) + const matches = useStore(router.stores.matches, (value) => value) - const tags = Vue.computed>(() => { - const currentMatches = matches.value - const tags: Array = [] + const meta = Vue.computed>(() => { + const resultMeta: Array = [] + const metaByAttribute: Record = {} + let title: RouterManagedTag | undefined + ;[...matches.value.map((match) => match.meta!).filter(Boolean)] + .reverse() + .forEach((metas) => { + ;[...metas].reverse().forEach((m) => { + if (!m) return + + if (m.title) { + if (!title) { + title = { + tag: 'title', + children: m.title, + } + } + } else if ('script:ld+json' in m) { + // Handle JSON-LD structured data + // Content is HTML-escaped to prevent XSS when injected via innerHTML + try { + const json = JSON.stringify(m['script:ld+json']) + resultMeta.push({ + tag: 'script', + attrs: { + type: 'application/ld+json', + }, + children: escapeHtml(json), + }) + } catch { + // Skip invalid JSON-LD objects + } + } else { + const attribute = m.name ?? m.property + if (attribute) { + if (metaByAttribute[attribute]) { + return + } else { + metaByAttribute[attribute] = true + } + } + + resultMeta.push({ + tag: 'meta', + attrs: { + ...m, + }, + }) + } + }) + }) + + if (title) { + resultMeta.push(title) + } + + resultMeta.reverse() + + return resultMeta + }) + + const links = Vue.computed>( + () => + matches.value + .map((match) => match.links!) + .filter(Boolean) + .flat(1) + .map((link) => ({ + tag: 'link', + attrs: { + ...link, + }, + })) as Array, + ) + + const preloadMeta = Vue.computed>(() => { + const preloadMeta: Array = [] + + matches.value.forEach((match) => { + router.ssr?.manifest?.routes[match.routeId]?.preloads + ?.filter(Boolean) + .forEach((preload) => { + preloadMeta.push({ + tag: 'link', + attrs: { + ...getScriptPreloadAttrs( + router.ssr?.manifest, + preload, + assetCrossOrigin, + ), + }, + }) + }) + }) + + return preloadMeta + }) + + const headScripts = Vue.computed>(() => + ( + matches.value + .map((match) => match.headScripts!) + .flat(1) + .filter(Boolean) as Array + ).map(({ children, ...script }) => ({ + tag: 'script', + attrs: { + ...script, + }, + children, + })), + ) + + const manifestAssets = Vue.computed>(() => { const manifest = router.ssr?.manifest - for (const match of currentMatches) { - for (const link of manifest?.routes[match.routeId]?.css ?? []) { + + const assets: Array = [] + + matches.value.forEach((match) => { + const routeManifest = manifest?.routes[match.routeId] + + routeManifest?.css?.forEach((link) => { const resolvedLink = resolveManifestCssLink(link) - tags.push({ + assets.push({ tag: 'link', attrs: { rel: 'stylesheet', @@ -35,10 +150,11 @@ export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => { resolvedLink.crossOrigin, }, }) - } - } + }) + }) + if (manifest?.inlineStyle) { - tags.push({ + assets.push({ tag: 'style', attrs: manifest.inlineStyle.attrs, children: manifest.inlineStyle.children, @@ -46,97 +162,16 @@ export const useTags = (assetCrossOrigin?: AssetCrossOriginConfig) => { }) } - const resultMeta: Array = [] - const metaByAttribute: Record = {} - let title: RouterManagedTag | undefined - for (let i = currentMatches.length - 1; i >= 0; i--) { - const metas = currentMatches[i]!.meta - if (!metas) { - continue - } - for (let j = metas.length - 1; j >= 0; j--) { - const m = metas[j] - if (!m) { - continue - } - - if (m.title) { - if (!title) { - title = { - tag: 'title', - children: m.title, - } - } - } else if ('script:ld+json' in m) { - // Content is HTML-escaped to prevent XSS when injected via innerHTML. - try { - resultMeta.push({ - tag: 'script', - attrs: { type: 'application/ld+json' }, - children: escapeHtml(JSON.stringify(m['script:ld+json'])), - }) - } catch { - // Skip invalid JSON-LD objects. - } - } else { - const attribute = m.name ?? m.property - if (attribute) { - if (metaByAttribute[attribute]) { - continue - } else { - metaByAttribute[attribute] = true - } - } - resultMeta.push({ - tag: 'meta', - attrs: { - ...m, - }, - }) - } - } - } - - if (title) { - resultMeta.push(title) - } - resultMeta.reverse() - appendUniqueUserTags(tags, resultMeta) - - const preloads: Array = [] - const links: Array = [] - const headScripts: Array = [] - for (const match of currentMatches) { - for (const preload of manifest?.routes[match.routeId]?.preloads ?? []) { - if (preload) { - preloads.push({ - tag: 'link', - attrs: { - ...getScriptPreloadAttrs(manifest, preload, assetCrossOrigin), - }, - }) - } - } - for (const link of match.links ?? []) { - if (link) { - links.push({ tag: 'link', attrs: { ...link } }) - } - } - for (const script of match.headScripts ?? []) { - if (script) { - const { children, ...attrs } = script - headScripts.push({ - tag: 'script', - attrs: { ...attrs }, - children: children as string | undefined, - }) - } - } - } - tags.push(...preloads) - appendUniqueUserTags(tags, links) - appendUniqueUserTags(tags, headScripts) - return tags + return assets }) - return () => tags.value + + return () => { + const tags: Array = [] + tags.push(...manifestAssets.value) + appendUniqueUserTags(tags, meta.value) + tags.push(...preloadMeta.value) + appendUniqueUserTags(tags, links.value) + appendUniqueUserTags(tags, headScripts.value) + return tags + } } diff --git a/packages/vue-router/src/index.tsx b/packages/vue-router/src/index.tsx index f63a763e25..2e14e349f0 100644 --- a/packages/vue-router/src/index.tsx +++ b/packages/vue-router/src/index.tsx @@ -15,6 +15,8 @@ export { stringifySearchWith, functionalUpdate, replaceEqualDeep, + isPlainObject, + isPlainArray, deepEqual, createControlledPromise, retainSearchParams, @@ -197,6 +199,7 @@ export type { RegisteredRouter, RouterContextOptions, ControllablePromise, + InjectedHtmlEntry, RouterOptions, RouterState, ListenerFn, diff --git a/packages/vue-router/src/lazyRouteComponent.tsx b/packages/vue-router/src/lazyRouteComponent.tsx index 3137e15ba4..77a2233573 100644 --- a/packages/vue-router/src/lazyRouteComponent.tsx +++ b/packages/vue-router/src/lazyRouteComponent.tsx @@ -44,13 +44,9 @@ export function lazyRouteComponent< // Use existing promise or create new one if (!loadPromise) { - error = undefined loadPromise = importer() .then((res) => { - if (typeof document !== 'undefined') { - loadPromise = undefined - ;(lazyComp as any).preload = undefined - } + loadPromise = undefined comp = res[exportName ?? 'default'] return comp }) @@ -69,6 +65,7 @@ export function lazyRouteComponent< return loadPromise } + // Create a lazy component wrapper using defineComponent so it works in Vue SFC templates const lazyComp = Vue.defineComponent({ name: 'LazyRouteComponent', diff --git a/packages/vue-router/src/link.tsx b/packages/vue-router/src/link.tsx index 34666743e3..3a5a9875a8 100644 --- a/packages/vue-router/src/link.tsx +++ b/packages/vue-router/src/link.tsx @@ -1,7 +1,7 @@ import * as Vue from 'vue' import { deepEqual, - getUrlScheme, + exactPathTest, hasKeys, isDangerousProtocol, preloadWarning, @@ -9,8 +9,8 @@ import { } from '@tanstack/router-core' import { isServer } from '@tanstack/router-core/isServer' +import { useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' -import { linkLocationContext } from './matchContext' import { useIntersectionObserver } from './utils' import type { @@ -29,6 +29,8 @@ import type { type EventHandler = (e: TEvent) => void +const timeoutMap = new WeakMap>() + type DataAttributes = { [K in `data-${string}`]?: unknown } @@ -56,17 +58,6 @@ type VueStyleLinkEventHandlers = { onTouchstart?: EventHandler } -type LinkEventHandlers = { - onClick: EventHandler - onBlur: EventHandler - onFocus: EventHandler - onMouseenter: EventHandler - onMouseleave: EventHandler - onMouseover: EventHandler - onMouseout: EventHandler - onTouchstart: EventHandler -} - interface StyledProps { class?: LinkHTMLAttributes['class'] style?: LinkHTMLAttributes['style'] @@ -82,9 +73,7 @@ type PropsOfComponent = ? P : Record -type AnyLinkPropsOptions = UseLinkPropsOptions & { - _asChild?: unknown -} +type AnyLinkPropsOptions = UseLinkPropsOptions type LinkEventOptions = AnyLinkPropsOptions & Partial export function useLinkProps< @@ -95,233 +84,207 @@ export function useLinkProps< TMaskTo extends string = '', >( options: UseLinkPropsOptions, -): LinkHTMLAttributes { - return useLinkPropsImpl(() => options as AnyLinkPropsOptions) -} - -function useLinkPropsImpl( - getOptions: () => AnyLinkPropsOptions, ): LinkHTMLAttributes { const router = useRouter() - let renderFetchedHref: string | undefined + const isTransitioning = Vue.ref(false) + let hasRenderFetched = false // Ensure router is defined before proceeding if (!router) { console.warn('useRouter must be used inside a component!') - return {} + return Vue.computed(() => ({})) as unknown as LinkHTMLAttributes + } + + // Determine if the link is external or internal + const type = Vue.computed(() => { + try { + new URL(`${options.to}`) + return 'external' + } catch { + return 'internal' + } + }) + + const ref = Vue.ref(null) + const eventHandlers = getLinkEventHandlers(options as LinkEventOptions) + + if (type.value === 'external') { + // Block dangerous protocols like javascript:, blob:, data: + if (isDangerousProtocol(options.to as string, router.protocolAllowlist)) { + if (process.env.NODE_ENV !== 'production') { + console.warn(`Blocked Link with dangerous protocol: ${options.to}`) + } + // Return props without href to prevent navigation + const safeProps: Record = { + ...getPropsSafeToSpread(options as AnyLinkPropsOptions), + ref, + // No href attribute - blocks the dangerous protocol + target: options.target, + disabled: options.disabled, + style: options.style, + class: options.class, + onClick: options.onClick, + onBlur: options.onBlur, + onFocus: options.onFocus, + onMouseenter: eventHandlers.onMouseenter, + onMouseleave: eventHandlers.onMouseleave, + onMouseover: eventHandlers.onMouseover, + onMouseout: eventHandlers.onMouseout, + onTouchstart: eventHandlers.onTouchstart, + } + + // Remove undefined values + Object.keys(safeProps).forEach((key) => { + if (safeProps[key] === undefined) { + delete safeProps[key] + } + }) + + return Vue.computed( + () => safeProps as LinkHTMLAttributes, + ) as unknown as LinkHTMLAttributes + } + + // External links just have simple props + const externalProps: Record = { + ...getPropsSafeToSpread(options as AnyLinkPropsOptions), + ref, + href: options.to, + target: options.target, + disabled: options.disabled, + style: options.style, + class: options.class, + onClick: options.onClick, + onBlur: options.onBlur, + onFocus: options.onFocus, + onMouseenter: eventHandlers.onMouseenter, + onMouseleave: eventHandlers.onMouseleave, + onMouseover: eventHandlers.onMouseover, + onMouseout: eventHandlers.onMouseout, + onTouchstart: eventHandlers.onTouchstart, + } + + // Remove undefined values + Object.keys(externalProps).forEach((key) => { + if (externalProps[key] === undefined) { + delete externalProps[key] + } + }) + + return Vue.computed( + () => externalProps as LinkHTMLAttributes, + ) as unknown as LinkHTMLAttributes } // During SSR we render exactly once and do not need reactivity. // Avoid store subscriptions, effects and observers on the server. if (isServer ?? router.isServer) { - const options = getOptions() - if (getUrlScheme(`${options.to}`)) { - return Vue.shallowRef( - getExternalLinkProps(options, router), - ) as unknown as LinkHTMLAttributes - } - const next = router.buildLocation(options as any) - const href = getHref(options, router, next) + const href = getHref({ + options: options as AnyLinkPropsOptions, + router, + nextLocation: next, + }) - const isActive = - !options.disabled && (href === undefined || !!getUrlScheme(href)) - ? false - : getIsActive( - router.stores.location.get(), - next, - options.activeOptions, - router, - ) + const isActive = getIsActive({ + loc: router.stores.location.get(), + nextLoc: next, + activeOptions: options.activeOptions, + router, + }) - const { resolvedProps, resolvedClass, resolvedStyle } = resolveStyleProps( - options, + const { + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, + resolvedStyle, + } = resolveStyleProps({ + options: options as AnyLinkPropsOptions, isActive, - ) + }) const result = combineResultProps({ href, - options, + options: options as AnyLinkPropsOptions, isActive, - resolvedProps, - resolvedClass, + isTransitioning: false, + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, resolvedStyle, }) - return Vue.shallowRef( + return Vue.ref( result as LinkHTMLAttributes, ) as unknown as LinkHTMLAttributes } - const ref = Vue.ref(null) + const currentLocation = useStore(router.stores.location, (l) => l, { + equal: (prev, next) => prev.href === next.href, + }) - const isExternal = () => !!getUrlScheme(`${getOptions().to}`) + const next = Vue.computed(() => { + // Rebuild when inherited search/hash or the current route context changes. - // Links build from the location their match presents, or the router's live - // one outside every match. External links never read it. - const source = Vue.inject(linkLocationContext)! + const opts = { _fromLocation: currentLocation.value, ...options } + return router.buildLocation(opts) + }) - // Rebuild only when the href moves. - const currentLocation = Vue.computed((prev?: ParsedLocation) => - prev?.href === source.value.href ? prev : source.value, + const preload = Vue.computed(() => { + if (options.reloadDocument) { + return false + } + return options.preload ?? router.options.defaultPreload + }) + + const preloadDelay = Vue.computed( + () => options.preloadDelay ?? router.options.defaultPreloadDelay ?? 0, ) - // The Link's own destination options, replaced only when a navigation - // option changes identity: the router reuses a location built from the same - // object without reading the current location. A reactive value changes in - // place, so a reactive option value (checked one level deep, not nested) - // gets a fresh object per location instead, re-read at each navigation. A - // mask holds destination options of its own, so its values are checked too. - const dest = Vue.computed((prev?: Record) => { - const options = getOptions() as Record - const dest: Record = {} - let same = !!prev - for (const key of NAVIGATION_KEYS) { - const value = (dest[key] = options[key]) - if ( - Vue.isProxy(value) || - (key === 'mask' && value && Object.values(value).some(Vue.isProxy)) - ) { - // Track the location: a reactive value is re-read at each one. - same = !currentLocation.value - } - same &&= prev![key] === value - } - return same ? prev! : dest - }) + const isActive = Vue.computed(() => + getIsActive({ + activeOptions: options.activeOptions, + loc: currentLocation.value, + nextLoc: next.value, + router, + }), + ) - // Clicks and preloads build from the latest location the Link's match - // presents. - const navigateOptions = () => { - const options = dest.value - options._fromLocation = source.value - return options as any - } + const doPreload = () => + router + .preloadRoute({ ...options, _builtLocation: next.value } as any) + .catch((err: any) => { + console.warn(err) + console.warn(preloadWarning) + }) - // [href, active] of an internal Link, derived in one computation. An - // unchanged result keeps its identity, so a navigation that leaves the Link - // as it was notifies nothing downstream. - const state = Vue.computed((prev?: LinkState): LinkState => { - const options = getOptions() - const destOptions = dest.value - // Rebuild when inherited search/hash or the current route context changes. - destOptions._fromLocation = currentLocation.value - const next = router.buildLocation(destOptions as any) - const href = getHref(options, router, next) - const isActive = - !options.disabled && (href === undefined || !!getUrlScheme(href)) - ? false - : getIsActive( - currentLocation.value, - next, - options.activeOptions, - router, - ) - return prev && - prev[0 /* href */] === href && - prev[1 /* isActive */] === isActive - ? prev - : [href, isActive] - }) - - // The requested mode does not depend on the location, so the preload - // effects do not run on navigations. - const preloadMode = Vue.computed(() => { - const options = getOptions() - return ( - !isExternal() && - !options.reloadDocument && - !options.disabled && - (options.preload ?? router.options.defaultPreload) - ) - }) - const preload = () => { - const href = !isExternal() && state.value[0 /* href */] - return !!href && !getUrlScheme(href) && preloadMode.value - } - - const preloadDelay = () => - getOptions().preloadDelay ?? router.options.defaultPreloadDelay ?? 0 - - const doPreload = () => { - return router.preloadRoute(navigateOptions()).catch((err: any) => { - console.warn(err) - console.warn(preloadWarning) - }) - } - - let pendingPreload: 'intent' | 'viewport' | undefined - let preloadTimeout: ReturnType | undefined - const cancelPreload = () => { - clearTimeout(preloadTimeout) - preloadTimeout = pendingPreload = undefined - } - - const enqueuePreload = ( - e?: MouseEvent | FocusEvent | IntersectionObserverEntry, + const preloadViewportIoCallback = ( + entry: IntersectionObserverEntry | undefined, ) => { - if (!e) { - cancelPreload() - return - } - - const isIntersecting = (e as IntersectionObserverEntry).isIntersecting - const preloadMode = isIntersecting === undefined ? 'intent' : 'viewport' - if (preload() !== preloadMode || isIntersecting === false) { - if (isIntersecting === false && pendingPreload === 'viewport') { - cancelPreload() - } - return - } - - if (!preloadDelay()) { + if (entry?.isIntersecting) { doPreload() - return - } - - if (!preloadTimeout) { - const scheduledHref = state.value[0 /* href */] - pendingPreload = preloadMode - preloadTimeout = setTimeout(() => { - preloadTimeout = pendingPreload = undefined - if ( - preload() === preloadMode && - state.value[0 /* href */] === scheduledHref - ) { - doPreload() - } - }, preloadDelay()) } } useIntersectionObserver( ref, - enqueuePreload, - () => preloadMode.value !== 'viewport', - // Intent preloading still needs timer cleanup without an observer. - () => !!preloadMode.value, + preloadViewportIoCallback, + { rootMargin: '100px' }, + { disabled: () => !!options.disabled || !(preload.value === 'viewport') }, ) - Vue.watchEffect(() => { - if (preloadMode.value !== 'render' || !preload()) { + Vue.effect(() => { + if (hasRenderFetched) { return } - - const nextHref = state.value[0 /* href */] - if (nextHref && renderFetchedHref !== nextHref) { - renderFetchedHref = nextHref + if (!options.disabled && preload.value === 'render') { doPreload() + hasRenderFetched = true } }) // The click handler const handleClick = (e: PointerEvent): void => { - const options = getOptions() - const href = !isExternal() && state.value[0 /* href */] - if (!options.disabled && (!href || getUrlScheme(href))) { - return - } - // Check actual element's target attribute as fallback const elementTarget = ( e.currentTarget as HTMLAnchorElement | SVGAElement @@ -331,7 +294,7 @@ function useLinkPropsImpl( if ( !options.disabled && - !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && + !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === '_self') && e.button === 0 @@ -342,83 +305,142 @@ function useLinkPropsImpl( } e.preventDefault() - enqueuePreload() + + isTransitioning.value = true + + const unsub = router.subscribe('onResolved', () => { + unsub() + isTransitioning.value = false + }) // All is well? Navigate! - router.navigate(navigateOptions()) + router.navigate({ + ...options, + replace: options.replace, + resetScroll: options.resetScroll, + hashScrollIntoView: options.hashScrollIntoView, + startTransition: options.startTransition, + viewTransition: options.viewTransition, + ignoreBlocker: options.ignoreBlocker, + }) } } - const handleTouchStart = () => { - if (preload() === 'intent') { + const enqueueIntentPreload = (e: MouseEvent | FocusEvent) => { + if (options.disabled || preload.value !== 'intent') return + + if (!preloadDelay.value) { doPreload() + return + } + + const eventTarget = e.currentTarget || e.target + + if (!eventTarget || timeoutMap.has(eventTarget)) return + + timeoutMap.set( + eventTarget, + setTimeout(() => { + timeoutMap.delete(eventTarget) + doPreload() + }, preloadDelay.value), + ) + } + + const handleTouchStart = (_: TouchEvent) => { + if (options.disabled || preload.value !== 'intent') return + doPreload() + } + + const handleLeave = (e: MouseEvent | FocusEvent) => { + if (options.disabled) return + const eventTarget = e.currentTarget || e.target + + if (eventTarget) { + const id = timeoutMap.get(eventTarget) + clearTimeout(id) + timeoutMap.delete(eventTarget) } } - const handleLeave = () => { - if (pendingPreload === 'intent') { - cancelPreload() - } - } - + // Helper to compose event handlers - with explicit return type and better type handling function composeEventHandlers( - getUserHandler: () => EventHandler | undefined, - handler: EventHandler, + handlers: Array | undefined>, ): (e: T) => void { return (event: T) => { - getUserHandler()?.(event) - handler(event) + for (const handler of handlers) { + if (handler) { + handler(event) + } + } } } + // Get the active and inactive props + const resolvedStyleProps = Vue.computed(() => + resolveStyleProps({ + options: options as AnyLinkPropsOptions, + isActive: isActive.value, + }), + ) + + const href = Vue.computed(() => + getHref({ + options: options as AnyLinkPropsOptions, + router, + nextLocation: next.value, + }), + ) + // Create static event handlers that don't change between renders - const staticEventHandlers: LinkEventHandlers = { - onClick: composeEventHandlers(() => getOptions().onClick, handleClick), - onBlur: composeEventHandlers(() => getOptions().onBlur, handleLeave), - onFocus: composeEventHandlers(() => getOptions().onFocus, enqueuePreload), - onMouseenter: composeEventHandlers( - () => getLinkEventHandlers(getOptions() as LinkEventOptions).onMouseenter, - enqueuePreload, - ), - onMouseover: composeEventHandlers( - () => getLinkEventHandlers(getOptions() as LinkEventOptions).onMouseover, - enqueuePreload, - ), - onMouseleave: composeEventHandlers( - () => getLinkEventHandlers(getOptions() as LinkEventOptions).onMouseleave, + const staticEventHandlers = { + onClick: composeEventHandlers([options.onClick, handleClick]), + onBlur: composeEventHandlers([options.onBlur, handleLeave]), + onFocus: composeEventHandlers([ + options.onFocus, + enqueueIntentPreload, + ]), + onMouseenter: composeEventHandlers([ + eventHandlers.onMouseenter, + enqueueIntentPreload, + ]), + onMouseover: composeEventHandlers([ + eventHandlers.onMouseover, + enqueueIntentPreload, + ]), + onMouseleave: composeEventHandlers([ + eventHandlers.onMouseleave, handleLeave, - ), - onMouseout: composeEventHandlers( - () => getLinkEventHandlers(getOptions() as LinkEventOptions).onMouseout, + ]), + onMouseout: composeEventHandlers([ + eventHandlers.onMouseout, handleLeave, - ), - onTouchstart: composeEventHandlers( - () => getLinkEventHandlers(getOptions() as LinkEventOptions).onTouchstart, + ]), + onTouchstart: composeEventHandlers([ + eventHandlers.onTouchstart, handleTouchStart, - ), + ]), } // Compute all props synchronously to avoid hydration mismatches // Using Vue.computed ensures props are calculated at render time, not after const computedProps = Vue.computed(() => { - const options = getOptions() - if (isExternal()) { - return getExternalLinkProps(options, router, ref, staticEventHandlers) - } - - const [href, isActive] = state.value - const { resolvedProps, resolvedClass, resolvedStyle } = resolveStyleProps( - options, - isActive, - ) + const { + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, + resolvedStyle, + } = resolvedStyleProps.value return combineResultProps({ - href, - options, + href: href.value, + options: options as AnyLinkPropsOptions, ref, staticEventHandlers, - isActive, - resolvedProps, - resolvedClass, + isActive: isActive.value, + isTransitioning: isTransitioning.value, + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, resolvedStyle, }) }) @@ -427,71 +449,67 @@ function useLinkPropsImpl( return computedProps as unknown as LinkHTMLAttributes } -// [href, active] of an internal Link. -type LinkState = [href: string | undefined, isActive: boolean] +function resolveStyleProps({ + options, + isActive, +}: { + options: AnyLinkPropsOptions + isActive: boolean +}) { + const activeProps = options.activeProps || (() => ({ class: 'active' })) + const resolvedActiveProps: StyledProps = (isActive + ? typeof activeProps === 'function' + ? activeProps() + : activeProps + : {}) || { class: undefined, style: undefined } -// Options that decide where and how a Link navigates. -const NAVIGATION_KEYS = [ - 'to', - 'replace', - 'resetScroll', - 'hashScrollIntoView', - 'startTransition', - 'viewTransition', - 'ignoreBlocker', - 'params', - 'search', - 'hash', - 'state', - 'mask', - 'unsafeRelative', - 'from', - 'href', -] as const + const inactiveProps = options.inactiveProps || (() => ({})) -function resolveStyleProps(options: AnyLinkPropsOptions, isActive: boolean) { - const props = - (isActive ? options.activeProps : options.inactiveProps) || - (isActive ? STATIC_ACTIVE_PROPS : EMPTY_OBJECT) - const resolvedProps: StyledProps = - (typeof props === 'function' ? props() : props) || EMPTY_OBJECT - const baseClass = options.class - const stateClass = resolvedProps.class - const resolvedClass = baseClass - ? stateClass - ? [baseClass, stateClass] - : baseClass - : stateClass - ? stateClass - : undefined + const resolvedInactiveProps: StyledProps = (isActive + ? {} + : typeof inactiveProps === 'function' + ? inactiveProps() + : inactiveProps) || { class: undefined, style: undefined } - const baseStyle = options.style - const stateStyle = resolvedProps.style - let resolvedStyle: Record | undefined - if (baseStyle || stateStyle) { - // Keep a snapshot of reactive styles rather than returning their proxy. - const style: Record = {} - Object.assign(style, baseStyle, stateStyle) - if (hasKeys(style)) { - resolvedStyle = style - } + const classes = [ + options.class, + resolvedActiveProps?.class, + resolvedInactiveProps?.class, + ].filter(Boolean) + const resolvedClassName = classes.length ? classes.join(' ') : undefined + + const result: Record = {} + + // Merge styles from all sources + if (options.style) { + Object.assign(result, options.style) } + + if (resolvedActiveProps?.style) { + Object.assign(result, resolvedActiveProps.style) + } + + if (resolvedInactiveProps?.style) { + Object.assign(result, resolvedInactiveProps.style) + } + + const resolvedStyle = hasKeys(result) ? result : undefined return { - resolvedProps, - resolvedClass, + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, resolvedStyle, } } -const STATIC_ACTIVE_PROPS = { class: 'active' } -const EMPTY_OBJECT = {} - function combineResultProps({ href, options, isActive, - resolvedProps, - resolvedClass, + isTransitioning, + resolvedActiveProps, + resolvedInactiveProps, + resolvedClassName, resolvedStyle, ref, staticEventHandlers, @@ -500,18 +518,29 @@ function combineResultProps({ href: string | undefined options: AnyLinkPropsOptions isActive: boolean - resolvedProps: StyledProps - resolvedClass?: StyledProps['class'] + isTransitioning: boolean + resolvedActiveProps: StyledProps + resolvedInactiveProps: StyledProps + resolvedClassName?: string resolvedStyle?: Record ref?: Vue.VNodeRef | undefined - staticEventHandlers?: LinkEventHandlers + staticEventHandlers?: { + onClick: any + onBlur: any + onFocus: any + onMouseenter: any + onMouseover: any + onMouseleave: any + onMouseout: any + onTouchstart: any + } }) { - const disabled = options.disabled || href === undefined const result: Record = { ...getPropsSafeToSpread(options), ref, ...staticEventHandlers, - disabled: options._asChild ? disabled : undefined, + href, + disabled: !!options.disabled, target: options.target, } @@ -519,11 +548,11 @@ function combineResultProps({ result.style = resolvedStyle } - if (resolvedClass) { - result.class = resolvedClass + if (resolvedClassName) { + result.class = resolvedClassName } - if (disabled) { + if (options.disabled) { result.role = 'link' result['aria-disabled'] = true } @@ -533,67 +562,24 @@ function combineResultProps({ result['aria-current'] = 'page' } - for (const key of Object.keys(resolvedProps)) { + if (isTransitioning) { + result['data-transitioning'] = 'transitioning' + } + + for (const key of Object.keys(resolvedActiveProps)) { if (key !== 'class' && key !== 'style') { - result[key] = resolvedProps[key] + result[key] = resolvedActiveProps[key] } } - result.href = href + for (const key of Object.keys(resolvedInactiveProps)) { + if (key !== 'class' && key !== 'style') { + result[key] = resolvedInactiveProps[key] + } + } return result } -function getExternalLinkProps( - options: AnyLinkPropsOptions, - router: AnyRouter, - ref?: Vue.Ref, - staticEventHandlers?: LinkEventHandlers, -): LinkHTMLAttributes { - const dangerous = isDangerousProtocol( - options.to as string, - router.protocolAllowlist, - ) - const disabled = options.disabled || dangerous - if (process.env.NODE_ENV !== 'production' && dangerous) { - console.warn(`Blocked Link with dangerous protocol: ${options.to}`) - } - - const eventHandlers = getLinkEventHandlers(options as LinkEventOptions) - const result: Record = { - ...getPropsSafeToSpread(options), - ref, - href: disabled ? undefined : options.to, - target: options.target, - disabled: options._asChild ? disabled : undefined, - style: options.style, - class: options.class, - onClick: staticEventHandlers?.onClick ?? options.onClick, - onBlur: staticEventHandlers?.onBlur ?? options.onBlur, - onFocus: staticEventHandlers?.onFocus ?? options.onFocus, - onMouseenter: - staticEventHandlers?.onMouseenter ?? eventHandlers.onMouseenter, - onMouseleave: - staticEventHandlers?.onMouseleave ?? eventHandlers.onMouseleave, - onMouseover: staticEventHandlers?.onMouseover ?? eventHandlers.onMouseover, - onMouseout: staticEventHandlers?.onMouseout ?? eventHandlers.onMouseout, - onTouchstart: - staticEventHandlers?.onTouchstart ?? eventHandlers.onTouchstart, - } - - if (disabled) { - result.role = 'link' - result['aria-disabled'] = true - } - - for (const key of Object.keys(result)) { - if (result[key] === undefined) { - delete result[key] - } - } - - return result as LinkHTMLAttributes -} - function getLinkEventHandlers( options: LinkEventOptions, ): VueStyleLinkEventHandlers { @@ -606,85 +592,105 @@ function getLinkEventHandlers( } } -// Options the Link consumes; every other option is an element prop. -const LINK_OPTION_KEYS = new Set([ - ...NAVIGATION_KEYS, - 'activeProps', - 'inactiveProps', - 'activeOptions', - 'preload', - 'preloadDelay', - 'preloadIntentProximity', - 'children', - 'target', - 'disabled', - 'style', - 'class', - 'onClick', - 'onBlur', - 'onFocus', - 'onMouseEnter', - 'onMouseenter', - 'onMouseLeave', - 'onMouseleave', - 'onMouseOver', - 'onMouseover', - 'onMouseOut', - 'onMouseout', - 'onTouchStart', - 'onTouchstart', - 'reloadDocument', - '_asChild', - 'additionalProps', -]) - const getPropsSafeToSpread = (options: AnyLinkPropsOptions) => { - const propsSafeToSpread: Record = {} - for (const key in options) { - if (!LINK_OPTION_KEYS.has(key)) { - propsSafeToSpread[key] = (options as Record)[key] - } + const { + activeProps: _activeProps, + inactiveProps: _inactiveProps, + activeOptions: _activeOptions, + to: _to, + preload: _preload, + preloadDelay: _preloadDelay, + preloadIntentProximity: _preloadIntentProximity, + hashScrollIntoView: _hashScrollIntoView, + replace: _replace, + startTransition: _startTransition, + resetScroll: _resetScroll, + viewTransition: _viewTransition, + children: _children, + target: _target, + disabled: _disabled, + style: _style, + class: _class, + onClick: _onClick, + onBlur: _onBlur, + onFocus: _onFocus, + onMouseEnter: _onMouseEnter, + onMouseenter: _onMouseenter, + onMouseLeave: _onMouseLeave, + onMouseleave: _onMouseleave, + onMouseOver: _onMouseOver, + onMouseover: _onMouseover, + onMouseOut: _onMouseOut, + onMouseout: _onMouseout, + onTouchStart: _onTouchStart, + onTouchstart: _onTouchstart, + ignoreBlocker: _ignoreBlocker, + params: _params, + search: _search, + hash: _hash, + state: _state, + mask: _mask, + reloadDocument: _reloadDocument, + unsafeRelative: _unsafeRelative, + _asChild: __asChild, + from: _from, + additionalProps: _additionalProps, + ...propsSafeToSpread + } = options as AnyLinkPropsOptions & { + additionalProps?: unknown + children?: unknown + _asChild?: unknown } + return propsSafeToSpread } -function getIsActive( +function getIsActive({ + activeOptions, + loc, + nextLoc, + router, +}: { + activeOptions: LinkOptions['activeOptions'] loc: { pathname: string search: any hash: string - }, + } nextLoc: { pathname: string search: any hash: string - }, - activeOptions: LinkOptions['activeOptions'], - router: AnyRouter, -) { - const currentPath = removeTrailingSlash(loc.pathname, router.basepath) - const nextPath = removeTrailingSlash(nextLoc.pathname, router.basepath) + } + router: AnyRouter +}) { + if (activeOptions?.exact) { + const testExact = exactPathTest( + loc.pathname, + nextLoc.pathname, + router.basepath, + ) + if (!testExact) { + return false + } + } else { + const currentPath = removeTrailingSlash(loc.pathname, router.basepath) + const nextPath = removeTrailingSlash(nextLoc.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 + const pathIsFuzzyEqual = + currentPath.startsWith(nextPath) && + (currentPath.length === nextPath.length || + currentPath[nextPath.length] === '/') + if (!pathIsFuzzyEqual) { + return false + } } if (activeOptions?.includeSearch ?? true) { - const searchTest = deepEqual( - loc.search, - nextLoc.search, - !activeOptions?.exact, - activeOptions?.explicitUndefined, - ) + const searchTest = deepEqual(loc.search, nextLoc.search, { + partial: !activeOptions?.exact, + ignoreUndefined: !activeOptions?.explicitUndefined, + }) if (!searchTest) { return false } @@ -696,11 +702,15 @@ function getIsActive( return true } -function getHref( - options: AnyLinkPropsOptions, - router: AnyRouter, - nextLocation?: ParsedLocation, -) { +function getHref({ + options, + router, + nextLocation, +}: { + options: AnyLinkPropsOptions + router: AnyRouter + nextLocation?: ParsedLocation +}) { if (options.disabled) { return undefined } @@ -713,20 +723,10 @@ function getHref( const publicHref = location?.publicHref if (!publicHref) return undefined - const href = location?.external - ? publicHref - : router.history.createHref(publicHref) || '/' - if ( - (location?.external || href !== publicHref) && - isDangerousProtocol(href, router.protocolAllowlist) - ) { - if (process.env.NODE_ENV !== 'production') { - console.warn(`Blocked Link with dangerous protocol: ${href}`) - } - return undefined - } + const external = location?.external + if (external) return publicHref - return href + return router.history.createHref(publicHref) || '/' } // Type definitions @@ -782,7 +782,12 @@ export type LinkProps< export interface LinkPropsChildren { // If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns - children?: Vue.VNodeChild | ((state: { isActive: boolean }) => Vue.VNodeChild) + children?: + | Vue.VNodeChild + | ((state: { + isActive: boolean + isTransitioning: boolean + }) => Vue.VNodeChild) } type LinkComponentVueProps = TComp extends keyof HTMLElementTagNameMap @@ -853,34 +858,6 @@ export function createLink( }) as any } -function useLinkPropsSnapshot( - props: Record, - attrs: Record, -) { - const attrsSnapshot = Vue.shallowRef({ ...attrs }) - Vue.onBeforeUpdate(() => { - const keys = Object.keys(attrs) - const previous = attrsSnapshot.value - if ( - keys.length !== Object.keys(previous).length || - keys.some((key) => !Object.is(attrs[key], previous[key])) - ) { - attrsSnapshot.value = { ...attrs } - } - }) - - // Keep a plain cached snapshot so location-only updates do not repeatedly - // cross Vue's props and attrs proxies for every link computation. - const allProps = Vue.computed( - () => - ({ - ...props, - ...attrsSnapshot.value, - }) as AnyLinkPropsOptions, - ) - return () => allProps.value -} - const LinkImpl = Vue.defineComponent({ name: 'Link', inheritAttrs: false, @@ -911,12 +888,11 @@ const LinkImpl = Vue.defineComponent({ 'target', ], setup(props, { attrs, slots }) { - // The server renders once: read the props directly. - const linkPropsSource = useLinkPropsImpl( - (isServer ?? useRouter()?.isServer) - ? () => ({ ...props, ...attrs }) - : useLinkPropsSnapshot(props, attrs), - ) as LinkHTMLAttributes | Vue.ComputedRef + // Call useLinkProps ONCE during setup with combined props and attrs + const allProps = { ...props, ...attrs } + const linkPropsSource = useLinkProps(allProps) as + | LinkHTMLAttributes + | Vue.ComputedRef return () => { const Component = props._asChild || 'a' @@ -924,9 +900,16 @@ const LinkImpl = Vue.defineComponent({ const linkProps = Vue.unref(linkPropsSource) const isActive = linkProps['data-status'] === 'active' + const isTransitioning = + linkProps['data-transitioning'] === 'transitioning' // Create the slot content or empty array if no default slot - const slotContent = slots.default ? slots.default({ isActive }) : [] + const slotContent = slots.default + ? slots.default({ + isActive, + isTransitioning, + }) + : [] // Special handling for SVG links - wrap an inside the SVG if (Component === 'svg') { @@ -946,8 +929,8 @@ const LinkImpl = Vue.defineComponent({ ) } - // Vue normalizes class bindings in place; preserve the cached bindings. - return Vue.h(Component, { ...linkProps }, slotContent) + // Return the component with props and children + return Vue.h(Component, linkProps, slotContent) } }, }) @@ -959,6 +942,10 @@ export const Link = LinkImpl as unknown as Vue.Component & Vue.Component & LinkComponent<'a'> +function isCtrlEvent(e: MouseEvent) { + return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) +} + export type LinkOptionsFnOptions< TOptions, TComp, diff --git a/packages/vue-router/src/matchContext.tsx b/packages/vue-router/src/matchContext.tsx index d46757f443..1a8b7fb167 100644 --- a/packages/vue-router/src/matchContext.tsx +++ b/packages/vue-router/src/matchContext.tsx @@ -1,39 +1,39 @@ import * as Vue from 'vue' -import { _isRouteDeparting } from '@tanstack/router-core' -import type { InjectionKey, Ref } from 'vue' -import type { AnyRouter, ParsedLocation } from '@tanstack/router-core' + +// Reactive nearest-match context used by hooks that work relative to the +// current match in the tree. +export const matchContext = Symbol('TanStackRouterMatch') as Vue.InjectionKey< + Vue.Ref +> + +// Pending match context for nearest-match lookups +export const pendingMatchContext = Symbol( + 'TanStackRouterPendingMatch', +) as Vue.InjectionKey> + +// Dummy pending context when nearest pending state is not needed +export const dummyPendingMatchContext = Symbol( + 'TanStackRouterDummyPendingMatch', +) as Vue.InjectionKey> // Stable routeId context — a plain string (not reactive) that identifies // which route this component belongs to. Provided by Match, consumed by // MatchInner, Outlet, and useMatch for routeId-based store lookups. export const routeIdContext = Symbol( 'TanStackRouterRouteId', -) as InjectionKey - -// The location the links of the nearest match, or of the router outside every -// match, build from. Provided on the client only. -export const linkLocationContext = Symbol( - 'TanStackRouterLinkLocation', -) as InjectionKey>> +) as Vue.InjectionKey /** - * Provides the location the links below build from. A location publication - * whose navigation leaves `routeId` keeps the location the route still - * presents, so its links do no work: the route unmounts when that navigation - * commits, and any other outcome publishes a newer location. The store calls - * this subscription synchronously inside the publication, the only time the - * predicate is valid. Without a route the location is the live one. Links - * hand it to the router, so it stays raw rather than a readonly proxy. + * Retrieves nearest pending-match state from the component tree */ -export function provideLinkLocation(router: AnyRouter, routeId?: string) { - const store = router.stores.location - const linkLocation = Vue.shallowRef(store.get()) - Vue.onScopeDispose( - store.subscribe((location) => { - if (!_isRouteDeparting(router, routeId, location)) { - linkLocation.value = location - } - }).unsubscribe, - ) - Vue.provide(linkLocationContext, linkLocation) +export function injectPendingMatch(): Vue.Ref { + return Vue.inject(pendingMatchContext, Vue.ref(false)) +} + +/** + * Retrieves dummy pending-match state from the component tree + * This only exists so we can conditionally inject a value when we are not interested in the nearest pending match + */ +export function injectDummyPendingMatch(): Vue.Ref { + return Vue.inject(dummyPendingMatchContext, Vue.ref(false)) } diff --git a/packages/vue-router/src/nonRouteComponentContext.tsx b/packages/vue-router/src/nonRouteComponentContext.tsx deleted file mode 100644 index 2111a9ef57..0000000000 --- a/packages/vue-router/src/nonRouteComponentContext.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import * as Vue from 'vue' - -export type NonRouteComponent = - | 'pendingComponent' - | 'errorComponent' - | 'notFoundComponent' - -export const nonRouteComponentContext = - process.env.NODE_ENV !== 'production' - ? (Symbol('nonRouteComponentContext') as Vue.InjectionKey< - Vue.ComputedRef - >) - : undefined - -const NonRouteComponentContextProvider = - process.env.NODE_ENV !== 'production' - ? Vue.defineComponent({ - name: 'NonRouteComponentContextProvider', - props: { - value: { - type: String as Vue.PropType, - required: true, - }, - }, - setup(props, { slots }) { - Vue.provide( - nonRouteComponentContext!, - Vue.computed(() => props.value), - ) - return () => slots.default?.() - }, - }) - : undefined - -export function renderInNonRouteComponentContext( - component: Vue.Component, - props: Record | undefined, - context: NonRouteComponent, -): Vue.VNode { - return Vue.h( - NonRouteComponentContextProvider!, - { value: context }, - { default: () => Vue.h(component, props) }, - ) -} diff --git a/packages/vue-router/src/not-found.tsx b/packages/vue-router/src/not-found.tsx index 5a6b3c160d..f676c66e99 100644 --- a/packages/vue-router/src/not-found.tsx +++ b/packages/vue-router/src/not-found.tsx @@ -1,64 +1,55 @@ import * as Vue from 'vue' import { isNotFound } from '@tanstack/router-core' -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { CatchBoundary } from './CatchBoundary' import { useRouter } from './useRouter' import type { ErrorComponentProps, NotFoundError } from '@tanstack/router-core' -export const CatchNotFound = Vue.defineComponent({ - name: 'CatchNotFound', - inheritAttrs: false, - props: { - fallback: Function as Vue.PropType<(error: NotFoundError) => Vue.VNode>, - onCatch: Function as Vue.PropType<(error: NotFoundError) => void>, - children: { - type: Object as Vue.PropType, - required: true, - }, - }, - setup(props) { - const router = useRouter() - // TODO: Some way for the user to programmatically reset the not-found boundary? - const pathname = useSelector( - router.stores.location, - (location) => location.pathname, - ) - const status = useSelector(router.stores.status) +export function CatchNotFound(props: { + fallback?: (error: NotFoundError) => Vue.VNode + onCatch?: (error: Error) => void + children: Vue.VNode +}) { + const router = useRouter() + // TODO: Some way for the user to programmatically reset the not-found boundary? + const pathname = useStore( + router.stores.location, + (location) => location.pathname, + ) + const status = useStore(router.stores.status, (value) => value) - // Create a function that returns a VNode to match the SyncRouteComponent signature - const errorComponentFn = (componentProps: ErrorComponentProps) => { - const error = componentProps.error + // Create a function that returns a VNode to match the SyncRouteComponent signature + const errorComponentFn = (componentProps: ErrorComponentProps) => { + const error = componentProps.error + if (isNotFound(error)) { + // If a fallback is provided, use it + if (props.fallback) { + return props.fallback(error) + } + // Otherwise return a default not found message + return Vue.h('p', null, 'Not Found') + } else { + // Re-throw non-NotFound errors + throw error + } + } + + return Vue.h(CatchBoundary, { + getResetKey: () => `not-found-${pathname.value}-${status.value}`, + onCatch: (error: Error) => { if (isNotFound(error)) { - // If a fallback is provided, use it - if (props.fallback) { - return props.fallback(error) + if (props.onCatch) { + props.onCatch(error) } - // Otherwise return a default not found message - return Vue.h('p', null, 'Not Found') } else { - // Re-throw non-NotFound errors throw error } - } - - return () => - Vue.h(CatchBoundary, { - getResetKey: () => `not-found-${pathname.value}-${status.value}`, - onCatch: (error: unknown) => { - if (isNotFound(error)) { - if (props.onCatch) { - props.onCatch(error) - } - } else { - throw error - } - }, - errorComponent: errorComponentFn, - children: props.children, - }) - }, -}) + }, + errorComponent: errorComponentFn, + children: props.children, + }) +} export const DefaultGlobalNotFound = Vue.defineComponent({ name: 'DefaultGlobalNotFound', diff --git a/packages/vue-router/src/renderRouteNotFound.tsx b/packages/vue-router/src/renderRouteNotFound.tsx index 104a65ab73..3b029070a9 100644 --- a/packages/vue-router/src/renderRouteNotFound.tsx +++ b/packages/vue-router/src/renderRouteNotFound.tsx @@ -1,6 +1,5 @@ import * as Vue from 'vue' import { DefaultGlobalNotFound } from './not-found' -import { renderInNonRouteComponentContext } from './nonRouteComponentContext' import type { AnyRoute, AnyRouter } from '@tanstack/router-core' /** @@ -18,13 +17,7 @@ export function renderRouteNotFound( ): Vue.VNode { if (!route.options.notFoundComponent) { if (router.options.defaultNotFoundComponent) { - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - router.options.defaultNotFoundComponent, - data, - 'notFoundComponent', - ) - : Vue.h(router.options.defaultNotFoundComponent, data) + return Vue.h(router.options.defaultNotFoundComponent, data) } if (process.env.NODE_ENV !== 'production') { @@ -38,11 +31,5 @@ export function renderRouteNotFound( return Vue.h(DefaultGlobalNotFound) } - return process.env.NODE_ENV !== 'production' - ? renderInNonRouteComponentContext( - route.options.notFoundComponent, - data, - 'notFoundComponent', - ) - : Vue.h(route.options.notFoundComponent, data) + return Vue.h(route.options.notFoundComponent, data) } diff --git a/packages/vue-router/src/route.ts b/packages/vue-router/src/route.ts index 7c931ecdf9..d409d506fe 100644 --- a/packages/vue-router/src/route.ts +++ b/packages/vue-router/src/route.ts @@ -51,7 +51,7 @@ import type { LinkComponentRoute } from './link' // Structural type for Vue SFC components (.vue files) // Uses structural matching to accept Vue components without breaking // TypeScript inference for inline function components -export type VueSFC = { +type VueSFC = { readonly __name?: string setup?: (...args: Array) => any render?: Function @@ -99,7 +99,10 @@ export class RouteApi< } useMatch: UseMatchRoute = (opts) => { - return useMatch({ ...opts, from: this.id } as any) as any + return useMatch({ + select: opts?.select, + from: this.id, + } as any) as any } useRouteContext: UseRouteContextRoute = (opts) => { @@ -107,11 +110,17 @@ export class RouteApi< } useSearch: UseSearchRoute = (opts) => { - return useSearch({ ...opts, from: this.id } as any) + return useSearch({ + select: opts?.select, + from: this.id, + } as any) as any } useParams: UseParamsRoute = (opts) => { - return useParams({ ...opts, from: this.id } as any) + return useParams({ + select: opts?.select, + from: this.id, + } as any) as any } useLoaderDeps: UseLoaderDepsRoute = (opts) => { @@ -243,7 +252,10 @@ export class Route< } useMatch: UseMatchRoute = (opts) => { - return useMatch({ ...opts, from: this.id } as any) as any + return useMatch({ + select: opts?.select, + from: this.id, + } as any) as any } useRouteContext: UseRouteContextRoute = (opts?) => { @@ -251,11 +263,17 @@ export class Route< } useSearch: UseSearchRoute = (opts) => { - return useSearch({ ...opts, from: this.id } as any) + return useSearch({ + select: opts?.select, + from: this.id, + } as any) as any } useParams: UseParamsRoute = (opts) => { - return useParams({ ...opts, from: this.id } as any) + return useParams({ + select: opts?.select, + from: this.id, + } as any) as any } useLoaderDeps: UseLoaderDepsRoute = (opts) => { @@ -476,7 +494,10 @@ export class RootRoute< } useMatch: UseMatchRoute = (opts) => { - return useMatch({ ...opts, from: this.id } as any) as any + return useMatch({ + select: opts?.select, + from: this.id, + } as any) as any } useRouteContext: UseRouteContextRoute = (opts) => { @@ -484,11 +505,17 @@ export class RootRoute< } useSearch: UseSearchRoute = (opts) => { - return useSearch({ ...opts, from: this.id } as any) + return useSearch({ + select: opts?.select, + from: this.id, + } as any) as any } useParams: UseParamsRoute = (opts) => { - return useParams({ ...opts, from: this.id } as any) + return useParams({ + select: opts?.select, + from: this.id, + } as any) as any } useLoaderDeps: UseLoaderDepsRoute = (opts) => { @@ -525,7 +552,7 @@ export type VueNode = Vue.VNode export type SyncRouteComponent = (props: TProps) => Vue.VNode export type AsyncRouteComponent = SyncRouteComponent & { - preload?: () => Promise | undefined + preload?: () => Promise } export type RouteComponent = AsyncRouteComponent diff --git a/packages/vue-router/src/router.ts b/packages/vue-router/src/router.ts index b1f56cf929..00b55c4060 100644 --- a/packages/vue-router/src/router.ts +++ b/packages/vue-router/src/router.ts @@ -11,7 +11,6 @@ import type { ErrorRouteComponent, NotFoundRouteComponent, RouteComponent, - VueSFC, } from './route' import type { VNode } from 'vue' @@ -23,7 +22,7 @@ declare module '@tanstack/router-core' { * @default Outlet * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultcomponent-property) */ - defaultComponent?: RouteComponent | VueSFC + defaultComponent?: RouteComponent /** * The default `errorComponent` a route should use if no error component is provided. * @@ -31,14 +30,14 @@ declare module '@tanstack/router-core' { * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaulterrorcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#handling-errors-with-routeoptionserrorcomponent) */ - defaultErrorComponent?: ErrorRouteComponent | VueSFC + defaultErrorComponent?: ErrorRouteComponent /** * The default `pendingComponent` a route should use if no pending component is provided. * * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultpendingcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#showing-a-pending-component) */ - defaultPendingComponent?: RouteComponent | VueSFC + defaultPendingComponent?: RouteComponent /** * The default `notFoundComponent` a route should use if no notFound component is provided. * @@ -46,7 +45,7 @@ declare module '@tanstack/router-core' { * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultnotfoundcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/not-found-errors#default-router-wide-not-found-handling) */ - defaultNotFoundComponent?: NotFoundRouteComponent | VueSFC + defaultNotFoundComponent?: NotFoundRouteComponent /** * A component that will be used to wrap the entire router. * @@ -70,7 +69,7 @@ declare module '@tanstack/router-core' { * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultoncatch-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#handling-errors-with-routeoptionsoncatch) */ - defaultOnCatch?: (error: unknown) => void + defaultOnCatch?: (error: Error) => void } } diff --git a/packages/vue-router/src/routerStores.ts b/packages/vue-router/src/routerStores.ts index a7aafa0287..da943fe990 100644 --- a/packages/vue-router/src/routerStores.ts +++ b/packages/vue-router/src/routerStores.ts @@ -1,9 +1,19 @@ import { batch, createAtom } from '@tanstack/vue-store' -import type { GetStoreConfig } from '@tanstack/router-core' +import type { + AnyRoute, + GetStoreConfig, + RouterStores, +} from '@tanstack/router-core' import type { Readable } from '@tanstack/vue-store' declare module '@tanstack/router-core' { export interface RouterReadableStore extends Readable {} + export interface RouterStores { + /** Maps each active routeId to the matchId of its child in the match tree. */ + childMatchIdByRouteId: RouterReadableStore> + /** Maps each pending routeId to true for quick lookup. */ + pendingRouteIds: RouterReadableStore> + } } export const getStoreFactory: GetStoreConfig = (_opts) => { @@ -11,5 +21,34 @@ export const getStoreFactory: GetStoreConfig = (_opts) => { createMutableStore: createAtom, createReadonlyStore: createAtom, batch, + init: (stores: RouterStores) => { + // Single derived store: one reactive node that maps every active + // routeId to its child's matchId. Depends only on matchesId + + // the pool's routeId tags (which are set during reconciliation). + // Outlet reads the map and then does a direct pool lookup. + stores.childMatchIdByRouteId = createAtom(() => { + const ids = stores.matchesId.get() + const obj: Record = {} + for (let i = 0; i < ids.length - 1; i++) { + const parentStore = stores.matchStores.get(ids[i]!) + if (parentStore?.routeId) { + obj[parentStore.routeId] = ids[i + 1]! + } + } + return obj + }) + + stores.pendingRouteIds = createAtom(() => { + const ids = stores.pendingIds.get() + const obj: Record = {} + for (const id of ids) { + const store = stores.pendingMatchStores.get(id) + if (store?.routeId) { + obj[store.routeId] = true + } + } + return obj + }) + }, } } diff --git a/packages/vue-router/src/ssr/RouterClient.tsx b/packages/vue-router/src/ssr/RouterClient.tsx index b21f0fc9f5..8ed9401669 100644 --- a/packages/vue-router/src/ssr/RouterClient.tsx +++ b/packages/vue-router/src/ssr/RouterClient.tsx @@ -4,7 +4,7 @@ import { HeadContent } from '../HeadContent' import { RouterProvider } from '../RouterProvider' import type { AnyRouter } from '@tanstack/router-core' -let hydrationPromise: Promise | undefined +let hydrationPromise: Promise>> | undefined export const RouterClient = Vue.defineComponent({ name: 'RouterClient', @@ -17,14 +17,25 @@ export const RouterClient = Vue.defineComponent({ setup(props) { const isHydrated = Vue.ref(false) - hydrationPromise ??= hydrate(props.router).finally(() => window.$_TSR!.h()) + if (!hydrationPromise) { + if (!props.router.stores.matchesId.get().length) { + hydrationPromise = hydrate(props.router) + } else { + hydrationPromise = Promise.resolve() + } + } Vue.onMounted(() => { - return hydrationPromise!.then(() => { + hydrationPromise!.then(() => { isHydrated.value = true }) }) + // For SSR, we're already hydrated + if (typeof window === 'undefined') { + isHydrated.value = true + } + return () => { if (!isHydrated.value) { return null diff --git a/packages/vue-router/src/ssr/defaultStreamHandler.tsx b/packages/vue-router/src/ssr/defaultStreamHandler.tsx index 574a1edb66..5c663c8f5b 100644 --- a/packages/vue-router/src/ssr/defaultStreamHandler.tsx +++ b/packages/vue-router/src/ssr/defaultStreamHandler.tsx @@ -3,8 +3,8 @@ import { renderRouterToStream } from './renderRouterToStream' import { RouterServer } from './RouterServer' export const defaultStreamHandler = defineHandlerCallback( - ({ request, router, responseHeaders }) => - renderRouterToStream({ + async ({ request, router, responseHeaders }) => + await renderRouterToStream({ request, router, responseHeaders, diff --git a/packages/vue-router/src/ssr/renderRouterToStream.tsx b/packages/vue-router/src/ssr/renderRouterToStream.tsx index c48354546e..efad4fc2eb 100644 --- a/packages/vue-router/src/ssr/renderRouterToStream.tsx +++ b/packages/vue-router/src/ssr/renderRouterToStream.tsx @@ -1,25 +1,66 @@ +import { ReadableStream as NodeReadableStream } from 'node:stream/web' import * as Vue from 'vue' -import { renderToString, renderToWebStream } from 'vue/server-renderer' +import { pipeToWebWritable, renderToString } from 'vue/server-renderer' import { isbot } from 'isbot' import { createSsrStreamResponse, - getSsrStatus, - transformHtmlStringWithRouter, transformReadableStreamWithRouter, - waitForRequest, } from '@tanstack/router-core/ssr/server' import type { AnyRouter } from '@tanstack/router-core' import type { Component } from 'vue' -const DOCTYPE = new TextEncoder().encode('') +const isAbortError = (request: Request, error: unknown) => + (request.signal.aborted && error === request.signal.reason) || + (error instanceof Error && error.name === 'AbortError') || + (error as any)?.code === 'ABORT_ERR' -/** The router transport needs `` as the outer root, not a fragment. */ -export function warnUnlessHtmlRoot(html: string) { - if (process.env.NODE_ENV !== 'production' && !html.startsWith(' as its outer element. A fragment or array root breaks streamed hydration scripts.', - ) +function prependDoctype( + readable: globalThis.ReadableStream, +): NodeReadableStream { + const encoder = new TextEncoder() + let sentDoctype = false + let reader: ReadableStreamDefaultReader | undefined + const releaseReader = () => { + try { + reader?.releaseLock() + } catch { + // ignore + } + reader = undefined } + + return new NodeReadableStream({ + start() { + reader = readable.getReader() + }, + async pull(controller) { + if (!sentDoctype) { + sentDoctype = true + controller.enqueue(encoder.encode('')) + return + } + try { + const { done, value } = await reader!.read() + if (done) { + controller.close() + releaseReader() + return + } + controller.enqueue(value) + } catch (err) { + controller.error(err) + releaseReader() + } + }, + async cancel(reason) { + try { + await reader?.cancel(reason) + } catch { + // ignore + } + releaseReader() + }, + }) } export const renderRouterToStream = async ({ @@ -33,47 +74,151 @@ export const renderRouterToStream = async ({ responseHeaders: Headers App: Component }) => { - const signal = request.signal - if (signal.aborted) { - router.serverSsr?.cleanup() - throw signal.reason - } + const app = Vue.createSSRApp(App, { router }) - try { - const app = Vue.createSSRApp(App, { router }) - - if (isbot(request.headers.get('User-Agent'))) { - let fullHtml = await waitForRequest(renderToString(app), signal) - warnUnlessHtmlRoot(fullHtml) - fullHtml = await transformHtmlStringWithRouter(router, fullHtml, { - signal, + if (isbot(request.headers.get('User-Agent'))) { + try { + let cleanupAbortListener: (() => void) | undefined + const abortPromise = new Promise((_, reject) => { + if (request.signal.aborted) { + reject(request.signal.reason) + return + } + const onRequestAbort = () => reject(request.signal.reason) + request.signal.addEventListener('abort', onRequestAbort, { once: true }) + cleanupAbortListener = () => { + request.signal.removeEventListener('abort', onRequestAbort) + } }) - return new Response(fullHtml, { - status: getSsrStatus(router), + + let fullHtml = await Promise.race([ + renderToString(app), + abortPromise, + ]).finally(() => cleanupAbortListener?.()) + + router.serverSsr!.setRenderFinished() + const injectedHtml = router.serverSsr!.takeBufferedHtml() + if (injectedHtml) { + fullHtml = fullHtml.replace(``, () => `${injectedHtml}`) + } + + const htmlOpenIndex = fullHtml.indexOf('') + + if (htmlOpenIndex !== -1 && htmlCloseIndex !== -1) { + fullHtml = fullHtml.slice(htmlOpenIndex, htmlCloseIndex + 7) + } else if (htmlOpenIndex !== -1) { + fullHtml = fullHtml.slice(htmlOpenIndex) + } + + return new Response(`${fullHtml}`, { + status: router.stores.statusCode.get(), headers: responseHeaders, }) + } finally { + router.serverSsr?.cleanup() + } + } + + const { writable, readable } = new TransformStream() + const innerWriter = writable.getWriter() + let writerDone = false + const releaseWriter = () => { + try { + innerWriter.releaseLock() + } catch { + // already released / errored + } + } + const abortVuePipe = (reason?: unknown) => { + if (writerDone) { + return } - const readable = renderToWebStream(app).pipeThrough( - new TransformStream({ - start(controller) { - controller.enqueue(DOCTYPE) - }, - }), - ) - const responseStream = transformReadableStreamWithRouter(router, readable, { - signal, - }) - - return createSsrStreamResponse( - router, - new Response(responseStream, { - status: getSsrStatus(router), - headers: responseHeaders, - }), - ) - } catch (error) { - router.serverSsr?.cleanup() - throw error + writerDone = true + void innerWriter + .abort(reason) + .catch(() => {}) + .finally(releaseWriter) } + const handleWriterError = (err: unknown) => { + if (isAbortError(request, err)) { + return + } + + throw err + } + const handleWriteError = (err: unknown) => { + if (writerDone || isAbortError(request, err)) { + return + } + + throw err + } + + const vueWritable = new WritableStream({ + write(chunk) { + if (writerDone) { + return + } + + return innerWriter.write(chunk).catch(handleWriteError) + }, + close() { + if (writerDone) { + return + } + + writerDone = true + return innerWriter.close().catch(handleWriterError).finally(releaseWriter) + }, + abort(reason) { + if (writerDone) { + return + } + + writerDone = true + return innerWriter + .abort(reason) + .catch(handleWriterError) + .finally(releaseWriter) + }, + }) + + // `pipeToWebWritable` returns void (see @vue/server-renderer). Pass a + // proxy writable so request aborts can abort the real TransformStream + // writer even while Vue holds a lock on the proxy writable. + try { + pipeToWebWritable(app, {}, vueWritable) + } catch (err) { + console.error('Error in Vue pipeToWebWritable:', err) + // Setup failed before any pipe was wired; abort writable so the + // readable side errors instead of hanging until the lifetime timeout. + abortVuePipe(err) + } + + if (request.signal.aborted) { + abortVuePipe(request.signal.reason) + } else { + const onRequestAbort = () => abortVuePipe(request.signal.reason) + request.signal.addEventListener('abort', onRequestAbort, { once: true }) + router.serverSsr?.onCleanup(() => { + request.signal.removeEventListener('abort', onRequestAbort) + }) + } + + const doctypedStream = prependDoctype(readable) + const responseStream = transformReadableStreamWithRouter( + router, + doctypedStream, + { onAbort: abortVuePipe }, + ) + + return createSsrStreamResponse( + router, + new Response(responseStream as any, { + status: router.stores.statusCode.get(), + headers: responseHeaders, + }), + ) } diff --git a/packages/vue-router/src/ssr/renderRouterToString.tsx b/packages/vue-router/src/ssr/renderRouterToString.tsx index 38681de5d8..b551dc5dfc 100644 --- a/packages/vue-router/src/ssr/renderRouterToString.tsx +++ b/packages/vue-router/src/ssr/renderRouterToString.tsx @@ -1,7 +1,5 @@ import * as Vue from 'vue' import { renderToString as vueRenderToString } from 'vue/server-renderer' -import { renderSsrHtmlResponse } from '@tanstack/router-core/ssr/server' -import { warnUnlessHtmlRoot } from './renderRouterToStream' import type { AnyRouter } from '@tanstack/router-core' import type { Component } from 'vue' @@ -14,14 +12,28 @@ export const renderRouterToString = async ({ responseHeaders: Headers App: Component }) => { - return renderSsrHtmlResponse({ - router, - responseHeaders, - render: async () => { - const app = Vue.createSSRApp(App, { router }) - const rendered = await vueRenderToString(app) - warnUnlessHtmlRoot(rendered) - return rendered - }, - }) + try { + const app = Vue.createSSRApp(App, { router }) + + let html = await vueRenderToString(app) + router.serverSsr!.setRenderFinished() + + const injectedHtml = router.serverSsr!.takeBufferedHtml() + if (injectedHtml) { + html = html.replace(``, () => `${injectedHtml}`) + } + + return new Response(`${html}`, { + status: router.stores.statusCode.get(), + headers: responseHeaders, + }) + } catch (error) { + console.error('Render to string error:', error) + return new Response('Internal Server Error', { + status: 500, + headers: responseHeaders, + }) + } finally { + router.serverSsr?.cleanup() + } } diff --git a/packages/vue-router/src/useBlocker.tsx b/packages/vue-router/src/useBlocker.tsx index 17eef20f7a..4802a3e82a 100644 --- a/packages/vue-router/src/useBlocker.tsx +++ b/packages/vue-router/src/useBlocker.tsx @@ -179,23 +179,21 @@ export function useBlocker( location: HistoryLocation, ): AnyShouldBlockFnLocation { const parsedLocation = router.parseLocation(location) - const [, rawParams, foundRoute] = router.getMatchedRoutes( - parsedLocation.pathname, - ) - if (foundRoute === undefined) { + const matchedRoutes = router.getMatchedRoutes(parsedLocation.pathname) + if (matchedRoutes.foundRoute === undefined) { return { routeId: '__notFound__', fullPath: parsedLocation.pathname, pathname: parsedLocation.pathname, - params: rawParams, + params: matchedRoutes.routeParams, search: parsedLocation.search, } } return { - routeId: foundRoute.id, - fullPath: foundRoute.fullPath, + routeId: matchedRoutes.foundRoute.id, + fullPath: matchedRoutes.foundRoute.fullPath, pathname: parsedLocation.pathname, - params: rawParams, + params: matchedRoutes.routeParams, search: parsedLocation.search, } } @@ -375,23 +373,21 @@ const BlockImpl = Vue.defineComponent({ location: HistoryLocation, ): AnyShouldBlockFnLocation { const parsedLocation = router.parseLocation(location) - const [, rawParams, foundRoute] = router.getMatchedRoutes( - parsedLocation.pathname, - ) - if (foundRoute === undefined) { + const matchedRoutes = router.getMatchedRoutes(parsedLocation.pathname) + if (matchedRoutes.foundRoute === undefined) { return { routeId: '__notFound__', fullPath: parsedLocation.pathname, pathname: parsedLocation.pathname, - params: rawParams, + params: matchedRoutes.routeParams, search: parsedLocation.search, } } return { - routeId: foundRoute.id, - fullPath: foundRoute.fullPath, + routeId: matchedRoutes.foundRoute.id, + fullPath: matchedRoutes.foundRoute.fullPath, pathname: parsedLocation.pathname, - params: rawParams, + params: matchedRoutes.routeParams, search: parsedLocation.search, } } diff --git a/packages/vue-router/src/useCanGoBack.ts b/packages/vue-router/src/useCanGoBack.ts index 007331fd5e..2149584979 100644 --- a/packages/vue-router/src/useCanGoBack.ts +++ b/packages/vue-router/src/useCanGoBack.ts @@ -1,9 +1,9 @@ -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' export function useCanGoBack() { const router = useRouter() - return useSelector( + return useStore( router.stores.location, (location) => location.state.__TSR_index !== 0, ) diff --git a/packages/vue-router/src/useLocation.tsx b/packages/vue-router/src/useLocation.tsx index 144ca8ced9..2d9e4314a2 100644 --- a/packages/vue-router/src/useLocation.tsx +++ b/packages/vue-router/src/useLocation.tsx @@ -1,4 +1,4 @@ -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' import type { AnyRouter, @@ -25,7 +25,7 @@ export function useLocation< opts?: UseLocationBaseOptions, ): Vue.Ref> { const router = useRouter() - return useSelector(router.stores.location, (location) => + return useStore(router.stores.location, (location) => opts?.select ? opts.select(location) : location, ) as Vue.Ref> } diff --git a/packages/vue-router/src/useMatch.tsx b/packages/vue-router/src/useMatch.tsx index 5bffc5fdcf..29047e5d48 100644 --- a/packages/vue-router/src/useMatch.tsx +++ b/packages/vue-router/src/useMatch.tsx @@ -1,8 +1,12 @@ import * as Vue from 'vue' import { invariant } from '@tanstack/router-core' +import { useStore } from '@tanstack/vue-store' import { isServer } from '@tanstack/router-core/isServer' -import { useSelector } from '@tanstack/vue-store' -import { routeIdContext } from './matchContext' +import { + injectDummyPendingMatch, + injectPendingMatch, + routeIdContext, +} from './matchContext' import { useRouter } from './useRouter' import type { AnyRouter, @@ -30,12 +34,9 @@ export interface UseMatchBaseOptions< export type UseMatchRoute = < TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, - TThrow extends boolean = true, >( - opts?: UseMatchBaseOptions, -) => Vue.Ref< - ThrowOrOptional, TThrow> -> + opts?: UseMatchBaseOptions, +) => Vue.Ref> export type UseMatchOptions< TRouter extends AnyRouter, @@ -82,7 +83,7 @@ export function useMatch< const nearestRouteId = opts.from ? undefined : Vue.inject(routeIdContext) const matchStore = (opts.from ?? nearestRouteId) - ? router.stores.getMatchStore(opts.from ?? nearestRouteId!) + ? router.stores.getRouteMatchStore(opts.from ?? nearestRouteId!) : undefined const match = matchStore?.get() @@ -113,37 +114,53 @@ export function useMatch< > } + const hasPendingNearestMatch = opts.from + ? injectDummyPendingMatch() + : injectPendingMatch() // Set up reactive match value based on lookup strategy. let match: Readonly> - const nearestRouteId = Vue.inject(routeIdContext) if (opts.from) { - // routeId case: subscribe to the stable per-route presentation atom. - const matchStore = router.stores.getMatchStore(opts.from) - match = useSelector(matchStore) + // routeId case: single subscription via per-routeId computed store. + // The store reference is stable (cached by routeId). + const matchStore = router.stores.getRouteMatchStore(opts.from) + match = useStore(matchStore, (value) => value) } else { - // Nearest-match case: use the routeId from context for stable lookup. + // matchId case: use routeId from context for stable store lookup. // The routeId is provided by the nearest Match component and doesn't // change for the component's lifetime, so the store is stable. + const nearestRouteId = Vue.inject(routeIdContext) if (nearestRouteId) { - match = useSelector(router.stores.getMatchStore(nearestRouteId)) + match = useStore( + router.stores.getRouteMatchStore(nearestRouteId), + (value) => value, + ) } else { // No route context — will fall through to error handling below match = Vue.ref(undefined) as Readonly> } } - const ownsMatch = - nearestRouteId !== undefined && - (opts.from ?? nearestRouteId) === nearestRouteId - let lastOwnedMatch: any - const result = Vue.computed(() => { - if (match.value !== undefined && ownsMatch) { - lastOwnedMatch = match.value - } - const selectedMatch = match.value ?? lastOwnedMatch + const hasPendingRouteMatch = opts.from + ? useStore(router.stores.pendingRouteIds, (ids) => ids) + : undefined + const isTransitioning = useStore( + router.stores.isTransitioning, + (value) => value, + { equal: Object.is }, + ) + + const result = Vue.computed(() => { + const selectedMatch = match.value if (selectedMatch === undefined) { - if (opts.shouldThrow ?? true) { + const hasPendingMatch = opts.from + ? Boolean(hasPendingRouteMatch?.value[opts.from!]) + : hasPendingNearestMatch.value + if ( + !hasPendingMatch && + !isTransitioning.value && + (opts.shouldThrow ?? true) + ) { if (process.env.NODE_ENV !== 'production') { throw new Error( `Invariant failed: Could not find ${opts.from ? `an active match from "${opts.from}"` : 'a nearest match!'}`, diff --git a/packages/vue-router/src/useParams.tsx b/packages/vue-router/src/useParams.tsx index 6891c08adc..5b501cc296 100644 --- a/packages/vue-router/src/useParams.tsx +++ b/packages/vue-router/src/useParams.tsx @@ -33,18 +33,15 @@ export type UseParamsOptions< export type UseParamsRoute = < TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, - TThrow extends boolean = true, >( opts?: UseParamsBaseOptions< TRouter, TFrom, /* TStrict */ true, - TThrow, + /* TThrow */ true, TSelected >, -) => Vue.Ref< - ThrowOrOptional, TThrow> -> +) => Vue.Ref> export function useParams< TRouter extends AnyRouter = RegisteredRouter, diff --git a/packages/vue-router/src/useRouterState.tsx b/packages/vue-router/src/useRouterState.tsx index 489b05ae91..13b6f85236 100644 --- a/packages/vue-router/src/useRouterState.tsx +++ b/packages/vue-router/src/useRouterState.tsx @@ -1,6 +1,6 @@ import * as Vue from 'vue' import { isServer } from '@tanstack/router-core/isServer' -import { useSelector } from '@tanstack/vue-store' +import { useStore } from '@tanstack/vue-store' import { useRouter } from './useRouter' import type { AnyRouter, @@ -39,9 +39,9 @@ export function useRouterState< // During SSR we render exactly once and do not need reactivity. // Avoid subscribing to the store on the server since the server store // implementation does not provide subscribe() semantics. - // The expression must stay inlined in the `if` so bundlers fold the - // browser-build constant `isServer = false` and drop this server block. - if (isServer ?? router.isServer) { + const _isServer = isServer ?? router.isServer + + if (_isServer) { const state = router.stores.__store.get() as RouterState< TRouter['routeTree'] > @@ -50,10 +50,8 @@ export function useRouterState< > } - return useSelector(router.stores.__store, (state) => { - if (opts?.select) { - return opts.select(state) - } + return useStore(router.stores.__store, (state) => { + if (opts?.select) return opts.select(state) return state }) as Vue.Ref> diff --git a/packages/vue-router/src/useSearch.tsx b/packages/vue-router/src/useSearch.tsx index 43f61d743f..877a1cf876 100644 --- a/packages/vue-router/src/useSearch.tsx +++ b/packages/vue-router/src/useSearch.tsx @@ -33,18 +33,15 @@ export type UseSearchOptions< export type UseSearchRoute = < TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, - TThrow extends boolean = true, >( opts?: UseSearchBaseOptions< TRouter, TFrom, /* TStrict */ true, - TThrow, + /* TThrow */ true, TSelected >, -) => Vue.Ref< - ThrowOrOptional, TThrow> -> +) => Vue.Ref> export function useSearch< TRouter extends AnyRouter = RegisteredRouter, diff --git a/packages/vue-router/src/utils.ts b/packages/vue-router/src/utils.ts index 10b059c4a5..609c4558a8 100644 --- a/packages/vue-router/src/utils.ts +++ b/packages/vue-router/src/utils.ts @@ -31,9 +31,10 @@ export const usePrevious = (fn: () => boolean) => { * When the intersection changes, the callback will be called with the `IntersectionObserverEntry`. * * @param ref - The ref to observe + * @param intersectionObserverOptions - The options to pass to the IntersectionObserver + * @param options - The options to pass to the hook * @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 = () => { @@ -41,49 +42,48 @@ export const usePrevious = (fn: () => boolean) => { * useIntersectionObserver( * ref, * (entry) => { doSomething(entry) }, - * () => false + * { rootMargin: '10px' }, + * { disabled: false } * ) * return
* ``` */ export function useIntersectionObserver( ref: Vue.Ref, - callback: (entry?: IntersectionObserverEntry) => void, - disabled: () => boolean, - cleanupWhenDisabled?: () => boolean, -): void { + callback: (entry: IntersectionObserverEntry | undefined) => void, + intersectionObserverOptions: IntersectionObserverInit = {}, + options: { disabled?: boolean | (() => boolean) } = {}, +): Vue.Ref { const isIntersectionObserverAvailable = typeof IntersectionObserver === 'function' + const observerRef = Vue.ref(null) // Use watchEffect with cleanup to properly manage the observer lifecycle Vue.watchEffect((onCleanup) => { const r = ref.value - if (disabled() || !r || !isIntersectionObserverAvailable) { - if (cleanupWhenDisabled?.() ?? true) { - onCleanup(() => callback()) - } + // Support both static boolean and function for disabled check + const isDisabled = + typeof options.disabled === 'function' + ? options.disabled() + : options.disabled + if (!r || !isIntersectionObserverAvailable || isDisabled) { return } - 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' }, - ) + const observer = new IntersectionObserver(([entry]) => { + callback(entry) + }, intersectionObserverOptions) + observerRef.value = observer observer.observe(r) onCleanup(() => { - active = false observer.disconnect() - callback() + observerRef.value = null }) }) + + return observerRef } export function splitProps>( diff --git a/packages/vue-router/tests/Match.test.tsx b/packages/vue-router/tests/Match.test.tsx deleted file mode 100644 index 0d2e7b6f15..0000000000 --- a/packages/vue-router/tests/Match.test.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import * as Vue from 'vue' -import { renderToString } from 'vue/server-renderer' -import { afterEach, expect, test, vi } from 'vitest' -import { cleanup, fireEvent, render } from '@testing-library/vue' -import { - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -afterEach(cleanup) - -function createTestRouter( - scrollRestoration: boolean | (() => boolean), - isServer = false, -) { - const revision = Vue.ref(0) - const mounted = vi.fn() - const Child = Vue.defineComponent({ - setup() { - const count = Vue.ref(0) - Vue.onMounted(mounted) - return () => - }, - }) - const Shell = Vue.defineComponent({ - setup(_, { slots }) { - return () => ( -
- {slots.default?.()} -
- ) - }, - }) - const root = createRootRoute({ - shellComponent: Shell, - component: () => ( -
- -
- ), - }) - const child = createRoute({ - getParentRoute: () => root, - path: '/child', - component: Child, - }) - const router = createRouter({ - routeTree: root.addChildren([child]), - history: createMemoryHistory({ initialEntries: ['/child'] }), - isServer, - scrollRestoration, - ssr: { nonce: 'test-nonce' }, - }) - return { router, revision, mounted } -} - -test.each([false, true])( - 'preserves root child state through shell updates (scroll restoration: %s)', - async (scrollRestoration) => { - const { router, revision, mounted } = createTestRouter(scrollRestoration) - const app = render() - const button = await app.findByRole('button') - - await fireEvent.click(button) - revision.value++ - router.update({ scrollRestoration: !scrollRestoration }) - await router.invalidate() - await Vue.nextTick() - - expect(app.getByRole('button')).toBe(button) - expect(button).toHaveTextContent('1') - expect(mounted).toHaveBeenCalledOnce() - expect(app.getByTestId('shell')).toHaveAttribute('data-revision', '1') - }, -) - -test.each([ - ['disabled', false, false], - ['enabled', true, true], - ['skipped by selector', (): boolean => false, false], - ['enabled by selector', (): boolean => true, true], -] as const)( - 'renders root child content and the restoration script on the server (%s)', - async (_, scrollRestoration, hasScript) => { - const { router } = createTestRouter(scrollRestoration, true) - await router.load() - const html = await renderToString( - Vue.createSSRApp(() => ), - ) - const container = document.createElement('div') - container.innerHTML = html - - expect(container.querySelector('main > button')).toHaveTextContent('0') - const scripts = container.querySelectorAll('main > script') - expect(scripts).toHaveLength(hasScript ? 1 : 0) - if (hasScript) { - expect(scripts[0]).toHaveAttribute('nonce', 'test-nonce') - expect(scripts[0]?.textContent).toContain( - 'document.currentScript.remove()', - ) - } - }, -) diff --git a/packages/vue-router/tests/Matches.test.tsx b/packages/vue-router/tests/Matches.test.tsx index 6bd1f4be38..4e9e9afa51 100644 --- a/packages/vue-router/tests/Matches.test.tsx +++ b/packages/vue-router/tests/Matches.test.tsx @@ -1,5 +1,4 @@ import { afterEach, describe, expect, test } from 'vitest' -import * as Vue from 'vue' import { cleanup, fireEvent, @@ -8,7 +7,6 @@ import { waitFor, } from '@testing-library/vue' import { createMemoryHistory } from '@tanstack/history' -import { createControlledPromise } from '@tanstack/router-core' import { Link, Outlet, @@ -38,41 +36,38 @@ const invoicesRoute = createRoute({ component: () => , }) -const InvoicesIndex = Vue.defineComponent({ - setup() { - const matches = useMatches() - return () => { - const loaderDataMatches = matches.value.filter((match: any) => - isMatch(match, 'loaderData.0.id'), - ) +const InvoicesIndex = () => { + const matches = useMatches() - const contextMatches = matches.value.filter((match: any) => - isMatch(match, 'context.permissions'), - ) + const loaderDataMatches = matches.value.filter((match: any) => + isMatch(match, 'loaderData.0.id'), + ) - const incorrectMatches = matches.value.filter((match: any) => - isMatch(match, 'loaderData.6.id'), - ) + const contextMatches = matches.value.filter((match: any) => + isMatch(match, 'context.permissions'), + ) - return ( -
-
- Loader Matches -{' '} - {loaderDataMatches.map((match: any) => match.fullPath).join(',')} -
-
- Context Matches -{' '} - {contextMatches.map((match: any) => match.fullPath).join(',')} -
-
- Incorrect Matches -{' '} - {incorrectMatches.map((match: any) => match.fullPath).join(',')} -
-
- ) - } - }, -}) + const incorrectMatches = matches.value.filter((match: any) => + isMatch(match, 'loaderData.6.id'), + ) + + return ( +
+
+ Loader Matches -{' '} + {loaderDataMatches.map((match: any) => match.fullPath).join(',')} +
+
+ Context Matches -{' '} + {contextMatches.map((match: any) => match.fullPath).join(',')} +
+
+ Incorrect Matches -{' '} + {incorrectMatches.map((match: any) => match.fullPath).join(',')} +
+
+ ) +} const invoicesIndexRoute = createRoute({ getParentRoute: () => invoicesRoute, @@ -139,7 +134,7 @@ test('when filtering useMatches by loaderData', async () => { // Vue Suspense requires async setup functions or top-level await to trigger fallback. // Since TanStack Router throws Promises from render (not setup), Vue doesn't show // the pending component during initial load. Navigation-triggered pending states -// DO work - see loaders.test.tsx 'navigating away from a pending route aborts its loader'. +// DO work - see loaders.test.tsx 'cancelMatches after pending timeout'. test('should show pendingComponent of root route', async () => { const root = createRootRoute({ pendingComponent: () =>
, @@ -163,78 +158,6 @@ test('should show pendingComponent of root route', async () => { expect(await rendered.findByTestId('root-content')).toBeInTheDocument() }) -test('useMatchRoute follows superseding pending locations', async () => { - const aGate = createControlledPromise() - const bGate = createControlledPromise() - - const Layout = Vue.defineComponent({ - setup() { - const matchRoute = useMatchRoute() - const pendingA = matchRoute({ to: '/a', pending: true }) - const pendingB = matchRoute({ to: '/b', pending: true }) - const resolvedB = matchRoute({ to: '/b', pending: false }) - return () => ( -
- {String(Boolean(pendingA.value))} - {String(Boolean(pendingB.value))} - - {String(Boolean(resolvedB.value))} - - -
- ) - }, - }) - - const root = createRootRoute({ component: Layout }) - const index = createRoute({ - getParentRoute: () => root, - path: '/', - }) - const a = createRoute({ - getParentRoute: () => root, - path: '/a', - loader: () => aGate, - }) - const b = createRoute({ - getParentRoute: () => root, - path: '/b', - loader: () => bGate, - }) - const router = createRouter({ - routeTree: root.addChildren([index, a, b]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - render() - - await waitFor(() => { - expect(screen.getByTestId('pending-a')).toHaveTextContent('false') - expect(router.stores.status.get()).toBe('idle') - expect(router.stores.resolvedLocation.get()?.pathname).toBe('/') - }) - - const navigationA = router.navigate({ to: '/a' }) - await waitFor(() => { - expect(screen.getByTestId('pending-a')).toHaveTextContent('true') - expect(screen.getByTestId('resolved-b')).toHaveTextContent('false') - }) - - const navigationB = router.navigate({ to: '/b' }) - await waitFor(() => { - expect(screen.getByTestId('pending-a')).toHaveTextContent('false') - expect(screen.getByTestId('pending-b')).toHaveTextContent('true') - expect(screen.getByTestId('resolved-b')).toHaveTextContent('false') - }) - - aGate.resolve() - bGate.resolve() - await Promise.allSettled([navigationA, navigationB]) - await waitFor(() => { - expect(screen.getByTestId('pending-b')).toHaveTextContent('false') - expect(screen.getByTestId('resolved-b')).toHaveTextContent('true') - }) -}) - describe('matching on different param types', () => { const testCases = [ { @@ -399,38 +322,36 @@ describe('matching on different param types', () => { async ({ name, path, params, matchParams, nav }) => { const rootRoute = createRootRoute() - const RouteComponent = Vue.defineComponent({ - setup() { - const routeParams = Route.useParams() - - const matchRoute = useMatchRoute() - - const matchRouteMatch = matchRoute({ - to: path, - }) - return () => ( -
-

{name}

-
- Params{' '} - - {JSON.stringify(routeParams.value)} - - Matches{' '} - - {JSON.stringify(matchRouteMatch.value)} - -
-
- ) - }, - }) const Route = createRoute({ getParentRoute: () => rootRoute, path, component: RouteComponent, }) + function RouteComponent() { + const routeParams = Route.useParams() + const matchRoute = useMatchRoute() + const matchRouteMatch = matchRoute({ + to: path, + }) + + return ( +
+

{name}

+
+ Params{' '} + + {JSON.stringify(routeParams.value)} + + Matches{' '} + + {JSON.stringify(matchRouteMatch.value)} + +
+
+ ) + } + const router = createRouter({ routeTree: rootRoute.addChildren([Route]), history: createMemoryHistory({ initialEntries: ['/'] }), diff --git a/packages/vue-router/tests/Outlet.test.tsx b/packages/vue-router/tests/Outlet.test.tsx deleted file mode 100644 index 6bf904ba98..0000000000 --- a/packages/vue-router/tests/Outlet.test.tsx +++ /dev/null @@ -1,190 +0,0 @@ -import { afterEach, expect, test, vi } from 'vitest' -import { cleanup, render, screen } from '@testing-library/vue' -import { createMemoryHistory } from '@tanstack/history' -import { createControlledPromise, notFound } from '@tanstack/router-core' -import { - Outlet, - RouterProvider, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -const outletWarning = ( - component: 'pendingComponent' | 'errorComponent' | 'notFoundComponent', -) => - `Warning: An was rendered inside a ${component}. should only be rendered inside a route component.` - -afterEach(() => { - cleanup() - vi.restoreAllMocks() -}) - -test('does not warn when Outlet is rendered inside a route component', async () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const rootRoute = createRootRoute({ - component: () => ( - <> - Root route - - - ), - }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => Index route, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - - expect(await screen.findByText('Index route')).toBeInTheDocument() - expect(warn).not.toHaveBeenCalled() -}) - -test('warns when Outlet is rendered inside a pendingComponent', async () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const pending = createControlledPromise() - const rootRoute = createRootRoute({ component: Outlet }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => Index route, - }) - const pendingRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/pending', - loader: () => pending, - pendingMs: 0, - pendingComponent: () => ( - <> - Pending route - - - ), - component: () => Resolved route, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, pendingRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - await screen.findByText('Index route') - - const navigation = router.navigate({ to: '/pending' }) - expect(await screen.findByText('Pending route')).toBeInTheDocument() - pending.resolve() - await navigation - - expect(warn).toHaveBeenCalledWith(outletWarning('pendingComponent')) -}) - -test('warns when Outlet is rendered inside an errorComponent', async () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const rootRoute = createRootRoute({ component: Outlet }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: () => { - throw new Error('Loader failed') - }, - errorComponent: () => ( - <> - Error route - - - ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - - expect(await screen.findByText('Error route')).toBeInTheDocument() - expect(warn).toHaveBeenCalledWith(outletWarning('errorComponent')) -}) - -test.each([new Error('Loader failed'), false, 0, '', null, undefined])( - 'warns with the current component after a fallback transition with %s', - async (error) => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const pending = createControlledPromise() - const FallbackComponent = (props: { error?: unknown }) => ( - <> - {'error' in props ? 'Error route' : 'Pending route'} - - - ) - const rootRoute = createRootRoute({ component: Outlet }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => Index route, - }) - const transitionRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/transition', - loader: () => pending, - pendingMs: 0, - pendingComponent: FallbackComponent, - errorComponent: FallbackComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, transitionRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - await screen.findByText('Index route') - - const navigation = router.navigate({ to: '/transition' }) - expect(await screen.findByText('Pending route')).toBeInTheDocument() - pending.reject(error) - await navigation - - expect(await screen.findByText('Error route')).toBeInTheDocument() - expect(warn).toHaveBeenCalledWith(outletWarning('pendingComponent')) - expect(warn).toHaveBeenCalledWith(outletWarning('errorComponent')) - }, -) - -test('warns when Outlet is rendered inside a notFoundComponent', async () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const rootRoute = createRootRoute({ component: Outlet }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => Index route, - }) - const notFoundRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/not-found', - component: () => { - throw notFound() - }, - notFoundComponent: () => ( - <> - Not found route - - - ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, notFoundRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - await screen.findByText('Index route') - await router.navigate({ to: '/not-found' }) - - expect(await screen.findByText('Not found route')).toBeInTheDocument() - expect(warn).toHaveBeenCalledWith(outletWarning('notFoundComponent')) -}) diff --git a/packages/vue-router/tests/Scripts.test.tsx b/packages/vue-router/tests/Scripts.test.tsx index 7336b95f4f..5cd2eacd4f 100644 --- a/packages/vue-router/tests/Scripts.test.tsx +++ b/packages/vue-router/tests/Scripts.test.tsx @@ -1,4 +1,4 @@ -import { afterEach, describe, expect, test, vi } from 'vitest' +import { afterEach, describe, expect, test } from 'vitest' import { cleanup, fireEvent, @@ -7,14 +7,11 @@ import { waitFor, } from '@testing-library/vue' import { Teleport } from 'vue' -import { hydrate } from '@tanstack/router-core/ssr/client' -import { dehydrateSsrMatchId } from '../../router-core/src/ssr/ssr-match-id' import { HeadContent, Link, Outlet, - RouterContextProvider, RouterProvider, createBrowserHistory, createMemoryHistory, @@ -51,7 +48,6 @@ afterEach(() => { cleanup() browserHistories.splice(0).forEach((history) => history.destroy()) window.history.replaceState(null, 'root', '/') - delete window.$_TSR }) describe('ssr scripts', () => { @@ -152,98 +148,6 @@ describe('ssr scripts', () => { }) describe('ssr HeadContent', () => { - test('renders descendant assets during a data-only hydration handoff', async () => { - const rootRoute = createRootRoute({}) - const dataOnlyRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/report', - ssr: 'data-only', - loader: () => 'report', - }) - const childRoute = createRoute({ - getParentRoute: () => dataOnlyRoute, - path: '/details', - loader: () => 'details', - head: () => ({ - meta: [{ name: 'vue-data-only-child', content: 'visible' }], - }), - scripts: () => [ - { - id: 'vue-data-only-body-script', - type: 'application/json', - children: '{"source":"body"}', - }, - ], - }) - const router = createRouter({ - history: createMemoryHistory({ - initialEntries: ['/report/details'], - }), - routeTree: rootRoute.addChildren([ - dataOnlyRoute.addChildren([childRoute]), - ]), - }) - const matches = router.matchRoutes(router.latestLocation) - window.$_TSR = { - router: { - dehydratedData: {}, - manifest: { - routes: { - [childRoute.id]: { - preloads: ['/vue-data-only-manifest.js'], - scripts: [ - { - attrs: { - id: 'vue-data-only-manifest-script', - type: 'application/json', - }, - children: '{"source":"manifest"}', - }, - ], - }, - }, - }, - matches: matches.map((match, index) => ({ - i: dehydrateSsrMatchId(match.id), - s: 'success', - ssr: index === 1 ? 'data-only' : true, - l: index ? (index === 1 ? 'report' : 'details') : undefined, - u: Date.now(), - })), - }, - h: vi.fn(), - e: vi.fn(), - c: vi.fn(), - p: vi.fn(), - buffer: [], - } - - await hydrate(router) - - expect(router.state.matches.map((match) => match.status)).toEqual([ - 'success', - 'pending', - 'success', - ]) - render( - - - - , - ) - - expect( - document.querySelector('meta[name="vue-data-only-child"]'), - ).not.toBeNull() - expect( - document.querySelector('link[href="/vue-data-only-manifest.js"]'), - ).not.toBeNull() - expect(document.querySelector('#vue-data-only-body-script')).not.toBeNull() - expect( - document.querySelector('#vue-data-only-manifest-script'), - ).not.toBeNull() - }) - test('applies assetCrossOrigin to manifest stylesheets and preloads', async () => { const history = createTestBrowserHistory() @@ -299,11 +203,6 @@ describe('ssr HeadContent', () => { .querySelector('link[rel="modulepreload"]') ?.getAttribute('crossorigin'), ).toBe('anonymous') - expect( - document.head - .querySelector('link[rel="modulepreload"]') - ?.getAttribute('fetchpriority'), - ).toBe('low') }) test('does not duplicate SSR head links and cleans up preloads on unmount', async () => { @@ -316,7 +215,6 @@ describe('ssr HeadContent', () => { const ssrPreload = document.createElement('link') ssrPreload.setAttribute('rel', 'modulepreload') ssrPreload.setAttribute('href', '/main.js') - ssrPreload.setAttribute('fetchpriority', 'low') document.head.append(ssrStylesheet, ssrPreload) @@ -403,7 +301,6 @@ describe('ssr HeadContent', () => { const ssrPreload = document.createElement('link') ssrPreload.setAttribute('rel', 'modulepreload') ssrPreload.setAttribute('href', '/index.js') - ssrPreload.setAttribute('fetchpriority', 'low') document.head.append(ssrStylesheet, ssrPreload) @@ -737,7 +634,7 @@ describe('ssr HeadContent', () => { ).toBe('.runtime{color:red}') }) - test('renders iife manifest preloads as low priority script links', async () => { + test('renders preload as script links for iife manifest preloads', async () => { const history = createTestBrowserHistory() const rootRoute = createRootRoute({ @@ -777,11 +674,6 @@ describe('ssr HeadContent', () => { }) expect(document.head.querySelector('link[rel="modulepreload"]')).toBeFalsy() - expect( - document.head - .querySelector('link[rel="preload"][as="script"]') - ?.getAttribute('fetchpriority'), - ).toBe('low') }) test('derives title, dedupes meta, and allows non-loader HeadContent', async () => { diff --git a/packages/vue-router/tests/Transitioner.test.tsx b/packages/vue-router/tests/Transitioner.test.tsx index 84adcf8af8..8fc6095f94 100644 --- a/packages/vue-router/tests/Transitioner.test.tsx +++ b/packages/vue-router/tests/Transitioner.test.tsx @@ -1,20 +1,15 @@ -import { afterEach, describe, expect, it, onTestFinished, vi } from 'vitest' -import { cleanup, render, waitFor } from '@testing-library/vue' +import { describe, expect, it, vi } from 'vitest' +import { render, waitFor } from '@testing-library/vue' import { - RouterProvider, - createControlledPromise, createMemoryHistory, createRootRoute, createRoute, createRouter, } from '../src' - -afterEach(() => { - cleanup() -}) +import { RouterProvider } from '../src/RouterProvider' describe('Transitioner', () => { - it('loads the initial route when the provider mounts', async () => { + it('should call router.load() when Transitioner mounts on the client', async () => { const loader = vi.fn() const rootRoute = createRootRoute() const indexRoute = createRoute({ @@ -32,45 +27,18 @@ describe('Transitioner', () => { }), }) - const view = render() + // Mock router.load() to verify it gets called + const loadSpy = vi.spyOn(router, 'load') + render() + await router.latestLoadPromise + + // Wait for the createRenderEffect to run and call router.load() await waitFor(() => { + expect(loadSpy).toHaveBeenCalledTimes(1) expect(loader).toHaveBeenCalledTimes(1) - expect(view.getByText('Index')).toBeInTheDocument() - }) - }) - - it('reuses a public load already in progress when the provider mounts', async () => { - const loaderGate = createControlledPromise() - const beforeLoad = vi.fn() - const loader = vi.fn(() => loaderGate) - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - beforeLoad, - loader, - component: () =>
Index
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), }) - const load = router.load() - onTestFinished(async () => { - loaderGate.resolve() - await Promise.allSettled([load]) - }) - - await waitFor(() => expect(loader).toHaveBeenCalledTimes(1)) - - const view = render() - loaderGate.resolve() - await load - - expect(await view.findByText('Index')).toBeInTheDocument() - expect(beforeLoad).toHaveBeenCalledTimes(1) - expect(loader).toHaveBeenCalledTimes(1) + loadSpy.mockRestore() }) }) diff --git a/packages/vue-router/tests/blocker.test.tsx b/packages/vue-router/tests/blocker.test.tsx index fdd9fa4931..6a58ff0cd4 100644 --- a/packages/vue-router/tests/blocker.test.tsx +++ b/packages/vue-router/tests/blocker.test.tsx @@ -1,4 +1,4 @@ -import { defineComponent } from 'vue' +import '@testing-library/jest-dom/vitest' import { afterEach, describe, expect, test, vi } from 'vitest' import { cleanup, fireEvent, render, screen } from '@testing-library/vue' import combinate from 'combinate' @@ -29,12 +29,13 @@ interface BlockerTestOpts { async function setup({ blockerFn, disabled, ignoreBlocker }: BlockerTestOpts) { const _mockBlockerFn = vi.fn(blockerFn) const rootRoute = createRootRoute() - const Setup = defineComponent({ - setup() { + const indexRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/', + component: function Setup() { const navigate = useNavigate() - useBlocker({ disabled, shouldBlockFn: _mockBlockerFn }) - return () => ( + return ( <>

Index

@@ -49,12 +50,6 @@ async function setup({ blockerFn, disabled, ignoreBlocker }: BlockerTestOpts) { }, }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: Setup, - }) - const postsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/posts', diff --git a/packages/vue-router/tests/component-preload-retry.test.tsx b/packages/vue-router/tests/component-preload-retry.test.tsx deleted file mode 100644 index ca74f2ba67..0000000000 --- a/packages/vue-router/tests/component-preload-retry.test.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import { afterEach, expect, test, vi } from 'vitest' -import { cleanup, fireEvent, render, screen } from '@testing-library/vue' -import { createControlledPromise } from '@tanstack/router-core' -import { - Link, - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - lazyRouteComponent, - useRouter, -} from '../src' -import type { ErrorComponentProps } from '../src' - -afterEach(() => { - cleanup() - vi.restoreAllMocks() - vi.unstubAllGlobals() -}) - -test('a successful server component download is reused', async () => { - vi.stubGlobal('document', undefined) - const importer = vi.fn().mockResolvedValue({ default: () => null }) - const Page = lazyRouteComponent(importer) - - const preload = Page.preload?.() - await preload - - expect(Page.preload?.()).toBe(preload) - expect(importer).toHaveBeenCalledTimes(1) -}) - -test('a resolved client component preload is reused', async () => { - const importer = vi.fn().mockResolvedValue({ default: () => null }) - const Page = lazyRouteComponent(importer) - - await Page.preload?.() - expect(Page.preload).toBeUndefined() - expect(importer).toHaveBeenCalledTimes(1) -}) - -test('revisiting a resolved lazy component skips pending UI', async () => { - const PageContent = () =>
Page content
- const componentImport = createControlledPromise<{ - default: typeof PageContent - }>() - const repeatedImport = createControlledPromise<{ - default: typeof PageContent - }>() - const importer = vi - .fn() - .mockImplementationOnce(() => componentImport) - .mockImplementationOnce(() => repeatedImport) - const Page = lazyRouteComponent(importer) - const PendingComponent = vi.fn(() => ( -
Loading page
- )) - const rootRoute = createRootRoute({ - component: () => ( - <> - Home link - Page link - - - ), - }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Home content
, - }) - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - component: Page, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, pageRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 0, - defaultPendingComponent: PendingComponent, - }) - - render() - expect(await screen.findByText('Home content')).toBeInTheDocument() - - await fireEvent.click(screen.getByRole('link', { name: 'Page link' })) - expect(await screen.findByTestId('pending-component')).toHaveTextContent( - 'Loading page', - ) - componentImport.resolve({ default: PageContent }) - expect(await screen.findByText('Page content')).toBeInTheDocument() - - await fireEvent.click(screen.getByRole('link', { name: 'Home link' })) - expect(await screen.findByText('Home content')).toBeInTheDocument() - PendingComponent.mockClear() - await fireEvent.click(screen.getByRole('link', { name: 'Page link' })) - await new Promise((resolve) => setTimeout(resolve, 10)) - - expect(screen.queryByText('Page content')).toBeInTheDocument() - expect(screen.queryByTestId('pending-component')).not.toBeInTheDocument() - expect(PendingComponent).not.toHaveBeenCalled() - expect(importer).toHaveBeenCalledOnce() -}) - -test('a failed component download is retried from the route error UI', async () => { - vi.spyOn(console, 'error').mockImplementation(() => {}) - - const PageContent = () =>
Page content
- const importer = vi - .fn<() => Promise<{ default: typeof PageContent }>>() - .mockRejectedValueOnce(new Error('component download failed')) - .mockResolvedValue({ default: PageContent }) - const Page = lazyRouteComponent(importer) - - function RouteError(props: ErrorComponentProps) { - const router = useRouter() - return ( - - ) - } - - const rootRoute = createRootRoute() - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - component: Page, - errorComponent: RouteError, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - }) - - render() - - const retryButton = await screen.findByRole('button', { name: 'Retry' }) - expect(importer).toHaveBeenCalledTimes(1) - - await fireEvent.click(retryButton) - - expect(await screen.findByText('Page content')).toBeInTheDocument() - expect(importer).toHaveBeenCalledTimes(2) -}) diff --git a/packages/vue-router/tests/disableGlobalCatchBoundary.test.tsx b/packages/vue-router/tests/disableGlobalCatchBoundary.test.tsx index 67c7f6c63f..3cd92b08c0 100644 --- a/packages/vue-router/tests/disableGlobalCatchBoundary.test.tsx +++ b/packages/vue-router/tests/disableGlobalCatchBoundary.test.tsx @@ -79,32 +79,4 @@ describe('disableGlobalCatchBoundary option', () => { ) expect(externalErrorElement).toBeInTheDocument() }) - - test('the global boundary recovers when the same match is reloaded', async () => { - vi.spyOn(console, 'warn').mockImplementation(() => {}) - let shouldThrow = true - - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => { - if (shouldThrow) { - throw new Error('Temporary error') - } - return
Recovered
- }, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - }) - - render() - expect(await screen.findByText('Temporary error')).toBeInTheDocument() - - shouldThrow = false - await router.invalidate() - - expect(await screen.findByText('Recovered')).toBeInTheDocument() - }) }) diff --git a/packages/vue-router/tests/errorBoundary.test-d.tsx b/packages/vue-router/tests/errorBoundary.test-d.tsx deleted file mode 100644 index 36db897af3..0000000000 --- a/packages/vue-router/tests/errorBoundary.test-d.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { expectTypeOf, test } from 'vitest' -import { createRootRoute, createRouter } from '../src' -import type { ErrorComponentProps } from '../src' - -test('only boundary errors default to unknown', () => { - expectTypeOf().toEqualTypeOf() - expectTypeOf['error']>().toEqualTypeOf() - const routeTree = createRootRoute({ - errorComponent: ({ error }) => { - expectTypeOf(error).toEqualTypeOf() - return
- }, - onCatch: (error) => { - expectTypeOf(error).toEqualTypeOf() - }, - onError: (error) => { - expectTypeOf(error).toBeAny() - }, - }) - createRouter({ - routeTree, - defaultErrorComponent: ({ error }) => { - expectTypeOf(error).toEqualTypeOf() - return
- }, - defaultOnCatch: (error) => { - expectTypeOf(error).toEqualTypeOf() - }, - }) -}) diff --git a/packages/vue-router/tests/errorComponent.test.tsx b/packages/vue-router/tests/errorComponent.test.tsx index c5f88afa62..f606040f17 100644 --- a/packages/vue-router/tests/errorComponent.test.tsx +++ b/packages/vue-router/tests/errorComponent.test.tsx @@ -1,13 +1,8 @@ import { afterEach, describe, expect, test, vi } from 'vitest' import { cleanup, fireEvent, render, screen } from '@testing-library/vue' -import { defineComponent, ref } from 'vue' -import { createControlledPromise } from '@tanstack/router-core' import { - CatchBoundary, - ErrorComponent, Link, - Outlet, RouterProvider, createLazyRoute, createRootRoute, @@ -17,11 +12,7 @@ import { import type { ErrorComponentProps } from '../src' function MyErrorComponent(props: ErrorComponentProps) { - return
Error: {getErrorMessage(props.error)}
-} - -function getErrorMessage(error: unknown) { - return error instanceof Error ? error.message : String(error) + return
Error: {props.error.message}
} async function asyncToThrowFn() { @@ -169,220 +160,3 @@ describe.each([true, false])( ) }, ) - -test('global catch boundary resets when a background child generation recovers', async () => { - const refresh = createControlledPromise() - let loaderCalls = 0 - const rootRoute = createRootRoute({ component: Outlet }) - const ChildComponent = defineComponent({ - setup() { - const revision = childRoute.useLoaderData() - return () => { - if (revision.value === 1) { - throw new Error('stale child render failed') - } - - return
Recovered child revision {revision.value}
- } - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: { - staleReloadMode: 'background', - handler: () => (++loaderCalls === 1 ? 1 : refresh), - }, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([childRoute]), - }) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - vi.spyOn(console, 'error').mockImplementation(() => {}) - - render() - expect( - await screen.findByText('stale child render failed'), - ).toBeInTheDocument() - - const invalidation = router.invalidate() - await vi.waitFor(() => expect(loaderCalls).toBe(2)) - expect(screen.getByText('stale child render failed')).toBeInTheDocument() - expect(screen.queryByText(/Recovered child revision/)).not.toBeInTheDocument() - refresh.resolve(2) - await invalidation - - expect( - await screen.findByText('Recovered child revision 2'), - ).toBeInTheDocument() - expect( - screen.queryByText('stale child render failed'), - ).not.toBeInTheDocument() -}) - -test('ancestor route errorComponent resets when a background child generation recovers', async () => { - const refresh = createControlledPromise() - let loaderCalls = 0 - const rootRoute = createRootRoute({ - component: Outlet, - errorComponent: ({ error }) => ( -
Ancestor error: {getErrorMessage(error)}
- ), - }) - const ChildComponent = defineComponent({ - setup() { - const revision = childRoute.useLoaderData() - return () => { - if (revision.value === 1) { - throw new Error('stale child render failed') - } - - return
Recovered child revision {revision.value}
- } - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: { - staleReloadMode: 'background', - handler: () => (++loaderCalls === 1 ? 1 : refresh), - }, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([childRoute]), - }) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - vi.spyOn(console, 'error').mockImplementation(() => {}) - - let invalidation: Promise | undefined - try { - render() - expect( - await screen.findByText('Ancestor error: stale child render failed'), - ).toBeInTheDocument() - - invalidation = router.invalidate({ - filter: (match) => match.routeId === childRoute.id, - }) - await vi.waitFor(() => expect(loaderCalls).toBe(2)) - expect( - screen.getByText('Ancestor error: stale child render failed'), - ).toBeInTheDocument() - refresh.resolve(2) - await invalidation - - expect( - await screen.findByText('Recovered child revision 2'), - ).toBeInTheDocument() - } finally { - refresh.resolve(2) - if (invalidation) { - await Promise.allSettled([invalidation]) - } - } -}) - -test.each([ - ['false', false], - ['zero', 0], - ['negative zero', -0], - ['bigint zero', 0n], - ['empty string', ''], - ['null', null], - ['undefined', undefined], - ['NaN', NaN], -] as const)( - 'CatchBoundary renders falsy thrown value %s', - async (_, thrown) => { - vi.spyOn(console, 'error').mockImplementation(() => {}) - let caught: unknown - - function ThrowFalsy(): never { - throw thrown - } - - const rootRoute = createRootRoute({ - component: ThrowFalsy, - errorComponent: ({ error }) => ( -
{Object.is(error, thrown) ? 'Caught value' : 'Wrong value'}
- ), - onCatch: (error) => { - caught = error - }, - }) - const router = createRouter({ routeTree: rootRoute }) - - render() - - expect(await screen.findByText('Caught value')).toBeInTheDocument() - expect(screen.queryByText('Wrong value')).not.toBeInTheDocument() - expect(Object.is(caught, thrown)).toBe(true) - }, -) - -test.each([ - [new Error('Error message'), 'Error message'], - [{ message: 'Serialized message' }, 'Serialized message'], - [{ message: 0 }, undefined], - ['Thrown string', undefined], - [false, undefined], - [0, undefined], - [0n, undefined], - ['', undefined], - [null, undefined], - [undefined, undefined], - [NaN, undefined], - [Symbol('error'), undefined], - [Object.create(null), undefined], -])('default error details render %s', (error, expected) => { - const { container } = render() - - expect(screen.getByText('Something went wrong!')).toBeInTheDocument() - expect(container.querySelector('code')?.textContent).toBe(expected) -}) - -test.each([false, 0, -0, 0n, '', null, undefined, NaN, { message: 'object' }])( - 'CatchBoundary retains the original value and resets after throwing %s', - async (thrown) => { - const shouldThrow = ref(true) - const resetKey = ref(0) - const onCatch = vi.fn() - const Child = defineComponent(() => () => { - if (shouldThrow.value) { - throw thrown - } - return
Recovered child
- }) - const App = defineComponent(() => () => ( - resetKey.value} - onCatch={onCatch} - errorComponent={({ error, reset }: ErrorComponentProps) => ( - - )} - children={} - /> - )) - - render() - await screen.findByText('Reset') - shouldThrow.value = false - await fireEvent.click(screen.getByText('Reset')) - expect(await screen.findByText('Recovered child')).toBeInTheDocument() - - shouldThrow.value = true - await screen.findByText('Reset') - shouldThrow.value = false - resetKey.value++ - expect(await screen.findByText('Recovered child')).toBeInTheDocument() - expect(onCatch).toHaveBeenCalledTimes(2) - expect(onCatch).toHaveBeenLastCalledWith(thrown) - }, -) diff --git a/packages/vue-router/tests/fileRoute.test.ts b/packages/vue-router/tests/fileRoute.test.ts index 5d459d1b7e..f6b92298c8 100644 --- a/packages/vue-router/tests/fileRoute.test.ts +++ b/packages/vue-router/tests/fileRoute.test.ts @@ -1,38 +1,13 @@ /* eslint-disable */ -import { afterEach, describe, it, expect, vi } from 'vitest' +import { describe, it, expect } from 'vitest' import { getRouteApi, createFileRoute, createLazyRoute, createLazyFileRoute, LazyRoute, - FileRoute, } from '../src' -afterEach(() => { - vi.restoreAllMocks() -}) - -describe('createFileRoute', () => { - it('creates a non-root route without a deprecation warning', () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - // @ts-expect-error - const route = createFileRoute('')({}) - - expect(route.isRoot).toBe(false) - expect(warn).not.toHaveBeenCalled() - }) - - it('keeps the deprecation warning for direct FileRoute usage', () => { - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - // @ts-expect-error - const route = new FileRoute('').createRoute({}) - - expect(route.isRoot).toBe(false) - expect(warn).toHaveBeenCalledOnce() - }) -}) - describe('createFileRoute has the same hooks as getRouteApi', () => { const routeApi = getRouteApi('foo') const hookNames = Object.keys(routeApi).filter((key) => key.startsWith('use')) diff --git a/packages/vue-router/tests/hydration-capped-boundary-pending.test.tsx b/packages/vue-router/tests/hydration-capped-boundary-pending.test.tsx deleted file mode 100644 index e8e0db4b67..0000000000 --- a/packages/vue-router/tests/hydration-capped-boundary-pending.test.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import * as Vue from 'vue' -import { renderToString } from 'vue/server-renderer' -import { afterEach, describe, expect, test, vi } from 'vitest' -import { hydrate as hydrateRouter } from '@tanstack/router-core/ssr/client' -import { - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - notFound, -} from '../src' -import { dehydrateToBootstrap } from './ssr-test-utils' -import type { TsrSsrGlobal } from '@tanstack/router-core/ssr/client' - -declare global { - interface Window { - $_TSR?: TsrSsrGlobal - } -} - -const testCleanups: Array<() => void | Promise> = [] - -afterEach(async () => { - while (testCleanups.length) { - await testCleanups.pop()!() - } - vi.restoreAllMocks() - window.$_TSR = undefined - document.body.innerHTML = '' -}) - -describe('hydrating a server-capped boundary lane', () => { - test.each([ - ['error', 'parent'], - ['notFound', 'parent'], - ['error', 'root'], - ['notFound', 'root'], - ] as const)( - 'keeps the server-rendered %s %s boundary visible through hydration', - async (outcome, boundary) => { - const childLoader = vi.fn(() => 'child data') - const makeRouteTree = () => { - const boundaryOptions = { - beforeLoad: () => { - throw outcome === 'notFound' - ? notFound() - : new Error('server route failure') - }, - pendingComponent: () => ( -
Boundary pending
- ), - errorComponent: () => ( -
Boundary error
- ), - notFoundComponent: () => ( -
Boundary not found
- ), - } - const rootRoute = createRootRoute({ - component: Outlet, - ...(boundary === 'root' ? boundaryOptions : {}), - }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - component: Outlet, - ...(boundary === 'parent' ? boundaryOptions : {}), - }) - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - loader: childLoader, - component: () =>
Child
, - }) - return rootRoute.addChildren([parentRoute.addChildren([childRoute])]) - } - - const serverRouter = createRouter({ - routeTree: makeRouteTree(), - history: createMemoryHistory({ - initialEntries: ['/parent/child'], - }), - }) - serverRouter.isServer = true - testCleanups.push(() => serverRouter.serverSsr?.cleanup()) - window.$_TSR = await dehydrateToBootstrap(serverRouter) - - const serverMatches = serverRouter.stores.matches.get() - expect(serverMatches).toHaveLength(3) - const serverBoundary = serverMatches[boundary === 'root' ? 0 : 1]! - if (outcome === 'notFound' && boundary === 'root') { - expect(serverBoundary).toMatchObject({ - status: 'success', - _notFound: true, - }) - } else { - expect(serverBoundary.status).toBe(outcome) - } - - const serverApp = Vue.createSSRApp( - Vue.defineComponent({ - setup: () => () => , - }), - ) - const serverHtml = await renderToString(serverApp) - const expectedBoundary = - outcome === 'notFound' ? 'Boundary not found' : 'Boundary error' - expect(serverHtml).toContain(expectedBoundary) - - const clientRouter = createRouter({ - routeTree: makeRouteTree(), - history: createMemoryHistory({ - initialEntries: ['/parent/child'], - }), - }) - - await hydrateRouter(clientRouter) - - const container = document.createElement('div') - container.innerHTML = serverHtml - document.body.appendChild(container) - const consoleError = vi - .spyOn(console, 'error') - .mockImplementation(() => {}) - const consoleWarn = vi.spyOn(console, 'warn').mockImplementation(() => {}) - const clientApp = Vue.createSSRApp( - Vue.defineComponent({ - setup: () => () => , - }), - ) - let clientAppMounted = false - testCleanups.push(() => { - if (clientAppMounted) { - clientApp.unmount() - } - container.remove() - }) - - clientApp.mount(container) - clientAppMounted = true - await Vue.nextTick() - - expect(container).toHaveTextContent(expectedBoundary) - expect(container).not.toHaveTextContent('Boundary pending') - expect( - [consoleError.mock.calls, consoleWarn.mock.calls].flat(2).join(' '), - ).not.toMatch(/hydration|mismatch/i) - expect(childLoader).not.toHaveBeenCalled() - }, - ) -}) diff --git a/packages/vue-router/tests/hydration-terminal-lane.test.tsx b/packages/vue-router/tests/hydration-terminal-lane.test.tsx deleted file mode 100644 index f24b3f2ac7..0000000000 --- a/packages/vue-router/tests/hydration-terminal-lane.test.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { cleanup, render, screen } from '@testing-library/vue' -import { afterEach, describe, expect, test, vi } from 'vitest' -import { nextTick } from 'vue' -import { hydrate } from '@tanstack/router-core/ssr/client' -import { dehydrateSsrMatchId } from '../../router-core/src/ssr/ssr-match-id' -import { - RouterProvider, - createMemoryHistory, - createRootRoute, - createRouter, -} from '../src' -import type { AnyRouteMatch } from '@tanstack/router-core' -import type { TsrSsrGlobal } from '@tanstack/router-core/ssr/client' - -function bootstrap( - matches: Array<{ - match: AnyRouteMatch - status: AnyRouteMatch['status'] - ssr: AnyRouteMatch['ssr'] - data?: unknown - error?: unknown - notFound?: boolean - }>, -): void { - window.$_TSR = { - router: { - manifest: undefined, - matches: matches.map(({ match, status, ssr, data, error, notFound }) => ({ - i: dehydrateSsrMatchId(match.id), - l: data, - e: error, - s: status, - ssr, - u: Date.now(), - ...(notFound ? { g: true } : {}), - })), - }, - h: vi.fn(), - e: vi.fn(), - c: vi.fn(), - p: vi.fn(), - buffer: [], - } as TsrSsrGlobal -} - -afterEach(() => { - cleanup() - vi.useRealTimers() - delete window.$_TSR -}) - -describe('hydration terminal lane', () => { - test('keeps a hydrated pending fallback through its minimum before a terminal result', async () => { - vi.useFakeTimers() - vi.setSystemTime(0) - const rootRoute = createRootRoute({ - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
Missing page pending
, - notFoundComponent: () =>
Missing page
, - }) - const router = createRouter({ - history: createMemoryHistory({ initialEntries: ['/missing'] }), - routeTree: rootRoute, - }) - const matches = router.matchRoutes(router.state.location) - expect(matches[0]?._notFound).toBe(true) - bootstrap([ - { - match: matches[0]!, - status: 'pending', - ssr: false, - notFound: true, - }, - ]) - - await hydrate(router) - render() - await nextTick() - expect(screen.getByRole('status')).toHaveTextContent('Missing page pending') - - await vi.advanceTimersByTimeAsync(99) - await nextTick() - expect(screen.getByRole('status')).toHaveTextContent('Missing page pending') - expect(screen.queryByText('Missing page')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(5) - await nextTick() - expect(screen.getByText('Missing page')).toBeInTheDocument() - }) -}) diff --git a/packages/vue-router/tests/issue-4467-lazy-route-pending.test.tsx b/packages/vue-router/tests/issue-4467-lazy-route-pending.test.tsx deleted file mode 100644 index 7c5c131783..0000000000 --- a/packages/vue-router/tests/issue-4467-lazy-route-pending.test.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { cleanup, render, screen } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { nextTick } from 'vue' -import { createControlledPromise } from '@tanstack/router-core' -import { - Outlet, - RouterProvider, - createLazyRoute, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -afterEach(() => { - cleanup() - vi.useRealTimers() -}) - -test('a lazy pending component does not restart an acknowledged minimum', async () => { - const loader = createControlledPromise() - const lazyPageOptions = createLazyRoute('/page')({ - pendingComponent: () =>

Loading lazy page

, - component: () =>

Page

, - }) - const lazyOptions = createControlledPromise() - const rootRoute = createRootRoute({ component: () => }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>

Index page

, - }) - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - loader: () => loader, - }).lazy(() => lazyOptions) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, pageRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 100, - defaultPendingComponent: () =>

Loading default

, - }) - - render() - expect( - await screen.findByRole('heading', { name: 'Index page' }), - ).toBeInTheDocument() - vi.useFakeTimers() - vi.setSystemTime(0) - - const navigation = router.navigate({ to: '/page' }) - let settled = false - void navigation.then(() => { - settled = true - }) - try { - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByRole('status')).toHaveTextContent('Loading default') - - await vi.advanceTimersByTimeAsync(25) - lazyOptions.resolve(lazyPageOptions) - loader.resolve() - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByRole('status')).toHaveTextContent('Loading lazy page') - - await vi.advanceTimersByTimeAsync(74) - await nextTick() - expect(screen.getByRole('status')).toHaveTextContent('Loading lazy page') - - await vi.advanceTimersByTimeAsync(5) - await Promise.resolve() - await nextTick() - expect(settled).toBe(true) - await navigation - expect(screen.getByRole('heading', { name: 'Page' })).toBeInTheDocument() - expect(Date.now()).toBeLessThan(125) - } finally { - lazyOptions.resolve(lazyPageOptions) - loader.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await navigation - } -}) diff --git a/packages/vue-router/tests/issue-7367-pending-min-redirect.test.tsx b/packages/vue-router/tests/issue-7367-pending-min-redirect.test.tsx deleted file mode 100644 index f664a08303..0000000000 --- a/packages/vue-router/tests/issue-7367-pending-min-redirect.test.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { cleanup, render, screen } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { nextTick } from 'vue' -import { createControlledPromise } from '@tanstack/router-core' -import { - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - redirect, -} from '../src' - -afterEach(() => { - vi.restoreAllMocks() - cleanup() - vi.useRealTimers() -}) - -test('a compatible SPA redirect preserves the acknowledged pending minimum', async () => { - vi.useFakeTimers() - vi.setSystemTime(0) - const redirectReady = createControlledPromise() - let shouldRedirect = true - - const rootRoute = createRootRoute({ - component: () => , - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
loading
, - beforeLoad: async () => { - if (shouldRedirect) { - shouldRedirect = false - await redirectReady - throw redirect({ to: '/welcome', replace: true }) - } - }, - }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Index
, - }) - const welcomeRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/welcome', - component: () =>
Welcome
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, welcomeRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - try { - render() - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByTestId('pending')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(25) - redirectReady.resolve() - await vi.advanceTimersByTimeAsync(74) - await nextTick() - expect(screen.getByTestId('pending')).toBeInTheDocument() - expect(screen.queryByTestId('welcome-page')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(5) - await nextTick() - expect(screen.getByTestId('welcome-page')).toBeInTheDocument() - } finally { - redirectReady.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await nextTick() - } -}) - -test('an incompatible SPA redirect does not inherit the pending minimum', async () => { - const redirectReady = createControlledPromise() - const rootRoute = createRootRoute({ component: () => }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Index
, - }) - const sourceRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/source', - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
loading
, - beforeLoad: async () => { - await redirectReady - throw redirect({ to: '/welcome', replace: true }) - }, - }) - const welcomeRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/welcome', - component: () =>
Welcome
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, sourceRoute, welcomeRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - expect(await screen.findByTestId('index-page')).toBeVisible() - vi.useFakeTimers() - vi.setSystemTime(0) - - const navigation = router.navigate({ to: '/source' }) - try { - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByTestId('pending')).toBeVisible() - - await vi.advanceTimersByTimeAsync(25) - redirectReady.resolve() - await vi.advanceTimersByTimeAsync(5) - await navigation - await nextTick() - - expect(Date.now()).toBeLessThan(100) - expect(screen.getByTestId('welcome-page')).toBeVisible() - expect(screen.queryByTestId('index-page')).not.toBeInTheDocument() - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - } finally { - redirectReady.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await navigation - } -}) diff --git a/packages/vue-router/tests/issue-7986-retained-pending.test.tsx b/packages/vue-router/tests/issue-7986-retained-pending.test.tsx deleted file mode 100644 index acbabfcb29..0000000000 --- a/packages/vue-router/tests/issue-7986-retained-pending.test.tsx +++ /dev/null @@ -1,1135 +0,0 @@ -import { cleanup, render, screen, waitFor } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { createControlledPromise } from '@tanstack/router-core' -import { defineComponent, nextTick } from 'vue' -import { - Outlet, - RouterProvider, - createLazyRoute, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' -import type { ControlledPromise } from '@tanstack/router-core' - -const controlledPromises = new Set>() -const pendingOperations = new Set>() - -afterEach(async () => { - try { - for (const promise of controlledPromises) { - if (promise.status === 'pending') { - promise.resolve() - } - } - if (vi.isFakeTimers()) { - await vi.runAllTimersAsync() - } - await Promise.allSettled(pendingOperations) - } finally { - controlledPromises.clear() - pendingOperations.clear() - cleanup() - vi.useRealTimers() - vi.restoreAllMocks() - } -}) - -const navigationDelay = 100 - -function controlled() { - const promise = createControlledPromise() - controlledPromises.add(promise) - return promise -} - -function track(operation: Promise) { - pendingOperations.add(operation) - return operation -} - -function setup() { - const navigationBeforeLoadStarted = controlled() - let beforeLoadCalls = 0 - - const rootRoute = createRootRoute({ component: () => }) - const layoutRoute = createRoute({ - getParentRoute: () => rootRoute, - id: 'app', - beforeLoad: async () => { - if (++beforeLoadCalls > 1) { - navigationBeforeLoadStarted.resolve() - await new Promise((resolve) => - setTimeout(resolve, navigationDelay), - ) - } - return { user: 'test' } - }, - component: () => , - }) - const Project = defineComponent({ - setup() { - const params = projectRoute.useParams() - - const search = projectRoute.useSearch() - return () => ( -
- project={params.value.projectId} tab={search.value.tab ?? 'default'} -
- ) - }, - }) - const projectRoute = createRoute({ - getParentRoute: () => layoutRoute, - path: '/projects/$projectId', - validateSearch: (search: Record): { tab?: string } => - typeof search.tab === 'string' ? { tab: search.tab } : {}, - component: Project, - }) - - const router = createRouter({ - routeTree: rootRoute.addChildren([layoutRoute.addChildren([projectRoute])]), - history: createMemoryHistory({ initialEntries: ['/projects/p1'] }), - defaultPendingComponent: () =>
Pending
, - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - return { router, navigationBeforeLoadStarted } -} - -test('a search-only navigation retains successful UI while beforeLoad reruns', async () => { - const { router, navigationBeforeLoadStarted } = setup() - render() - expect(await screen.findByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - - vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }) - const navigation = track( - router.navigate({ - to: '/projects/$projectId', - params: { projectId: 'p1' }, - search: { tab: 'files' }, - }), - ) - await navigationBeforeLoadStarted - - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(navigationDelay) - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p1 tab=files', - ) -}) - -test('a path-param navigation retains successful UI while beforeLoad reruns', async () => { - const { router, navigationBeforeLoadStarted } = setup() - render() - expect(await screen.findByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - - vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }) - const navigation = track( - router.navigate({ - to: '/projects/$projectId', - params: { projectId: 'p2' }, - }), - ) - await navigationBeforeLoadStarted - - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p1 tab=default', - ) - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(navigationDelay) - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toHaveTextContent( - 'project=p2 tab=default', - ) -}) - -test('a blocking reload retains the exact successful match', async () => { - const reloadStarted = controlled() - let loaderCalls = 0 - - const rootRoute = createRootRoute({ component: () => }) - const PageComponent = defineComponent({ - setup() { - const loaderData = pageRoute.useLoaderData() - - const search = pageRoute.useSearch() - return () => ( -
- {loaderData.value} tab={search.value.tab ?? 'default'} -
- ) - }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - validateSearch: (search: Record): { tab?: string } => - typeof search.tab === 'string' ? { tab: search.tab } : {}, - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: () => { - if (++loaderCalls === 1) { - return 'initial' - } - reloadStarted.resolve() - return new Promise((resolve) => - setTimeout(() => resolve('reloaded'), navigationDelay), - ) - }, - }, - component: PageComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - defaultPendingComponent: () =>
Pending
, - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('content')).toHaveTextContent( - 'initial tab=default', - ) - - vi.useFakeTimers({ toFake: ['setTimeout', 'clearTimeout'] }) - const navigation = track( - router.navigate({ - to: '/page', - search: { tab: 'files' }, - }), - ) - await reloadStarted - - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent('initial tab=default') - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent('initial tab=default') - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(navigationDelay) - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toHaveTextContent('reloaded tab=files') -}) - -test('a cached success retries through pending UI when an error is mounted', async () => { - vi.spyOn(console, 'error').mockImplementation(() => {}) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - const retryStarted = controlled() - const retry = controlled() - let loaderCalls = 0 - - const rootRoute = createRootRoute({ component: () => }) - const PageComponent = defineComponent({ - setup() { - const loaderData = pageRoute.useLoaderData() - return () =>
{loaderData.value}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: () => { - loaderCalls++ - if (loaderCalls === 1) { - throw new Error('initial load failed') - } - if (loaderCalls === 2) { - return 'preloaded' - } - retryStarted.resolve() - return retry.then(() => 'retried') - }, - }, - component: PageComponent, - pendingComponent: () =>
Pending
, - errorComponent: () =>
Failed
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('error')).toBeInTheDocument() - - await router.preloadRoute({ to: '/page' }) - expect(loaderCalls).toBe(2) - expect(screen.getByTestId('error')).toBeInTheDocument() - - const navigation = track(router.navigate({ to: '/page' })) - await retryStarted - await nextTick() - - expect(await screen.findByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('error')).not.toBeInTheDocument() - - retry.resolve() - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent('retried') -}) - -test('a cache-only success retries through pending UI over mounted success', async () => { - const retryStarted = controlled() - const retry = controlled() - let loaderCalls = 0 - - const rootRoute = createRootRoute({ component: () => }) - const PageComponent = defineComponent({ - setup() { - const loaderData = pageRoute.useLoaderData() - return () =>
{loaderData.value}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: () => { - const generation = ++loaderCalls - if (generation === 3) { - retryStarted.resolve() - return retry.then(() => `generation ${generation}`) - } - return `generation ${generation}` - }, - }, - component: PageComponent, - pendingComponent: () =>
Pending
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('content')).toHaveTextContent('generation 1') - - await router.preloadRoute({ to: '/page' }) - expect(loaderCalls).toBe(2) - expect(screen.getByTestId('content')).toHaveTextContent('generation 1') - - const navigation = track(router.navigate({ to: '/page' })) - await retryStarted - await nextTick() - - expect(await screen.findByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('content')).not.toBeInTheDocument() - - retry.resolve() - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toHaveTextContent('generation 3') -}) - -test('a success hidden below an error boundary retries through pending UI', async () => { - vi.spyOn(console, 'error').mockImplementation(() => {}) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - const childReloadStarted = controlled() - const childReload = controlled() - let parentFails = false - let childReloads = false - - const rootRoute = createRootRoute({ component: () => }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - shouldReload: true, - loader: () => { - if (parentFails) { - throw new Error('parent failed') - } - return 'parent data' - }, - component: () => , - errorComponent: () =>
Parent failed
, - }) - const ChildComponent = defineComponent({ - setup() { - const loaderData = childRoute.useLoaderData() - return () =>
{loaderData.value}
- }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - shouldReload: () => childReloads, - loader: { - staleReloadMode: 'blocking', - handler: () => { - if (childReloads) { - childReloadStarted.resolve() - return childReload.then(() => 'reloaded child') - } - return 'initial child' - }, - }, - component: ChildComponent, - pendingComponent: () =>
Pending child
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ initialEntries: ['/parent/child'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('content')).toHaveTextContent( - 'initial child', - ) - - parentFails = true - await track(router.navigate({ to: '/parent/child' })) - await nextTick() - expect(await screen.findByTestId('error')).toBeInTheDocument() - - parentFails = false - childReloads = true - const navigation = track(router.navigate({ to: '/parent/child' })) - await childReloadStarted - await nextTick() - - expect(await screen.findByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('error')).not.toBeInTheDocument() - - childReload.resolve() - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent('reloaded child') -}) - -test('a global not-found destination keeps pending until its terminal component is ready', async () => { - const missingStarted = controlled() - const missingLoader = controlled() - const terminalStarted = controlled() - const terminalReady = controlled() - let loaderCalls = 0 - const Missing = Object.assign( - () =>
Missing
, - { - preload: () => { - terminalStarted.resolve() - return terminalReady - }, - }, - ) - - const rootRoute = createRootRoute({ - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: () => { - if (++loaderCalls === 1) { - return 'initial root' - } - missingStarted.resolve() - return missingLoader - }, - }, - component: () => , - pendingComponent: () =>
Pending root
, - notFoundComponent: Missing, - }) - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - component: () =>
Page
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('content')).toBeInTheDocument() - - const navigation = track(router.navigate({ to: '/missing' } as any)) - await missingStarted - await nextTick() - - expect(await screen.findByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('content')).not.toBeInTheDocument() - - let settled = false - void navigation.then(() => { - settled = true - }) - missingLoader.resolve() - await terminalStarted - await nextTick() - expect(screen.getByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('missing')).not.toBeInTheDocument() - expect(settled).toBe(false) - - terminalReady.resolve() - await navigation - await nextTick() - - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() - expect(screen.getByTestId('missing')).toBeVisible() -}) - -test('a cold global not-found presents pending only while its terminal component loads', async () => { - const terminalStarted = controlled() - const terminalReady = controlled() - const Missing = Object.assign( - () =>
Missing
, - { - preload: () => { - terminalStarted.resolve() - return terminalReady - }, - }, - ) - const rootRoute = createRootRoute({ - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: () =>
Pending root
, - notFoundComponent: Missing, - }) - const router = createRouter({ - routeTree: rootRoute, - history: createMemoryHistory({ initialEntries: ['/missing'] }), - }) - - render() - await terminalStarted - expect(await screen.findByTestId('pending')).toBeVisible() - expect(screen.queryByTestId('missing')).not.toBeInTheDocument() - - terminalReady.resolve() - expect(await screen.findByTestId('missing')).toBeVisible() - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() -}) - -test('lazy fuzzy-boundary relocation retains the mounted parent', async () => { - const lazyStarted = controlled() - const lazyRoute = controlled() - const parentReloadStarted = controlled() - const parentReload = controlled() - let parentLoads = 0 - - const rootRoute = createRootRoute({ - component: () => , - notFoundComponent: () =>
Root missing
, - }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - beforeLoad: async () => { - if (++parentLoads > 1) { - parentReloadStarted.resolve() - await parentReload - } - }, - component: () => ( -
-
Parent content
- -
- ), - pendingComponent: () => ( -
Parent pending
- ), - notFoundComponent: () => ( -
Parent missing
- ), - }) - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - }).lazy(async () => { - lazyStarted.resolve() - await lazyRoute - return createLazyRoute('/parent/child')({ - notFoundComponent: () => ( -
Child missing
- ), - }) - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ initialEntries: ['/parent'] }), - defaultPendingComponent: () => ( -
Pending
- ), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('parent-content')).toBeVisible() - - const navigation = track( - router.navigate({ - to: '/parent/child/missing' as any, - }), - ) - await lazyStarted - await nextTick() - - expect(screen.getByTestId('parent-content')).toBeVisible() - expect(screen.queryByTestId('parent-pending')).not.toBeInTheDocument() - expect(screen.queryByTestId('parent-missing')).not.toBeInTheDocument() - - lazyRoute.resolve() - await parentReloadStarted - await nextTick() - - expect(screen.getByTestId('parent-content')).toBeVisible() - expect(screen.queryByTestId('parent-pending')).not.toBeInTheDocument() - expect(screen.queryByTestId('parent-missing')).not.toBeInTheDocument() - - parentReload.resolve() - await navigation - await nextTick() - - expect(screen.getByTestId('child-missing')).toBeVisible() - expect(screen.queryByTestId('root-missing')).not.toBeInTheDocument() - expect(screen.queryByTestId('parent-missing')).not.toBeInTheDocument() -}) - -test('a superseding navigation replaces an unrelated pending presentation', async () => { - const otherStarted = controlled() - const otherLoader = controlled() - const pageReloadStarted = controlled() - const pageReload = controlled() - let pageLoads = 0 - - const rootRoute = createRootRoute({ component: () => }) - const PageComponent = defineComponent({ - setup() { - const loaderData = pageRoute.useLoaderData() - return () =>
{loaderData.value}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: () => { - if (++pageLoads === 1) { - return 'initial page' - } - pageReloadStarted.resolve() - return pageReload.then(() => 'reloaded page') - }, - }, - component: PageComponent, - pendingComponent: () =>
Page pending
, - }) - const otherRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/other', - loader: async () => { - otherStarted.resolve() - await otherLoader - }, - pendingComponent: () => ( -
Other pending
- ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute, otherRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 1, - }) - - render() - expect(await screen.findByTestId('content')).toHaveTextContent('initial page') - - const otherNavigation = track(router.navigate({ to: '/other' })) - await otherStarted - await nextTick() - expect(await screen.findByTestId('other-pending')).toBeVisible() - - const navigation = track(router.navigate({ to: '/page' })) - await pageReloadStarted - await nextTick() - - await waitFor(() => { - expect(screen.getByTestId('page-pending')).toBeVisible() - expect(screen.queryByTestId('other-pending')).not.toBeInTheDocument() - }) - - pageReload.resolve() - await navigation - otherLoader.resolve() - await Promise.allSettled([otherNavigation]) - await nextTick() - - expect(screen.queryByTestId('page-pending')).not.toBeInTheDocument() - expect(screen.getByTestId('content')).toBeVisible() - expect(screen.getByTestId('content')).toHaveTextContent('reloaded page') -}) - -test('a retained root publishes fresh context with a child fallback', async () => { - const retainedStarted = controlled() - const retainedReady = controlled() - const childStarted = controlled() - const childReady = controlled() - let retainedLoads = 0 - - const RootComponent = defineComponent({ - setup() { - const context = rootRoute.useRouteContext() - return () => ( -
-
{context.value.user}
- -
- ) - }, - }) - - const rootRoute = createRootRoute({ - validateSearch: (search: Record): { user: string } => ({ - user: typeof search.user === 'string' ? search.user : 'unknown', - }), - beforeLoad: async ({ search }) => { - if (++retainedLoads > 1) { - retainedStarted.resolve() - await retainedReady - } - return { user: search.user } - }, - component: RootComponent, - }) - const sourceRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/source', - component: () =>
Source
, - }) - const childRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/child', - loader: async () => { - childStarted.resolve() - await childReady - }, - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: () =>
Pending
, - component: () =>
Child
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([sourceRoute, childRoute]), - history: createMemoryHistory({ initialEntries: ['/source?user=Ada'] }), - }) - - render() - expect(await screen.findByTestId('source')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Ada') - await waitFor(() => expect(router.state.status).toBe('idle')) - - const navigation = track( - router.navigate({ to: '/child', search: { user: 'Grace' } }), - ) - await retainedStarted - await nextTick() - expect(screen.getByTestId('source')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Ada') - expect(screen.queryByTestId('child-pending')).not.toBeInTheDocument() - - retainedReady.resolve() - await childStarted - await nextTick() - expect(await screen.findByTestId('child-pending')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Grace') - - childReady.resolve() - await navigation - await nextTick() - expect(screen.getByTestId('child')).toBeVisible() -}) - -test('a retained prefix exposes one fresh context chain before descendant pending', async () => { - const retainedStarted = controlled() - const retainedReady = controlled() - const pendingStarted = controlled() - const pendingReady = controlled() - let retainedLoads = 0 - - const rootRoute = createRootRoute({ - beforeLoad: () => ({ rootReady: true }), - component: () => , - }) - const AComponent = defineComponent({ - setup() { - const context = aRoute.useRouteContext() - return () => ( -
-
{context.value.user}
- -
- ) - }, - }) - - const aRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'a', - validateSearch: (search: Record): { user: string } => ({ - user: typeof search.user === 'string' ? search.user : 'unknown', - }), - beforeLoad: async ({ search }) => { - if (++retainedLoads > 1) { - retainedStarted.resolve() - await retainedReady - } - return { user: search.user } - }, - component: AComponent, - }) - const bRoute = createRoute({ - getParentRoute: () => aRoute, - path: 'b', - component: () => , - }) - const cRoute = createRoute({ - getParentRoute: () => bRoute, - path: 'c', - component: () => , - }) - const dRoute = createRoute({ - getParentRoute: () => cRoute, - path: 'd', - component: () =>
Source
, - }) - const EComponent = defineComponent({ - setup() { - const context = eRoute.useRouteContext() - return () => ( -
-
{context.value.user}
- -
- ) - }, - }) - - const eRoute = createRoute({ - getParentRoute: () => aRoute, - path: 'e', - component: EComponent, - }) - const FPendingComponent = defineComponent({ - setup() { - const context = fRoute.useRouteContext() - return () => ( -
F pending for {context.value.user}
- ) - }, - }) - - const fRoute = createRoute({ - getParentRoute: () => eRoute, - path: 'f', - loader: async () => { - pendingStarted.resolve() - await pendingReady - }, - pendingComponent: FPendingComponent, - component: () => , - }) - const gRoute = createRoute({ - getParentRoute: () => fRoute, - path: 'g', - component: () =>
G
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([ - aRoute.addChildren([ - bRoute.addChildren([cRoute.addChildren([dRoute])]), - eRoute.addChildren([fRoute.addChildren([gRoute])]), - ]), - ]), - history: createMemoryHistory({ initialEntries: ['/a/b/c/d?user=Ada'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 0, - }) - - render() - expect(await screen.findByTestId('source')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Ada') - - const navigation = track( - router.navigate({ - to: '/a/e/f/g', - search: { user: 'Grace' }, - }), - ) - await retainedStarted - await nextTick() - - expect(screen.getByTestId('source')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Ada') - expect(screen.queryByTestId('f-pending')).not.toBeInTheDocument() - - retainedReady.resolve() - await pendingStarted - await nextTick() - - expect(await screen.findByTestId('f-pending')).toBeVisible() - expect(screen.getByTestId('user')).toHaveTextContent('Grace') - expect(screen.getByTestId('e-user')).toHaveTextContent('Grace') - expect(screen.getByTestId('f-pending')).toHaveTextContent('Grace') - expect(screen.queryByTestId('source')).not.toBeInTheDocument() - expect(screen.queryByTestId('hidden-g')).not.toBeInTheDocument() - expect(router.state.matches.map((match) => match.routeId)).toContain( - gRoute.id, - ) - - pendingReady.resolve() - await navigation -}) - -test.each([false, true])( - 'retained loader and component work does not own the child fallback (parent pending: %s)', - async (parentHasPending) => { - const parentReloadStarted = controlled() - const parentReload = controlled() - const parentComponent = controlled() - const childLoader = controlled() - let parentLoads = 0 - let parentPreloads = 0 - - const rootRoute = createRootRoute({ component: () => }) - const Parent = Object.assign( - defineComponent({ - setup() { - const loaderData = parentRoute.useLoaderData() - return () => ( -
- {loaderData.value} - -
- ) - }, - }), - { - preload: () => (++parentPreloads === 1 ? undefined : parentComponent), - }, - ) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: 'parent', - shouldReload: true, - loader: { - staleReloadMode: 'blocking', - handler: async () => { - if (++parentLoads === 1) { - return 'initial parent' - } - parentReloadStarted.resolve() - await parentReload - return 'reloaded parent' - }, - }, - component: Parent, - ...(parentHasPending - ? { - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: () => ( -
Parent pending
- ), - } - : {}), - }) - const sourceRoute = createRoute({ - getParentRoute: () => parentRoute, - path: 'source', - component: () =>
Source
, - }) - const childOptions = createLazyRoute('/parent/child')({ - pendingComponent: () => ( -
Child pending
- ), - component: () =>
Child
, - }) - const childLazy = createControlledPromise() - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: 'child', - pendingMs: 0, - pendingMinMs: 0, - loader: () => childLoader, - }).lazy(() => childLazy) - const router = createRouter({ - routeTree: rootRoute.addChildren([ - parentRoute.addChildren([sourceRoute, childRoute]), - ]), - history: createMemoryHistory({ initialEntries: ['/parent/source'] }), - }) - - render() - expect(await screen.findByTestId('source')).toBeVisible() - await waitFor(() => expect(router.state.status).toBe('idle')) - - const navigation = track(router.navigate({ to: '/parent/child' })) - try { - await parentReloadStarted - parentReload.resolve() - await waitFor(() => { - expect( - router.state.matches.find((match) => match.routeId === parentRoute.id) - ?.isFetching, - ).toBe(false) - }) - - childLazy.resolve(childOptions) - expect(await screen.findByTestId('child-pending')).toBeVisible() - expect(screen.getByTestId('parent-content')).toBeVisible() - expect(screen.queryByTestId('parent-pending')).not.toBeInTheDocument() - expect(screen.queryByTestId('source')).not.toBeInTheDocument() - } finally { - parentReload.resolve() - parentComponent.resolve() - childLazy.resolve(childOptions) - childLoader.resolve() - await navigation - } - - expect(await screen.findByTestId('child')).toBeVisible() - }, -) - -test('a failure in the last retained guard suppresses descendant pending', async () => { - const guardStarted = controlled() - const guardReady = controlled() - const childReady = controlled() - let guardLoads = 0 - let childLoads = 0 - - const rootRoute = createRootRoute({ - beforeLoad: () => ({ rootReady: true }), - component: () => , - }) - const layoutRoute = createRoute({ - getParentRoute: () => rootRoute, - id: 'layout', - beforeLoad: async () => { - if (++guardLoads > 1) { - guardStarted.resolve() - await guardReady - throw new Error('blocked') - } - }, - component: () => , - errorComponent: () =>
Guard error
, - }) - const sourceRoute = createRoute({ - getParentRoute: () => layoutRoute, - path: '/source', - component: () =>
Source
, - }) - const childRoute = createRoute({ - getParentRoute: () => layoutRoute, - path: '/child', - loader: async () => { - childLoads++ - await childReady - }, - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: () =>
Pending
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([ - layoutRoute.addChildren([sourceRoute, childRoute]), - ]), - history: createMemoryHistory({ initialEntries: ['/source'] }), - }) - - render() - expect(await screen.findByTestId('source')).toBeVisible() - await waitFor(() => expect(router.state.status).toBe('idle')) - - const navigation = track(router.navigate({ to: '/child' })) - await guardStarted - await nextTick() - expect(screen.getByTestId('source')).toBeVisible() - expect(screen.queryByTestId('child-pending')).not.toBeInTheDocument() - expect(childLoads).toBe(0) - - guardReady.resolve() - await navigation - expect(await screen.findByTestId('guard-error')).toBeVisible() - expect(screen.queryByTestId('child-pending')).not.toBeInTheDocument() - expect(childLoads).toBe(0) -}) diff --git a/packages/vue-router/tests/issue-8115-context.test.tsx b/packages/vue-router/tests/issue-8115-context.test.tsx deleted file mode 100644 index a139155572..0000000000 --- a/packages/vue-router/tests/issue-8115-context.test.tsx +++ /dev/null @@ -1,887 +0,0 @@ -import * as Vue from 'vue' -import { - cleanup, - fireEvent, - render, - screen, - waitFor, -} from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { hydrate } from '@tanstack/router-core/ssr/client' -import { - Outlet, - RouterProvider, - Scripts, - createControlledPromise, - createMemoryHistory, - createRootRoute, - createRootRouteWithContext, - createRoute, - createRouter, - useLocation, -} from '../src' -import { createRequestHandler, renderRouterToString } from '../src/ssr/server' -import type { AnyRouter } from '@tanstack/router-core' - -declare module '@tanstack/history' { - interface HistoryState { - issue8115Revision?: 'old' | 'new' - } -} - -afterEach(() => { - cleanup() - vi.restoreAllMocks() - delete window.$_TSR - delete (window as Window & { $R?: unknown }).$R - document.body.innerHTML = '' -}) - -test('invalidate merges fresh parent beforeLoad context with cached child context', async () => { - let generation = 0 - let childContextCalls = 0 - - const rootRoute = createRootRoute({ - beforeLoad: () => { - generation++ - return { - parentGeneration: generation, - collision: `parent-${generation}`, - } - }, - component: Outlet, - }) - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
-
- {context.value.parentGeneration} -
-
- {context.value.childSnapshotOfParent} -
-
{context.value.collision}
-
- ) - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - context: ({ context }) => { - childContextCalls++ - return { - childSnapshotOfParent: context.parentGeneration, - collision: `child-snapshot-${context.parentGeneration}`, - } - }, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([childRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - - expect(await screen.findByTestId('parent-generation')).toHaveTextContent('1') - expect(screen.getByTestId('child-snapshot')).toHaveTextContent('1') - expect(screen.getByTestId('collision')).toHaveTextContent('child-snapshot-1') - expect(generation).toBe(1) - expect(childContextCalls).toBe(1) - const childMatchId = router.state.matches[1]!.id - - await router.invalidate() - await Vue.nextTick() - - // The fresh parent contribution is merged under the cached child contribution. - expect(router.state.matches[1]!.id).toBe(childMatchId) - expect(generation).toBe(2) - expect(childContextCalls).toBe(1) - expect(screen.getByTestId('parent-generation')).toHaveTextContent('2') - expect(screen.getByTestId('child-snapshot')).toHaveTextContent('1') - expect(screen.getByTestId('collision')).toHaveTextContent('child-snapshot-1') -}) - -test('a same-id child beforeLoad error observes fresh inherited context', async () => { - const childError = new Error('child beforeLoad failed') - let parentGeneration = 0 - let renderedError: unknown - - const rootRoute = createRootRoute({ component: Outlet }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - loaderDeps: () => ({ stable: true }), - beforeLoad: () => ({ generation: ++parentGeneration }), - component: Outlet, - }) - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
{context.value.generation}
- ) - }, - }) - - const ChildErrorComponent = Vue.defineComponent({ - props: ['error'], - setup(props) { - const context = childRoute.useRouteContext() - - return () => { - renderedError = props.error - return ( -
- {context.value.generation} -
- ) - } - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - loaderDeps: () => ({ stable: true }), - beforeLoad: ({ context }) => { - if (context.generation === 2) { - throw childError - } - }, - component: ChildComponent, - errorComponent: ChildErrorComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ initialEntries: ['/parent/child'] }), - }) - - render() - - expect(await screen.findByTestId('child-generation')).toHaveTextContent('1') - await waitFor(() => expect(router.state.status).toBe('idle')) - const initialChildMatchId = router.state.matches.find( - (match) => match.routeId === childRoute.id, - )?.id - expect(initialChildMatchId).toBeDefined() - - await router.invalidate() - - expect( - await screen.findByTestId('child-error-generation'), - ).toBeInTheDocument() - expect(renderedError).toBe(childError) - expect( - router.state.matches.find((match) => match.routeId === childRoute.id)?.id, - ).toBe(initialChildMatchId) - expect(screen.getByTestId('child-error-generation')).toHaveTextContent('2') -}) - -test('a same-match reload merges new provider context with cached route context', async () => { - type ProviderContext = { - providerValue: string - collision: string - } - - const providerA: ProviderContext = { - providerValue: 'A', - collision: 'provider:A', - } - const providerB: ProviderContext = { - providerValue: 'B', - collision: 'provider:B', - } - const rootRoute = createRootRouteWithContext()() - const IndexComponent = Vue.defineComponent({ - setup() { - const context = indexRoute.useRouteContext() - return () => ( -
{JSON.stringify(context.value)}
- ) - }, - }) - - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - context: ({ context }) => ({ - derivedFromProvider: `derived:${context.providerValue}`, - collision: `route-cached:${context.providerValue}`, - }), - component: IndexComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - context: providerA, - }) - const providerContext = Vue.ref(providerA) - const App = Vue.defineComponent({ - setup: () => () => ( - - ), - }) - - render(App) - expect(await screen.findByTestId('full-context')).toHaveTextContent( - JSON.stringify({ - providerValue: 'A', - collision: 'route-cached:A', - derivedFromProvider: 'derived:A', - }), - ) - - providerContext.value = providerB - await Vue.nextTick() - await router.invalidate() - await Vue.nextTick() - - expect(screen.getByTestId('full-context')).toHaveTextContent( - JSON.stringify({ - providerValue: 'B', - collision: 'route-cached:A', - derivedFromProvider: 'derived:A', - }), - ) -}) - -test('navigation merges fresh parent context with cached child preload context', async () => { - let parentBeforeLoadRuns = 0 - let childContextRuns = 0 - let childLoaderRuns = 0 - - const rootRoute = createRootRoute({ component: Outlet }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Home
, - }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - beforeLoad: ({ preload }) => { - parentBeforeLoadRuns++ - return { - parentValue: preload ? 'parent-preload' : 'parent-navigation', - } - }, - component: Outlet, - }) - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
- {JSON.stringify({ - parentValue: context.value.parentValue, - childValue: context.value.childValue, - })} -
- ) - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - context: ({ context, preload }) => { - childContextRuns++ - return { - childValue: `${preload ? 'child-preload' : 'child-navigation'}:${context.parentValue}`, - } - }, - loader: () => { - childLoaderRuns++ - return 'child data' - }, - preloadStaleTime: Infinity, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([ - indexRoute, - parentRoute.addChildren([childRoute]), - ]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - expect(await screen.findByText('Home')).toBeInTheDocument() - - await router.preloadRoute({ to: '/parent/child' }) - expect(parentBeforeLoadRuns).toBe(1) - expect(childContextRuns).toBe(1) - expect(childLoaderRuns).toBe(1) - - await router.navigate({ to: '/parent/child' }) - - expect(await screen.findByTestId('context')).toHaveTextContent( - JSON.stringify({ - parentValue: 'parent-navigation', - childValue: 'child-preload:parent-preload', - }), - ) - expect(parentBeforeLoadRuns).toBe(2) - expect(childContextRuns).toBe(1) - expect(childLoaderRuns).toBe(1) -}) - -test('a cached child context contribution is merged with fresh parent context', async () => { - const rootRoute = createRootRoute({ component: Outlet }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - validateSearch: (search: Record) => ({ - version: Number(search.version), - }), - loaderDeps: ({ search }) => ({ version: search.version }), - context: ({ deps }) => ({ parentVersion: `version-${deps.version}` }), - component: Outlet, - }) - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
- Parent: {context.value.parentVersion}; cached child:{' '} - {context.value.childSnapshot} -
- ) - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - loaderDeps: () => ({ stable: true }), - context: ({ context }) => ({ - childSnapshot: `derived-from-${context.parentVersion}`, - }), - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ - initialEntries: ['/parent/child?version=1'], - }), - }) - - render() - - expect( - await screen.findByText( - 'Parent: version-1; cached child: derived-from-version-1', - ), - ).toBeInTheDocument() - - const initialParentMatchId = router.state.matches.find( - (match) => match.routeId === parentRoute.id, - )?.id - const initialChildMatchId = router.state.matches.find( - (match) => match.routeId === childRoute.id, - )?.id - - expect(initialParentMatchId).toBeDefined() - expect(initialChildMatchId).toBeDefined() - - await router.navigate({ - to: '/parent/child', - search: { version: 2 }, - }) - await Vue.nextTick() - - expect( - screen.getByText('Parent: version-2; cached child: derived-from-version-1'), - ).toBeInTheDocument() - - const nextParentMatchId = router.state.matches.find( - (match) => match.routeId === parentRoute.id, - )?.id - const nextChildMatchId = router.state.matches.find( - (match) => match.routeId === childRoute.id, - )?.id - - expect(nextParentMatchId).not.toBe(initialParentMatchId) - expect(nextChildMatchId).toBe(initialChildMatchId) -}) - -test('#8115: hydration does not render a successful route with missing context when context reconstruction fails', async () => { - const contextError = new Error('client context reconstruction failed') - const clientSuccessRenderValues: Array = [] - let clientContextAttempts = 0 - let serverPhase = true - - const createRouteTree = () => { - const rootRoute = createRootRoute({ - component: () => ( - <> - - - - ), - }) - const IndexComponent = Vue.defineComponent({ - setup() { - const context = indexRoute.useRouteContext({ - select: (routeContext): { locale?: string } => routeContext, - }) - return () => { - if (!serverPhase) { - clientSuccessRenderValues.push(context.value.locale) - } - - return ( -
- Locale: {context.value.locale ?? 'missing'} -
- ) - } - }, - }) - - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - context: (): { locale: string } => { - if (serverPhase) { - return { locale: 'en' } - } - clientContextAttempts++ - throw contextError - }, - component: IndexComponent, - errorComponent: ({ error }) => ( -
- {error instanceof Error ? error.message : String(error)} -
- ), - }) - - return rootRoute.addChildren([indexRoute]) - } - - const ServerApp = Vue.defineComponent({ - props: { - router: { - type: Object as Vue.PropType, - required: true, - }, - }, - setup: (props) => () => ( - - - -
- -
- - - ), - }) - - const response = await createRequestHandler({ - request: new Request('http://localhost/'), - createRouter: () => - createRouter({ routeTree: createRouteTree(), isServer: true }), - })(({ router, responseHeaders }) => - renderRouterToString({ - router, - responseHeaders, - App: ServerApp, - }), - ) - const html = await response.text() - const serverDocument = new DOMParser().parseFromString(html, 'text/html') - - expect(serverDocument.body.textContent).toContain('Locale: en') - const currentScriptSpy = vi.spyOn(document, 'currentScript', 'get') - try { - // These scripts come exclusively from this test's renderRouterToString output. - for (const script of serverDocument.querySelectorAll('script')) { - currentScriptSpy.mockReturnValue(script) - new Function(script.textContent ?? '')() - script.remove() - } - } finally { - currentScriptSpy.mockRestore() - } - expect(window.$_TSR?.router?.matches.at(-1)?.s).toBe('success') - - serverPhase = false - const clientRouter = createRouter({ - routeTree: createRouteTree(), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - const serverContainer = serverDocument.querySelector('#__app') - expect(serverContainer).not.toBeNull() - const container = document.createElement('div') - container.id = '__app' - container.innerHTML = serverContainer!.innerHTML - document.body.appendChild(container) - const hydrationMessages: Array = [] - const originalError = console.error.bind(console) - const originalWarn = console.warn.bind(console) - const recordHydrationMessage = (...args: Array) => { - const message = args.map(String).join(' ') - if (/hydration|mismatch/i.test(message)) { - hydrationMessages.push(message) - return true - } - return false - } - vi.spyOn(console, 'error').mockImplementation((...args) => { - if (!recordHydrationMessage(...args)) { - originalError(...args) - } - }) - vi.spyOn(console, 'warn').mockImplementation((...args) => { - if (!recordHydrationMessage(...args)) { - originalWarn(...args) - } - }) - let app: Vue.App | undefined - - try { - await hydrate(clientRouter) - const ClientApp = Vue.defineComponent({ - setup: () => () => , - }) - app = Vue.createSSRApp(ClientApp) - app.mount(container) - await Vue.nextTick() - - await waitFor(() => { - expect( - container.querySelector('[data-testid="route-error"]'), - ).toHaveTextContent(contextError.message) - }) - expect(clientContextAttempts).toBeGreaterThan(0) - expect(container.querySelector('[data-testid="route-success"]')).toBeNull() - expect(clientSuccessRenderValues).not.toContain(undefined) - expect(hydrationMessages.length).toBeGreaterThan(0) - } finally { - app?.unmount() - container.remove() - } -}) - -test('a same-id child retry presents one coherent beforeLoad context generation', async () => { - const childReloadStarted = createControlledPromise() - const childReload = createControlledPromise() - let parentGeneration = 0 - let childLoads = 0 - - const rootRoute = createRootRoute({ component: Outlet }) - const ParentComponent = Vue.defineComponent({ - setup() { - const context = parentRoute.useRouteContext() - return () => ( -
-
- Parent generation {context.value.generation} -
- -
- ) - }, - }) - - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - beforeLoad: () => ({ generation: ++parentGeneration }), - component: ParentComponent, - }) - const ChildPendingComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
- Child generation {context.value.inheritedGeneration} -
- ) - }, - }) - - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - return () => ( -
- Child generation {context.value.inheritedGeneration} -
- ) - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - beforeLoad: ({ context }) => ({ - inheritedGeneration: context.generation, - }), - loader: async () => { - if (++childLoads > 1) { - childReloadStarted.resolve() - await childReload - } - }, - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: ChildPendingComponent, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ initialEntries: ['/parent/child'] }), - }) - - render() - expect(await screen.findByTestId('parent-generation')).toHaveTextContent( - 'Parent generation 1', - ) - expect(await screen.findByTestId('child-generation')).toHaveTextContent( - 'Child generation 1', - ) - await waitFor(() => expect(router.state.status).toBe('idle')) - const initialChildId = router.state.matches.find( - (match) => match.routeId === childRoute.id, - )?.id - expect(initialChildId).toBeDefined() - - let invalidation: Promise | undefined - try { - invalidation = router.invalidate({ - filter: (match) => - match.routeId === parentRoute.id || match.routeId === childRoute.id, - forcePending: true, - }) - await childReloadStarted - - await waitFor(() => { - expect(screen.getByTestId('parent-generation')).toHaveTextContent( - 'Parent generation 2', - ) - expect(screen.getByTestId('child-pending-generation')).toHaveTextContent( - 'Child generation 2', - ) - }) - expect( - router.state.matches.find((match) => match.routeId === parentRoute.id), - ).toMatchObject({ - status: 'success', - context: { generation: 2 }, - }) - expect( - router.state.matches.find((match) => match.routeId === childRoute.id), - ).toMatchObject({ - id: initialChildId, - status: 'pending', - context: { generation: 2, inheritedGeneration: 2 }, - }) - } finally { - childReload.resolve() - await Promise.allSettled(invalidation ? [invalidation] : []) - } -}) - -test('a same-id navigation merges new inherited context with cached route context', async () => { - const history = createMemoryHistory({ initialEntries: ['/'] }) - history.replace('/', { issue8115Revision: 'old' }) - - const rootRoute = createRootRoute({ - beforeLoad: ({ location }) => ({ - inheritedRevision: location.state.issue8115Revision, - }), - }) - const IndexComponent = Vue.defineComponent({ - setup() { - const location = useLocation() - - const context = indexRoute.useRouteContext() - - const matchId = indexRoute.useMatch({ select: (match) => match.id }) - - const navigate = indexRoute.useNavigate() - return () => ( - <> - {matchId.value} - - location: {location.value.state.issue8115Revision}; inherited:{' '} - {context.value.inheritedRevision}; self:{' '} - {context.value.selfRevision} - - - - ) - }, - }) - - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - context: ({ location }) => ({ - selfRevision: location.state.issue8115Revision, - }), - component: IndexComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history, - }) - - render() - - expect(await screen.findByTestId('snapshot')).toHaveTextContent( - 'location: old; inherited: old; self: old', - ) - const initialMatchId = screen.getByTestId('match-id').textContent - - await fireEvent.click(screen.getByRole('button', { name: 'Update state' })) - - await waitFor(() => { - expect(screen.getByTestId('match-id').textContent).toBe(initialMatchId) - expect(screen.getByTestId('snapshot')).toHaveTextContent( - 'location: new; inherited: new; self: old', - ) - }) -}) - -test('#8115: a successful root never renders without its context while a child is pending on cold load', async () => { - let resolveChildLoader!: () => void - const childLoader = new Promise((resolve) => { - resolveChildLoader = resolve - }) - const rootRenderValues: Array = [] - - const RootComponent = Vue.defineComponent({ - setup() { - const context = rootRoute.useRouteContext() - return () => { - const locale = context.value.locale - - rootRenderValues.push(locale) - - return ( -
-

Locale: {locale ?? 'missing'}

- -
- ) - } - }, - }) - - const rootRoute = createRootRoute({ - context: () => ({ locale: 'en' }), - component: RootComponent, - }) - const childRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: () => childLoader, - pendingMs: 0, - pendingComponent: () =>

Loading child

, - component: () =>

Child content

, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([childRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - - try { - expect(await screen.findByRole('status')).toHaveTextContent('Loading child') - expect(screen.getByTestId('root-locale')).toHaveTextContent('Locale: en') - expect(rootRenderValues.length).toBeGreaterThan(0) - expect(rootRenderValues.every((locale) => locale === 'en')).toBe(true) - } finally { - resolveChildLoader() - await childLoader - await Vue.nextTick() - } -}) - -test('a same-id search navigation merges fresh inherited context with cached route context', async () => { - const rootRoute = createRootRoute({ component: Outlet }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - validateSearch: (search: Record) => ({ - revision: typeof search.revision === 'string' ? search.revision : 'one', - }), - loaderDeps: ({ search }) => ({ revision: search.revision }), - context: ({ deps }) => ({ inheritedRevision: deps.revision }), - component: Outlet, - }) - const ChildComponent = Vue.defineComponent({ - setup() { - const context = childRoute.useRouteContext() - - const search = childRoute.useSearch() - - const matchId = childRoute.useMatch({ select: (match) => match.id }) - return () => ( - <> -
{matchId.value}
-
{search.value.revision}
-
- {context.value.inheritedRevision} -
-
- {context.value.cachedSelfRevision} -
- - ) - }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - loaderDeps: () => ({}), - context: ({ context, location }) => ({ - cachedSelfRevision: `${context.inheritedRevision}:${String((location.search as Record).revision)}`, - }), - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ - initialEntries: ['/parent/child?revision=one'], - }), - }) - - render() - - expect(await screen.findByTestId('current-search')).toHaveTextContent('one') - expect(screen.getByTestId('inherited-context')).toHaveTextContent('one') - expect(screen.getByTestId('cached-self-context')).toHaveTextContent('one:one') - const initialMatchId = screen.getByTestId('match-id').textContent - - await router.navigate({ - to: '/parent/child', - search: { revision: 'two' }, - }) - await Vue.nextTick() - - expect(await screen.findByTestId('current-search')).toHaveTextContent('two') - expect(screen.getByTestId('match-id').textContent).toBe(initialMatchId) - expect(screen.getByTestId('inherited-context')).toHaveTextContent('two') - expect(screen.getByTestId('cached-self-context')).toHaveTextContent('one:one') -}) diff --git a/packages/vue-router/tests/jest-dom.setup.ts b/packages/vue-router/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/packages/vue-router/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/packages/vue-router/tests/link-departing-scope.test.tsx b/packages/vue-router/tests/link-departing-scope.test.tsx deleted file mode 100644 index 71b917bebf..0000000000 --- a/packages/vue-router/tests/link-departing-scope.test.tsx +++ /dev/null @@ -1,1127 +0,0 @@ -import { setFlagsFromString } from 'node:v8' -import { runInNewContext } from 'node:vm' -import * as Vue from 'vue' -import { - cleanup, - fireEvent, - render, - screen, - waitFor, -} from '@testing-library/vue' -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 } -} - -// Lets the router run its microtask-driven load steps and Vue flush renders. -const tick = () => new Promise((resolve) => setTimeout(resolve, 0)) - -type Gates = Partial> - -function setup({ - initial = '/a', - bAfterGate, - beforeRender, -}: { - initial?: string - bAfterGate?: () => void - beforeRender?: (router: any) => void -} = {}) { - const gates: Gates = {} - const counts = { - aUpdater: 0, - aRenders: 0, - goneUpdater: 0, - listUpdater: 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 hash = Vue.ref(undefined) - const extra = Vue.ref(false) - const gone = Vue.ref(false) - const renderPreload = Vue.ref(false) - const list = Vue.ref(['one', 'two']) - const controls: { - setHash: (value: string | undefined) => Promise - setExtra: (value: boolean) => Promise - setGone: (value: boolean) => Promise - setRenderPreload: (value: boolean) => Promise - setList: (value: Array) => Promise - } = { - setHash: (value) => ((hash.value = value), Vue.nextTick()), - setExtra: (value) => ((extra.value = value), Vue.nextTick()), - setGone: (value) => ((gone.value = value), Vue.nextTick()), - setRenderPreload: (value) => ( - (renderPreload.value = value), - Vue.nextTick() - ), - setList: (value) => ((list.value = value), Vue.nextTick()), - } - - // Stable updaters, and one component per changing part, so that changing - // one part does not re-render the other links. - const aSelfSearch = (prev: any) => { - counts.aUpdater++ - return prev - } - const aSelfSlot = ({ isActive }: { isActive: boolean }) => { - counts.aRenders++ - return isActive ? 'a self' : 'a self (inactive)' - } - const aNextSearch = (prev: any) => { - nextFrom.push(prev.x) - return { x: `${prev.x}-next` } - } - const aRenderSearch = (prev: any) => ({ x: `${prev.x}-render` }) - const sameSearch = (prev: any) => prev - const goneSearch = (prev: any) => { - counts.goneUpdater++ - return prev - } - const listSearches = new Map any>() - const listSearch = (item: string) => { - let search = listSearches.get(item) - if (!search) { - search = (prev: any) => { - counts.listUpdater++ - return { ...prev, item } - } - listSearches.set(item, search) - } - return search - } - - const ADot = Vue.defineComponent(() => () => ( - - a dot - - )) - const ARender = Vue.defineComponent( - () => () => - renderPreload.value ? ( - - a render - - ) : null, - ) - const AExtra = Vue.defineComponent( - () => () => - extra.value ? ( - - a extra - - ) : null, - ) - const AGone = Vue.defineComponent( - () => () => - gone.value ? null : ( - - a gone - - ), - ) - const AList = Vue.defineComponent(() => () => ( - <> - {list.value.map((item) => ( - - {item} - - ))} - - )) - - const root = createRootRoute({ - component: () => ( - <> - - root b - - - - ), - }) - const layout = createRoute({ - getParentRoute: () => root, - id: '_layout', - component: () => ( - <> - - layout b - - - - ), - }) - 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: () => ( - <> -

A page

- - {aSelfSlot} - - - - a next - - - - - - - ), - }) - 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) - render() - - 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) { - void router.navigate(options) - await tick() - } - - async function settle() { - await waitFor(() => expect(router.state.status).toBe('idle')) - } - - async function release(name: keyof Gates) { - const gate = gates[name]! - gates[name] = undefined - gate.resolve() - await gate.promise - await tick() - } - - return { - router, - gates, - counts, - aLoads, - nextFrom, - controls, - link, - isActive, - href, - start, - settle, - release, - } -} - -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 - const list = t.counts.listUpdater - 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.counts.listUpdater).toBe(list) - 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') - await t.settle() - 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') - await t.settle() - await tick() - 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() - await tick() - 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' }) - - await t.controls.setHash('h') - await 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() - await tick() - expect(t.href('a-extra')).toBe('/a?x=one') - expect(t.isActive('a-extra')).toBe(true) - }) - - test('list churn in a departing match keeps building from its held location', async () => { - const t = setup({ initial: '/a?x=one' }) - await screen.findByText('A page') - expect(t.href('a-list-one')).toBe('/a?x=one&item=one') - t.gates.b = deferred() - await t.start({ to: '/b' }) - - const list = t.counts.listUpdater - await t.controls.setList(['two', 'three']) - expect(screen.queryByTestId('a-list-one')).toBeNull() - // Only the new link derives, from the held location. - expect(t.counts.listUpdater).toBe(list + 1) - expect(t.href('a-list-two')).toBe('/a?x=one&item=two') - expect(t.href('a-list-three')).toBe('/a?x=one&item=three') - - await t.release('b') - await screen.findByText('B page') - expect(t.counts.listUpdater).toBe(list + 1) - }) - - 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() - await tick() - 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' }) - await 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.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 fireEvent.click(t.link(id)) - await tick() - 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 fireEvent[event](t.link('a-next')) - await tick() - 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 t.controls.setRenderPreload(true) - await tick() - 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 fireEvent.mouseEnter(t.link('a-next')) - await tick() - expect(t.aLoads).toEqual(['two-next']) - await fireEvent.click(t.link('a-next')) - await tick() - expect(t.router.latestLocation.href).toBe('/a?x=two-next') - await t.release('a') - await t.settle() - await tick() - 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 t.router.navigate({ to: '/a', search: { x: 'two' } }) - await screen.findByText('A page') - await t.settle() - await tick() - // 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) - await 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 fireEvent.click(t.link('a-extra')) - await tick() - expect(t.router.latestLocation.href).toBe('/a?x=two') - t.gates.items.resolve() - await t.settle() - await tick() - 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. - vi.spyOn(console, 'error').mockImplementation(() => {}) - 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 tick() - - await t.router.navigate({ to: '/a', search: { x: 'two' } }) - await t.settle() - await tick() - 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 t.router.navigate({ to: '/a', search: { x: 'two' } }) - await t.settle() - await tick() - 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) - t.router.history.go(-2) - await tick() - await t.settle() - await tick() - 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 tick() - 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' }) - void t.router.invalidate() - await tick() - 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 t.router.navigate({ to: '/a' }) - await screen.findByText('A page') - await tick() - 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 tick() - expect(failures.length).toBeGreaterThan(0) - delete (document as any).startViewTransition - vi.unstubAllGlobals() - - // A navigation that keeps the page updates its links. - await t.router.navigate({ to: '/a', search: { x: 'two' } }) - await t.settle() - await tick() - 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 = (_props: unknown, { slots }: Vue.SetupContext) => ( - <> - - wrap b - - {slots.default?.()} - - ) - router.update({ ...router.options, InnerWrap: InnerWrap as any }) - 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('pending and failing destinations', () => { - function setupPending(options: { throwFromP?: boolean } = {}) { - const gate: { p?: Deferred } = {} - const counts = { aUpdater: 0 } - const aNextSearch = (prev: any) => { - counts.aUpdater++ - return { x: `${prev.x}-next` } - } - const pendingSearch = (prev: any) => ({ y: `${prev.y}-pending` }) - const root = createRootRoute({ - component: () => ( - <> - - root p - - - - ), - errorComponent: () => ( - - error a - - ), - }) - const a = createRoute({ - getParentRoute: () => root, - path: '/a', - component: () => ( - <> -

A page

- - a next - - - ), - }) - const pRoute = createRoute({ - getParentRoute: () => root, - path: '/p', - validateSearch: (search: Record) => - search as { y?: string }, - loader: async () => { - await gate.p?.promise - if (options.throwFromP) { - throw new Error('p failed') - } - }, - pendingComponent: () => ( - - p pending - - ), - component: () =>

P page

, - }) - const router = createRouter({ - routeTree: root.addChildren([a, pRoute]), - history: createMemoryHistory({ initialEntries: ['/a?x=one'] }), - defaultPendingMs: 0, - defaultPendingMinMs: 0, - }) - render() - return { router, gate, counts } - } - - test('links in a pending component build from the destination and a return remounts fresh links', async () => { - const t = setupPending() - await screen.findByText('A page') - const updater = t.counts.aUpdater - t.gate.p = deferred() - void t.router.navigate({ to: '/p', search: { y: 'one' } }) - const pending = await screen.findByTestId('p-pending') - expect(t.counts.aUpdater).toBe(updater) - expect(pending).toHaveAttribute('href', '/p?y=one-pending') - expect(screen.getByTestId('root-p')).toHaveAttribute('aria-current', 'page') - - void t.router.navigate({ to: '/a', search: { x: 'two' } }) - await screen.findByText('A page') - await waitFor(() => expect(t.router.state.status).toBe('idle')) - await tick() - expect(screen.getByTestId('a-next')).toHaveAttribute( - 'href', - '/a?x=two-next', - ) - expect(screen.getByTestId('root-p')).not.toHaveAttribute('aria-current') - t.gate.p.resolve() - await tick() - expect(screen.getByText('A page')).toBeInTheDocument() - }) - - test('a departure that ends in an error leaves live links', async () => { - vi.spyOn(console, 'error').mockImplementation(() => {}) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - const t = setupPending({ throwFromP: true }) - await screen.findByText('A page') - const updater = t.counts.aUpdater - t.gate.p = deferred() - void t.router.navigate({ to: '/p' }) - await tick() - expect(t.counts.aUpdater).toBe(updater) - t.gate.p.resolve() - const errorLink = await screen.findByTestId('error-a') - await waitFor(() => expect(t.router.state.status).toBe('idle')) - expect(t.router.state.location.pathname).toBe('/p') - expect(errorLink).toHaveAttribute('href', '/a') - expect(errorLink).not.toHaveAttribute('aria-current') - }) -}) - -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 photoSearch = (prev: any) => ({ id: prev.x }) - const mask = - kind === 'mask' - ? ({ to: '.', search: true, hash: true } as any) - : undefined - const a = createRoute({ - getParentRoute: () => root, - path: '/a', - component: () => ( - - 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() - void router.navigate({ to: '/b' }) - await tick() - expect(router.state.status).toBe('pending') - expect(link).toHaveAttribute('href', '/a?x=one#h') - - await fireEvent.click(link) - await tick() - // 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') - }, - ) -}) - -describe('link location retention', () => { - setFlagsFromString('--expose-gc') - const gc: () => void = runInNewContext('gc') - async function collect() { - for (let round = 0; round < 3; round++) { - await tick() - 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 sameSearch = (prev: any) => prev - const root = createRootRoute({ - component: () => ( - <> - - root b - - - - ), - }) - const a = createRoute({ - getParentRoute: () => root, - path: '/a', - component: () => ( - <> -

A page

- - 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 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')) - await tick() - 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 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) - - await 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) - - await fireEvent.mouseEnter(screen.getByTestId('inherit')) - await waitFor(() => expect(bLoads).toEqual(['latest'])) - }) -}) diff --git a/packages/vue-router/tests/link-destination.test.tsx b/packages/vue-router/tests/link-destination.test.tsx deleted file mode 100644 index 2615f07c58..0000000000 --- a/packages/vue-router/tests/link-destination.test.tsx +++ /dev/null @@ -1,236 +0,0 @@ -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('reuses a fixed destination across navigations', async () => { - const params = { id: 'fixed' } - const search = { build: 1 } - const { go, builds } = setup(() => ( - - )) - const link = await screen.findByTestId('link') - expect(link).toHaveAttribute('href', '/target/fixed?build=1#details') - const initial = builds() - - await go('two') - await go('three', { hash: 'x' }) - await Vue.nextTick() - expect(link).toHaveAttribute('href', '/target/fixed?build=1#details') - expect(builds()).toBe(initial) - - await fireEvent.click(link) - await vi.waitFor(() => expect(link).toHaveAttribute('data-status', 'active')) -}) - -test('rebuilds on a destination prop change, not a presentation prop change', async () => { - const id = Vue.ref('one') - const cls = Vue.ref('a') - const { go, builds } = setup(() => ( - - )) - const link = await screen.findByTestId('link') - expect(link).toHaveAttribute('href', '/target/one?build=1') - id.value = 'two' - await Vue.nextTick() - expect(link).toHaveAttribute('href', '/target/two?build=1') - await go('two') - await Vue.nextTick() - const settled = builds() - await go('three') - await Vue.nextTick() - expect(builds()).toBe(settled) - expect(link).toHaveAttribute('href', '/target/two?build=1') -}) - -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('does not re-read a reactive object nested inside a plain object', async () => { - // Only the prop value itself is checked for a reactive proxy (one level). - const filters = Vue.reactive({ page: 1 }) - const params = { id: 'fixed' } - const search = { build: 1, filters } - const { go } = setup(() => ( - - )) - const link = await screen.findByTestId('link') - const href = link.getAttribute('href') - filters.page = 2 - await go('two') - await Vue.nextTick() - expect(link).toHaveAttribute('href', href!) -}) - -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-href-safety.test.tsx b/packages/vue-router/tests/link-href-safety.test.tsx deleted file mode 100644 index a5518e83c0..0000000000 --- a/packages/vue-router/tests/link-href-safety.test.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import * as Vue from 'vue' -import { renderToString } from 'vue/server-renderer' -import { cleanup, fireEvent, render } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { - Link, - RouterContextProvider, - createMemoryHistory, - createRootRoute, - createRouter, -} from '../src' - -afterEach(() => { - cleanup() - vi.restoreAllMocks() -}) - -// kind, final href, blocked, active -const cases: Array< - readonly [ - kind: 'history' | 'rewrite' | 'to', - href: string, - blocked: boolean, - active: boolean, - ] -> = [ - ['history', '//evil.example/path', true, false], - ['history', '/\\evil.example/path', true, false], - ['history', '\\/evil.example/path', true, false], - ['history', '\x01 \t//evil.example/path', true, false], - ['history', 'javascript:blocked()', true, false], - ['history', '/formatted', false, true], - ['rewrite', 'javascript:blocked()', true, false], - ['rewrite', 'https://other.example/', false, false], - ['rewrite', '/safe', false, true], - ['to', 'myapp:open', false, false], - ['to', 'mailto:person@example.com', true, false], -] - -for (const isServer of [true, false]) { - test.each(cases)( - `validates %s href %j on ${isServer ? 'server' : 'client'}`, - async (kind, href, blocked, active) => { - vi.spyOn(console, 'warn').mockImplementation(() => {}) - const history = createMemoryHistory({ initialEntries: ['/safe'] }) - // Keep custom history output raw so Link must validate it itself. - history.createHref = vi.fn((path) => (kind === 'history' ? href : path)) - const router = createRouter({ - routeTree: createRootRoute(), - history, - isServer, - protocolAllowlist: ['http:', 'https:', 'myapp:'], - rewrite: - kind === 'rewrite' - ? { - output: ({ url }) => new URL(href, url), - } - : undefined, - }) - const navigate = vi.spyOn(router, 'navigate').mockResolvedValue() - const preload = vi - .spyOn(router, 'preloadRoute') - .mockResolvedValue(undefined) - const tree = Vue.h(RouterContextProvider, { router }, () => - Vue.h( - Link, - { - to: kind === 'to' ? href : '/safe', - preload: 'intent', - preloadDelay: 0, - activeProps: { class: 'active', href: 'javascript:active()' }, - inactiveProps: { class: 'inactive', href: 'javascript:inactive()' }, - }, - { - default: ({ isActive }: { isActive: boolean }) => String(isActive), - }, - ), - ) - let container: Element - if (isServer) { - container = document.createElement('div') - container.innerHTML = await renderToString(tree) - } else { - container = render(tree).container - } - const anchor = container.querySelector('a')! - if (kind === 'history') { - expect(history.createHref).toHaveBeenCalledWith('/safe') - } - expect(anchor.getAttribute('href')).toBe(blocked ? null : href) - expect(anchor.textContent).toBe(String(active)) - expect(anchor.getAttribute('aria-current')).toBe(active ? 'page' : null) - expect(anchor.getAttribute('aria-disabled')).toBe(blocked ? 'true' : null) - if (kind !== 'to') { - expect(anchor.className).toBe(active ? 'active' : 'inactive') - } - if (!isServer && blocked) { - expect( - anchor.dispatchEvent( - new MouseEvent('click', { bubbles: true, cancelable: true }), - ), - ).toBe(true) - await fireEvent.focus(anchor) - await fireEvent.mouseEnter(anchor) - await fireEvent.touchStart(anchor) - expect(navigate).not.toHaveBeenCalled() - expect(preload).not.toHaveBeenCalled() - } - }, - ) -} diff --git a/packages/vue-router/tests/link-location-transition.test.tsx b/packages/vue-router/tests/link-location-transition.test.tsx deleted file mode 100644 index 69093faed9..0000000000 --- a/packages/vue-router/tests/link-location-transition.test.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import * as Vue from 'vue' -import { cleanup, render, waitFor } from '@testing-library/vue' -import { afterEach, expect, test } from 'vitest' -import { - Link, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -afterEach(cleanup) - -test('external links use the current location when becoming internal again', async () => { - const to = Vue.ref('https://other.example/') - const root = createRootRoute({ - component: Vue.defineComponent({ - setup: () => () => ( - - Target - - ), - }), - }) - const item = createRoute({ - getParentRoute: () => root, - path: '/items/$id', - validateSearch: (search: Record) => ({ - keep: String(search.keep), - }), - }) - const router = createRouter({ - routeTree: root.addChildren([item]), - history: createMemoryHistory({ - initialEntries: ['/items/one?keep=first#first'], - }), - }) - await router.load() - const view = render() - const anchor = await view.findByText('Target') - for (const [id, keep] of [ - ['two', 'second'], - ['three', 'third'], - ] as const) { - to.value = 'https://other.example/' - await Vue.nextTick() - await router.navigate({ - to: '/items/$id', - params: { id }, - search: { keep }, - hash: keep, - }) - expect(anchor).toHaveAttribute('href', 'https://other.example/') - to.value = '.' - await waitFor(() => { - expect(anchor).toHaveAttribute( - 'href', - `/items/${id}?keep=${keep}#${keep}`, - ) - expect(anchor).toHaveAttribute('aria-current', 'page') - }) - } - await router.navigate({ - to: '/items/$id', - params: { id: 'four' }, - search: { keep: 'fourth' }, - hash: 'fourth', - }) - await waitFor(() => - expect(anchor).toHaveAttribute('href', '/items/four?keep=fourth#fourth'), - ) - to.value = 'https://other.example/' - await Vue.nextTick() - await router.navigate({ to: '.', search: true, hash: 'latest' }) - to.value = '/items/three' - await waitFor(() => { - expect(anchor).toHaveAttribute('href', '/items/three?keep=fourth#latest') - expect(anchor).not.toHaveAttribute('aria-current') - }) -}) diff --git a/packages/vue-router/tests/link-path-matching.test.tsx b/packages/vue-router/tests/link-path-matching.test.tsx deleted file mode 100644 index 4923efc64e..0000000000 --- a/packages/vue-router/tests/link-path-matching.test.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import * as Vue from 'vue' -import { renderToString } from 'vue/server-renderer' -import { cleanup, render } from '@testing-library/vue' -import { afterEach, expect, test } from 'vitest' -import { - Link, - RouterContextProvider, - createMemoryHistory, - createRootRoute, - createRouter, -} from '../src' - -afterEach(cleanup) - -const cases = [ - { current: '/', to: '/', exact: true, active: true }, - { current: '/posts', to: '/posts/', exact: true, active: true }, - { current: '/posts/', to: '/posts', exact: true, active: true }, - { current: '/posts/item', to: '/posts', exact: true, active: false }, - { current: '/posts/item', to: '/posts', exact: false, active: true }, - { current: '/posts/item', to: '/posts/', exact: false, active: true }, - { current: '/posts-other', to: '/posts', exact: false, active: false }, -] - -for (const basepath of ['', '/app']) { - test.each(cases)( - `pathname matching agrees on server and client with basepath "${basepath}": $current -> $to, exact=$exact`, - async ({ current, to, exact, active }) => { - for (const isServer of [true, false]) { - const router = createRouter({ - routeTree: createRootRoute(), - history: createMemoryHistory({ - initialEntries: [basepath + current], - }), - basepath, - trailingSlash: 'preserve', - isServer, - }) - const tree = Vue.h(RouterContextProvider, { router }, () => - Vue.h( - Link, - { - to, - activeOptions: { exact }, - inactiveProps: { class: 'inactive' }, - }, - { - default: ({ isActive }: { isActive: boolean }) => - String(isActive), - }, - ), - ) - let container: Element - if (isServer) { - container = document.createElement('div') - container.innerHTML = await renderToString(tree) - } else { - container = render(tree).container - } - const anchor = container.querySelector('a')! - expect(anchor.textContent).toBe(String(active)) - expect(anchor.getAttribute('aria-current')).toBe(active ? 'page' : null) - expect(anchor.className).toBe(active ? 'active' : 'inactive') - } - }, - ) -} - -test('pathname matching reacts when exact mode changes', async () => { - const exact = Vue.ref(true) - const router = createRouter({ - routeTree: createRootRoute(), - history: createMemoryHistory({ initialEntries: ['/posts/item'] }), - isServer: false, - }) - const { container } = render( - Vue.h(RouterContextProvider, { router }, () => - Vue.h( - Link, - { - to: '/posts', - activeOptions: { exact: exact.value }, - inactiveProps: { class: 'inactive' }, - }, - { default: ({ isActive }: { isActive: boolean }) => String(isActive) }, - ), - ), - ) - const anchor = container.querySelector('a')! - for (const mode of [true, false, true]) { - exact.value = mode - await Vue.nextTick() - expect(anchor.textContent).toBe(String(!mode)) - expect(anchor.getAttribute('aria-current')).toBe(mode ? null : 'page') - expect(anchor.className).toBe(mode ? 'inactive' : 'active') - } -}) diff --git a/packages/vue-router/tests/link-style-ssr.test.tsx b/packages/vue-router/tests/link-style-ssr.test.tsx deleted file mode 100644 index 79af1f2164..0000000000 --- a/packages/vue-router/tests/link-style-ssr.test.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import * as Vue from 'vue' -import { renderToString } from 'vue/server-renderer' -import { expect, test, vi } from 'vitest' -import { - Link, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -test('preserves selected state props and styling during SSR', async () => { - const active = vi.fn(() => ({ - class: ['selected', [{ 'active-object': true, hidden: false }]], - style: { color: 'blue' }, - title: 'selected', - })) - const unused = vi.fn(() => ({ class: 'unused' })) - const root = createRootRoute({ - component: () => - Vue.h(Vue.Fragment, [ - Vue.h( - Link, - { - to: '/', - class: 'base', - style: { color: 'red', marginTop: '2px' }, - activeProps: active, - inactiveProps: unused, - }, - () => 'Active', - ), - Vue.h( - Link, - { - to: '/other', - activeProps: unused, - inactiveProps: { class: { idle: true }, 'data-state': 'idle' }, - }, - () => 'Inactive', - ), - Vue.h(Link, { to: '/' }, () => 'Default'), - Vue.h(Link, { to: '/', activeProps: {} }, () => 'Empty'), - ]), - }) - const history = createMemoryHistory({ initialEntries: ['/'] }) - const router = createRouter({ - routeTree: root.addChildren([ - createRoute({ getParentRoute: () => root, path: '/' }), - createRoute({ getParentRoute: () => root, path: '/other' }), - ]), - history, - isServer: true, - }) - try { - await router.load() - const html = await renderToString( - Vue.createSSRApp(() => Vue.h(RouterProvider, { router })), - ) - const container = document.createElement('div') - container.innerHTML = html - const links = container.querySelectorAll('a') - expect(links).toHaveLength(4) - expect([...links[0]!.classList]).toEqual([ - 'base', - 'selected', - 'active-object', - ]) - expect(links[0]!.style.color).toBe('blue') - expect(links[0]!.style.marginTop).toBe('2px') - expect(links[0]!.getAttribute('title')).toBe('selected') - expect(links[1]!.className).toBe('idle') - expect(links[1]!.getAttribute('data-state')).toBe('idle') - expect(links[2]!.className).toBe('active') - expect(links[3]!.className).toBe('') - expect(active).toHaveBeenCalledWith() - expect(unused).not.toHaveBeenCalled() - } finally { - history.destroy() - } -}) diff --git a/packages/vue-router/tests/link-style.test.tsx b/packages/vue-router/tests/link-style.test.tsx deleted file mode 100644 index d2c4e7891a..0000000000 --- a/packages/vue-router/tests/link-style.test.tsx +++ /dev/null @@ -1,242 +0,0 @@ -import * as Vue from 'vue' -import { afterEach, expect, test, vi } from 'vitest' -import { cleanup, render, screen, waitFor } from '@testing-library/vue' -import { - Link, - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - useLinkProps, -} from '../src' - -const disposers: Array<() => void> = [] -afterEach(() => { - cleanup() - for (const dispose of disposers.splice(0)) { - dispose() - } -}) - -function renderLinks(Links: Vue.Component) { - const history = createMemoryHistory({ initialEntries: ['/target'] }) - disposers.push(history.destroy) - const root = createRootRoute({ - component: () => Vue.h(Vue.Fragment, [Vue.h(Links), Vue.h(Outlet)]), - }) - const router = createRouter({ - routeTree: root.addChildren([ - createRoute({ getParentRoute: () => root, path: '/' }), - createRoute({ getParentRoute: () => root, path: '/target' }), - ]), - history, - scrollRestoration: false, - defaultPreload: false, - }) - render(Vue.h(RouterProvider, { router })) - return router -} - -test('preserves object and nested-array class bindings across state updates', async () => { - const activeClass = Vue.reactive({ selected: true, removed: false }) - const inactiveClass = Vue.reactive({ idle: true }) - const router = renderLinks(() => - Vue.h( - Link, - { - to: '/target', - class: ['base', { decorated: true }], - activeProps: () => ({ - class: ['active-state', [undefined, activeClass, ['nested']]], - }), - inactiveProps: { class: inactiveClass }, - }, - () => 'Class bindings', - ), - ) - const link = await screen.findByRole('link', { name: 'Class bindings' }) - expect([...link.classList]).toEqual([ - 'base', - 'decorated', - 'active-state', - 'selected', - 'nested', - ]) - activeClass.selected = false - activeClass.removed = true - await waitFor(() => { - expect(link).not.toHaveClass('selected') - expect(link).toHaveClass('removed', 'nested') - }) - await router.navigate({ to: '/' }) - await waitFor(() => { - expect([...link.classList]).toEqual(['base', 'decorated', 'idle']) - }) - inactiveClass.idle = false - await waitFor(() => - expect([...link.classList]).toEqual(['base', 'decorated']), - ) -}) - -test.each([false, true])( - 'useLinkProps retains class values rather than strings (with base: %s)', - async (withBase) => { - const baseClass = ['base', { decorated: true }] - const stateClass = { selected: true } - let binding: unknown - const HookLink = Vue.defineComponent({ - setup() { - const props = useLinkProps({ - to: '/target', - class: withBase ? baseClass : undefined, - activeProps: { class: stateClass }, - }) - return () => { - const resolved = Vue.unref(props) - binding = resolved.class - return Vue.h('a', { ...resolved }, 'Hook classes') - } - }, - }) - renderLinks(HookLink) - await screen.findByRole('link', { name: 'Hook classes' }) - if (withBase) { - expect(binding).toEqual([baseClass, stateClass]) - } else { - expect(binding).toBe(stateClass) - } - }, -) - -test('omits the class binding when neither source provides a class', async () => { - renderLinks(() => - Vue.h(Link, { to: '/target', activeProps: {} }, () => 'No classes'), - ) - const link = await screen.findByRole('link', { name: 'No classes' }) - expect(link).not.toHaveAttribute('class') -}) - -test('tracks additions to an initially empty state-only style proxy', async () => { - const style = Vue.reactive({}) - renderLinks(() => - Vue.h( - Link, - { to: '/target', activeProps: () => ({ style }) }, - () => 'Reactive', - ), - ) - const link = await screen.findByRole('link', { name: 'Reactive' }) - expect(link.style.color).toBe('') - style.color = 'red' - await waitFor(() => expect(link.style.color).toBe('red')) - delete style.color - await waitFor(() => expect(link.style.color).toBe('')) -}) - -test('merges only the selected state and tracks reactive style properties', async () => { - const base = Vue.reactive({ color: 'red', marginTop: '2px' }) - const stateStyle = Vue.reactive({ backgroundColor: 'white' }) - const stateClass = Vue.ref('selected') - const active = vi.fn(() => ({ - class: stateClass.value, - style: stateStyle, - title: 'selected', - href: '/state-href', - })) - const inactive = vi.fn(() => ({ - class: 'idle', - style: { color: 'gray' }, - title: 'idle', - })) - const router = renderLinks(() => - Vue.h( - Link, - { - to: '/target', - class: ['base', { decorated: true }], - style: base, - activeProps: active, - inactiveProps: inactive, - }, - () => 'Styled', - ), - ) - const link = await screen.findByRole('link', { name: 'Styled' }) - expect(link).toHaveClass('base', 'decorated', 'selected') - expect(link.style).toMatchObject({ - color: 'red', - marginTop: '2px', - backgroundColor: 'white', - }) - expect(link).toHaveAttribute('href', '/target') - expect(inactive).not.toHaveBeenCalled() - - base.color = 'blue' - stateStyle.backgroundColor = 'black' - stateClass.value = 'updated' - await waitFor(() => { - expect(link).toHaveClass('base', 'decorated', 'updated') - expect(link.style).toMatchObject({ - color: 'blue', - backgroundColor: 'black', - }) - }) - - await router.navigate({ to: '/' }) - await waitFor(() => { - expect(link).toHaveClass('base', 'idle') - expect(link).toHaveAttribute('title', 'idle') - expect(link).toHaveAttribute('href', '/target') - expect(link.style).toMatchObject({ color: 'gray', marginTop: '2px' }) - expect(link.style.backgroundColor).toBe('') - }) - active.mockClear() - inactive.mockClear() - base.marginTop = '3px' - await waitFor(() => expect(link.style).toMatchObject({ marginTop: '3px' })) - expect(active).not.toHaveBeenCalled() - expect(inactive).toHaveBeenCalled() - - await router.navigate({ to: '/target' }) - await waitFor(() => { - expect(link).toHaveClass('base', 'updated') - expect(link.style).toMatchObject({ - color: 'blue', - backgroundColor: 'black', - }) - }) -}) - -test('switches between default and custom state props without stale attributes', async () => { - const custom = Vue.ref(false) - const router = renderLinks(() => - Vue.h( - Link, - { - to: '/target', - activeProps: custom.value - ? { title: 'custom', style: { color: 'red' } } - : undefined, - }, - () => 'Defaults', - ), - ) - const link = await screen.findByRole('link', { name: 'Defaults' }) - expect(link).toHaveClass('active') - custom.value = true - await waitFor(() => { - expect(link).not.toHaveClass('active') - expect(link).toHaveAttribute('title', 'custom') - expect(link.style).toMatchObject({ color: 'red' }) - }) - custom.value = false - await waitFor(() => { - expect(link).toHaveClass('active') - expect(link).not.toHaveAttribute('title') - expect(link.style.color).toBe('') - }) - await router.navigate({ to: '/' }) - await waitFor(() => expect(link).not.toHaveClass('active')) -}) diff --git a/packages/vue-router/tests/link.bench.tsx b/packages/vue-router/tests/link.bench.tsx index 5a5b5f8752..8a30d80a2d 100644 --- a/packages/vue-router/tests/link.bench.tsx +++ b/packages/vue-router/tests/link.bench.tsx @@ -1,8 +1,7 @@ /** @jsxImportSource vue */ import { render } from '@testing-library/vue' -import { describe, test } from 'vitest' -import { getRouteSegments } from '@tanstack/router-core' +import { bench, describe } from 'vitest' import * as Vue from 'vue' import { Link, @@ -38,12 +37,10 @@ const createRouterRenderer = (routesCount: number) => (children: Vue.VNode) => { const InterpolatePathLink = Vue.defineComponent({ props: ['to', 'params'], setup(props, { slots }) { - const router = useRouter() - const href = interpolatePath( - props.to, - getRouteSegments(router.routesByPath[props.to])!, - props.params, - ) + const href = interpolatePath({ + path: props.to, + params: props.params, + }).interpolatedPath return () => Vue.h('a', { href }, slots.default?.()) }, @@ -83,8 +80,9 @@ describe.each([ ])('$name', ({ numberOfRoutes, numberOfLinks, matchedParamId }) => { const renderRouter = createRouterRenderer(numberOfRoutes) - test('hardcoded href', async ({ bench }) => { - await bench('hardcoded href', () => { + bench( + 'hardcoded href', + () => { const links = Vue.h( 'div', null, @@ -95,13 +93,13 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) - test('interpolate path', async ({ bench }) => { - await bench('interpolate path', () => { + bench( + 'interpolate path', + () => { const links = Vue.h( 'div', null, @@ -120,13 +118,13 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) - test('build location', async ({ bench }) => { - await bench('build location', () => { + bench( + 'build location', + () => { const links = Vue.h( 'div', null, @@ -145,13 +143,13 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) - test('link to absolute path', async ({ bench }) => { - await bench('link to absolute path', () => { + bench( + 'link to absolute path', + () => { const links = Vue.h( 'div', null, @@ -172,13 +170,13 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) - test('link to relative path', async ({ bench }) => { - await bench('link to relative path', () => { + bench( + 'link to relative path', + () => { const links = Vue.h( 'div', null, @@ -201,13 +199,13 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) - test('link to current path', async ({ bench }) => { - await bench('link to current path', () => { + bench( + 'link to current path', + () => { const links = Vue.h( 'div', null, @@ -228,8 +226,7 @@ describe.each([ const router = renderRouter(links) render(Vue.h(RouterProvider, { router })) - }).run({ - warmupIterations: 1, - }) - }) + }, + { warmupIterations: 1 }, + ) }) diff --git a/packages/vue-router/tests/link.test.tsx b/packages/vue-router/tests/link.test.tsx index bae8cf04f9..e047fe5993 100644 --- a/packages/vue-router/tests/link.test.tsx +++ b/packages/vue-router/tests/link.test.tsx @@ -33,7 +33,6 @@ import { useRouteContext, useSearch, } from '../src' -import { useIntersectionObserver } from '../src/utils' import { getIntersectionObserverMock, getSearchParamsFromURI, @@ -43,16 +42,12 @@ import type { RouterHistory } from '../src' const ioObserveMock = vi.fn() const ioDisconnectMock = vi.fn() -let ioCallback: IntersectionObserverCallback let history: RouterHistory beforeEach(() => { const io = getIntersectionObserverMock({ observe: ioObserveMock, disconnect: ioDisconnectMock, - onCreate: (callback) => { - ioCallback = callback - }, }) vi.stubGlobal('IntersectionObserver', io) history = createBrowserHistory() @@ -60,7 +55,6 @@ beforeEach(() => { }) afterEach(() => { - vi.useRealTimers() history.destroy?.() window.history.replaceState(null, 'root', '/') vi.resetAllMocks() @@ -70,170 +64,6 @@ afterEach(() => { const WAIT_TIME = 300 describe('Link', () => { - test('keeps protocol-relative Link paths on the router origin', async () => { - const inputs = [ - '//evil.example', - '/\\evil.example', - '\\/evil.example', - ' \t/\\evil.example', - ] - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => ( - <> - {inputs.map((to, index) => ( - - ))} - - ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history, - }) - - render() - - for (let index = 0; index < inputs.length; index++) { - const link = await screen.findByTestId(`unsafe-link-${index}`) - const href = link.getAttribute('href') - expect(href).not.toBeNull() - expect(new URL(href!, window.location.href).origin).toBe( - window.location.origin, - ) - } - }) - - test('blocks a dangerous final href produced by an output rewrite', async () => { - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => , - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history, - rewrite: { - output: ({ url }) => - url.pathname === '/safe' ? new URL('javascript:alert(1)') : url, - }, - }) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - - render() - const link = await screen.findByTestId('rewritten-link') - - expect(link).not.toHaveAttribute('href') - expect(link).toHaveAttribute('role', 'link') - expect(link).toHaveAttribute('aria-disabled', 'true') - expect( - link.dispatchEvent( - new MouseEvent('click', { bubbles: true, cancelable: true }), - ), - ).toBe(true) - }) - - test('blocks a dangerous final href produced by custom history', async () => { - const customHistory = createBrowserHistory({ - createHref: () => 'javascript:alert(1)', - }) - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => ( - - ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: customHistory, - }) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - - render() - const link = await screen.findByTestId('custom-history-link') - - expect(link).not.toHaveAttribute('href') - expect( - link.dispatchEvent( - new MouseEvent('click', { bubbles: true, cancelable: true }), - ), - ).toBe(true) - customHistory.destroy() - }) - - test.each([ - { to: '/', disabled: false }, - { to: '/safe', disabled: false }, - { to: '/', disabled: true }, - { to: '/safe', disabled: true }, - ])( - 'keeps the validated href when applying state props: %j', - async (props) => { - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => ( - - ), - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history, - }) - - render() - const link = await screen.findByTestId('state-props-link') - - if (props.disabled) { - expect(link).not.toHaveAttribute('href') - } else { - expect(link).toHaveAttribute('href', props.to) - } - }, - ) - - test('does not intercept an external href produced by custom history', async () => { - const customHistory = createBrowserHistory({ - createHref: () => 'https://other.example/path', - }) - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => , - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: customHistory, - }) - render() - const link = await screen.findByTestId('custom-history-link') - - expect(link).toHaveAttribute('href', 'https://other.example/path') - expect( - link.dispatchEvent( - new MouseEvent('click', { bubbles: true, cancelable: true }), - ), - ).toBe(true) - customHistory.destroy() - }) - // rerender doesn't exist in solid // test('when using renderHook it returns a hook with same content to prove rerender works', async () => { @@ -576,228 +406,6 @@ describe('Link', () => { expect(vueCaseTouchstart).toHaveBeenCalledTimes(1) }) - test('reacts to internal and external destination changes', async () => { - const to = Vue.ref('/posts') - const target = Vue.ref() - const decorated = Vue.ref(false) - const disabled = Vue.ref(false) - - const RootComponent = Vue.defineComponent({ - setup() { - return () => - Vue.h( - Link as any, - { - to: to.value, - target: target.value, - disabled: disabled.value, - ...(decorated.value - ? { class: 'decorated', 'aria-label': 'Updated link' } - : {}), - }, - { default: () => 'Dynamic link' }, - ) - }, - }) - - const rootRoute = createRootRoute({ - component: RootComponent, - }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts', - }) - const aboutRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/about', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([postsRoute, aboutRoute]), - history, - }) - - render() - - const link = await screen.findByRole('link', { name: 'Dynamic link' }) - expect(link).toHaveAttribute('href', '/posts') - expect(link).not.toHaveClass('decorated') - - to.value = 'https://example.com/one' - target.value = '_blank' - decorated.value = true - disabled.value = true - await Vue.nextTick() - - expect(link).not.toHaveAttribute('href') - expect(link).toHaveAttribute('target', '_blank') - expect(link).toHaveAttribute('aria-label', 'Updated link') - expect(link).toHaveClass('decorated') - expect(link).toHaveAttribute('role', 'link') - expect(link).toHaveAttribute('aria-disabled', 'true') - expect(link).not.toHaveAttribute('disabled') - - disabled.value = false - to.value = 'https://example.com/two' - await Vue.nextTick() - expect(link).toHaveAttribute('href', 'https://example.com/two') - expect(link).not.toHaveAttribute('aria-disabled') - expect(link).not.toHaveAttribute('disabled') - - to.value = 'javascript:alert(1)' - await Vue.nextTick() - expect(link).not.toHaveAttribute('href') - expect(link).toHaveAttribute('role', 'link') - expect(link).toHaveAttribute('aria-disabled', 'true') - - to.value = 'https://example.com/three' - await Vue.nextTick() - expect(link).toHaveAttribute('href', 'https://example.com/three') - expect(link).not.toHaveAttribute('aria-disabled') - - to.value = '/about' - target.value = undefined - decorated.value = false - disabled.value = false - await Vue.nextTick() - - expect(link).toHaveAttribute('href', '/about') - expect(link).not.toHaveAttribute('target') - expect(link).not.toHaveAttribute('aria-label') - expect(link).not.toHaveClass('decorated') - expect(link).not.toHaveAttribute('aria-disabled') - expect(link).not.toHaveAttribute('disabled') - - decorated.value = true - await Vue.nextTick() - expect(link).toHaveAttribute('aria-label', 'Updated link') - expect(link).toHaveClass('decorated') - - decorated.value = false - await Vue.nextTick() - expect(link).not.toHaveAttribute('aria-label') - expect(link).not.toHaveClass('decorated') - - await fireEvent.click(link) - await waitFor(() => expect(window.location.pathname).toBe('/about')) - }) - - test('tracks router location after an external link becomes internal', async () => { - const to = Vue.ref('https://example.com') - const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - - Initially external - - ) - }, - }) - - const rootRoute = createRootRoute({ - component: RootComponent, - }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([postsRoute]), - history, - }) - - render() - - const link = await screen.findByRole('link', { name: 'Initially external' }) - expect(link).toHaveAttribute('href', 'https://example.com') - - to.value = '/posts' - await Vue.nextTick() - expect(link).toHaveAttribute('href', '/posts') - - await fireEvent.click(link) - await waitFor(() => { - expect(window.location.pathname).toBe('/posts') - expect(link).toHaveAttribute('data-status', 'active') - }) - }) - - test('uses current event handlers after link props change', async () => { - const firstClick = vi.fn((event: MouseEvent) => event.preventDefault()) - const secondClick = vi.fn((event: MouseEvent) => event.preventDefault()) - const firstMouseEnter = vi.fn() - const secondMouseEnter = vi.fn() - const clickHandler = Vue.shallowRef< - ((event: MouseEvent) => void) | undefined - >(firstClick) - const mouseEnterHandler = Vue.shallowRef< - ((event: MouseEvent) => void) | undefined - >(firstMouseEnter) - const disabled = Vue.ref(false) - - const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - - Dynamic handlers - - ) - }, - }) - - const rootRoute = createRootRoute({ - component: RootComponent, - }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([postsRoute]), - history, - }) - - render() - - const link = await screen.findByRole('link', { name: 'Dynamic handlers' }) - await fireEvent.click(link) - await fireEvent.mouseEnter(link) - expect(firstClick).toHaveBeenCalledOnce() - expect(firstMouseEnter).toHaveBeenCalledOnce() - - clickHandler.value = secondClick - mouseEnterHandler.value = secondMouseEnter - await Vue.nextTick() - await fireEvent.click(link) - await fireEvent.mouseEnter(link) - - expect(firstClick).toHaveBeenCalledOnce() - expect(firstMouseEnter).toHaveBeenCalledOnce() - expect(secondClick).toHaveBeenCalledOnce() - expect(secondMouseEnter).toHaveBeenCalledOnce() - - clickHandler.value = undefined - mouseEnterHandler.value = undefined - await Vue.nextTick() - await fireEvent.click(link) - await fireEvent.mouseEnter(link) - - expect(secondClick).toHaveBeenCalledOnce() - expect(secondMouseEnter).toHaveBeenCalledOnce() - - disabled.value = true - await Vue.nextTick() - await fireEvent.click(link) - await fireEvent.mouseEnter(link) - - expect(secondClick).toHaveBeenCalledOnce() - expect(secondMouseEnter).toHaveBeenCalledOnce() - }) - describe('when the current route has a search fields with undefined values', () => { async function runTest(opts: { explicitUndefined: boolean | undefined }) { const rootRoute = createRootRoute() @@ -1127,48 +735,35 @@ describe('Link', () => { const postLoader = createControlledPromise() let postLoadCount = 0 - const RootComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => { - const nextPostId = params.value.postId === '1' ? '2' : '1' - - return ( - <> - - Current post - - - Switch post - - - - ) - } - }, - }) - const rootRoute = createRootRoute({ - component: RootComponent, - }) - - const PostComponent = Vue.defineComponent({ - setup() { + component: () => { const params = useParams({ strict: false }) - return () =>

{`Post ${params.value.postId}`}

+ const nextPostId = params.value.postId === '1' ? '2' : '1' + + return ( + <> + + Current post + + + Switch post + + + + ) }, }) @@ -1179,7 +774,10 @@ describe('Link', () => { postLoadCount += 1 return postLoadCount === 1 ? Promise.resolve() : postLoader.promise }, - component: PostComponent, + component: () => { + const params = useParams({ strict: false }) + return

{`Post ${params.value.postId}`}

+ }, }) const router = createRouter({ @@ -1216,57 +814,44 @@ describe('Link', () => { const postsLoader = createControlledPromise() let postsLoadCount = 0 - const RootComponent = Vue.defineComponent({ - setup() { - const search = useSearch({ strict: false }) - return () => { - const nextPage = Number(search.value.page ?? 1) === 1 ? 2 : 1 - - return ( - <> - - Static search - - - Current search - - - Switch search - - - - ) - } - }, - }) - const rootRoute = createRootRoute({ - component: RootComponent, - }) - - const PostsComponent = Vue.defineComponent({ - setup() { + component: () => { const search = useSearch({ strict: false }) - return () =>

{`Posts ${search.value.page}`}

+ const nextPage = Number(search.value.page ?? 1) === 1 ? 2 : 1 + + return ( + <> + + Static search + + + Current search + + + Switch search + + + + ) }, }) @@ -1281,7 +866,10 @@ describe('Link', () => { postsLoadCount += 1 return postsLoadCount === 1 ? Promise.resolve() : postsLoader.promise }, - component: PostsComponent, + component: () => { + const search = useSearch({ strict: false }) + return

{`Posts ${search.value.page}`}

+ }, }) const router = createRouter({ @@ -1547,13 +1135,10 @@ describe('Link', () => { expect(indexLink).not.toHaveAttribute('data-status', 'active') expect(indexLink).toHaveAttribute('href', '/') - // 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') + expect(postsLink).toHaveAttribute('data-status', 'active') + expect(postsLink).toHaveAttribute('aria-current', 'page') + expect(postsLink).toHaveClass('active') + expect(postsLink).toHaveAttribute('href', '/posts') }) test('when navigating to /posts with a base url', async () => { @@ -1609,13 +1194,10 @@ describe('Link', () => { expect(indexLink).not.toHaveAttribute('data-status', 'active') expect(indexLink).toHaveAttribute('href', '/app/') - // 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') + expect(postsLink).toHaveAttribute('data-status', 'active') + expect(postsLink).toHaveAttribute('aria-current', 'page') + expect(postsLink).toHaveClass('active') + expect(postsLink).toHaveAttribute('href', '/app/posts') }) test('when navigating to /posts with search', async () => { @@ -1635,17 +1217,15 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const search = useSearch({ strict: false }) - return () => ( - <> -

Posts

- Page: {search.value.page} - - ) - }, - }) + const PostsComponent = () => { + const search = useSearch({ strict: false }) + return ( + <> +

Posts

+ Page: {search.value.page} + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -1721,20 +1301,18 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const search = useSearch({ strict: false }) - return () => ( - <> -

Posts

- Page: {search.value.page} - - Filter: {search.value.filter} - - - ) - }, - }) + const PostsComponent = () => { + const search = useSearch({ strict: false }) + return ( + <> +

Posts

+ Page: {search.value.page} + + Filter: {search.value.filter} + + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -1787,16 +1365,15 @@ describe('Link', () => { expect(window.location.search).toBe('?page=2&filter=inactive') }) + const updatedPage = await screen.findByTestId('current-page') + const updatedFilter = await screen.findByTestId('current-filter') + // Verify search was updated expect(window.location.pathname).toBe('/posts') expect(window.location.search).toBe('?page=2&filter=inactive') - await waitFor(() => { - expect(screen.getByTestId('current-page')).toHaveTextContent('Page: 2') - expect(screen.getByTestId('current-filter')).toHaveTextContent( - 'Filter: inactive', - ) - }) + expect(updatedPage).toHaveTextContent('Page: 2') + expect(updatedFilter).toHaveTextContent('Filter: inactive') }) test('when navigation to . from /posts while updating search from / and using base path', async () => { @@ -1840,20 +1417,18 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const search = useSearch({ strict: false }) - return () => ( - <> -

Posts

- Page: {search.value.page} - - Filter: {search.value.filter} - - - ) - }, - }) + const PostsComponent = () => { + const search = useSearch({ strict: false }) + return ( + <> +

Posts

+ Page: {search.value.page} + + Filter: {search.value.filter} + + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -1916,12 +1491,10 @@ describe('Link', () => { expect(window.location.pathname).toBe('/Dashboard/posts') expect(window.location.search).toBe('?page=2&filter=inactive') - await waitFor(() => { - expect(screen.getByTestId('current-page')).toHaveTextContent('Page: 2') - expect(screen.getByTestId('current-filter')).toHaveTextContent( - 'Filter: inactive', - ) - }) + const updatedPage = await screen.findByTestId('current-page') + const updatedFilter = await screen.findByTestId('current-filter') + expect(updatedPage).toHaveTextContent('Page: 2') + expect(updatedFilter).toHaveTextContent('Filter: inactive') }) test('when navigating to /posts with invalid search', async () => { @@ -1942,17 +1515,15 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const search = useSearch({ strict: false }) - return () => ( - <> -

Posts

- Page: {search.value.page} - - ) - }, - }) + const PostsComponent = () => { + const search = useSearch({ strict: false }) + return ( + <> +

Posts

+ Page: {search.value.page} + + ) + } const ErrorComponent = () => { return

Oops, something went wrong

@@ -2015,17 +1586,15 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const data = useLoaderData({ strict: false }) - return () => ( - <> -

Posts

- Page: {data.value.pageDoubled} - - ) - }, - }) + const PostsComponent = () => { + const data = useLoaderData({ strict: false }) + return ( + <> +

Posts

+ Page: {data.value.pageDoubled} + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -2080,17 +1649,15 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const loader = useLoaderData({ strict: false }) - return () => ( - <> -

Posts

- Page: {loader.value.pageDoubled} - - ) - }, - }) + const PostsComponent = () => { + const loader = useLoaderData({ strict: false }) + return ( + <> +

Posts

+ Page: {loader.value.pageDoubled} + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -2273,18 +1840,16 @@ describe('Link', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const context = useRouteContext({ strict: false }) - return () => ( - <> -

Posts

- UserId: {context.value.userId} - Username: {context.value.username} - - ) - }, - }) + const PostsComponent = () => { + const context = useRouteContext({ strict: false }) + return ( + <> +

Posts

+ UserId: {context.value.userId} + Username: {context.value.username} + + ) + } const postsRoute = createRoute({ getParentRoute: () => rootRoute, @@ -2536,12 +2101,10 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => Params: {params.value.postId} - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return Params: {params.value.postId} + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -2573,12 +2136,14 @@ describe('Link', () => { test('keeps a relative link active when changing inherited params (issue #5655)', async () => { const rootRoute = createRootRoute() - const PostComponent = Vue.defineComponent({ - setup() { + const postRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/post/$postId', + component: () => { const params = useParams({ strict: false }) - const postId = Vue.computed(() => params.value.postId) - return () => ( + + return ( <> { }, }) - const postRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/post/$postId', - component: PostComponent, - }) - - const Step1Component = Vue.defineComponent({ - setup() { + const step1Route = createRoute({ + getParentRoute: () => postRoute, + path: 'step1', + component: () => { const params = useParams({ strict: false }) - const postId = Vue.computed(() => params.value.postId) - const otherPostId = Vue.computed(() => postId.value === '1' ? '2' : '1', ) - return () => ( + + return ( <> {`Post ${postId.value} step1`} { }, }) - const step1Route = createRoute({ + const step2Route = createRoute({ getParentRoute: () => postRoute, - path: 'step1', - component: Step1Component, - }) - - const Step2Component = Vue.defineComponent({ - setup() { + path: 'step2', + component: () => { const params = useParams({ strict: false }) - const postId = Vue.computed(() => params.value.postId) - const otherPostId = Vue.computed(() => postId.value === '1' ? '2' : '1', ) - return () => ( + + return ( <> {`Post ${postId.value} step2`} { }, }) - const step2Route = createRoute({ - getParentRoute: () => postRoute, - path: 'step2', - component: Step2Component, - }) - const router = createRouter({ routeTree: rootRoute.addChildren([ postRoute.addChildren([step1Route, step2Route]), @@ -2750,17 +2299,15 @@ describe('Link', () => { component: PostsIndexComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - Index - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + Index + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -2866,16 +2413,14 @@ describe('Link', () => { component: PostsIndexComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -2979,17 +2524,15 @@ describe('Link', () => { component: PostsIndexComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - Index - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + Index + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3078,17 +2621,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3217,17 +2758,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3414,31 +2953,27 @@ describe('Link', () => { component: UsersComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + + Params: {params.value.postId} + + + ) + } - const UserComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - - Params: {params.value.userId} - - - ) - }, - }) + const UserComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + + Params: {params.value.userId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, path: '$postid', @@ -3560,17 +3095,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3699,17 +3232,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3828,17 +3359,15 @@ describe('Link', () => { validateSearch: () => ({ page: 2 }), }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -3975,17 +3504,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -4111,17 +3638,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -4208,9 +3733,7 @@ describe('Link', () => { test('when navigating from /invoices to ./invoiceId and the current route is /posts/$postId/details', async () => { const rootRoute = createRootRoute({ - errorComponent: ({ error }) => ( -
{error instanceof Error ? error.message : String(error)}
- ), + errorComponent: (err) =>
{err.error.message}
, }) const indexRoute = createRoute({ @@ -4257,17 +3780,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -4317,12 +3838,10 @@ describe('Link', () => { ), }) - const InvoiceComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => invoiceId: {params.value.invoiceId} - }, - }) + const InvoiceComponent = () => { + const params = useParams({ strict: false }) + return invoiceId: {params.value.invoiceId} + } const invoiceRoute = createRoute({ getParentRoute: () => invoicesRoute, @@ -4388,17 +3907,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -4484,17 +4001,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -4571,17 +4086,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const search = vi.fn((prev) => ({ page: prev.postPage })) @@ -4701,17 +4214,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const search = vi.fn((prev) => ({ page: prev.postPage })) @@ -4803,17 +4314,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const search = vi.fn((prev) => ({ page: prev.postPage })) @@ -4905,17 +4414,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const search = vi.fn((prev) => ({ page: prev.postPage })) @@ -5008,17 +4515,15 @@ describe('Link', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const search = vi.fn((prev) => ({ page: prev.postPage })) @@ -5260,12 +4765,10 @@ describe('Link', () => { let parseParams: any let stringifyParams: any - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () =>
Post: {params.value.postId}
- }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return
Post: {params.value.postId}
+ } const postRoute = createRoute({ getParentRoute: () => rootRoute, @@ -5324,12 +4827,10 @@ describe('Link', () => { let parseParams: any let stringifyParams: any - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () =>
Post: {params.value.postId}
- }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return
Post: {params.value.postId}
+ } const postRoute = createRoute({ getParentRoute: () => rootRoute, @@ -5407,12 +4908,10 @@ describe('Link', () => { } } - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () =>
Post: {params.value.postId}
- }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return
Post: {params.value.postId}
+ } const postRoute = createRoute({ getParentRoute: () => rootRoute, @@ -5551,308 +5050,6 @@ 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({ - getParentRoute: () => rootRoute, - path: '/', - component: () => ( - <> - - Viewport Link - - - Intent Link - - - ), - }) - const aboutRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/about', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, aboutRoute]), - history, - }) - const preloadRouteSpy = vi.spyOn(router, 'preloadRoute') - - render() - - const viewportLink = await screen.findByRole('link', { - name: 'Viewport Link', - }) - const intentLink = await screen.findByRole('link', { name: 'Intent Link' }) - vi.useFakeTimers() - - ioCallback([], {} as IntersectionObserver) - ioCallback( - [ - { - isIntersecting: false, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).not.toHaveBeenCalled() - - ioCallback( - [ - { - isIntersecting: true, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - ioCallback( - [ - { - isIntersecting: true, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - fireEvent.mouseLeave(viewportLink) - - expect(preloadRouteSpy).not.toHaveBeenCalled() - await vi.advanceTimersByTimeAsync(49) - expect(preloadRouteSpy).not.toHaveBeenCalled() - await vi.advanceTimersByTimeAsync(1) - expect(preloadRouteSpy).toHaveBeenCalledOnce() - - ioCallback( - [ - { - isIntersecting: true, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - { - isIntersecting: false, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).toHaveBeenCalledOnce() - - ioCallback( - [ - { - isIntersecting: true, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - await vi.advanceTimersByTimeAsync(49) - - ioCallback( - [ - { - isIntersecting: false, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - { - isIntersecting: true, - target: viewportLink, - } as unknown as IntersectionObserverEntry, - ], - {} as IntersectionObserver, - ) - await vi.advanceTimersByTimeAsync(1) - expect(preloadRouteSpy).toHaveBeenCalledTimes(2) - - fireEvent.mouseEnter(intentLink) - fireEvent.mouseLeave(intentLink) - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).toHaveBeenCalledTimes(2) - }) - - test('Link.disabled should disable viewport observation', async () => { - const rootRoute = createRootRoute() - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => ( - <> -

Index Heading

- - Index Link - - - ), - }) - - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - defaultPreload: 'viewport', - }) - - render() - - const indexLink = await screen.findByRole('link', { name: 'Index Link' }) - expect(indexLink).toBeInTheDocument() - expect(indexLink).toHaveAttribute('aria-disabled', 'true') - expect(ioObserveMock).not.toHaveBeenCalled() - }) - - test('useIntersectionObserver should react to its disabled getter', async () => { - const TestComponent = Vue.defineComponent({ - name: 'TestComponent', - setup() { - const element = Vue.ref(null) - const disabled = Vue.ref(true) - - useIntersectionObserver( - element, - () => {}, - () => disabled.value, - ) - - return () => ( - <> - -
- - ) - }, - }) - - render() - expect(ioObserveMock).not.toHaveBeenCalled() - - const toggle = screen.getByRole('button', { name: 'Toggle disabled' }) - await fireEvent.click(toggle) - await waitFor(() => expect(ioObserveMock).toHaveBeenCalledOnce()) - - await fireEvent.click(toggle) - await waitFor(() => expect(ioDisconnectMock).toHaveBeenCalledOnce()) - }) - test("Router.preload='render', should trigger the route loader on render", async () => { const mock = vi.fn() @@ -5893,116 +5090,6 @@ describe('Link', () => { expect(mock).toHaveBeenCalledTimes(1) }) - test('Link.preload="render" preloads each reactive destination', async () => { - const to = Vue.ref('/posts') - const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - - Dynamic render preload - - ) - }, - }) - - const rootRoute = createRootRoute({ - component: RootComponent, - }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts', - }) - const aboutRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/about', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([postsRoute, aboutRoute]), - history, - }) - const preloadRouteSpy = vi.spyOn(router, 'preloadRoute') - - render() - - const link = await screen.findByRole('link', { - name: 'Dynamic render preload', - }) - await waitFor(() => expect(preloadRouteSpy).toHaveBeenCalledOnce()) - expect(link).toHaveAttribute('href', '/posts') - - to.value = '/about' - await waitFor(() => expect(preloadRouteSpy).toHaveBeenCalledTimes(2)) - expect(link).toHaveAttribute('href', '/about') - }) - - test('cancels stale delayed preloads after link inputs change', async () => { - const to = Vue.ref('/posts') - const disabled = Vue.ref(false) - const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - - Dynamic intent preload - - ) - }, - }) - - const rootRoute = createRootRoute({ - component: RootComponent, - }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts', - }) - const aboutRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/about', - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([postsRoute, aboutRoute]), - history, - }) - const preloadRouteSpy = vi.spyOn(router, 'preloadRoute') - - render() - const link = await screen.findByRole('link', { - name: 'Dynamic intent preload', - }) - vi.useFakeTimers() - - await fireEvent.mouseEnter(link) - disabled.value = true - await Vue.nextTick() - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).not.toHaveBeenCalled() - - disabled.value = false - await Vue.nextTick() - await fireEvent.mouseEnter(link) - to.value = '/about' - await Vue.nextTick() - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).not.toHaveBeenCalled() - - await fireEvent.mouseEnter(link) - to.value = 'https://example.com' - await Vue.nextTick() - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).not.toHaveBeenCalled() - - to.value = '/about' - await Vue.nextTick() - await fireEvent.mouseEnter(link) - await vi.advanceTimersByTimeAsync(50) - expect(preloadRouteSpy).toHaveBeenCalledOnce() - }) - test.each([undefined, false, 'render', 'viewport'] as const)( 'Link.preload="%s" should not preload on focus, hover, or touchstart', async (preloadMode) => { @@ -6060,7 +5147,6 @@ describe('Link', () => { ) test('Link.preload="intent" should preload on focus, hover, and touchstart', async () => { - const updateSearch = vi.fn((search) => search) const rootRoute = createRootRoute() const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -6068,7 +5154,7 @@ describe('Link', () => { component: () => ( <>

Index Heading

- + About Link @@ -6095,8 +5181,6 @@ describe('Link', () => { expect(aboutLink).toBeInTheDocument() const baselineCalls = preloadRouteSpy.mock.calls.length - const baselineSearchCalls = updateSearch.mock.calls.length - expect(baselineSearchCalls).toBeGreaterThan(0) fireEvent.focus(aboutLink) await waitFor(() => @@ -6112,10 +5196,6 @@ describe('Link', () => { await waitFor(() => expect(preloadRouteSpy).toHaveBeenCalledTimes(baselineCalls + 3), ) - expect(updateSearch).toHaveBeenCalledTimes(baselineSearchCalls + 3) - for (const call of preloadRouteSpy.mock.calls.slice(baselineCalls)) { - expect(call).toHaveLength(1) - } }) test('Router.preload="intent", pendingComponent renders during unresolved route loader', async () => { @@ -6170,6 +5250,79 @@ describe('Link', () => { expect(window.location.pathname).toBe('/posts') }) + test('Link slot receives isTransitioning during pending navigation', async () => { + let resolvePostsLoader: (() => void) | undefined + + const postsLoaderPromise = new Promise((resolve) => { + resolvePostsLoader = resolve + }) + + const rootRoute = createRootRoute({ + component: () => + Vue.h(Vue.Fragment, null, [ + Vue.h( + Link, + { to: '/posts', 'data-testid': 'posts-link' }, + { + default: ({ isTransitioning }: { isTransitioning: boolean }) => ( + <> + + {isTransitioning ? 'transitioning' : 'idle'} + + Posts + + ), + }, + ), + Vue.h(Outlet), + ]), + }) + + const indexRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/', + component: () =>

Index page

, + }) + + const postsRoute = createRoute({ + ssr: false, + getParentRoute: () => rootRoute, + path: '/posts', + loader: () => postsLoaderPromise, + component: () =>

Posts page

, + }) + + const router = createRouter({ + routeTree: rootRoute.addChildren([indexRoute, postsRoute]), + history, + }) + + render() + + await screen.findByRole('heading', { name: 'Index page' }) + + const postsLink = await screen.findByTestId('posts-link') + const transitionState = await screen.findByTestId('slot-transition-state') + + expect(transitionState).toHaveTextContent('idle') + expect(postsLink).not.toHaveAttribute('data-transitioning') + + fireEvent.click(postsLink) + + await waitFor(() => expect(resolvePostsLoader).toBeDefined()) + await waitFor(() => + expect(transitionState).toHaveTextContent('transitioning'), + ) + expect(postsLink).toHaveAttribute('data-transitioning', 'transitioning') + + resolvePostsLoader?.() + + await screen.findByRole('heading', { name: 'Posts page' }) + + await waitFor(() => expect(transitionState).toHaveTextContent('idle')) + expect(postsLink).not.toHaveAttribute('data-transitioning') + }) + describe('when preloading a link, `preload` should be', () => { async function runTest({ expectedPreload, @@ -6234,16 +5387,14 @@ describe('Link', () => { loader: postsLoaderFn, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + ) + } const postBeforeLoadFn = vi.fn() const postLoaderFn = vi.fn() @@ -6649,9 +5800,7 @@ describe('search middleware', () => { test('search middlewares work', async () => { const rootRoute = createRootRoute({ - errorComponent: ({ error }) => ( -
{error instanceof Error ? error.stack : String(error)}
- ), + errorComponent: (error) =>
{error.error.stack}
, validateSearch: (input) => { return { root: input.root as string | undefined, @@ -6671,10 +5820,12 @@ describe('search middleware', () => { ], }, }) - const IndexComponent = Vue.defineComponent({ - setup() { + const indexRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/', + component: () => { const search = indexRoute.useSearch() - return () => ( + return ( <>

Index

{search.value.root ?? '$undefined'}
@@ -6693,12 +5844,6 @@ describe('search middleware', () => { }, }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: IndexComponent, - }) - const PostsComponent = () => { return ( <> @@ -6780,21 +5925,6 @@ describe('search middleware', () => { }, }) - const PostsComponent = Vue.defineComponent({ - setup() { - const search = postsRoute.useSearch() - return () => ( - <> -

Posts

-
{search.value.foo}
- - new - - - ) - }, - }) - const postsRoute = createRoute({ getParentRoute: () => rootRoute, path: 'posts', @@ -6809,7 +5939,18 @@ describe('search middleware', () => { ], }, - component: PostsComponent, + component: () => { + const search = postsRoute.useSearch() + return ( + <> +

Posts

+
{search.value.foo}
+ + new + + + ) + }, }) const postsNewRoute = createRoute({ @@ -6902,12 +6043,10 @@ describe('search middleware', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => Params: {params.value.postId} - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return Params: {params.value.postId} + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -7317,12 +6456,14 @@ describe('splat routes with empty splat', () => { async (trailingSlash) => { const tail = trailingSlash === 'always' ? '/' : '' - // The links stay mounted across the navigation so they can turn active. - const rootRoute = createRootRoute({ + const rootRoute = createRootRoute() + const indexRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/', component: () => { return ( <> - +

Index Route

{ ) }, }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () => { - return

Index Route

- }, - }) const splatRoute = createRoute({ getParentRoute: () => rootRoute, @@ -7644,18 +6778,16 @@ describe('relative links to current route', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -8079,17 +7211,15 @@ describe('when on /posts/$postId and navigating to ../ with default `from` /post // postsRouteApi.Link is not available in Vue, so we use Link with from prop instead // const postsRouteApi = getRouteApi('/_layout/posts') - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -8355,28 +7485,27 @@ describe('encoded and unicode paths', () => { }, }) - const PathRouteComponent = Vue.defineComponent({ - setup() { - const params = pathRoute.useParams() - return () => ( -
-

Path Route

-

- params:{' '} - - {JSON.stringify(params.value)} - -

-
- ) - }, - }) const pathRoute = createRoute({ getParentRoute: () => rootRoute, path, component: PathRouteComponent, }) + function PathRouteComponent() { + const params = pathRoute.useParams() + return ( +
+

Path Route

+

+ params:{' '} + + {JSON.stringify(params.value)} + +

+
+ ) + } + const router = createRouter({ routeTree: rootRoute.addChildren([indexRoute, pathRoute]), history, diff --git a/packages/vue-router/tests/loaders.test.tsx b/packages/vue-router/tests/loaders.test.tsx index f8b94245a8..ae267ac2ae 100644 --- a/packages/vue-router/tests/loaders.test.tsx +++ b/packages/vue-router/tests/loaders.test.tsx @@ -1,11 +1,4 @@ -import { defineComponent } from 'vue' -import { - cleanup, - fireEvent, - render, - screen, - waitFor, -} from '@testing-library/vue' +import { cleanup, fireEvent, render, screen } from '@testing-library/vue' import { afterEach, describe, expect, test, vi } from 'vitest' @@ -206,17 +199,13 @@ test('reproducer for #2053', async () => { }, }) - const FooComponent = defineComponent({ - setup() { - const params = fooRoute.useParams() - return () =>
fooId: {params.value.fooId}
- }, - }) - const fooRoute = createRoute({ getParentRoute: () => rootRoute, path: '/foo/$fooId', - component: FooComponent, + component: () => { + const params = fooRoute.useParams() + return
fooId: {params.value.fooId}
+ }, }) window.history.replaceState(null, 'root', '/foo/3ΚΑΠΠΑ') @@ -287,51 +276,6 @@ test('throw error from loader upon initial load', async () => { expect(errorElement).toBeInTheDocument() }) -// https://github.com/TanStack/router/pull/7673 -test('#7673: aborted loader does not render the route component with undefined loaderData', async () => { - const abortError = new DOMException('Aborted', 'AbortError') - const routeComponentRendered = vi.fn() - const renderedError = vi.fn() - const rootRoute = createRootRoute({}) - const IndexComponent = defineComponent({ - setup() { - const data = indexRoute.useLoaderData() - return () => { - routeComponentRendered() - - return
{data.value.value}
- } - }, - }) - - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - loader: (): Promise<{ value: string }> => Promise.reject(abortError), - component: IndexComponent, - errorComponent: ({ error }) => { - renderedError(error) - return
indexErrorComponent
- }, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - }) - - render() - - expect(await screen.findByTestId('index-error')).toBeInTheDocument() - expect(screen.queryByTestId('index-content')).not.toBeInTheDocument() - expect(routeComponentRendered).not.toHaveBeenCalled() - expect(renderedError).toHaveBeenCalledWith(abortError) - expect( - router.state.matches.find((match) => match.routeId === indexRoute.id), - ).toMatchObject({ - status: 'error', - error: abortError, - }) -}) - test('throw error from beforeLoad when navigating to route', async () => { const rootRoute = createRootRoute({}) @@ -380,20 +324,6 @@ test('reproducer #4245', async () => { const LOADER_WAIT_TIME = 500 const rootRoute = createRootRoute({}) - const IndexComponent = defineComponent({ - setup() { - const data = indexRoute.useLoaderData() - return () => ( -
- - foo - - {data.value} -
- ) - }, - }) - const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', @@ -402,7 +332,17 @@ test('reproducer #4245', async () => { return 'index' }, - component: IndexComponent, + component: () => { + const data = indexRoute.useLoaderData() + return ( +
+ + foo + + {data.value} +
+ ) + }, }) const fooRoute = createRoute({ @@ -499,30 +439,6 @@ test('reproducer #4546', async () => { }) let counter = 0 - const Header = defineComponent({ - setup() { - const router = useRouter() - - const ctx = appRoute.useRouteContext() - return () => ( -
- Header Counter:{' '} -

{ctx.value.counter}

- -
- ) - }, - }) const appRoute = createRoute({ getParentRoute: () => rootRoute, id: '_app', @@ -542,12 +458,42 @@ test('reproducer #4546', async () => { }, }) - const IndexComponent = defineComponent({ - setup() { - const data = indexRoute.useLoaderData() + function Header() { + const router = useRouter() + const ctx = appRoute.useRouteContext() + return ( +
+ Header Counter:

{ctx.value.counter}

+ +
+ ) + } + + const indexRoute = createRoute({ + getParentRoute: () => appRoute, + path: '/', + loader: ({ context }) => { + return { + counter: context.counter, + } + }, + + component: () => { + const data = indexRoute.useLoaderData() const ctx = indexRoute.useRouteContext() - return () => ( + + return (
{ ) }, }) - - const indexRoute = createRoute({ + const idRoute = createRoute({ getParentRoute: () => appRoute, - path: '/', + path: '$id', loader: ({ context }) => { return { counter: context.counter, } }, - component: IndexComponent, - }) - const IdComponent = defineComponent({ - setup() { + component: () => { const data = idRoute.useLoaderData() - const ctx = idRoute.useRouteContext() - return () => ( + + return (
{ }, }) - const idRoute = createRoute({ - getParentRoute: () => appRoute, - path: '$id', - loader: ({ context }) => { - return { - counter: context.counter, - } - }, - - component: IdComponent, - }) - const routeTree = rootRoute.addChildren([ appRoute.addChildren([indexRoute, idRoute]), ]) @@ -671,7 +601,7 @@ test('reproducer #4546', async () => { expect(routeContext).toHaveTextContent('3') const loaderData = await screen.findByTestId('index-loader-data') - await waitFor(() => expect(loaderData).toHaveTextContent('3')) + expect(loaderData).toHaveTextContent('3') } fireEvent.click(invalidateRouterButton) @@ -701,11 +631,11 @@ test('reproducer #4546', async () => { expect(routeContext).toHaveTextContent('5') const loaderData = await screen.findByTestId('id-loader-data') - await waitFor(() => expect(loaderData).toHaveTextContent('5')) + expect(loaderData).toHaveTextContent('5') } }) -test('does not show pending UI when routes resolve before their thresholds', async () => { +test('clears pendingTimeout when match resolves', async () => { const defaultPendingComponentOnMountMock = vi.fn() const nestedPendingComponentOnMountMock = vi.fn() const fooPendingComponentOnMountMock = vi.fn() @@ -773,7 +703,7 @@ test('does not show pending UI when routes resolve before their thresholds', asy }) render() - await screen.findByText('Index page') + await router.latestLoadPromise const linkToFoo = await screen.findByTestId('link-to-foo') fireEvent.click(linkToFoo) const fooElement = await screen.findByText('Nested Foo page') @@ -787,7 +717,7 @@ test('does not show pending UI when routes resolve before their thresholds', asy expect(fooPendingComponentOnMountMock).not.toHaveBeenCalled() }) -test('navigating away from pending UI aborts its loader', async () => { +test('cancelMatches after pending timeout', async () => { function getPendingComponent(onMount: () => void) { const PendingComponent = () => { onMount() @@ -839,7 +769,7 @@ test('navigating away from pending UI aborts its loader', async () => { const routeTree = rootRoute.addChildren([fooRoute, barRoute]) const router = createRouter({ routeTree, history }) render() - await screen.findByText('Index page') + await router.latestLoadPromise const fooLink = await screen.findByTestId('link-to-foo') fireEvent.click(fooLink) await sleep(WAIT_TIME * 30) diff --git a/packages/vue-router/tests/not-found.test.tsx b/packages/vue-router/tests/not-found.test.tsx index cefc7becda..3cb4a78ec3 100644 --- a/packages/vue-router/tests/not-found.test.tsx +++ b/packages/vue-router/tests/not-found.test.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { afterEach, beforeEach, expect, test } from 'vitest' import { cleanup, render, screen } from '@testing-library/vue' @@ -371,23 +370,19 @@ test('beforeLoad notFound with routeId targets parent boundary and preserves par ), }) - const ParentNotFoundComponent = defineComponent({ - setup() { - const loaderData = parentRoute.useLoaderData() - return () => ( - - {loaderData.value.message} - - ) - }, - }) - const parentRoute = createRoute({ getParentRoute: () => rootRoute, path: '/parent', loader: () => ({ message: 'ready' }), component: () => , - notFoundComponent: ParentNotFoundComponent, + notFoundComponent: () => { + const loaderData = parentRoute.useLoaderData() + return ( + + {loaderData.value.message} + + ) + }, }) const childRoute = createRoute({ diff --git a/packages/vue-router/tests/optional-path-params.test.tsx b/packages/vue-router/tests/optional-path-params.test.tsx index 52dcd9ddb4..ca98aef616 100644 --- a/packages/vue-router/tests/optional-path-params.test.tsx +++ b/packages/vue-router/tests/optional-path-params.test.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { afterEach, describe, expect, it, vi } from 'vitest' import { cleanup, @@ -27,10 +26,12 @@ describe('Solid Router - Optional Path Parameters', () => { describe('Route matching with optional parameters', () => { it('should match route with no optional parameters', async () => { const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}/{-$slug}', + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -38,12 +39,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}/{-$slug}', - component: PostsComponent, - }) window.history.replaceState({}, '', '/posts') const router = createRouter({ @@ -59,10 +54,12 @@ describe('Solid Router - Optional Path Parameters', () => { it('should match route with one optional parameter', async () => { const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}/{-$slug}', + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -70,12 +67,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}/{-$slug}', - component: PostsComponent, - }) window.history.replaceState({}, '', '/posts/tech') const router = createRouter({ @@ -93,10 +84,12 @@ describe('Solid Router - Optional Path Parameters', () => { it('should match route with all optional parameters', async () => { const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}/{-$slug}', + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -104,12 +97,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}/{-$slug}', - component: PostsComponent, - }) window.history.replaceState({}, '', '/posts/tech/hello-world') const router = createRouter({ @@ -136,10 +123,12 @@ describe('Solid Router - Optional Path Parameters', () => { 'should handle mixed required and optional parameters: $path', async ({ path, expectedParams }) => { const rootRoute = createRootRoute() - const UsersComponent = defineComponent({ - setup() { + const usersRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/users/$id/{-$tab}', + component: () => { const params = usersRoute.useParams() - return () => ( + return (

User Profile

{JSON.stringify(params.value)}
@@ -147,12 +136,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const usersRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/users/$id/{-$tab}', - component: UsersComponent, - }) window.history.replaceState({}, '', path) const router = createRouter({ @@ -212,10 +195,12 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const IndexComponent = defineComponent({ - setup() { + const indexRoute = createRoute({ + getParentRoute: () => localeRoute, + path: '/', + component: () => { const context = indexRoute.useRouteContext() - return () => ( + return (

{context.value.content.title}

@@ -226,12 +211,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const indexRoute = createRoute({ - getParentRoute: () => localeRoute, - path: '/', - component: IndexComponent, - }) - window.history.replaceState({}, '', path) const router = createRouter({ @@ -498,10 +477,12 @@ describe('Solid Router - Optional Path Parameters', () => { ), }) - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}/{-$slug}', + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -510,12 +491,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}/{-$slug}', - component: PostsComponent, - }) - const router = createRouter({ routeTree: rootRoute.addChildren([indexRoute, postsRoute]), }) @@ -581,10 +556,12 @@ describe('Solid Router - Optional Path Parameters', () => { ), }) - const FilesComponent = defineComponent({ - setup() { + const filesRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/files/prefix{-$name}.txt', + component: () => { const params = filesRoute.useParams() - return () => ( + return (

Files

{JSON.stringify(params.value)}
@@ -593,12 +570,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const filesRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/files/prefix{-$name}.txt', - component: FilesComponent, - }) - const router = createRouter({ routeTree: rootRoute.addChildren([indexRoute, filesRoute]), }) @@ -616,57 +587,55 @@ describe('Solid Router - Optional Path Parameters', () => { describe('useNavigate with optional parameters', () => { it('should navigate with optional parameters programmatically', async () => { const rootRoute = createRootRoute() - const Component = defineComponent({ - setup() { - const navigate = useNavigate() - - const params = postsRoute.useParams() - return () => ( -
-
{JSON.stringify(params.value)}
- - - -
- ) - }, - }) const postsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/posts/{-$category}/{-$slug}', component: Component, }) + function Component() { + const navigate = useNavigate() + const params = postsRoute.useParams() + + return ( +
+
{JSON.stringify(params.value)}
+ + + +
+ ) + } // Start at a specific post window.history.replaceState({}, '', '/posts/tech/hello-world') @@ -698,39 +667,37 @@ describe('Solid Router - Optional Path Parameters', () => { it('should handle relative navigation with optional parameters', async () => { const rootRoute = createRootRoute() - const Component = defineComponent({ - setup() { - const navigate = useNavigate() - - const params = postsRoute.useParams() - return () => ( -
-

Posts

-
{JSON.stringify(params.value)}
- - -
- ) - }, - }) const postsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/posts/{-$category}', component: Component, }) + function Component() { + const navigate = useNavigate() + const params = postsRoute.useParams() + + return ( +
+

Posts

+
{JSON.stringify(params.value)}
+ + +
+ ) + } window.history.replaceState({}, '', '/posts') const router = createRouter({ @@ -812,10 +779,12 @@ describe('Solid Router - Optional Path Parameters', () => { 'should handle nested routes with optional parameters: $path', async ({ path, expected }) => { const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}', + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts Layout

@@ -827,16 +796,12 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}', - component: PostsComponent, - }) - - const PostComponent = defineComponent({ - setup() { + const postRoute = createRoute({ + getParentRoute: () => postsRoute, + path: '/{-$slug}', + component: () => { const params = postRoute.useParams() - return () => ( + return (

Post Detail

@@ -847,12 +812,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const postRoute = createRoute({ - getParentRoute: () => postsRoute, - path: '/{-$slug}', - component: PostComponent, - }) - window.history.replaceState({}, '', path) const router = createRouter({ @@ -876,20 +835,6 @@ describe('Solid Router - Optional Path Parameters', () => { it('should work with search parameters', async () => { const rootRoute = createRootRoute() - const Component = defineComponent({ - setup() { - const params = postsRoute.useParams() - - const search = postsRoute.useSearch() - return () => ( -
-

Posts

-
{JSON.stringify(params.value)}
-
{JSON.stringify(search.value)}
-
- ) - }, - }) const postsRoute = createRoute({ getParentRoute: () => rootRoute, path: '/posts/{-$category}', @@ -900,6 +845,18 @@ describe('Solid Router - Optional Path Parameters', () => { component: Component, }) + function Component() { + const params = postsRoute.useParams() + const search = postsRoute.useSearch() + return ( +
+

Posts

+
{JSON.stringify(params.value)}
+
{JSON.stringify(search.value)}
+
+ ) + } + window.history.replaceState({}, '', '/posts/tech?page=2&sort=title') const router = createRouter({ routeTree: rootRoute.addChildren([postsRoute]), @@ -932,10 +889,12 @@ describe('Solid Router - Optional Path Parameters', () => { 'should handle multiple consecutive optional parameters: $path', async ({ path, expectedParams }) => { const rootRoute = createRootRoute() - const DateComponent = defineComponent({ - setup() { + const dateRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/{-$year}/{-$month}/{-$day}', + component: () => { const params = dateRoute.useParams() - return () => ( + return (

Date Route

{JSON.stringify(params.value)}
@@ -944,12 +903,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const dateRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/{-$year}/{-$month}/{-$day}', - component: DateComponent, - }) - window.history.replaceState({}, '', path) const router = createRouter({ @@ -997,10 +950,12 @@ describe('Solid Router - Optional Path Parameters', () => { 'should handle routes with required param after optional param: $path', async ({ path, expected }) => { const rootRoute = createRootRoute() - const RoomsComponent = defineComponent({ - setup() { + const roomsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/{-$locale}/$rooms', + component: () => { const params = roomsRoute.useParams() - return () => ( + return (

Rooms

@@ -1015,12 +970,6 @@ describe('Solid Router - Optional Path Parameters', () => { }, }) - const roomsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/{-$locale}/$rooms', - component: RoomsComponent, - }) - window.history.replaceState({}, '', path) const router = createRouter({ @@ -1047,12 +996,14 @@ describe('Solid Router - Optional Path Parameters', () => { }) const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}', + loader: mockLoader, + component: () => { const data = postsRoute.useLoaderData() - const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -1061,13 +1012,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}', - loader: mockLoader, - component: PostsComponent, - }) window.history.replaceState({}, '', '/posts') const router = createRouter({ @@ -1104,10 +1048,13 @@ describe('Solid Router - Optional Path Parameters', () => { }) const rootRoute = createRootRoute() - const PostsComponent = defineComponent({ - setup() { + const postsRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/posts/{-$category}', + beforeLoad: mockBeforeLoad, + component: () => { const params = postsRoute.useParams() - return () => ( + return (

Posts

{JSON.stringify(params.value)}
@@ -1115,13 +1062,6 @@ describe('Solid Router - Optional Path Parameters', () => { ) }, }) - - const postsRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/posts/{-$category}', - beforeLoad: mockBeforeLoad, - component: PostsComponent, - }) window.history.replaceState({}, '', '/posts/tech') const router = createRouter({ diff --git a/packages/vue-router/tests/pending-fallback-promise-replacement.test.tsx b/packages/vue-router/tests/pending-fallback-promise-replacement.test.tsx deleted file mode 100644 index 8cab6d41f0..0000000000 --- a/packages/vue-router/tests/pending-fallback-promise-replacement.test.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { cleanup, render, screen } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { createControlledPromise } from '@tanstack/router-core' -import { - RouterProvider, - createMemoryHistory, - createRootRoute, - createRouter, -} from '../src' - -const testCleanups: Array<() => void | Promise> = [] - -afterEach(async () => { - vi.useRealTimers() - while (testCleanups.length) { - await testCleanups.pop()!() - } - cleanup() -}) - -test('a continuously visible fallback keeps its deadline across replacement loads', async () => { - const firstReload = createControlledPromise() - const secondReload = createControlledPromise() - const reloads = [firstReload, secondReload] - let loaderCall = 0 - - const rootRoute = createRootRoute({ - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
Pending
, - loader: () => { - const generation = ++loaderCall - const gate = reloads[generation - 2] - return gate ? gate.then(() => generation) : generation - }, - component: () =>
Content
, - }) - const router = createRouter({ - routeTree: rootRoute, - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - expect(await screen.findByText('Content')).toBeInTheDocument() - - vi.useFakeTimers() - const firstInvalidation = router.invalidate({ forcePending: true }) - const invalidations = [firstInvalidation] - testCleanups.push(async () => { - firstReload.resolve() - secondReload.resolve() - await Promise.allSettled(invalidations) - }) - await vi.advanceTimersByTimeAsync(0) - expect(screen.getByTestId('pending')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(25) - let secondSettled = false - const secondInvalidation = router - .invalidate({ forcePending: true }) - .then(() => { - secondSettled = true - }) - invalidations.push(secondInvalidation) - - firstReload.resolve() - secondReload.resolve() - await Promise.resolve() - - await vi.advanceTimersByTimeAsync(74) - expect(secondSettled).toBe(false) - expect(screen.getByTestId('pending')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(1) - await Promise.all(invalidations) - expect(screen.getByText('Content')).toBeInTheDocument() - expect(screen.queryByTestId('pending')).not.toBeInTheDocument() -}) diff --git a/packages/vue-router/tests/public-presentation-lane-contract.test.tsx b/packages/vue-router/tests/public-presentation-lane-contract.test.tsx deleted file mode 100644 index 0dd4069b96..0000000000 --- a/packages/vue-router/tests/public-presentation-lane-contract.test.tsx +++ /dev/null @@ -1,487 +0,0 @@ -import { cleanup, render, screen, waitFor } from '@testing-library/vue' -import { afterEach, describe, expect, test, vi } from 'vitest' -import { defineComponent, nextTick } from 'vue' -import { createControlledPromise } from '@tanstack/router-core' -import { - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - notFound, -} from '../src' - -afterEach(() => { - cleanup() - vi.useRealTimers() - vi.restoreAllMocks() -}) - -describe('public presentation lane contracts', () => { - test('a plain load retry presents pending UI over a committed error', async () => { - const retryStarted = createControlledPromise() - const retry = createControlledPromise() - let attempt = 0 - - const rootRoute = createRootRoute({ component: () => }) - const PageComponent = defineComponent({ - setup() { - const loaderData = pageRoute.useLoaderData() - return () =>
{loaderData.value}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - pendingMs: 0, - pendingMinMs: 0, - pendingComponent: () =>
Retrying page
, - loader: () => { - if (!attempt++) { - throw new Error('Initial failure') - } - retryStarted.resolve() - return retry - }, - errorComponent: () =>
Page failed
, - component: PageComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([pageRoute]), - history: createMemoryHistory({ initialEntries: ['/page'] }), - }) - vi.spyOn(console, 'warn').mockImplementation(() => {}) - - render() - expect(await screen.findByText('Page failed')).toBeInTheDocument() - - let retryLoad!: Promise - try { - retryLoad = router.load() - await retryStarted - await nextTick() - expect(screen.getByText('Retrying page')).toBeInTheDocument() - expect(screen.queryByText('Page failed')).not.toBeInTheDocument() - - retry.resolve('Page recovered') - await retryLoad - await nextTick() - expect(screen.getByText('Page recovered')).toBeInTheDocument() - } finally { - retry.resolve('Page recovered') - await retryLoad - } - }) - - test('same-boundary takeover republishes successor search without restarting pendingMinMs', async () => { - const firstGate = createControlledPromise() - const secondGate = createControlledPromise() - - const rootRoute = createRootRoute({ component: () => }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Home
, - }) - const PageComponent = defineComponent({ - setup() { - const search = pageRoute.useSearch() - return () =>
Page revision {search.value.revision}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - validateSearch: (search: Record) => ({ - revision: Number(search.revision), - }), - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
Loading page
, - beforeLoad: ({ search }) => - search.revision === 1 ? firstGate : secondGate, - component: PageComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, pageRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - expect(await screen.findByText('Home')).toBeInTheDocument() - await waitFor(() => expect(router.state.status).toBe('idle')) - vi.useFakeTimers() - vi.setSystemTime(0) - - let successorSettled = false - let settledAtOriginalDeadline = false - let renderedAtOriginalDeadline = false - try { - void router.navigate({ - to: '/page', - search: { revision: 1 }, - }) - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByText('Loading page')).toBeInTheDocument() - expect(router.state.matches.at(-1)?.search).toMatchObject({ revision: 1 }) - - await vi.advanceTimersByTimeAsync(25) - - const secondNavigation = router.navigate({ - to: '/page', - search: { revision: 2 }, - }) - await vi.advanceTimersByTimeAsync(0) - await nextTick() - - expect(screen.getByText('Loading page')).toBeInTheDocument() - expect(router.state.location.search).toMatchObject({ revision: 2 }) - expect(router.state.matches.at(-1)?.search).toMatchObject({ revision: 2 }) - - void secondNavigation.then(() => { - successorSettled = true - }) - secondGate.resolve() - await Promise.resolve() - - await vi.advanceTimersByTimeAsync(74) - await nextTick() - expect(successorSettled).toBe(false) - expect(screen.getByText('Loading page')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(5) - await Promise.resolve() - await nextTick() - - settledAtOriginalDeadline = successorSettled - renderedAtOriginalDeadline = - screen.queryByText('Page revision 2') !== null - } finally { - firstGate.resolve() - secondGate.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await nextTick() - } - - expect({ - settled: settledAtOriginalDeadline, - rendered: renderedAtOriginalDeadline, - }).toEqual({ settled: true, rendered: true }) - expect(screen.getByText('Page revision 2')).toBeInTheDocument() - expect(screen.queryByText('Loading page')).not.toBeInTheDocument() - }) - - test('an earlier pending-ineligible boundary retires a deeper pending minimum', async () => { - const childReloadStarted = createControlledPromise() - const childReload = createControlledPromise() - const parentReloadStarted = createControlledPromise() - const parentReload = createControlledPromise() - let childLoads = 0 - - const rootRoute = createRootRoute({ - validateSearch: (search: Record) => ({ - revision: Number(search.revision), - }), - component: () => , - }) - const parentRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/parent', - loaderDeps: ({ search }) => ({ revision: search.revision }), - beforeLoad: ({ search }) => { - if (search.revision === 2) { - parentReloadStarted.resolve() - return parentReload - } - return undefined - }, - component: () => , - }) - const ChildComponent = defineComponent({ - setup() { - const search = childRoute.useSearch() - return () =>
Child revision {search.value.revision}
- }, - }) - - const childRoute = createRoute({ - getParentRoute: () => parentRoute, - path: '/child', - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
Loading child
, - loader: { - staleReloadMode: 'blocking', - handler: () => { - if (childLoads++) { - childReloadStarted.resolve() - return childReload - } - return undefined - }, - }, - component: ChildComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([parentRoute.addChildren([childRoute])]), - history: createMemoryHistory({ - initialEntries: ['/parent/child?revision=1'], - }), - }) - - render() - expect(await screen.findByText('Child revision 1')).toBeInTheDocument() - await waitFor(() => expect(router.state.status).toBe('idle')) - vi.useFakeTimers() - vi.setSystemTime(0) - - let firstNavigation: Promise | undefined - let secondNavigation: Promise | undefined - let settledBeforeOldMinimum = false - let renderedBeforeOldMinimum = false - try { - firstNavigation = router.invalidate({ - filter: (match) => match.routeId === childRoute.id, - forcePending: true, - }) - await childReloadStarted - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByText('Loading child')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(25) - secondNavigation = router.navigate({ - to: '/parent/child', - search: { revision: 2 }, - }) - await parentReloadStarted - expect(screen.getByText('Loading child')).toBeInTheDocument() - - childReload.resolve() - const successor = secondNavigation - void successor.then(() => { - settledBeforeOldMinimum = true - }) - parentReload.resolve() - await vi.advanceTimersByTimeAsync(5) - await nextTick() - renderedBeforeOldMinimum = screen.queryByText('Child revision 2') !== null - } finally { - childReload.resolve() - parentReload.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await Promise.allSettled( - [firstNavigation, secondNavigation].filter( - (navigation): navigation is Promise => !!navigation, - ), - ) - } - - expect({ - settled: settledBeforeOldMinimum, - rendered: renderedBeforeOldMinimum, - }).toEqual({ settled: true, rendered: true }) - }) - - test('same-boundary timing survives a private retained-context barrier', async () => { - const retainedStarted = createControlledPromise() - const retainedReady = createControlledPromise() - const firstPage = createControlledPromise() - const secondPageStarted = createControlledPromise() - const secondPage = createControlledPromise() - - const RootComponent = defineComponent({ - setup() { - const context = rootRoute.useRouteContext() - return () => ( -
-
Root revision {context.value.rootRevision}
- -
- ) - }, - }) - - const rootRoute = createRootRoute({ - validateSearch: (search: Record) => ({ - revision: Number(search.revision) || 0, - }), - beforeLoad: ({ search }) => { - if (search.revision === 2) { - retainedStarted.resolve() - return retainedReady.then(() => ({ rootRevision: 2 })) - } - return { rootRevision: search.revision } - }, - component: RootComponent, - }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Home
, - }) - const PageComponent = defineComponent({ - setup() { - const search = pageRoute.useSearch() - return () =>
Page revision {search.value.revision}
- }, - }) - - const pageRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/page', - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: () =>
Loading page
, - beforeLoad: ({ search }) => { - if (search.revision === 1) { - return firstPage - } - secondPageStarted.resolve() - return secondPage - }, - component: PageComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute, pageRoute]), - history: createMemoryHistory({ initialEntries: ['/'] }), - }) - - render() - expect(await screen.findByText('Home')).toBeInTheDocument() - vi.useFakeTimers() - vi.setSystemTime(0) - - let firstNavigation: Promise | undefined - let secondNavigation: Promise | undefined - try { - firstNavigation = router.navigate({ - to: '/page', - search: { revision: 1 }, - }) - await vi.advanceTimersByTimeAsync(0) - await nextTick() - expect(screen.getByText('Loading page')).toBeInTheDocument() - expect(screen.getByText('Root revision 1')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(25) - secondNavigation = router.navigate({ - to: '/page', - search: { revision: 2 }, - }) - await retainedStarted - await nextTick() - - expect(screen.getByText('Loading page')).toBeInTheDocument() - expect(screen.getByText('Root revision 1')).toBeInTheDocument() - - retainedReady.resolve() - await secondPageStarted - await nextTick() - expect(screen.getByText('Loading page')).toBeInTheDocument() - expect(screen.getByText('Root revision 2')).toBeInTheDocument() - - let settled = false - const successor = secondNavigation - void successor.then(() => { - settled = true - }) - secondPage.resolve() - await vi.advanceTimersByTimeAsync(74) - await nextTick() - expect(settled).toBe(false) - expect(screen.getByText('Loading page')).toBeInTheDocument() - - await vi.advanceTimersByTimeAsync(5) - await Promise.all([firstNavigation, successor]) - await nextTick() - expect(screen.getByText('Page revision 2')).toBeInTheDocument() - } finally { - retainedReady.resolve() - firstPage.resolve() - secondPage.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await Promise.allSettled( - [firstNavigation, secondNavigation].filter( - (navigation): navigation is Promise => !!navigation, - ), - ) - } - }) - - test('an exact-boundary terminal result supersedes an unrendered pending offer', async () => { - const pendingRenderStarted = createControlledPromise() - const pendingRender = createControlledPromise() - const terminalLoadStarted = createControlledPromise() - const terminalLoad = createControlledPromise() - const Pending = defineComponent({ - async setup() { - pendingRenderStarted.resolve() - await pendingRender - return () =>
Root pending
- }, - }) - - const rootRoute = createRootRoute({ - validateSearch: (search: Record) => ({ - terminal: search.terminal === true, - }), - pendingMs: 0, - pendingMinMs: 100, - pendingComponent: Pending, - beforeLoad: async ({ search }) => { - if (search.terminal) { - terminalLoadStarted.resolve() - await terminalLoad - throw notFound() - } - }, - notFoundComponent: () =>
Root not found
, - component: () => , - }) - const indexRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/', - component: () =>
Home
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([indexRoute]), - history: createMemoryHistory({ initialEntries: ['/?terminal=false'] }), - }) - - render() - expect(await screen.findByText('Home')).toBeInTheDocument() - await waitFor(() => expect(router.state.status).toBe('idle')) - vi.useFakeTimers() - vi.setSystemTime(0) - - let navigation: Promise | undefined - try { - navigation = router.navigate({ - to: '/', - search: { terminal: true }, - }) - await terminalLoadStarted - await vi.advanceTimersByTimeAsync(0) - await pendingRenderStarted - await nextTick() - expect(screen.getByText('Home')).toBeInTheDocument() - - terminalLoad.resolve() - await navigation - await nextTick() - - expect(screen.getByText('Root not found')).toBeInTheDocument() - expect(Date.now()).toBe(0) - } finally { - terminalLoad.resolve() - pendingRender.resolve() - await vi.advanceTimersByTimeAsync(1_000) - await Promise.allSettled(navigation ? [navigation] : []) - } - }) -}) diff --git a/packages/vue-router/tests/redirect.test.tsx b/packages/vue-router/tests/redirect.test.tsx index e26fe9a372..b7ba2e1af3 100644 --- a/packages/vue-router/tests/redirect.test.tsx +++ b/packages/vue-router/tests/redirect.test.tsx @@ -1,12 +1,11 @@ import { cleanup, fireEvent, render, screen } from '@testing-library/vue' -import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' +import { afterEach, describe, expect, test, vi } from 'vitest' import { Link, Outlet, RouterProvider, - createBrowserHistory, createMemoryHistory, createRootRoute, createRoute, @@ -16,17 +15,8 @@ import { } from '../src' import { sleep } from './utils' -import type { RouterHistory } from '../src' - -let history: RouterHistory - -beforeEach(() => { - history = createBrowserHistory() - expect(window.location.pathname).toBe('/') -}) afterEach(() => { - history.destroy() vi.clearAllMocks() vi.resetAllMocks() window.history.replaceState(null, 'root', '/') @@ -84,7 +74,7 @@ describe('redirect', () => { aboutRoute, indexRoute, ]) - const router = createRouter({ routeTree, history }) + const router = createRouter({ routeTree }) render() @@ -206,7 +196,7 @@ describe('redirect', () => { aboutRoute, indexRoute, ]) - const router = createRouter({ routeTree, history }) + const router = createRouter({ routeTree }) render() @@ -284,7 +274,7 @@ describe('redirect', () => { indexRoute, finalRoute, ]) - const router = createRouter({ routeTree, history }) + const router = createRouter({ routeTree }) render() @@ -302,4 +292,108 @@ describe('redirect', () => { expect(window.location.pathname).toBe('/final') }) }) + + describe('SSR', () => { + test('when `redirect` is thrown in `beforeLoad`', async () => { + const rootRoute = createRootRoute() + + const indexRoute = createRoute({ + path: '/', + getParentRoute: () => rootRoute, + beforeLoad: () => { + throw redirect({ + to: '/about', + }) + }, + }) + + const aboutRoute = createRoute({ + path: '/about', + getParentRoute: () => rootRoute, + component: () => { + return <>About + }, + }) + + const router = createRouter({ + routeTree: rootRoute.addChildren([indexRoute, aboutRoute]), + // Mock server mode + isServer: true, + history: createMemoryHistory({ + initialEntries: ['/'], + }), + }) + + await router.load() + + expect(router.state.redirect).toBeDefined() + expect(router.state.redirect).toBeInstanceOf(Response) + const redirectResponse = router.state.redirect! + + expect(redirectResponse.options).toEqual({ + _fromLocation: expect.objectContaining({ + hash: '', + href: '/', + pathname: '/', + search: {}, + searchStr: '', + }), + to: '/about', + href: '/about', + statusCode: 307, + }) + }) + + test('when `redirect` is thrown in `loader`', async () => { + const rootRoute = createRootRoute() + + const indexRoute = createRoute({ + path: '/', + getParentRoute: () => rootRoute, + loader: () => { + throw redirect({ + to: '/about', + }) + }, + }) + + const aboutRoute = createRoute({ + path: '/about', + getParentRoute: () => rootRoute, + component: () => { + return <>About + }, + }) + + const router = createRouter({ + history: createMemoryHistory({ + initialEntries: ['/'], + }), + routeTree: rootRoute.addChildren([indexRoute, aboutRoute]), + // Mock server mode + isServer: true, + }) + + await router.load() + + const currentRedirect = router.state.redirect + + expect(currentRedirect).toBeDefined() + expect(currentRedirect).toBeInstanceOf(Response) + const redirectResponse = currentRedirect! + + expect(redirectResponse.options).toEqual({ + _fromLocation: expect.objectContaining({ + hash: '', + href: '/', + pathname: '/', + search: {}, + searchStr: '', + }), + to: '/about', + href: '/about', + statusCode: 307, + }) + }) + }) }) diff --git a/packages/vue-router/tests/remountDeps.test.tsx b/packages/vue-router/tests/remountDeps.test.tsx deleted file mode 100644 index ff9bf6808e..0000000000 --- a/packages/vue-router/tests/remountDeps.test.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import * as Vue from 'vue' -import { cleanup, render, screen } from '@testing-library/vue' -import { afterEach, expect, test, vi } from 'vitest' -import { - Outlet, - RouterProvider, - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from '../src' - -afterEach(() => { - cleanup() -}) - -function setup(remountOnParams: boolean | 'falsy' = false) { - const mounted = vi.fn() - const unmounted = vi.fn() - const rootRoute = createRootRoute({ component: () => }) - const ItemComponent = Vue.defineComponent({ - name: 'ItemComponent', - setup() { - const params = itemRoute.useParams() - - Vue.onMounted(mounted) - Vue.onUnmounted(unmounted) - - return () =>
Item {params.value.itemId}
- }, - }) - const itemRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/items/$itemId', - component: ItemComponent, - remountDeps: - remountOnParams === 'falsy' - ? ({ params }) => (params.itemId === 'one' ? false : 0) - : remountOnParams - ? ({ params }) => params - : undefined, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([itemRoute]), - history: createMemoryHistory({ initialEntries: ['/items/one'] }), - }) - - render() - - return { mounted, router, unmounted } -} - -async function navigateToSecondItem( - router: ReturnType['router'], -) { - await router.navigate({ - to: '/items/$itemId', - params: { itemId: 'two' }, - }) -} - -test('keeps an active route component mounted when params change by default', async () => { - const { mounted, router, unmounted } = setup() - - expect(await screen.findByText('Item one')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(1) - expect(unmounted).not.toHaveBeenCalled() - - await navigateToSecondItem(router) - - expect(await screen.findByText('Item two')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(1) - expect(unmounted).not.toHaveBeenCalled() -}) - -test('remounts an active route component when params are remount deps', async () => { - const { mounted, router, unmounted } = setup(true) - - expect(await screen.findByText('Item one')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(1) - - await navigateToSecondItem(router) - - expect(await screen.findByText('Item two')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(2) - expect(unmounted).toHaveBeenCalledTimes(1) -}) - -test('remounts when remount deps change between falsy values', async () => { - const { mounted, router, unmounted } = setup('falsy') - - expect(await screen.findByText('Item one')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(1) - - await navigateToSecondItem(router) - - expect(await screen.findByText('Item two')).toBeInTheDocument() - expect(mounted).toHaveBeenCalledTimes(2) - expect(unmounted).toHaveBeenCalledTimes(1) -}) diff --git a/packages/vue-router/tests/renderRouterToStream.test.tsx b/packages/vue-router/tests/renderRouterToStream.test.tsx index 656e8a54b5..527bfa0e03 100644 --- a/packages/vue-router/tests/renderRouterToStream.test.tsx +++ b/packages/vue-router/tests/renderRouterToStream.test.tsx @@ -4,30 +4,12 @@ import { normalizeSsrResponse, } from '@tanstack/router-core/ssr/server' import { createMemoryHistory, createRootRoute, createRouter } from '../src' -import type { RouterManagedTag } from '@tanstack/router-core' -import type * as RouterSsrServer from '@tanstack/router-core/ssr/server' import type * as VueServerRenderer from 'vue/server-renderer' const rendererMocks = vi.hoisted(() => ({ - renderToWebStream: vi.fn(), + pipeToWebWritable: vi.fn(), renderToString: vi.fn(), })) -const routerTransformMocks = vi.hoisted(() => ({ - readableOptions: vi.fn(), -})) - -vi.mock('@tanstack/router-core/ssr/server', async (importOriginal) => { - const actual = await importOriginal() - return { - ...actual, - transformReadableStreamWithRouter: ( - ...args: Parameters - ) => { - routerTransformMocks.readableOptions(args[2]) - return actual.transformReadableStreamWithRouter(...args) - }, - } -}) vi.mock('vue/server-renderer', async () => { const actual = await vi.importActual( @@ -35,15 +17,11 @@ vi.mock('vue/server-renderer', async () => { ) return { ...actual, - renderToWebStream: rendererMocks.renderToWebStream, + pipeToWebWritable: rendererMocks.pipeToWebWritable, renderToString: rendererMocks.renderToString, } }) -const actualVueServerRenderer = await vi.importActual( - 'vue/server-renderer', -) - // Imported after mock so the wrapper picks up the mocked binding. const { renderRouterToStream } = await import('../src/ssr/renderRouterToStream') @@ -54,9 +32,8 @@ function unwrapResponse( } afterEach(() => { - rendererMocks.renderToWebStream.mockReset() + rendererMocks.pipeToWebWritable.mockReset() rendererMocks.renderToString.mockReset() - routerTransformMocks.readableOptions.mockReset() vi.restoreAllMocks() }) @@ -84,40 +61,14 @@ function drainBody(response: Response) { })().catch(() => true) } -function createManualVueStream() { - let controller!: ReadableStreamDefaultController - const cancel = vi.fn() - const stream = new ReadableStream({ - start(nextController) { - controller = nextController - }, - cancel, - }) - return { stream, controller, cancel } -} - -function renderScript(tag: RouterManagedTag) { - const attrs = tag.attrs ?? {} - const id = attrs.id ? ` id="${attrs.id}"` : '' - const nonce = attrs.nonce ? ` nonce="${attrs.nonce}"` : '' - const streamPart = - 'data-tsr-stream-part' in attrs ? ' data-tsr-stream-part=""' : '' - return `${tag.children ?? ''}` -} - describe('renderRouterToStream - sync setup failures', () => { - test('bot string response preserves hydration scripts and cleans up', async () => { + test('bot string response injects final scripts and cleans up', async () => { + rendererMocks.renderToString.mockResolvedValueOnce( + '
bot
', + ) const router = await buildRouter() await router.serverSsr!.dehydrate() const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const initialScripts = router.serverSsr!.takeInitialHydrationScriptTags()! - expect(initialScripts.boundary.attrs).not.toHaveProperty('id') - const renderedScripts = [...initialScripts.before, initialScripts.boundary] - .map(renderScript) - .join('') - rendererMocks.renderToString.mockResolvedValueOnce( - `
bot
${renderedScripts}`, - ) const response = unwrapResponse( await renderRouterToStream({ @@ -132,279 +83,82 @@ describe('renderRouterToStream - sync setup failures', () => { const html = await response.text() expect(html).toContain('$_TSR.e()') - expect(html).toContain(initialScripts.boundary.children) expect(html.indexOf('$_TSR.e()')).toBeLessThan(html.indexOf('')) expect(cleanup).toHaveBeenCalledOnce() expect(router.serverSsr).toBeUndefined() }) - test('request abort stops a bot wait and removes its temporary listener', async () => { - rendererMocks.renderToString.mockImplementationOnce( - () => new Promise(() => {}), - ) - const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const abortController = new AbortController() - const request = new Request('http://localhost/', { - headers: { 'User-Agent': 'Googlebot' }, - signal: abortController.signal, + test('pipeToWebWritable sync throw terminates response stream', async () => { + rendererMocks.pipeToWebWritable.mockImplementationOnce(() => { + throw new Error('forced-sync-setup-throw') }) - const addEventListener = vi.spyOn(request.signal, 'addEventListener') - const reason = new Error('bot-request-gone') - - const responsePromise = renderRouterToStream({ - request, - router, - responseHeaders: new Headers(), - App: { template: '
' } as any, - }) - await Promise.resolve() - abortController.abort(reason) - - await expect(responsePromise).rejects.toBe(reason) - // The shared abort waiter registers once; `{ once: true }` retires it. - expect( - addEventListener.mock.calls.filter(([type]) => type === 'abort'), - ).toHaveLength(1) - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - test('an already-aborted bot request does not start string rendering', async () => { - const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const abortController = new AbortController() - const reason = new Error('bot-already-gone') - abortController.abort(reason) - - await expect( - renderRouterToStream({ - request: new Request('http://localhost/', { - headers: { 'User-Agent': 'Googlebot' }, - signal: abortController.signal, - }), - router, - responseHeaders: new Headers(), - App: { template: '
' } as any, - }), - ).rejects.toBe(reason) - - expect(rendererMocks.renderToString).not.toHaveBeenCalled() - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - test('prepends one doctype without wrapping the renderer stream', async () => { - const router = await buildRouter() - await router.serverSsr!.dehydrate() - const initialScripts = router.serverSsr!.takeInitialHydrationScriptTags()! - const renderedScripts = [...initialScripts.before, initialScripts.boundary] - .map(renderScript) - .join('') - const appHtml = `
app
${renderedScripts}` - rendererMocks.renderToWebStream.mockReturnValueOnce( - new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode(appHtml)) - controller.close() - }, - }), - ) - - const response = unwrapResponse( - await renderRouterToStream({ - request: new Request('http://localhost/'), - router, - responseHeaders: new Headers(), - App: { template: '
' } as any, - }), - ) - const html = await response.text() - - expect(html).toBe(`${appHtml}`) - expect(html.match(//g)).toHaveLength(1) - expect(router.serverSsr).toBeUndefined() - }) - - test('already-aborted requests do not start the Vue producer', async () => { - const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const abortController = new AbortController() - const reason = new Error('already-gone') - abortController.abort(reason) - - await expect( - renderRouterToStream({ - request: new Request('http://localhost/', { - signal: abortController.signal, - }), - router, - responseHeaders: new Headers(), - App: { template: '
' } as any, - }), - ).rejects.toBe(reason) - - expect(rendererMocks.renderToWebStream).not.toHaveBeenCalled() - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - test('an abort during producer setup rejects before a response', async () => { - const abortController = new AbortController() - const reason = new Error('reentrant-abort') - rendererMocks.renderToWebStream.mockImplementationOnce( - actualVueServerRenderer.renderToWebStream, - ) const router = await buildRouter() - await expect( - renderRouterToStream({ - request: new Request('http://localhost/', { - signal: abortController.signal, - }), - router, - responseHeaders: new Headers(), - App: { - setup() { - abortController.abort(reason) - return () => null - }, - }, - }), - ).rejects.toBe(reason) - - expect(router.serverSsr).toBeUndefined() - }) - - test('real synchronous renderer failure rejects before creating a response', async () => { - const setupError = new Error('real-vue-setup-failure') - rendererMocks.renderToWebStream.mockImplementationOnce( - actualVueServerRenderer.renderToWebStream, - ) - const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const originalServerSsr = router.serverSsr! - - const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) - try { - await expect( - renderRouterToStream({ - request: new Request('http://localhost/'), - router, - responseHeaders: new Headers(), - App: { - setup() { - throw setupError - }, - }, - }), - ).rejects.toBe(setupError) - - expect(routerTransformMocks.readableOptions).not.toHaveBeenCalled() - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - } finally { - errorSpy.mockRestore() - warnSpy.mockRestore() - originalServerSsr.cleanup() - } - }) - - test('request abort drops later Vue writes and terminates the response', async () => { - const vue = createManualVueStream() - rendererMocks.renderToWebStream.mockReturnValueOnce(vue.stream) - - const router = await buildRouter() - const abortController = new AbortController() - const request = new Request('http://localhost/', { - signal: abortController.signal, - }) - const addEventListener = vi.spyOn(request.signal, 'addEventListener') const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) try { const response = unwrapResponse( await renderRouterToStream({ - request, + request: new Request('http://localhost/'), router, responseHeaders: new Headers(), App: { template: '
' } as any, }), ) - expect( - addEventListener.mock.calls.filter(([type]) => type === 'abort'), - ).toHaveLength(1) - const reason = new Error('client-gone') - abortController.abort(reason) - expect(response.body).not.toBeNull() + const terminated = await Promise.race([ + drainBody(response), + new Promise((resolve) => setTimeout(() => resolve(false), 2000)), + ]) - expect(await drainBody(response)).toBe(true) - expect(vue.cancel).toHaveBeenCalledWith(reason) - expect(() => - vue.controller.enqueue(new TextEncoder().encode('
')), - ).toThrow() + expect(terminated).toBe(true) } finally { errorSpy.mockRestore() router.serverSsr?.cleanup() } }) - test('downstream cancellation stops Vue writes and cleans up once', async () => { - const vue = createManualVueStream() - rendererMocks.renderToWebStream.mockReturnValueOnce(vue.stream) - - const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - const response = unwrapResponse( - await renderRouterToStream({ - request: new Request('http://localhost/'), - router, - responseHeaders: new Headers(), - App: { template: '
' } as any, - }), + test('request abort drops later Vue writes and terminates response stream', async () => { + let vueWriter: WritableStreamDefaultWriter | undefined + rendererMocks.pipeToWebWritable.mockImplementationOnce( + ( + _app: unknown, + _context: unknown, + writable: WritableStream, + ) => { + vueWriter = writable.getWriter() + }, ) - await response.body!.cancel('consumer-gone') - expect(vue.cancel).toHaveBeenCalledWith('consumer-gone') - expect(() => - vue.controller.enqueue(new TextEncoder().encode('
')), - ).toThrow() - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() - }) - - test('a renderer buffer failure errors the response body', async () => { - const renderError = new Error('vue-buffer-failed') - rendererMocks.renderToWebStream.mockImplementationOnce( - actualVueServerRenderer.renderToWebStream, - ) const router = await buildRouter() - const cleanup = vi.spyOn(router.serverSsr!, 'cleanup') - router.serverSsr!.disableHydration() + const abortController = new AbortController() const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) - const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {}) try { const response = unwrapResponse( await renderRouterToStream({ - request: new Request('http://localhost/'), + request: new Request('http://localhost/', { + signal: abortController.signal, + }), router, responseHeaders: new Headers(), - App: { - ssrRender(_context: unknown, push: (value: unknown) => void) { - push('partial') - push(Promise.reject(renderError)) - }, - } as any, + App: { template: '
' } as any, }), ) - await expect(response.text()).rejects.toBe(renderError) - expect(cleanup).toHaveBeenCalledOnce() - expect(router.serverSsr).toBeUndefined() + expect(vueWriter).toBeDefined() + abortController.abort(new Error('client-gone')) + + await expect( + vueWriter!.write(new TextEncoder().encode('
')), + ).resolves.toBeUndefined() + + const terminated = await Promise.race([ + drainBody(response), + new Promise((resolve) => setTimeout(() => resolve(false), 2000)), + ]) + + expect(terminated).toBe(true) } finally { errorSpy.mockRestore() - warnSpy.mockRestore() router.serverSsr?.cleanup() } }) diff --git a/packages/vue-router/tests/route.test.tsx b/packages/vue-router/tests/route.test.tsx index 6547de6634..70930e7ad4 100644 --- a/packages/vue-router/tests/route.test.tsx +++ b/packages/vue-router/tests/route.test.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { cleanup, render, screen } from '@testing-library/vue' import { afterEach, beforeEach, describe, expect, it, test, vi } from 'vitest' @@ -208,25 +207,17 @@ describe('onEnter event', () => { describe('useLoaderDeps', () => { test('returns a Ref', async () => { const rootRoute = createRootRoute() - const IndexComponent = defineComponent({ - setup() { - const deps = indexRoute.useLoaderDeps() - return () => { - // deps should be a Vue ref, so we access .value to get the value - expect(typeof deps).toBe('object') - - expect(deps.value).toEqual({ testDep: 'value' }) - - return
Index
- } - }, - }) - const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', loaderDeps: ({ search }) => ({ testDep: 'value' }), - component: IndexComponent, + component: () => { + const deps = indexRoute.useLoaderDeps() + // deps should be a Vue ref, so we access .value to get the value + expect(typeof deps).toBe('object') + expect(deps.value).toEqual({ testDep: 'value' }) + return
Index
+ }, }) const routeTree = rootRoute.addChildren([indexRoute]) const router = createRouter({ routeTree, history }) @@ -237,27 +228,18 @@ describe('useLoaderDeps', () => { test('returns a Ref via Route API', async () => { const rootRoute = createRootRoute() - const IndexComponent = defineComponent({ - setup() { - const api = getRouteApi('/') - - const deps = api.useLoaderDeps() - return () => { - // deps should be a Vue ref, so we access .value to get the value - expect(typeof deps).toBe('object') - - expect(deps.value).toEqual({ testDep: 'api-value' }) - - return
Index with API
- } - }, - }) - const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', loaderDeps: ({ search }) => ({ testDep: 'api-value' }), - component: IndexComponent, + component: () => { + const api = getRouteApi('/') + const deps = api.useLoaderDeps() + // deps should be a Vue ref, so we access .value to get the value + expect(typeof deps).toBe('object') + expect(deps.value).toEqual({ testDep: 'api-value' }) + return
Index with API
+ }, }) const routeTree = rootRoute.addChildren([indexRoute]) const router = createRouter({ routeTree, history }) diff --git a/packages/vue-router/tests/routeApi.test-d.tsx b/packages/vue-router/tests/routeApi.test-d.tsx index 073e9fd395..b2b4163837 100644 --- a/packages/vue-router/tests/routeApi.test-d.tsx +++ b/packages/vue-router/tests/routeApi.test-d.tsx @@ -62,12 +62,6 @@ describe('getRouteApi', () => { invoiceId: string }> >() - - expectTypeOf( - invoiceRouteApi.useParams({ - shouldThrow: false, - }), - ).toEqualTypeOf>() }) test('useContext', () => { expectTypeOf( @@ -84,12 +78,6 @@ describe('getRouteApi', () => { page: number }> >() - - expectTypeOf( - invoiceRouteApi.useSearch({ - shouldThrow: false, - }), - ).toEqualTypeOf>() }) test('useLoaderData', () => { expectTypeOf(invoiceRouteApi.useLoaderData()).toEqualTypeOf< @@ -109,16 +97,6 @@ describe('getRouteApi', () => { expectTypeOf(invoiceRouteApi.useMatch()).toEqualTypeOf< Vue.Ref> >() - - expectTypeOf( - invoiceRouteApi.useMatch({ - shouldThrow: false, - }), - ).toEqualTypeOf< - Vue.Ref< - MakeRouteMatch | undefined - > - >() }) }) diff --git a/packages/vue-router/tests/routeContext.test.tsx b/packages/vue-router/tests/routeContext.test.tsx index 8e37527844..53db6aa42f 100644 --- a/packages/vue-router/tests/routeContext.test.tsx +++ b/packages/vue-router/tests/routeContext.test.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { cleanup, fireEvent, render, screen } from '@testing-library/vue' import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' import { z } from 'zod' @@ -72,12 +71,20 @@ describe('context function', () => { ) }, }) - const DetailComponent = defineComponent({ - setup() { + const detailRoute = createRoute({ + getParentRoute: () => rootRoute, + path: '/detail/$id', + params: { + parse: (p) => z.object({ id: z.coerce.number() }).parse(p), + stringify: (p) => ({ id: `${p.id}` }), + }, + context: (args) => { + mockContextFn(args.params) + }, + component: () => { const id = detailRoute.useParams({ select: (params) => params.id }) - const navigate = detailRoute.useNavigate() - return () => ( + return (

Detail page: {id.value}

- - - ) - }, - }) + useBlocker({ shouldBlockFn: () => false }) + + return ( + <> +

Index

+ + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -76,20 +76,19 @@ describe('useBlocker', () => { test('does not block navigation when disabled', async () => { const rootRoute = createRootRoute() - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() - useBlocker({ shouldBlockFn: () => true, disabled: true }) - return () => ( - <> -

Index

- - - - ) - }, - }) + useBlocker({ shouldBlockFn: () => true, disabled: true }) + + return ( + <> +

Index

+ + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -129,20 +128,19 @@ describe('useBlocker', () => { test('blocks navigation when enabled', async () => { const rootRoute = createRootRoute() - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() - useBlocker({ shouldBlockFn: () => true }) - return () => ( - <> -

Index

- - - - ) - }, - }) + useBlocker({ shouldBlockFn: () => true }) + + return ( + <> +

Index

+ + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -184,22 +182,21 @@ describe('useBlocker', () => { const shouldBlockFn = vi.fn().mockReturnValue(true) - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() - useBlocker({ shouldBlockFn }) - return () => ( - <> -

Index

- - - - ) - }, - }) + useBlocker({ shouldBlockFn }) + + return ( + <> +

Index

+ + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -259,30 +256,29 @@ describe('useBlocker', () => { const shouldBlockFn = vi.fn().mockReturnValue(true) - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() - useBlocker({ shouldBlockFn }) - return () => ( - <> -

Index

- - - - ) - }, - }) + useBlocker({ shouldBlockFn }) + + return ( + <> +

Index

+ + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -344,30 +340,29 @@ describe('useBlocker', () => { test('conditionally blocking navigation works', async () => { const rootRoute = createRootRoute() - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() - useBlocker({ - shouldBlockFn: ({ next }) => { - if (next.fullPath === '/posts') { - return true - } - return false - }, - }) - return () => ( - <> -

Index

- - - - - ) - }, - }) + useBlocker({ + shouldBlockFn: ({ next }) => { + if (next.fullPath === '/posts') { + return true + } + return false + }, + }) + + return ( + <> +

Index

+ + + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -500,12 +495,13 @@ describe('useBlocker', () => { }) test('should allow navigation from 404 page when blocker is active', async () => { - const NotFoundComponent = Vue.defineComponent({ - setup() { + const rootRoute = createRootRoute({ + notFoundComponent: function NotFoundComponent() { const navigate = useNavigate() useBlocker({ shouldBlockFn: () => true }) - return () => ( + + return ( <>

Not Found

@@ -517,10 +513,6 @@ describe('useBlocker', () => { }, }) - const rootRoute = createRootRoute({ - notFoundComponent: NotFoundComponent, - }) - const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', @@ -570,12 +562,13 @@ describe('useBlocker', () => { }) test('should handle blocker navigation from 404 to another 404', async () => { - const NotFoundComponent = Vue.defineComponent({ - setup() { + const rootRoute = createRootRoute({ + notFoundComponent: function NotFoundComponent() { const navigate = useNavigate() useBlocker({ shouldBlockFn: () => true }) - return () => ( + + return ( <>

Not Found

- Home - About - - - ) - } - }, - }) + return ( + <> + + Home + About + + + ) + } const rootRoute = createRootRoute({ component: RootComponent, diff --git a/packages/vue-router/tests/useMatch.test.tsx b/packages/vue-router/tests/useMatch.test.tsx index 54306dea88..2c3575f052 100644 --- a/packages/vue-router/tests/useMatch.test.tsx +++ b/packages/vue-router/tests/useMatch.test.tsx @@ -1,12 +1,5 @@ import { afterEach, describe, expect, test, vi } from 'vitest' -import { - cleanup, - fireEvent, - render, - screen, - waitFor, -} from '@testing-library/vue' -import * as Vue from 'vue' +import { cleanup, render, screen, waitFor } from '@testing-library/vue' import { Link, Outlet, @@ -17,7 +10,7 @@ import { createRouter, useMatch, } from '../src' -import type { AnyRoute, RouterHistory } from '../src' +import type { RouteComponent, RouterHistory } from '../src' afterEach(() => { window.history.replaceState(null, 'root', '/') @@ -29,7 +22,7 @@ describe('useMatch', () => { RootComponent, history, }: { - RootComponent: NonNullable + RootComponent: RouteComponent history?: RouterHistory }) { const rootRoute = createRootRoute({ @@ -64,18 +57,12 @@ describe('useMatch', () => { test.each([true, false, undefined])( 'returns the match if shouldThrow = %s', async (shouldThrow) => { - const RootComponent = Vue.defineComponent({ - setup() { - const match = useMatch({ from: '/posts', shouldThrow }) - return () => { - expect(match.value).toBeDefined() - - expect(match.value!.routeId).toBe('/posts') - - return - } - }, - }) + function RootComponent() { + const match = useMatch({ from: '/posts', shouldThrow }) + expect(match.value).toBeDefined() + expect(match.value!.routeId).toBe('/posts') + return + } setup({ RootComponent, @@ -87,213 +74,14 @@ describe('useMatch', () => { ) }) - test('tracks presentation generations across replacement and re-entry', async () => { - const RootComponent = Vue.defineComponent({ - setup() { - const targetedRevision = useMatch({ - from: '/item', - shouldThrow: false, - select: (match) => match.loaderData, - }) - - return () => ( - <> -
- {targetedRevision.value === undefined - ? 'Targeted absent' - : `Targeted revision ${targetedRevision.value}`} -
- - Revision 2 - - - Revision 3 - - Other - - - ) - }, - }) - - const ItemComponent = Vue.defineComponent({ - setup() { - const nearestRevision = useMatch({ - strict: false, - shouldThrow: false, - select: (match) => match.loaderData as number, - }) - return () =>
Nearest revision {nearestRevision.value}
- }, - }) - - const rootRoute = createRootRoute({ component: RootComponent }) - const itemRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/item', - validateSearch: (search: Record) => ({ - revision: Number(search.revision), - }), - loaderDeps: ({ search }) => ({ revision: search.revision }), - loader: ({ deps }) => deps.revision, - component: ItemComponent, - }) - const otherRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/other', - component: () =>
Other route
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([itemRoute, otherRoute]), - history: createMemoryHistory({ initialEntries: ['/item?revision=1'] }), - }) - - render() - expect(await screen.findByText('Nearest revision 1')).toBeInTheDocument() - expect(screen.getByTestId('targeted-match')).toHaveTextContent( - 'Targeted revision 1', - ) - - await fireEvent.click(screen.getByText('Revision 2')) - expect(await screen.findByText('Nearest revision 2')).toBeInTheDocument() - expect(screen.getByTestId('targeted-match')).toHaveTextContent( - 'Targeted revision 2', - ) - - await fireEvent.click(screen.getByText('Other')) - expect(await screen.findByText('Other route')).toBeInTheDocument() - expect(screen.getByTestId('targeted-match')).toHaveTextContent( - 'Targeted absent', - ) - - await fireEvent.click(screen.getByText('Revision 3')) - expect(await screen.findByText('Nearest revision 3')).toBeInTheDocument() - expect(screen.getByTestId('targeted-match')).toHaveTextContent( - 'Targeted revision 3', - ) - }) - - test('renders a route generation that re-enters before an intermediate route renders', async () => { - const RootComponent = Vue.defineComponent({ - setup() { - return () => ( - <> - Other - - - ) - }, - }) - const ItemComponent = Vue.defineComponent({ - setup() { - const revision = useMatch({ - strict: false, - select: (match) => match.loaderData as number, - }) - return () =>
Item revision {revision.value}
- }, - }) - - const rootRoute = createRootRoute({ component: RootComponent }) - const itemRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/item', - validateSearch: (search: Record) => ({ - revision: Number(search.revision), - }), - loaderDeps: ({ search }) => ({ revision: search.revision }), - loader: ({ deps }) => deps.revision, - component: ItemComponent, - }) - const OtherComponent = Vue.defineComponent({ - setup: () => () =>
Other route
, - }) - - const otherRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/other', - component: OtherComponent, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([itemRoute, otherRoute]), - history: createMemoryHistory({ initialEntries: ['/item?revision=1'] }), - }) - - render() - expect(await screen.findByText('Item revision 1')).toBeInTheDocument() - - let returnNavigation: Promise | undefined - const unsubscribe = router.subscribe('onLoad', (event) => { - if (event.toLocation.pathname === '/other') { - returnNavigation = router.navigate({ - to: '/item', - search: { revision: 2 }, - }) - } - }) - try { - await fireEvent.click(screen.getByText('Other')) - await waitFor(() => expect(returnNavigation).toBeDefined()) - await returnNavigation - - expect(await screen.findByText('Item revision 2')).toBeInTheDocument() - expect(screen.queryByText('Other route')).not.toBeInTheDocument() - } finally { - unsubscribe() - } - }) - - test('an outgoing component never observes its own match disappear', async () => { - const observedRouteIds: Array = [] - const rootRoute = createRootRoute({ component: () => }) - const FirstComponent = Vue.defineComponent({ - setup() { - const match = useMatch({ - from: '/first', - shouldThrow: false, - }) - Vue.watchEffect(() => observedRouteIds.push(match.value?.routeId), { - flush: 'sync', - }) - return () =>
First route
- }, - }) - - const firstRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/first', - component: FirstComponent, - }) - const nextRoute = createRoute({ - getParentRoute: () => rootRoute, - path: '/next', - component: () =>
Next route
, - }) - const router = createRouter({ - routeTree: rootRoute.addChildren([firstRoute, nextRoute]), - history: createMemoryHistory({ initialEntries: ['/first'] }), - }) - - render() - expect(await screen.findByText('First route')).toBeInTheDocument() - - await router.navigate({ to: '/next' }) - - expect(await screen.findByText('Next route')).toBeInTheDocument() - expect(observedRouteIds).not.toContain(undefined) - }) - describe('when match is not found', () => { test.each([undefined, true])( 'throws if shouldThrow = %s', async (shouldThrow) => { - const RootComponent = Vue.defineComponent({ - setup() { - useMatch({ from: '/posts', shouldThrow }) - return () => - }, - }) - + function RootComponent() { + useMatch({ from: '/posts', shouldThrow }) + return + } setup({ RootComponent }) const postsError = await screen.findByText( 'Invariant failed: Could not find an active match from "/posts"', @@ -304,17 +92,11 @@ describe('useMatch', () => { describe('returns undefined if shouldThrow = false', () => { test('without select function', async () => { - const RootComponent = Vue.defineComponent({ - setup() { - const match = useMatch({ from: 'posts', shouldThrow: false }) - return () => { - expect(match.value).toBeUndefined() - - return - } - }, - }) - + function RootComponent() { + const match = useMatch({ from: 'posts', shouldThrow: false }) + expect(match.value).toBeUndefined() + return + } setup({ RootComponent }) expect( await waitFor(() => screen.findByText('IndexTitle')), @@ -322,21 +104,11 @@ describe('useMatch', () => { }) test('with select function', async () => { const select = vi.fn() - const RootComponent = Vue.defineComponent({ - setup() { - const match = useMatch({ - from: 'posts', - shouldThrow: false, - select, - }) - return () => { - expect(match.value).toBeUndefined() - - return - } - }, - }) - + function RootComponent() { + const match = useMatch({ from: 'posts', shouldThrow: false, select }) + expect(match.value).toBeUndefined() + return + } setup({ RootComponent }) const indexTitle = await screen.findByText('IndexTitle') expect(indexTitle).toBeInTheDocument() diff --git a/packages/vue-router/tests/useNavigate.test.tsx b/packages/vue-router/tests/useNavigate.test.tsx index 7ffdb64c32..e71151863f 100644 --- a/packages/vue-router/tests/useNavigate.test.tsx +++ b/packages/vue-router/tests/useNavigate.test.tsx @@ -1,4 +1,5 @@ import * as Vue from 'vue' +import '@testing-library/jest-dom/vitest' import { afterEach, beforeEach, describe, expect, test } from 'vitest' import { cleanup, @@ -152,19 +153,16 @@ test('when navigating from /posts to ./$postId', async () => { component: PostsIndexComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - - const navigate = useNavigate() - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + const navigate = useNavigate() + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -265,19 +263,16 @@ test('when navigating from /posts to ../posts/$postId', async () => { component: PostsIndexComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() - - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const navigate = useNavigate() + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -366,17 +361,15 @@ test('when navigating from /posts/$postId to /posts/$postId/info and the current component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -513,17 +506,15 @@ test('when navigating from /posts/$postId to ./info and the current route is /po component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -658,17 +649,15 @@ test('when navigating from /posts/$postId to ../$postId and the current route is component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -801,17 +790,15 @@ test('when navigating from /posts/$postId with an index to ../$postId and the cu component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -954,17 +941,15 @@ test('when navigating from /invoices to ./invoiceId and the current route is /po component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -1030,16 +1015,14 @@ test('when navigating from /invoices to ./invoiceId and the current route is /po ), }) - const InvoiceComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - invoiceId: {params.value.invoiceId} - - ) - }, - }) + const InvoiceComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + invoiceId: {params.value.invoiceId} + + ) + } const invoiceRoute = createRoute({ getParentRoute: () => invoicesRoute, @@ -1116,17 +1099,15 @@ test('when navigating to /posts/$postId/info which is masked as /posts/$postId', component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -1221,17 +1202,15 @@ test('when navigating to /posts/$postId/info which is imperatively masked as /po component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -1278,35 +1257,33 @@ test('when navigating to /posts/$postId/info which is imperatively masked as /po test('when setting search params with 2 parallel navigate calls', async () => { const rootRoute = createRootRoute() - const IndexComponent = Vue.defineComponent({ - setup() { - const navigate = useNavigate() + const IndexComponent = () => { + const navigate = useNavigate() + const search = indexRoute.useSearch() - const search = indexRoute.useSearch() - return () => ( - <> -

Index

-
{search.value.param1}
-
{search.value.param2}
- - - ) - }, - }) + navigate({ + to: '/', + search: (prev: any) => ({ ...prev, param2: 'bar' }), + }) + }} + > + search + + + ) + } const indexRoute = createRoute({ getParentRoute: () => rootRoute, @@ -1421,17 +1398,15 @@ describe('when on /posts/$postId and navigating to ../ with default `from` /post component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -1941,18 +1916,16 @@ describe('relative navigate to current route', () => { component: PostsComponent, }) - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( - <> - - Params: {params.value.postId} - - - ) - }, - }) + const PostComponent = () => { + const params = useParams({ strict: false }) + return ( + <> + + Params: {params.value.postId} + + + ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -2074,53 +2047,45 @@ describe('relative navigate to current route', () => { return [currentOpen, setModal] as const } - const DetailComponent = Vue.defineComponent({ - props: { - id: { type: String, required: true }, - }, - setup(props) { - const params = useParams({ strict: false }) - const [currentTest, setTest] = useModal('test') + function DetailComponent(props: { id: string }) { + const params = useParams({ strict: false }) + const [currentTest, setTest] = useModal('test') - return () => ( - <> -
- Post Path "/{params.value.postId}/detail-{props.id}"! -
- {currentTest.value ? ( - - ) : ( - - )} - - ) - }, - }) - - const PostComponent = Vue.defineComponent({ - setup() { - const params = useParams({ strict: false }) - return () => ( -
-
- Post "{params.value.postId}"! -
- - + return ( + <> +
+ Post Path "/{params.value.postId}/detail-{props.id}"!
- ) - }, - }) + {currentTest.value ? ( + + ) : ( + + )} + + ) + } + + const PostComponent = () => { + const params = useParams({ strict: false }) + + return ( +
+
Post "{params.value.postId}"!
+ + +
+ ) + } const postRoute = createRoute({ getParentRoute: () => postsRoute, @@ -2754,28 +2719,27 @@ describe('encoded and unicode paths', () => { ) } - const PathRouteComponent = Vue.defineComponent({ - setup() { - const params = pathRoute.useParams() - return () => ( -
-

Path Route

-

- params:{' '} - - {JSON.stringify(params.value)} - -

-
- ) - }, - }) const pathRoute = createRoute({ getParentRoute: () => rootRoute, path, component: PathRouteComponent, }) + function PathRouteComponent() { + const params = pathRoute.useParams() + return ( +
+

Path Route

+

+ params:{' '} + + {JSON.stringify(params.value)} + +

+
+ ) + } + const router = createRouter({ routeTree: rootRoute.addChildren([indexRoute, pathRoute]), history, diff --git a/packages/vue-router/tests/useParams.test.tsx b/packages/vue-router/tests/useParams.test.tsx index 75fe4c4014..0d65361056 100644 --- a/packages/vue-router/tests/useParams.test.tsx +++ b/packages/vue-router/tests/useParams.test.tsx @@ -1,4 +1,3 @@ -import { defineComponent } from 'vue' import { expect, test, vi } from 'vitest' import { fireEvent, render, screen, waitFor } from '@testing-library/vue' import { @@ -34,30 +33,6 @@ test('useParams must return parsed result if applicable.', async () => { component: PostsComponent, }) - const PostCategoryComponent = defineComponent({ - setup() { - const data = postCategoryRoute.useLoaderData() - return () => ( -
-

Post Categories

- {data.value.posts.map((post: (typeof posts)[number]) => { - const id = post.id === 1 ? 'one' : 'two' - return ( - - {post.title} - - ) - })} - -
- ) - }, - }) const postCategoryRoute = createRoute({ getParentRoute: () => postsRoute, path: 'category_{$category}', @@ -93,42 +68,6 @@ test('useParams must return parsed result if applicable.', async () => { }), }) - const PostComponent = defineComponent({ - setup() { - const params = useParams({ from: postRoute.fullPath }) - - const data = postRoute.useLoaderData() - return () => ( -
-

Post Route

-
- Category_Param:{' '} - - {params.value.category} - -
-
- PostId_Param:{' '} - {params.value.postId} -
-
- PostId:{' '} - {data.value.post.id} -
-
- Title:{' '} - {data.value.post.title} -
-
- Category:{' '} - - {data.value.post.category} - -
-
- ) - }, - }) const postRoute = createRoute({ getParentRoute: () => postCategoryRoute, path: '$postId', @@ -170,6 +109,65 @@ test('useParams must return parsed result if applicable.', async () => { ) } + function PostCategoryComponent() { + const data = postCategoryRoute.useLoaderData() + + return ( +
+

Post Categories

+ {data.value.posts.map((post: (typeof posts)[number]) => { + const id = post.id === 1 ? 'one' : 'two' + return ( + + {post.title} + + ) + })} + +
+ ) + } + + function PostComponent() { + const params = useParams({ from: postRoute.fullPath }) + + const data = postRoute.useLoaderData() + + return ( +
+

Post Route

+
+ Category_Param:{' '} + + {params.value.category} + +
+
+ PostId_Param:{' '} + {params.value.postId} +
+
+ PostId: {data.value.post.id} +
+
+ Title:{' '} + {data.value.post.title} +
+
+ Category:{' '} + + {data.value.post.category} + +
+
+ ) + } + window.history.replaceState({}, '', '/posts') const router = createRouter({ diff --git a/packages/vue-router/tests/utils.ts b/packages/vue-router/tests/utils.ts index da96eb2d95..be5d60819b 100644 --- a/packages/vue-router/tests/utils.ts +++ b/packages/vue-router/tests/utils.ts @@ -20,11 +20,9 @@ export function createTimer() { export const getIntersectionObserverMock = ({ observe, disconnect, - onCreate, }: { observe: Mock disconnect: Mock - onCreate?: (callback: IntersectionObserverCallback) => void }) => { return class IO implements IntersectionObserver { root: Document | Element | null @@ -35,7 +33,6 @@ export const getIntersectionObserverMock = ({ _cb: IntersectionObserverCallback, options?: IntersectionObserverInit, ) { - onCreate?.(_cb) this.root = options?.root ?? null this.rootMargin = options?.rootMargin ?? '0px' this.scrollMargin = options?.scrollMargin ?? '0px' diff --git a/packages/vue-router/vite.config.ts b/packages/vue-router/vite.config.ts index 13928e0a1a..88949476fa 100644 --- a/packages/vue-router/vite.config.ts +++ b/packages/vue-router/vite.config.ts @@ -24,7 +24,7 @@ const config = defineConfig({ watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts', './tests/setupTests.tsx'], + setupFiles: ['./tests/setupTests.tsx'], }, }) diff --git a/packages/vue-start-client/CHANGELOG.md b/packages/vue-start-client/CHANGELOG.md index 334da56ce7..54e1239b1f 100644 --- a/packages/vue-start-client/CHANGELOG.md +++ b/packages/vue-start-client/CHANGELOG.md @@ -1,244 +1,5 @@ # @tanstack/vue-start-client -## 1.167.45 - -### Patch Changes - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - - @tanstack/start-client-core@1.170.39 - - @tanstack/vue-router@1.170.42 - -## 1.167.44 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - - @tanstack/start-client-core@1.170.38 - - @tanstack/vue-router@1.170.41 - -## 1.167.43 - -### Patch Changes - -- Updated dependencies [[`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/router-core@1.171.37 - - @tanstack/start-client-core@1.170.37 - - @tanstack/vue-router@1.170.40 - -## 1.167.42 - -### Patch Changes - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`550f478`](https://github.com/TanStack/router/commit/550f47881070c0558a87e1acce7f38fbc85b9549), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - - @tanstack/start-client-core@1.170.36 - - @tanstack/vue-router@1.170.39 - -## 1.167.41 - -### Patch Changes - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`d35aab4`](https://github.com/TanStack/router/commit/d35aab425b07b46e222a507c0f0239644669757b), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/router-core@1.171.35 - - @tanstack/vue-router@1.170.38 - - @tanstack/start-client-core@1.170.35 - -## 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 - -- 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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - - @tanstack/start-client-core@1.170.32 - - @tanstack/vue-router@1.170.35 - -## 1.167.37 - -### Patch Changes - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - - @tanstack/vue-router@1.170.34 - - @tanstack/start-client-core@1.170.31 - -## 1.167.36 - -### Patch Changes - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`cb8749e`](https://github.com/TanStack/router/commit/cb8749e9fcd32d2290bf6c957b2701c3c0a14da5), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/vue-router@1.170.33 - - @tanstack/start-client-core@1.170.30 - -## 1.167.35 - -### Patch Changes - -- Updated dependencies [[`8c43c71`](https://github.com/TanStack/router/commit/8c43c712523fc63dc3a814f3a19617e270ce8ed1)]: - - @tanstack/vue-router@1.170.32 - -## 1.167.34 - -### Patch Changes - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - - @tanstack/vue-router@1.170.31 - - @tanstack/start-client-core@1.170.29 - -## 1.167.33 - -### Patch Changes - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`0caf6b9`](https://github.com/TanStack/router/commit/0caf6b9a2b7e14b0b146c74cc27cb05c19d700a5), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - - @tanstack/vue-router@1.170.30 - - @tanstack/start-client-core@1.170.28 - -## 1.167.32 - -### Patch Changes - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - - @tanstack/vue-router@1.170.29 - - @tanstack/start-client-core@1.170.27 - -## 1.167.31 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - - @tanstack/start-client-core@1.170.26 - - @tanstack/vue-router@1.170.28 - -## 1.167.30 - -### Patch Changes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - - @tanstack/vue-router@1.170.27 - - @tanstack/start-client-core@1.170.25 - -## 1.167.29 - -### Patch Changes - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`0fdf9ff`](https://github.com/TanStack/router/commit/0fdf9ff16fc532de9fc131d18df167ebd8038720), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - - @tanstack/vue-router@1.170.26 - - @tanstack/start-client-core@1.170.24 - -## 1.167.28 - -### Patch Changes - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90), [`3848503`](https://github.com/TanStack/router/commit/38485038c52ff898777cabeeeb2eaaa29c93f789)]: - - @tanstack/router-core@1.171.23 - - @tanstack/vue-router@1.170.25 - - @tanstack/start-client-core@1.170.23 - -## 1.167.27 - -### Patch Changes - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13), [`f500760`](https://github.com/TanStack/router/commit/f5007607d62e932b8df19de866cdc6bddcff8db3), [`1aafca9`](https://github.com/TanStack/router/commit/1aafca9b45d24f8f0dba78e716fc9582346c6ca1), [`aa10b65`](https://github.com/TanStack/router/commit/aa10b6589eeda215f5a60ea0af95a3101d8c414e)]: - - @tanstack/router-core@1.171.22 - - @tanstack/vue-router@1.170.24 - - @tanstack/start-client-core@1.170.22 - -## 1.167.26 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - - @tanstack/start-client-core@1.170.21 - - @tanstack/vue-router@1.170.23 - -## 1.167.25 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`c59788c`](https://github.com/TanStack/router/commit/c59788ca20f2d2e7f264a859ebe01b7646ba3154), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - - @tanstack/start-client-core@1.170.20 - - @tanstack/vue-router@1.170.22 - -## 1.167.24 - -### Patch Changes - -- Updated dependencies [[`2fbc99f`](https://github.com/TanStack/router/commit/2fbc99f2c262b057cb957e6ebba1ee073c655186), [`6bede65`](https://github.com/TanStack/router/commit/6bede65d7074dcd83455151b66b4574268bc782c)]: - - @tanstack/start-client-core@1.170.19 - -## 1.167.23 - -### Patch Changes - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - - @tanstack/start-client-core@1.170.18 - - @tanstack/vue-router@1.170.21 - -## 1.167.22 - -### Patch Changes - -- Updated dependencies [[`2435885`](https://github.com/TanStack/router/commit/2435885fa8b5e31c8c4b74d93920919f27316ebf), [`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`86bf510`](https://github.com/TanStack/router/commit/86bf510c2923afb76804223bd04afc2a809b33e7), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/vue-router@1.170.20 - - @tanstack/router-core@1.171.18 - - @tanstack/start-client-core@1.170.17 - -## 1.167.21 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - - @tanstack/start-client-core@1.170.16 - - @tanstack/vue-router@1.170.19 - -## 1.167.20 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - - @tanstack/vue-router@1.170.18 - - @tanstack/start-client-core@1.170.15 - -## 1.167.19 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - - @tanstack/start-client-core@1.170.14 - - @tanstack/vue-router@1.170.17 - ## 1.167.18 ### Patch Changes diff --git a/packages/vue-start-client/package.json b/packages/vue-start-client/package.json index 74b8016924..f191cb60fc 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.45", + "version": "1.167.18", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -30,12 +30,12 @@ "test:unit:dev": "vitest --watch", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -64,15 +64,9 @@ "@tanstack/start-client-core": "workspace:*" }, "devDependencies": { - "@vitejs/plugin-vue-jsx": "catalog:", + "@vitejs/plugin-vue-jsx": "^4.1.2", "vite": "*", - "vue": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vue": "^3.5.25" }, "peerDependencies": { "vue": "^3.3.0" diff --git a/packages/vue-start-client/src/hydrateStart.test.ts b/packages/vue-start-client/src/hydrateStart.test.ts deleted file mode 100644 index c338122c6c..0000000000 --- a/packages/vue-start-client/src/hydrateStart.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { afterEach, expect, test, vi } from 'vitest' -import { hydrateStart } from './hydrateStart' - -const coreHydrateStart = vi.hoisted(() => vi.fn()) - -vi.mock('@tanstack/start-client-core/client', () => ({ - hydrateStart: coreHydrateStart, -})) - -afterEach(() => { - delete window.$_TSR - coreHydrateStart.mockReset() -}) - -test('signals streaming cleanup without hiding a hydration failure', async () => { - const error = new Error('hydration failed') - coreHydrateStart.mockRejectedValue(error) - const hydrated = vi.fn() - window.$_TSR = { h: hydrated } as any - - await expect(hydrateStart()).rejects.toBe(error) - expect(hydrated).toHaveBeenCalledTimes(1) -}) diff --git a/packages/vue-start-client/src/hydrateStart.ts b/packages/vue-start-client/src/hydrateStart.ts index 7a90e6d27c..b9e4860b57 100644 --- a/packages/vue-start-client/src/hydrateStart.ts +++ b/packages/vue-start-client/src/hydrateStart.ts @@ -89,15 +89,9 @@ export function configureHydrationSuppressions( * suppression for routes with ssr: false or ssr: 'data-only' before returning */ export async function hydrateStart(): Promise { - try { - const router = await coreHydrateStart() - // Install console suppression before app.mount() is called - // This catches the "Hydration completed but contains mismatches" error - suppressSsrHydrationMismatches(router) - return router - } catch (error) { - // A failed router hydration never mounts StartClient, so release the stream here. - window.$_TSR?.h() - throw error - } + const router = await coreHydrateStart() + // Install console suppression before app.mount() is called + // This catches the "Hydration completed but contains mismatches" error + suppressSsrHydrationMismatches(router) + return router } diff --git a/packages/vue-start-server/CHANGELOG.md b/packages/vue-start-server/CHANGELOG.md index 0963c82fe8..379dfdda9e 100644 --- a/packages/vue-start-server/CHANGELOG.md +++ b/packages/vue-start-server/CHANGELOG.md @@ -1,287 +1,5 @@ # @tanstack/vue-start-server -## 1.167.50 - -### Patch Changes - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c)]: - - @tanstack/router-core@1.171.39 - - @tanstack/start-server-core@1.169.45 - - @tanstack/vue-router@1.170.42 - -## 1.167.49 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/router-core@1.171.38 - - @tanstack/start-server-core@1.169.44 - - @tanstack/vue-router@1.170.41 - -## 1.167.48 - -### Patch Changes - -- Updated dependencies [[`71d9694`](https://github.com/TanStack/router/commit/71d9694da6346fbece2cda4ecde92b0b12a7ee08)]: - - @tanstack/start-server-core@1.169.43 - -## 1.167.47 - -### Patch Changes - -- Updated dependencies [[`740b0ce`](https://github.com/TanStack/router/commit/740b0ce17737d1f7398740136acdbeabe80df7d8), [`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/start-server-core@1.169.42 - - @tanstack/router-core@1.171.37 - - @tanstack/vue-router@1.170.40 - -## 1.167.46 - -### Patch Changes - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Remove the built-in `useSession` API. Applications choose a session library, such as iron-session, and save or destroy sessions explicitly before returning or redirecting. Connect a cookie adapter through `getCookie` and `setCookie`, or append serialized cookies with `appendResponseHeader('set-cookie', cookie)`. Existing session cookies require a deliberate migration or signing in again with a new cookie name. - - `createServerEntry` keeps the complete callback, including custom error handling, inside the request context and converts errors that escape it. The built-in entry still converts errors automatically. Raw `createStartHandler` handlers now rethrow the original error. For custom reporting, catch inside `createServerEntry`, then rethrow for default conversion or return `handleStartError(error)` to preserve response-helper status, headers, and cookies. Return an explicit `Response` when choosing a custom error payload. - - Response helpers now apply consistently across server routes, SSR, server functions, redirects, errors, and middleware response replacements. Helper setters override returned values; cookie helpers preserve independent cookies and replace matching cookie identities. Use `appendResponseHeader('set-cookie', cookie)` when adding a serialized cookie without replacing other cookies. Changed responses receive copied headers and reuse the body stream, so applications should inspect the response returned by Start rather than relying on mutation of the original response. - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5)]: - - @tanstack/router-core@1.171.36 - - @tanstack/start-server-core@1.169.41 - - @tanstack/vue-router@1.170.39 - -## 1.167.45 - -### Patch Changes - -- Updated dependencies [[`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`dfe3dea`](https://github.com/TanStack/router/commit/dfe3dea88a28400db1677111e2b15ae7914782c2), [`d35aab4`](https://github.com/TanStack/router/commit/d35aab425b07b46e222a507c0f0239644669757b), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`663282b`](https://github.com/TanStack/router/commit/663282b0ebbc494aee3595ed95867ee29d01938e)]: - - @tanstack/router-core@1.171.35 - - @tanstack/vue-router@1.170.38 - - @tanstack/start-server-core@1.169.40 - -## 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 - -- 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 - -- Updated dependencies [[`cecae54`](https://github.com/TanStack/router/commit/cecae5440b8edaea77c5448fe3d74bbd20fe10a4), [`0103578`](https://github.com/TanStack/router/commit/01035782e53af9b929c784b94ddd64b95efb89c7), [`ce10dcd`](https://github.com/TanStack/router/commit/ce10dcd4d9d3d23738744e453205aad5c6dbd716), [`84936cc`](https://github.com/TanStack/router/commit/84936cc04530bba11059c57b293a794922bbc5aa), [`bbd2336`](https://github.com/TanStack/router/commit/bbd2336b8446de3f7dd85070895e7cf43980183e)]: - - @tanstack/router-core@1.171.32 - - @tanstack/start-server-core@1.169.37 - - @tanstack/vue-router@1.170.35 - -## 1.167.41 - -### Patch Changes - -- [#8204](https://github.com/TanStack/router/pull/8204) [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26) - Stream large deferred SSR hydration payloads through a backpressure-aware router transport, fail known setup errors before response creation, and close cancelled or expired transforms safely. - - Start now cancels discarded middleware and HEAD response bodies, including plain streams and derived branches. - - Server-function raw streams share one ordered response. Arbitrary or sequential consumption can require potentially unbounded buffering of unread data on the client. Cancelling one raw stream discards it locally, while aborting the whole call cancels the response and server work. Consume streams concurrently, cancel unused streams promptly, or use separate calls when independent backpressure is required. A raw stream that exceeds its unread-byte limit now fails alone; sibling streams and the JSON result keep flowing. - - The JSON wire shape of a `RawStream` server-function argument changed. Clients and servers must run matching versions for requests that pass a `RawStream`. - - The frame-protocol constants (`FRAME_TYPE_*`, `MAX_FRAME_PAYLOAD_SIZE`, `MAX_FRAMED_STREAMS`) moved from the `@tanstack/start-client-core` root to the `@tanstack/start-client-core/client-rpc` subpath. - - Router requests whose `Accept` header allows neither `text/html` nor `*/*` now receive `406 Not Acceptable` instead of `500`. - - Framework adapters share the body `` composition (`getSsrBodyScriptParts`, `composeSsrBodyScripts`) and the eager HTML response wrapper (`renderSsrHtmlResponse`) from `@tanstack/router-core`. - - Solid SSR now emits one document type and renders late lazy errors through route boundaries. A Solid `` without a `fallback` no longer holds the streamed shell; it renders inside the nearest `` boundary like React and Vue, and now renders falsy resolved values. - - Static server functions decode cached `RawStream` values with the client deserializer plugins. - - SSR Query integrations now keep request cleanup and stream ownership aligned with the router lifecycle. - -- Updated dependencies [[`bc80866`](https://github.com/TanStack/router/commit/bc80866f6d6eb3e6f152ee3682eb783c96403e83), [`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a0b2ad9`](https://github.com/TanStack/router/commit/a0b2ad99aee64af08d16b0e4ff26b3ba42a99f0a), [`1ca361b`](https://github.com/TanStack/router/commit/1ca361ba52a627d2f76ab33323bd83d1d0aa65a3)]: - - @tanstack/router-core@1.171.31 - - @tanstack/vue-router@1.170.34 - - @tanstack/start-server-core@1.169.36 - -## 1.167.40 - -### Patch Changes - -- Updated dependencies [[`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`b747fb8`](https://github.com/TanStack/router/commit/b747fb8891b3347b1ffdfe0fa81e7d15049cb776), [`6cfb1e8`](https://github.com/TanStack/router/commit/6cfb1e8b564be282584765352250bf61747895ed), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`cb8749e`](https://github.com/TanStack/router/commit/cb8749e9fcd32d2290bf6c957b2701c3c0a14da5), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`873c830`](https://github.com/TanStack/router/commit/873c830ccb2610a864ee697250e10fcc99772ffa), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`f151ab0`](https://github.com/TanStack/router/commit/f151ab018eede64ae849b77e68f3cdf31cb95cc5), [`bc57fa3`](https://github.com/TanStack/router/commit/bc57fa3f12450cf34c731450947c7c8f1ea05e58), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`d76a332`](https://github.com/TanStack/router/commit/d76a33284bc0668f7af4c972a6d32bd0f42b22a6), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`7e349c3`](https://github.com/TanStack/router/commit/7e349c3071ef7a346698d320fc0989998ad55734), [`9448caa`](https://github.com/TanStack/router/commit/9448caa03a89076b9770631c356c0cc502802c09), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`700a714`](https://github.com/TanStack/router/commit/700a714c5fb64199b4edfaa3273d230c9894e274), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef)]: - - @tanstack/router-core@1.171.30 - - @tanstack/vue-router@1.170.33 - - @tanstack/start-server-core@1.169.35 - -## 1.167.39 - -### Patch Changes - -- Updated dependencies [[`8c43c71`](https://github.com/TanStack/router/commit/8c43c712523fc63dc3a814f3a19617e270ce8ed1), [`d914b08`](https://github.com/TanStack/router/commit/d914b085bb4bf29ec18a531201e377c10681b661)]: - - @tanstack/vue-router@1.170.32 - - @tanstack/start-server-core@1.169.34 - -## 1.167.38 - -### Patch Changes - -- Updated dependencies [[`f9836f1`](https://github.com/TanStack/router/commit/f9836f16f0e25b0a8495f5e01e3f303b1cbc8725), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`9871c06`](https://github.com/TanStack/router/commit/9871c0625806001d6bf373524821a00303438a91), [`0654c0a`](https://github.com/TanStack/router/commit/0654c0a1a427db24d9af13c1d6ad1217a588c0c9)]: - - @tanstack/router-core@1.171.29 - - @tanstack/vue-router@1.170.31 - - @tanstack/start-server-core@1.169.33 - -## 1.167.37 - -### Patch Changes - -- Updated dependencies [[`edf0e16`](https://github.com/TanStack/router/commit/edf0e16ebfe82ec6e8f68f403a1fda8de9e28889), [`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`08eff50`](https://github.com/TanStack/router/commit/08eff50c447a154a3373909009e9e4375cea17ce), [`216c0c4`](https://github.com/TanStack/router/commit/216c0c48036fd1a33163b70dcabfed2b893808b0), [`2f91503`](https://github.com/TanStack/router/commit/2f9150309bc472f4a75cbe98adcdb50c76b12c7a), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`50eafca`](https://github.com/TanStack/router/commit/50eafcaebbbedb6fde3b2816de7a0ace8cde4832), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`0caf6b9`](https://github.com/TanStack/router/commit/0caf6b9a2b7e14b0b146c74cc27cb05c19d700a5), [`ee28348`](https://github.com/TanStack/router/commit/ee283480dfa51150a2e0b096a6eff94a89ff8b3f), [`c18e690`](https://github.com/TanStack/router/commit/c18e69081475a7c98f9d40bd0fe6da78ccb84598)]: - - @tanstack/router-core@1.171.28 - - @tanstack/vue-router@1.170.30 - - @tanstack/start-server-core@1.169.32 - -## 1.167.36 - -### Patch Changes - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b)]: - - @tanstack/router-core@1.171.27 - - @tanstack/vue-router@1.170.29 - - @tanstack/start-server-core@1.169.31 - -## 1.167.35 - -### Patch Changes - -- Updated dependencies [[`3e016ac`](https://github.com/TanStack/router/commit/3e016ac84ffec8119f0c25cfdd1fb17e5292bd34)]: - - @tanstack/router-core@1.171.26 - - @tanstack/start-server-core@1.169.30 - - @tanstack/vue-router@1.170.28 - -## 1.167.34 - -### Patch Changes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175), [`63d2cc9`](https://github.com/TanStack/router/commit/63d2cc9155ff5374112f7d067d0b278bafeb8486)]: - - @tanstack/router-core@1.171.25 - - @tanstack/vue-router@1.170.27 - - @tanstack/start-server-core@1.169.29 - -## 1.167.33 - -### Patch Changes - -- Updated dependencies [[`4c89b15`](https://github.com/TanStack/router/commit/4c89b15dd2b46491ee5e57985559bae8e31d62c2), [`cf6ab17`](https://github.com/TanStack/router/commit/cf6ab178b39e7628bf784759f384e0f4230e6d9e), [`0fdf9ff`](https://github.com/TanStack/router/commit/0fdf9ff16fc532de9fc131d18df167ebd8038720), [`bdaf73a`](https://github.com/TanStack/router/commit/bdaf73a4063ee2b02e3c9cc105ad10ce82a5a0ff)]: - - @tanstack/router-core@1.171.24 - - @tanstack/vue-router@1.170.26 - - @tanstack/start-server-core@1.169.28 - -## 1.167.32 - -### Patch Changes - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90), [`3848503`](https://github.com/TanStack/router/commit/38485038c52ff898777cabeeeb2eaaa29c93f789)]: - - @tanstack/router-core@1.171.23 - - @tanstack/vue-router@1.170.25 - - @tanstack/start-server-core@1.169.27 - -## 1.167.31 - -### Patch Changes - -- Updated dependencies [[`7e93431`](https://github.com/TanStack/router/commit/7e93431ae9ff58c91c3c5ca10ffcb8414c1d0b13), [`f500760`](https://github.com/TanStack/router/commit/f5007607d62e932b8df19de866cdc6bddcff8db3), [`1aafca9`](https://github.com/TanStack/router/commit/1aafca9b45d24f8f0dba78e716fc9582346c6ca1), [`aa10b65`](https://github.com/TanStack/router/commit/aa10b6589eeda215f5a60ea0af95a3101d8c414e)]: - - @tanstack/router-core@1.171.22 - - @tanstack/vue-router@1.170.24 - - @tanstack/start-server-core@1.169.26 - -## 1.167.30 - -### Patch Changes - -- Updated dependencies [[`51138a8`](https://github.com/TanStack/router/commit/51138a824cea053738f125c4c95073bd6286ff05)]: - - @tanstack/router-core@1.171.21 - - @tanstack/start-server-core@1.169.25 - - @tanstack/vue-router@1.170.23 - -## 1.167.29 - -### Patch Changes - -- Updated dependencies [[`44a8c3e`](https://github.com/TanStack/router/commit/44a8c3e1d2af305064b2363d97fc7847c6f1a246), [`5253e70`](https://github.com/TanStack/router/commit/5253e70db2083d68a788fb7c9a043bb0c5518f2a)]: - - @tanstack/router-core@1.171.20 - - @tanstack/start-server-core@1.169.24 - - @tanstack/vue-router@1.170.22 - -## 1.167.28 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-server-core@1.169.23 - -## 1.167.27 - -### Patch Changes - -- Updated dependencies [[`ea3a665`](https://github.com/TanStack/router/commit/ea3a665d81cbb5074c2d77ec953255ab534e7db9)]: - - @tanstack/router-core@1.171.19 - - @tanstack/start-server-core@1.169.22 - - @tanstack/vue-router@1.170.21 - -## 1.167.26 - -### Patch Changes - -- Updated dependencies [[`2435885`](https://github.com/TanStack/router/commit/2435885fa8b5e31c8c4b74d93920919f27316ebf), [`84db4a8`](https://github.com/TanStack/router/commit/84db4a842311df3f7e58073f6f12aaf371aeb5c7), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`86bf510`](https://github.com/TanStack/router/commit/86bf510c2923afb76804223bd04afc2a809b33e7), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/vue-router@1.170.20 - - @tanstack/router-core@1.171.18 - - @tanstack/start-server-core@1.169.21 - -## 1.167.25 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/router-core@1.171.17 - - @tanstack/start-server-core@1.169.20 - - @tanstack/vue-router@1.170.19 - -## 1.167.24 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/router-core@1.171.16 - - @tanstack/vue-router@1.170.18 - - @tanstack/start-server-core@1.169.19 - -## 1.167.23 - -### Patch Changes - -- [#7944](https://github.com/TanStack/router/pull/7944) [`65f7b7f`](https://github.com/TanStack/router/commit/65f7b7f791272f2ea581a1fe0fcd43183bc01162) - Use focused server entrypoints for shared constants and handler helpers so build tooling and framework renderers do not traverse the full Start server barrel. - -- Updated dependencies [[`65f7b7f`](https://github.com/TanStack/router/commit/65f7b7f791272f2ea581a1fe0fcd43183bc01162)]: - - @tanstack/start-server-core@1.169.18 - -## 1.167.22 - -### Patch Changes - -- Updated dependencies [[`e2dd204`](https://github.com/TanStack/router/commit/e2dd2049cb42eb219d3b447b8605066d19d9c1fa)]: - - @tanstack/router-core@1.171.15 - - @tanstack/start-server-core@1.169.17 - - @tanstack/vue-router@1.170.17 - ## 1.167.21 ### Patch Changes diff --git a/packages/vue-start-server/package.json b/packages/vue-start-server/package.json index 4fc4c1c9fd..bf704e93ea 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.50", + "version": "1.167.21", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -29,12 +29,12 @@ "test:unit": "exit 0; vitest", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", "build": "vite build" }, @@ -63,17 +63,10 @@ "@tanstack/start-server-core": "workspace:*" }, "devDependencies": { - "@vitejs/plugin-vue-jsx": "catalog:", - "@typescript/native": "npm:typescript@^7.0.2", - "typescript": "npm:@typescript/typescript6@^6.0.2", + "@vitejs/plugin-vue-jsx": "^4.1.2", + "typescript": "^6.0.2", "vite": "*", - "vue": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vue": "^3.5.25" }, "peerDependencies": { "vue": "^3.3.0" diff --git a/packages/vue-start-server/src/defaultRenderHandler.tsx b/packages/vue-start-server/src/defaultRenderHandler.tsx index 1e31e6e97e..69fa83d8ac 100644 --- a/packages/vue-start-server/src/defaultRenderHandler.tsx +++ b/packages/vue-start-server/src/defaultRenderHandler.tsx @@ -1,7 +1,5 @@ -import { - defineHandlerCallback, - renderRouterToString, -} from '@tanstack/vue-router/ssr/server' +import { defineHandlerCallback } from '@tanstack/start-server-core' +import { renderRouterToString } from '@tanstack/vue-router/ssr/server' import { StartServer } from './StartServer' export const defaultRenderHandler = defineHandlerCallback( diff --git a/packages/vue-start-server/src/defaultStreamHandler.tsx b/packages/vue-start-server/src/defaultStreamHandler.tsx index c02aeb8c6c..94106eee85 100644 --- a/packages/vue-start-server/src/defaultStreamHandler.tsx +++ b/packages/vue-start-server/src/defaultStreamHandler.tsx @@ -1,12 +1,10 @@ -import { - defineHandlerCallback, - renderRouterToStream, -} from '@tanstack/vue-router/ssr/server' +import { defineHandlerCallback } from '@tanstack/start-server-core' +import { renderRouterToStream } from '@tanstack/vue-router/ssr/server' import { StartServer } from './StartServer' export const defaultStreamHandler = defineHandlerCallback( - ({ request, router, responseHeaders }) => - renderRouterToStream({ + async ({ request, router, responseHeaders }) => + await renderRouterToStream({ request, router, responseHeaders, diff --git a/packages/vue-start/CHANGELOG.md b/packages/vue-start/CHANGELOG.md index 2e781d8694..1322cce2bf 100644 --- a/packages/vue-start/CHANGELOG.md +++ b/packages/vue-start/CHANGELOG.md @@ -1,430 +1,5 @@ # @tanstack/vue-start -## 1.169.6 - -### Patch Changes - -- Updated dependencies [[`3f22686`](https://github.com/TanStack/router/commit/3f226869e0af211ff7f1de5d7343e43462dbb101), [`559c7de`](https://github.com/TanStack/router/commit/559c7ded6e2a6eeda3f91c80d8c03f4cfeb9a206)]: - - @tanstack/start-plugin-core@1.171.57 - -## 1.169.5 - -### Patch Changes - -- [#8863](https://github.com/TanStack/router/pull/8863) [`01fab5a`](https://github.com/TanStack/router/commit/01fab5a6c8aed70d61d82c64bc344cbac66c240c) - The Rsbuild plugin keeps the app's `server.compress` setting instead of always setting it to `false`. Compression stays off by default: a compressed streamed page reaches the browser only once the stream ends. The optional `@rsbuild/core` peer is now `^2.0.5`, the first version whose compression keeps SSR response headers intact. - -- [#8869](https://github.com/TanStack/router/pull/8869) [`d05c6c6`](https://github.com/TanStack/router/commit/d05c6c66e7efc659286f37a56b3b1d4d267139e7) - Vite dev: Vue Start pre-bundles `@tanstack/vue-router > @tanstack/vue-store`, as React Start does for `@tanstack/react-store`. The first page load on a cold dependency cache no longer re-optimizes `vue` and reloads the page. - -- Updated dependencies [[`01fab5a`](https://github.com/TanStack/router/commit/01fab5a6c8aed70d61d82c64bc344cbac66c240c), [`c5320d7`](https://github.com/TanStack/router/commit/c5320d7ca23eca82d720ac5629d2bad5cf7d9b02), [`545a8d3`](https://github.com/TanStack/router/commit/545a8d3790989ca502153c3292c6b1e8063257f4), [`da8c28c`](https://github.com/TanStack/router/commit/da8c28c498230a5730ce75b2693baeeb3ef68ac1)]: - - @tanstack/start-plugin-core@1.171.56 - -## 1.169.4 - -### Patch Changes - -- [#8670](https://github.com/TanStack/router/pull/8670) [`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c) - Reference agent skills in other packages by their `intent load` identifier (`@tanstack/#`) instead of relative file links that break once packages are installed. - -- Updated dependencies [[`32a3360`](https://github.com/TanStack/router/commit/32a3360cba0e0f884b3215813a48c63467f5a53c), [`ed55775`](https://github.com/TanStack/router/commit/ed5577593a749b8c7193cc7b5d945fd084bfac2f), [`63a886d`](https://github.com/TanStack/router/commit/63a886da9040c4b039ea3bf5b3a841771375cddb), [`d9b07e8`](https://github.com/TanStack/router/commit/d9b07e8d3b724cdbfac0aa2fba4c1f7a3a241100)]: - - @tanstack/start-client-core@1.170.39 - - @tanstack/start-server-core@1.169.45 - - @tanstack/vue-router@1.170.42 - - @tanstack/start-plugin-core@1.171.55 - - @tanstack/vue-start-client@1.167.45 - - @tanstack/vue-start-server@1.167.50 - -## 1.169.3 - -### Patch Changes - -- Updated dependencies [[`18154b1`](https://github.com/TanStack/router/commit/18154b1c45454a70aa77e9d6d27c8a6e0733d031)]: - - @tanstack/start-server-core@1.169.44 - - @tanstack/start-client-core@1.170.38 - - @tanstack/start-plugin-core@1.171.54 - - @tanstack/vue-router@1.170.41 - - @tanstack/vue-start-client@1.167.44 - - @tanstack/vue-start-server@1.167.49 - -## 1.169.2 - -### Patch Changes - -- Updated dependencies [[`71d9694`](https://github.com/TanStack/router/commit/71d9694da6346fbece2cda4ecde92b0b12a7ee08), [`fdc10fa`](https://github.com/TanStack/router/commit/fdc10fa13fbac758615f9a3d37075088d1cc1e1f)]: - - @tanstack/start-server-core@1.169.43 - - @tanstack/start-plugin-core@1.171.53 - - @tanstack/vue-start-server@1.167.48 - -## 1.169.1 - -### Patch Changes - -- Updated dependencies [[`740b0ce`](https://github.com/TanStack/router/commit/740b0ce17737d1f7398740136acdbeabe80df7d8), [`d6ba115`](https://github.com/TanStack/router/commit/d6ba115d5751c75e20943f0062577cf17b446d82)]: - - @tanstack/start-server-core@1.169.42 - - @tanstack/start-plugin-core@1.171.52 - - @tanstack/vue-start-server@1.167.47 - - @tanstack/start-client-core@1.170.37 - - @tanstack/vue-router@1.170.40 - - @tanstack/vue-start-client@1.167.43 - -## 1.169.0 - -### Minor Changes - -- [#8696](https://github.com/TanStack/router/pull/8696) [`f243c61`](https://github.com/TanStack/router/commit/f243c61e95dae64fe04da4499c0c4ec44f26abae) - TanStack Start is stable. To upgrade from a release candidate, follow [Migrate from the Release Candidate](https://tanstack.com/start/latest/docs/framework/react/migrate-from-release-candidate). - -### Patch Changes - -- [#8694](https://github.com/TanStack/router/pull/8694) [`550f478`](https://github.com/TanStack/router/commit/550f47881070c0558a87e1acce7f38fbc85b9549) - Remove the deprecated `.inputValidator()` from `createServerFn` and `createMiddleware`. Use `.validator()`, which takes the same validator. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Keep streaming a page when request middleware returns a response that reads the page body, such as a copy made through a wrapped global `Response`, a copy in Bun, or a body piped through a transform. Start now disposes a replaced page stream only when nothing reads it. `transferResponseBodyOwnership` is removed: return the derived response directly. - -- [#7588](https://github.com/TanStack/router/pull/7588) [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5) - Remove the built-in `useSession` API. Applications choose a session library, such as iron-session, and save or destroy sessions explicitly before returning or redirecting. Connect a cookie adapter through `getCookie` and `setCookie`, or append serialized cookies with `appendResponseHeader('set-cookie', cookie)`. Existing session cookies require a deliberate migration or signing in again with a new cookie name. - - `createServerEntry` keeps the complete callback, including custom error handling, inside the request context and converts errors that escape it. The built-in entry still converts errors automatically. Raw `createStartHandler` handlers now rethrow the original error. For custom reporting, catch inside `createServerEntry`, then rethrow for default conversion or return `handleStartError(error)` to preserve response-helper status, headers, and cookies. Return an explicit `Response` when choosing a custom error payload. - - Response helpers now apply consistently across server routes, SSR, server functions, redirects, errors, and middleware response replacements. Helper setters override returned values; cookie helpers preserve independent cookies and replace matching cookie identities. Use `appendResponseHeader('set-cookie', cookie)` when adding a serialized cookie without replacing other cookies. Changed responses receive copied headers and reuse the body stream, so applications should inspect the response returned by Start rather than relying on mutation of the original response. - -- [#8696](https://github.com/TanStack/router/pull/8696) [`f243c61`](https://github.com/TanStack/router/commit/f243c61e95dae64fe04da4499c0c4ec44f26abae) - Require Vite 8 for Vite builds. Vite 7 is no longer supported. - -- Updated dependencies [[`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`550f478`](https://github.com/TanStack/router/commit/550f47881070c0558a87e1acce7f38fbc85b9549), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`f3d7ee3`](https://github.com/TanStack/router/commit/f3d7ee3374c660e0fe82a03ac580a90ed2e2fa98), [`4104b8e`](https://github.com/TanStack/router/commit/4104b8ef11498706b5059c5a915f2ae47ffbc5ba), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`94d6d8e`](https://github.com/TanStack/router/commit/94d6d8e49694e225cb07e2a6777633d08aeeb3c5), [`f243c61`](https://github.com/TanStack/router/commit/f243c61e95dae64fe04da4499c0c4ec44f26abae), [`19524cc`](https://github.com/TanStack/router/commit/19524ccdd75870ce1db2f324518eeb3f23cc0f97)]: - - @tanstack/start-server-core@1.169.41 - - @tanstack/start-client-core@1.170.36 - - @tanstack/start-plugin-core@1.171.51 - - @tanstack/vue-start-server@1.167.46 - - @tanstack/vue-router@1.170.39 - - @tanstack/vue-start-client@1.167.42 - -## 1.168.57 - -### Patch Changes - -- Updated dependencies [[`4191640`](https://github.com/TanStack/router/commit/41916400b93fdb62189722266ed1d77ba9c26be9), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb), [`d35aab4`](https://github.com/TanStack/router/commit/d35aab425b07b46e222a507c0f0239644669757b), [`efc2042`](https://github.com/TanStack/router/commit/efc2042c2d02a9780c3e7efe81f123d066a869eb)]: - - @tanstack/start-plugin-core@1.171.50 - - @tanstack/vue-router@1.170.38 - - @tanstack/start-server-core@1.169.40 - - @tanstack/start-client-core@1.170.35 - - @tanstack/vue-start-client@1.167.41 - - @tanstack/vue-start-server@1.167.45 - -## 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 - -- 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 - -- Updated dependencies [[`222300b`](https://github.com/TanStack/router/commit/222300b82fe6f2a5e7e7f460ae21a2e35c6230d7)]: - - @tanstack/start-plugin-core@1.171.47 - -## 1.168.53 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.32 - - @tanstack/start-plugin-core@1.171.46 - - @tanstack/start-server-core@1.169.37 - - @tanstack/vue-router@1.170.35 - - @tanstack/vue-start-client@1.167.38 - - @tanstack/vue-start-server@1.167.42 - -## 1.168.52 - -### Patch Changes - -- Updated dependencies [[`e561fa1`](https://github.com/TanStack/router/commit/e561fa1d7118e3d29267cc3b6ce1130d6581f387), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26), [`a1c8d1a`](https://github.com/TanStack/router/commit/a1c8d1aa759c227eae9601a030321ac4c53c24bd), [`cbbfbe3`](https://github.com/TanStack/router/commit/cbbfbe37ab1dbe328c343cb437c5660769cc9f26)]: - - @tanstack/vue-router@1.170.34 - - @tanstack/start-plugin-core@1.171.45 - - @tanstack/start-client-core@1.170.31 - - @tanstack/start-server-core@1.169.36 - - @tanstack/vue-start-server@1.167.41 - - @tanstack/vue-start-client@1.167.37 - -## 1.168.51 - -### Patch Changes - -- Updated dependencies [[`ab99818`](https://github.com/TanStack/router/commit/ab99818225835a1553a9f3513cd2093ff1b257be)]: - - @tanstack/start-plugin-core@1.171.44 - -## 1.168.50 - -### Patch Changes - -- Updated dependencies [[`cb8749e`](https://github.com/TanStack/router/commit/cb8749e9fcd32d2290bf6c957b2701c3c0a14da5), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8), [`634da91`](https://github.com/TanStack/router/commit/634da9176e16fa8aa49af459bbb054fcae7d85ef), [`e9396c9`](https://github.com/TanStack/router/commit/e9396c928945d1dd6fd3f3bd8052143794f688b5), [`9872d2a`](https://github.com/TanStack/router/commit/9872d2ac39fc05f4ef6566c0b421f71ceb115244), [`9b2adaf`](https://github.com/TanStack/router/commit/9b2adaf8c3fca905f156c42f6a4fe17a787afcc8)]: - - @tanstack/vue-router@1.170.33 - - @tanstack/start-server-core@1.169.35 - - @tanstack/start-client-core@1.170.30 - - @tanstack/start-plugin-core@1.171.43 - - @tanstack/vue-start-client@1.167.36 - - @tanstack/vue-start-server@1.167.40 - -## 1.168.49 - -### Patch Changes - -- Updated dependencies [[`8c43c71`](https://github.com/TanStack/router/commit/8c43c712523fc63dc3a814f3a19617e270ce8ed1), [`d914b08`](https://github.com/TanStack/router/commit/d914b085bb4bf29ec18a531201e377c10681b661)]: - - @tanstack/vue-router@1.170.32 - - @tanstack/start-server-core@1.169.34 - - @tanstack/vue-start-client@1.167.35 - - @tanstack/vue-start-server@1.167.39 - - @tanstack/start-plugin-core@1.171.42 - -## 1.168.48 - -### Patch Changes - -- Updated dependencies [[`49bcd4d`](https://github.com/TanStack/router/commit/49bcd4db743dba4a783d5533a42a0f97a5721292), [`9c1871c`](https://github.com/TanStack/router/commit/9c1871ccc88bc1157186b8b460941a304ec740b8), [`919c397`](https://github.com/TanStack/router/commit/919c3971493374cccc963e75b9b2a4e98ebf878a)]: - - @tanstack/start-plugin-core@1.171.41 - - @tanstack/vue-router@1.170.31 - - @tanstack/start-server-core@1.169.33 - - @tanstack/start-client-core@1.170.29 - - @tanstack/vue-start-client@1.167.34 - - @tanstack/vue-start-server@1.167.38 - -## 1.168.47 - -### Patch Changes - -- Updated dependencies [[`2f20c00`](https://github.com/TanStack/router/commit/2f20c00224c5ba63467551914e0c37012588c4c2), [`28a5e45`](https://github.com/TanStack/router/commit/28a5e4504e4ea5cb1480667a4bea2588a53e110f), [`f0b5eda`](https://github.com/TanStack/router/commit/f0b5eda544606686a8a8d675a686ca1366428b96), [`37877da`](https://github.com/TanStack/router/commit/37877da166fe4ce055c7b85e138b6681ebd7e8b4), [`0497cae`](https://github.com/TanStack/router/commit/0497caeef3ff7e1c1c6080eca38bca24e7ec320b), [`0caf6b9`](https://github.com/TanStack/router/commit/0caf6b9a2b7e14b0b146c74cc27cb05c19d700a5)]: - - @tanstack/vue-router@1.170.30 - - @tanstack/start-plugin-core@1.171.40 - - @tanstack/start-client-core@1.170.28 - - @tanstack/start-server-core@1.169.32 - - @tanstack/vue-start-client@1.167.33 - - @tanstack/vue-start-server@1.167.37 - -## 1.168.46 - -### Patch Changes - -- Updated dependencies [[`fa65287`](https://github.com/TanStack/router/commit/fa652872812c9433ba8b9d9a285e51b535e7367c), [`cb281d7`](https://github.com/TanStack/router/commit/cb281d70c1f5fe780f9d07bc500ea3a284a4e04b), [`a0041bb`](https://github.com/TanStack/router/commit/a0041bb36e700b3263b894e4d1573d924383b56b)]: - - @tanstack/vue-router@1.170.29 - - @tanstack/start-plugin-core@1.171.39 - - @tanstack/start-client-core@1.170.27 - - @tanstack/start-server-core@1.169.31 - - @tanstack/vue-start-client@1.167.32 - - @tanstack/vue-start-server@1.167.36 - -## 1.168.45 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.26 - - @tanstack/start-plugin-core@1.171.38 - - @tanstack/start-server-core@1.169.30 - - @tanstack/vue-router@1.170.28 - - @tanstack/vue-start-client@1.167.31 - - @tanstack/vue-start-server@1.167.35 - -## 1.168.44 - -### Patch Changes - -- Updated dependencies [[`5d3785d`](https://github.com/TanStack/router/commit/5d3785dcc366b66b1c261b5d01e66af778ff1175)]: - - @tanstack/vue-router@1.170.27 - - @tanstack/start-client-core@1.170.25 - - @tanstack/start-plugin-core@1.171.37 - - @tanstack/start-server-core@1.169.29 - - @tanstack/vue-start-client@1.167.30 - - @tanstack/vue-start-server@1.167.34 - -## 1.168.43 - -### Patch Changes - -- Updated dependencies [[`0fdf9ff`](https://github.com/TanStack/router/commit/0fdf9ff16fc532de9fc131d18df167ebd8038720)]: - - @tanstack/vue-router@1.170.26 - - @tanstack/start-client-core@1.170.24 - - @tanstack/start-plugin-core@1.171.36 - - @tanstack/start-server-core@1.169.28 - - @tanstack/vue-start-client@1.167.29 - - @tanstack/vue-start-server@1.167.33 - -## 1.168.42 - -### Patch Changes - -- Updated dependencies [[`31882c7`](https://github.com/TanStack/router/commit/31882c7fa87debef236228831655cb112c20ce90), [`3848503`](https://github.com/TanStack/router/commit/38485038c52ff898777cabeeeb2eaaa29c93f789)]: - - @tanstack/vue-router@1.170.25 - - @tanstack/start-client-core@1.170.23 - - @tanstack/start-plugin-core@1.171.35 - - @tanstack/start-server-core@1.169.27 - - @tanstack/vue-start-client@1.167.28 - - @tanstack/vue-start-server@1.167.32 - -## 1.168.41 - -### Patch Changes - -- Updated dependencies [[`f500760`](https://github.com/TanStack/router/commit/f5007607d62e932b8df19de866cdc6bddcff8db3), [`1aafca9`](https://github.com/TanStack/router/commit/1aafca9b45d24f8f0dba78e716fc9582346c6ca1), [`aa10b65`](https://github.com/TanStack/router/commit/aa10b6589eeda215f5a60ea0af95a3101d8c414e)]: - - @tanstack/vue-router@1.170.24 - - @tanstack/start-client-core@1.170.22 - - @tanstack/start-plugin-core@1.171.34 - - @tanstack/start-server-core@1.169.26 - - @tanstack/vue-start-client@1.167.27 - - @tanstack/vue-start-server@1.167.31 - -## 1.168.40 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.21 - - @tanstack/start-plugin-core@1.171.33 - - @tanstack/start-server-core@1.169.25 - - @tanstack/vue-router@1.170.23 - - @tanstack/vue-start-client@1.167.26 - - @tanstack/vue-start-server@1.167.30 - -## 1.168.39 - -### Patch Changes - -- Updated dependencies [[`c59788c`](https://github.com/TanStack/router/commit/c59788ca20f2d2e7f264a859ebe01b7646ba3154)]: - - @tanstack/start-client-core@1.170.20 - - @tanstack/start-plugin-core@1.171.32 - - @tanstack/start-server-core@1.169.24 - - @tanstack/vue-router@1.170.22 - - @tanstack/vue-start-client@1.167.25 - - @tanstack/vue-start-server@1.167.29 - -## 1.168.38 - -### Patch Changes - -- Updated dependencies [[`2fbc99f`](https://github.com/TanStack/router/commit/2fbc99f2c262b057cb957e6ebba1ee073c655186), [`6bede65`](https://github.com/TanStack/router/commit/6bede65d7074dcd83455151b66b4574268bc782c)]: - - @tanstack/start-client-core@1.170.19 - - @tanstack/start-server-core@1.169.23 - - @tanstack/vue-start-client@1.167.24 - - @tanstack/start-plugin-core@1.171.31 - - @tanstack/vue-start-server@1.167.28 - -## 1.168.37 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.18 - - @tanstack/start-plugin-core@1.171.30 - - @tanstack/start-server-core@1.169.22 - - @tanstack/vue-router@1.170.21 - - @tanstack/vue-start-client@1.167.23 - - @tanstack/vue-start-server@1.167.27 - -## 1.168.36 - -### Patch Changes - -- Updated dependencies [[`2435885`](https://github.com/TanStack/router/commit/2435885fa8b5e31c8c4b74d93920919f27316ebf), [`9cac62a`](https://github.com/TanStack/router/commit/9cac62a5c7f99ef070991ea6f1fa7e42c746d46b), [`86bf510`](https://github.com/TanStack/router/commit/86bf510c2923afb76804223bd04afc2a809b33e7), [`6aefb33`](https://github.com/TanStack/router/commit/6aefb3392595a07a93f89301d7b5e3558ff9190c)]: - - @tanstack/vue-router@1.170.20 - - @tanstack/start-client-core@1.170.17 - - @tanstack/start-server-core@1.169.21 - - @tanstack/vue-start-client@1.167.22 - - @tanstack/vue-start-server@1.167.26 - - @tanstack/start-plugin-core@1.171.29 - -## 1.168.35 - -### Patch Changes - -- Updated dependencies [[`b2908c6`](https://github.com/TanStack/router/commit/b2908c642ac09aa08e6d965d2a820d7186e42fd5)]: - - @tanstack/start-client-core@1.170.16 - - @tanstack/start-plugin-core@1.171.28 - - @tanstack/start-server-core@1.169.20 - - @tanstack/vue-router@1.170.19 - - @tanstack/vue-start-client@1.167.21 - - @tanstack/vue-start-server@1.167.25 - -## 1.168.34 - -### Patch Changes - -- Updated dependencies [[`45c4ad8`](https://github.com/TanStack/router/commit/45c4ad8d629e291fab70c37900525449e415ffcd)]: - - @tanstack/vue-router@1.170.18 - - @tanstack/start-client-core@1.170.15 - - @tanstack/start-plugin-core@1.171.27 - - @tanstack/start-server-core@1.169.19 - - @tanstack/vue-start-client@1.167.20 - - @tanstack/vue-start-server@1.167.24 - -## 1.168.33 - -### Patch Changes - -- Updated dependencies [[`65f7b7f`](https://github.com/TanStack/router/commit/65f7b7f791272f2ea581a1fe0fcd43183bc01162)]: - - @tanstack/start-server-core@1.169.18 - - @tanstack/start-plugin-core@1.171.26 - - @tanstack/vue-start-server@1.167.23 - -## 1.168.32 - -### Patch Changes - -- Updated dependencies [[`7592555`](https://github.com/TanStack/router/commit/7592555b86c968efbc8c817ac0cf6fdae60aabe0)]: - - @tanstack/start-plugin-core@1.171.25 - -## 1.168.31 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-plugin-core@1.171.24 - -## 1.168.30 - -### Patch Changes - -- Updated dependencies [[`ffdd64e`](https://github.com/TanStack/router/commit/ffdd64e842acacbc9d368a4803a9e474e9f0c0ff)]: - - @tanstack/start-plugin-core@1.171.23 - -## 1.168.29 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-plugin-core@1.171.22 - -## 1.168.28 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-plugin-core@1.171.21 - -## 1.168.27 - -### Patch Changes - -- Updated dependencies []: - - @tanstack/start-client-core@1.170.14 - - @tanstack/start-plugin-core@1.171.20 - - @tanstack/start-server-core@1.169.17 - - @tanstack/vue-router@1.170.17 - - @tanstack/vue-start-client@1.167.19 - - @tanstack/vue-start-server@1.167.22 - ## 1.168.26 ### Patch Changes diff --git a/packages/vue-start/package.json b/packages/vue-start/package.json index bf6b79e636..78e746056f 100644 --- a/packages/vue-start/package.json +++ b/packages/vue-start/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-start", - "version": "1.169.6", + "version": "1.168.26", "description": "Modern and scalable routing for Vue applications", "author": "Tanner Linsley", "license": "MIT", @@ -118,25 +118,19 @@ "@tanstack/vue-router": "workspace:*", "@tanstack/vue-start-client": "workspace:*", "@tanstack/vue-start-server": "workspace:*", - "pathe": "catalog:" + "pathe": "^2.0.3" }, "devDependencies": { - "@rsbuild/core": "catalog:", + "@rsbuild/core": "^2.0.11", "@tanstack/router-utils": "workspace:*", "@types/node": ">=20", - "@vitejs/plugin-vue-jsx": "catalog:", + "@vitejs/plugin-vue-jsx": "^4.1.2", "vite": "*", - "vue": "catalog:", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "vue": "^3.5.25" }, "peerDependencies": { - "@rsbuild/core": "^2.0.5", - "vite": ">=8.0.0", + "@rsbuild/core": "^2.0.0", + "vite": ">=7.0.0", "vue": "^3.3.0" }, "peerDependenciesMeta": { diff --git a/packages/vue-start/skills/vue-start/SKILL.md b/packages/vue-start/skills/vue-start/SKILL.md index 3a32dc169a..13fac52d1b 100644 --- a/packages/vue-start/skills/vue-start/SKILL.md +++ b/packages/vue-start/skills/vue-start/SKILL.md @@ -5,11 +5,10 @@ description: >- Vite plugin, StartClient, StartServer, Vue-specific setup, re-exports from @tanstack/start-client-core. Full project setup with Vue. -metadata: - type: framework - library: tanstack-start - library_version: '1.166.2' - framework: vue +type: framework +library: tanstack-start +library_version: '1.166.2' +framework: vue requires: - start-core sources: @@ -18,7 +17,7 @@ sources: # Vue Start (`@tanstack/vue-start`) -This skill builds on start-core. Read `@tanstack/start-client-core#start-core` first for foundational concepts. +This skill builds on start-core. Read [start-core](../../../start-client-core/skills/start-core/SKILL.md) first for foundational concepts. This skill covers the Vue-specific bindings, setup, and patterns for TanStack Start. @@ -36,7 +35,7 @@ This skill covers the Vue-specific bindings, setup, and patterns for TanStack St All core APIs (`createServerFn`, `createMiddleware`, `createStart`, `createIsomorphicFn`, `createServerOnlyFn`, `createClientOnlyFn`) are available from `@tanstack/vue-start`. -Server utilities (`getRequest`, `getRequestHeader`, `setResponseHeader`, `setCookie`, `getCookie`) are imported from `@tanstack/vue-start/server`. +Server utilities (`getRequest`, `getRequestHeader`, `setResponseHeader`, `setCookie`, `getCookie`, `useSession`) are imported from `@tanstack/vue-start/server`. ## Full Project Setup @@ -151,23 +150,20 @@ function RootComponent() { ```tsx import { createFileRoute } from '@tanstack/vue-router' import { createServerFn } from '@tanstack/vue-start' -import { defineComponent } from 'vue' const getGreeting = createServerFn({ method: 'GET' }).handler(async () => { return 'Hello from TanStack Start!' }) -const HomePage = defineComponent({ - setup() { - const greeting = Route.useLoaderData() - return () =>

{greeting.value}

- }, -}) - export const Route = createFileRoute('/')({ loader: () => getGreeting(), component: HomePage, }) + +function HomePage() { + const greeting = Route.useLoaderData() + return

{greeting.value}

+} ``` ## useServerFn Composable @@ -303,6 +299,6 @@ function RootComponent() { ## Cross-References -- `@tanstack/start-client-core#start-core` — core Start concepts -- `@tanstack/router-core#router-core` — routing fundamentals -- `@tanstack/vue-router#vue-router` — Vue Router composables and components +- [start-core](../../../start-client-core/skills/start-core/SKILL.md) — core Start concepts +- [router-core](../../../router-core/skills/router-core/SKILL.md) — routing fundamentals +- [vue-router](../../../vue-router/skills/vue-router/SKILL.md) — Vue Router composables and components diff --git a/packages/vue-start/src/default-entry/server.ts b/packages/vue-start/src/default-entry/server.ts index c716a7ac14..5729a469d3 100644 --- a/packages/vue-start/src/default-entry/server.ts +++ b/packages/vue-start/src/default-entry/server.ts @@ -1,7 +1,6 @@ import { createStartHandler, defaultStreamHandler, - createServerEntry as createCoreServerEntry, } from '@tanstack/vue-start/server' import type { Register } from '@tanstack/vue-router' import type { RequestHandler } from '@tanstack/vue-start/server' @@ -11,8 +10,12 @@ const fetch = createStartHandler(defaultStreamHandler) // Providing `RequestHandler` from `@tanstack/vue-start/server` is required so that the output types don't import it from `@tanstack/start-server-core` export type ServerEntry = { fetch: RequestHandler } -// Bind the shared request context and fallback error handling to Vue's Register. -export const createServerEntry: (entry: ServerEntry) => ServerEntry = - createCoreServerEntry +export function createServerEntry(entry: ServerEntry): ServerEntry { + return { + async fetch(...args) { + return await entry.fetch(...args) + }, + } +} export default createServerEntry({ fetch }) diff --git a/packages/vue-start/src/plugin/vite.ts b/packages/vue-start/src/plugin/vite.ts index d257ce7256..4af970a088 100644 --- a/packages/vue-start/src/plugin/vite.ts +++ b/packages/vue-start/src/plugin/vite.ts @@ -39,14 +39,6 @@ export function tanstackStart( '@tanstack/vue-router', '@tanstack/start-static-server-functions', ], - include: [ - // `@tanstack/vue-router` is excluded, so the scanner never - // sees its `@tanstack/vue-store` import; discovered while - // crawling, it imports `vue` and re-chunks the already - // optimized `vue`, which forces a full page reload on - // every cold start (and loses an in-flight page load). - '@tanstack/vue-router > @tanstack/vue-store', - ], } : undefined, } diff --git a/packages/zod-adapter/package.json b/packages/zod-adapter/package.json index 0f2c330d0c..d2c3a19efa 100644 --- a/packages/zod-adapter/package.json +++ b/packages/zod-adapter/package.json @@ -27,12 +27,12 @@ "clean": "rimraf ./dist && rimraf ./coverage", "test:eslint": "eslint ./src", "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js", "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js", "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js", "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js", "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js", - "test:types:ts60": "tsc6", - "test:types:ts70": "tsc", + "test:types:ts60": "tsc", "test:unit": "vitest", "test:unit:dev": "pnpm run test:unit --watch --typecheck", "test:build": "publint --strict && attw --ignore-rules no-resolution --pack .", @@ -64,21 +64,13 @@ "node": ">=20.19" }, "devDependencies": { - "@testing-library/jest-dom": "catalog:", - "@testing-library/react": "catalog:", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.2.0", "@tanstack/react-router": "workspace:*", "zod": "^3.24.2", - "react": "catalog:", - "react-dom": "catalog:", - "vite": "*", - "@tanstack/vite-config": "catalog:", - "vitest": "catalog:", - "jsdom": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "@arethetypeswrong/cli": "catalog:", - "publint": "catalog:", - "rimraf": "catalog:" + "react": "^19.0.0", + "react-dom": "^19.0.0", + "vite": "*" }, "peerDependencies": { "zod": "^3.23.8", diff --git a/packages/zod-adapter/tests/index.test.tsx b/packages/zod-adapter/tests/index.test.tsx index 36abe0f239..d59ec207fc 100644 --- a/packages/zod-adapter/tests/index.test.tsx +++ b/packages/zod-adapter/tests/index.test.tsx @@ -9,6 +9,7 @@ import { RouterProvider, } from '@tanstack/react-router' import { cleanup, fireEvent, render, screen } from '@testing-library/react' +import '@testing-library/jest-dom/vitest' afterEach(() => { vi.resetAllMocks() diff --git a/packages/zod-adapter/tests/jest-dom.setup.ts b/packages/zod-adapter/tests/jest-dom.setup.ts deleted file mode 100644 index 8f7cbf15be..0000000000 --- a/packages/zod-adapter/tests/jest-dom.setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as jestDomMatchers from '@testing-library/jest-dom/matchers' -import { expect } from 'vitest' -import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers' - -// Workaround for Vitest 5: remove once testing-library/jest-dom#742 is merged -// and released, and go back to `import '@testing-library/jest-dom/vitest'`. -// That entry imports `vitest` from its own install location, which can resolve -// a different Vitest copy than the one running these tests, and its types -// augment Vitest 4's `Assertion` instead of Vitest 5's `Matchers`. -// Keep `jest-dom` in this file name: vite-plugin-solid only skips injecting -// `@testing-library/jest-dom/vitest` when a setup file path contains it. -expect.extend(jestDomMatchers) - -declare module 'vitest' { - // Type parameter names must match Vitest's declaration for the interfaces to merge. - // eslint-disable-next-line @typescript-eslint/naming-convention - interface Matchers extends TestingLibraryMatchers {} -} diff --git a/packages/zod-adapter/vite.config.ts b/packages/zod-adapter/vite.config.ts index 8d553e0a59..8c8c0c519f 100644 --- a/packages/zod-adapter/vite.config.ts +++ b/packages/zod-adapter/vite.config.ts @@ -9,7 +9,6 @@ const config = defineConfig({ watch: false, environment: 'jsdom', typecheck: { enabled: true }, - setupFiles: ['./tests/jest-dom.setup.ts'], }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4328f4fab6..d2e72f4574 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,261 +1,24 @@ ---- -lockfileVersion: '9.0' - -importers: - - .: - configDependencies: {} - packageManagerDependencies: - pnpm: - specifier: 12.18.0 - version: 12.18.0 - -packages: - - '@pnpm/exe.android-arm64@12.18.0': - resolution: {integrity: sha512-fOF6IwgvnUKEmVedGqiAsNPfN2Ry8GvaqzSQOiF3RJFbpBfPKO/6YT54s1GjToyYinRxw9preHHPe4y2N3SzhA==} - cpu: [arm64] - os: [android] - - '@pnpm/exe.android-x64@12.18.0': - resolution: {integrity: sha512-6OiolnaCsB3/GcJ9XNrenbUH3zFHRJ+5QynrMUUEyThbgnnCzWxa199hpQlOmxN4rAXuYQ0IYgWFNUZxyzg31Q==} - cpu: [x64] - os: [android] - - '@pnpm/exe.darwin-arm64@12.18.0': - resolution: {integrity: sha512-zkq+4YzVIX39ETYLyC3W7LY7MpHEU/J3nRhHl4i2yPld2Cf2+rEKRh3ejJ4AmaQ77HHJLCktY4Z3jq0fpcxFXg==} - cpu: [arm64] - os: [darwin] - - '@pnpm/exe.darwin-x64@12.18.0': - resolution: {integrity: sha512-qMsL9qx92unOTa6hgkfiTJv8ceZaTx0IQg7InhYDVX2ZrTECujaVEEVypnJK5m3eGUsP1KD7Y4qIgleCwfRsYw==} - cpu: [x64] - os: [darwin] - - '@pnpm/exe.freebsd-x64@12.18.0': - resolution: {integrity: sha512-/9vy/4ms52cU4MjZ5NhHd6N2d9L9W0kARf5/ff2tweAHu0VeUzs/0qp/7ZHFuddm2Wa/m0AKQoPum9AVUCqKsw==} - cpu: [x64] - os: [freebsd] - - '@pnpm/exe.linux-arm64-musl@12.18.0': - resolution: {integrity: sha512-Vp+TIMPPyackVCXkOdEKH/RmAn/r07EcIyrgZYQK7VrkksqZOie0GnWIx+85mPqeFEYCRtXIZAFJ9L4ceTndDg==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@pnpm/exe.linux-arm64@12.18.0': - resolution: {integrity: sha512-2dpyVBCHT+FfpuQh9i+7MXAqNWYLCvD5vYr5p6Eimxoga8USLnjbUgyj72AOrO0hjc5ri3TEFP3jiyBHjkSZpQ==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@pnpm/exe.linux-ppc64@12.18.0': - resolution: {integrity: sha512-BBOOOfNJ2QwIIya3eKqOjiN4WNTszfRz7HCvw9XggcT7+ftMjNP8XJ/GfW+ltCBeUFR9d8WBVsr2m/NLjX2CZQ==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@pnpm/exe.linux-riscv64@12.18.0': - resolution: {integrity: sha512-7kMN77xSOYJX8GPSH5RbNAc5oM61LMmcSUukDDUwllnZPXm8GRPskCNsTWy8SCw01Kr1FB+5SwGNMiTdiziLNQ==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@pnpm/exe.linux-s390x@12.18.0': - resolution: {integrity: sha512-htuSCpEcmDzhKoJqXbPkvfr176dBHU0QIF5mWcRiqxRXAB/1JoYiMYotfjWpk+ztgpB9qlx4XnWlLFAf7gzc6g==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@pnpm/exe.linux-x64-musl@12.18.0': - resolution: {integrity: sha512-Uj+vzfIQ62kDP10x36yHZIXVs5ohdNtiPYwn5FhCLlNScHPo0OAI+ShGDtLofiBXKE7umu71Jmjm7N8a8zVcDw==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@pnpm/exe.linux-x64@12.18.0': - resolution: {integrity: sha512-OJ+X2wcraldCwj75pCIerWARQSRpdfj0eBTs/2ODyhfeW46ylOnjTIE/GKra6Mn6E72/gBmXS8igrUioa+F9fQ==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@pnpm/exe.win32-arm64@12.18.0': - resolution: {integrity: sha512-wEY6jiACGcbhhi5yD59doHqNTndS7AaujaPmtWAu1DKkHru2hy5fJ9yUGecW72Ypaw2/I3BEprfMOopap2NQtw==} - cpu: [arm64] - os: [win32] - - '@pnpm/exe.win32-x64@12.18.0': - resolution: {integrity: sha512-5FJkghO7RLRkQpWxeVEygW9XsmnNuxzPfXbgwFWCHsFyFhpDn/vOdL88ToQEM0Kt5igdW5s6U0/IDH8Dvkt3pg==} - cpu: [x64] - os: [win32] - - pnpm@12.18.0: - resolution: {integrity: sha512-nXiC1dyCFH7PxOBiqjSDTgrQKWcQoYN6ERWuASEn02txCeMhrBWYod0KZVl2gbHpmRfhLtDXSerpEYeUM2O+sw==} - engines: {node: '>=18'} - hasBin: true - -snapshots: - - '@pnpm/exe.android-arm64@12.18.0': - optional: true - - '@pnpm/exe.android-x64@12.18.0': - optional: true - - '@pnpm/exe.darwin-arm64@12.18.0': - optional: true - - '@pnpm/exe.darwin-x64@12.18.0': - optional: true - - '@pnpm/exe.freebsd-x64@12.18.0': - optional: true - - '@pnpm/exe.linux-arm64-musl@12.18.0': - optional: true - - '@pnpm/exe.linux-arm64@12.18.0': - optional: true - - '@pnpm/exe.linux-ppc64@12.18.0': - optional: true - - '@pnpm/exe.linux-riscv64@12.18.0': - optional: true - - '@pnpm/exe.linux-s390x@12.18.0': - optional: true - - '@pnpm/exe.linux-x64-musl@12.18.0': - optional: true - - '@pnpm/exe.linux-x64@12.18.0': - optional: true - - '@pnpm/exe.win32-arm64@12.18.0': - optional: true - - '@pnpm/exe.win32-x64@12.18.0': - optional: true - - pnpm@12.18.0: - optionalDependencies: - '@pnpm/exe.android-arm64': 12.18.0 - '@pnpm/exe.android-x64': 12.18.0 - '@pnpm/exe.darwin-arm64': 12.18.0 - '@pnpm/exe.darwin-x64': 12.18.0 - '@pnpm/exe.freebsd-x64': 12.18.0 - '@pnpm/exe.linux-arm64': 12.18.0 - '@pnpm/exe.linux-arm64-musl': 12.18.0 - '@pnpm/exe.linux-ppc64': 12.18.0 - '@pnpm/exe.linux-riscv64': 12.18.0 - '@pnpm/exe.linux-s390x': 12.18.0 - '@pnpm/exe.linux-x64': 12.18.0 - '@pnpm/exe.linux-x64-musl': 12.18.0 - '@pnpm/exe.win32-arm64': 12.18.0 - '@pnpm/exe.win32-x64': 12.18.0 - ---- lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -catalogs: - default: - '@arethetypeswrong/cli': - specifier: ^0.18.4 - version: 0.18.4 - '@babel/core': - specifier: ^7.29.7 - version: 7.29.7 - '@babel/types': - specifier: ^7.29.8 - version: 7.29.8 - '@eslint-react/eslint-plugin': - specifier: ^1.26.2 - version: 1.26.2 - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@tanstack/vite-config': - specifier: 0.5.2 - version: 0.5.2 - '@testing-library/jest-dom': - specifier: ^7.0.1 - version: 7.0.1 - '@testing-library/react': - specifier: ^16.2.0 - version: 16.3.0 - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1 - '@vitejs/plugin-vue-jsx': - specifier: ^4.1.2 - version: 4.2.0 - '@vitest/ui': - specifier: ^5.0.4 - version: 5.0.4 - chokidar: - specifier: ^5.0.0 - version: 5.0.0 - combinate: - specifier: ^1.1.11 - version: 1.1.11 - eslint-plugin-react-hooks: - specifier: ^5.1.0 - version: 5.1.0 - isbot: - specifier: ^5.1.22 - version: 5.1.28 - jsdom: - specifier: ^25.0.1 - version: 25.0.1 - pathe: - specifier: ^2.0.3 - version: 2.0.3 - publint: - specifier: ^0.3.16 - version: 0.3.17 - redaxios: - specifier: ^0.5.1 - version: 0.5.1 - rimraf: - specifier: ^6.1.2 - version: 6.1.2 - tinyglobby: - specifier: ^0.2.17 - version: 0.2.17 - vite-plugin-solid: - specifier: 2.11.10 - version: 2.11.10 - vitest: - specifier: ^5.0.4 - version: 5.0.4 - vue: - specifier: ^3.5.25 - version: 3.5.25 - zod: - specifier: ^4.5.4 - version: 4.5.4 - overrides: '@types/babel__traverse': ^7.28.0 vite-plugin-dts: 4.2.3 - solid-js: 1.9.12 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 eslint: ^9.22.0 - vite: ^8.3.4 + vite: ^8.0.14 '@types/node': 25.0.9 - '@playwright/test': ^1.63.0 - '@tanstack/query-core': ^5.102.0 - '@tanstack/react-query': ^5.102.0 - '@tanstack/solid-query': ^5.102.0 - '@tanstack/vue-query': ^5.102.0 + '@playwright/test': ^1.57.0 + '@tanstack/query-core': ^5.99.0 + '@tanstack/react-query': ^5.99.0 + '@tanstack/solid-query': ^6.0.0-beta.5 + '@tanstack/vue-query': ^5.99.0 '@tanstack/history': workspace:* '@tanstack/router-core': workspace:* '@tanstack/react-router': workspace:* @@ -294,56 +57,114 @@ overrides: '@tanstack/eslint-plugin-router': workspace:* '@tanstack/router-utils': workspace:* '@tanstack/start-static-server-functions': workspace:* + '@tanstack/nitro-v2-vite-plugin': workspace:* importers: .: devDependencies: + '@arethetypeswrong/cli': + specifier: ^0.18.4 + version: 0.18.4 '@changesets/changelog-github': specifier: ^0.7.0 version: 0.7.0 '@changesets/cli': specifier: ^2.30.0 version: 2.30.0(@types/node@25.0.9) + '@eslint-react/eslint-plugin': + specifier: ^1.26.2 + version: 1.26.2(eslint@9.22.0(jiti@2.7.0))(ts-api-utils@2.4.0(typescript@6.0.2))(typescript@6.0.2) '@nx/devkit': - specifier: 24.0.0 - version: 24.0.0(nx@24.0.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@10.2.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))) + specifier: 22.7.5 + version: 22.7.5(nx@22.7.5(@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))(debug@4.4.3)) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 + '@swc-node/core': + specifier: ^1.14.1 + version: 1.14.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26) '@swc-node/register': specifier: ^1.11.1 - 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@10.2.2) + version: 1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2) '@tanstack/eslint-config': specifier: 0.4.0 - version: 0.4.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 0.4.0(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@tanstack/query-core': + specifier: ^5.99.0 + version: 5.99.0 + '@tanstack/react-query': + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) + '@tanstack/solid-query': + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) + '@tanstack/vite-config': + specifier: 0.5.2 + version: 0.5.2(@types/node@25.0.9)(typescript@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)) + '@tanstack/vue-query': + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 + '@types/react': + specifier: ^19.2.8 + version: 19.2.9 + '@types/react-dom': + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.9) + '@vitest/browser': + specifier: ^4.1.4 + version: 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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))(vitest@4.1.4) + '@vitest/ui': + specifier: ^4.1.4 + version: 4.1.4(vitest@4.1.4) eslint: specifier: ^9.22.0 - version: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + version: 9.22.0(jiti@2.7.0) + eslint-plugin-react-hooks: + specifier: ^5.1.0 + version: 5.1.0(eslint@9.22.0(jiti@2.7.0)) eslint-plugin-unused-imports: specifier: ^4.1.4 - version: 4.1.4(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + version: 4.1.4(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0)) + jsdom: + specifier: ^25.0.1 + version: 25.0.1 markdown-link-extractor: specifier: ^4.0.3 version: 4.0.3 nx: - specifier: 24.0.0 - version: 24.0.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@10.2.2))(@swc/core@1.15.33(@swc/helpers@0.5.23)) + specifier: 22.7.5 + version: 22.7.5(@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))(debug@4.4.3) prettier: specifier: ^3.8.0 version: 3.8.1 + publint: + specifier: ^0.3.16 + version: 0.3.17 + react: + specifier: ^19.2.3 + version: 19.2.3 + react-dom: + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) + redaxios: + specifier: ^0.5.1 + version: 0.5.1 + rimraf: + specifier: ^6.1.2 + version: 6.1.2 tinyglobby: specifier: ^0.2.15 version: 0.2.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 + typescript55: + specifier: npm:typescript@5.5 + version: typescript@5.5.4 typescript56: specifier: npm:typescript@5.6 version: typescript@5.6.3 @@ -357,20 +178,20 @@ importers: specifier: npm:typescript@5.9 version: typescript@5.9.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) + vitest: + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@25.0.1)(msw@2.7.0(@types/node@25.0.9)(typescript@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)) benchmarks/bundle-size: dependencies: - '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../packages/react-router - '@tanstack/react-router-ssr-query': - specifier: workspace:* - version: link:../../packages/react-router-ssr-query '@tanstack/react-start': specifier: workspace:* version: link:../../packages/react-start @@ -387,24 +208,24 @@ importers: specifier: workspace:* version: link:../../packages/vue-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-plugin': specifier: workspace:* version: link:../../packages/router-plugin @@ -414,33 +235,30 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) benchmarks/client-nav: dependencies: - '@tanstack/history': - specifier: workspace:* - version: link:../../packages/history + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../packages/react-router @@ -454,21 +272,21 @@ importers: specifier: workspace:* version: link:../../packages/vue-router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@codspeed/vitest-plugin': - specifier: ^6.0.1 - version: 6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@6.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vitest@5.0.4) + specifier: ^5.5.0 + version: 5.5.0(debug@4.4.3)(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 @@ -477,46 +295,37 @@ importers: version: link:../../packages/router-plugin '@testing-library/react': specifier: ^16.2.0 - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/jsdom': specifier: 28.0.0 version: 28.0.0 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: ^29.1.1 - version: 29.1.1(@noble/hashes@2.0.1) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) benchmarks/memory/client: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -530,21 +339,21 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@codspeed/vitest-plugin': - specifier: ^6.0.1 - version: 6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@6.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vitest@5.0.4) + specifier: ^5.5.0 + version: 5.5.0(debug@4.4.3)(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 @@ -553,46 +362,40 @@ importers: version: 1.6.0 '@testing-library/react': specifier: ^16.2.0 - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/jsdom': specifier: 28.0.0 version: 28.0.0 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) jsdom: specifier: 29.1.1 version: 29.1.1(@noble/hashes@2.0.1) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) benchmarks/memory/server: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -612,57 +415,51 @@ importers: specifier: workspace:* version: link:../../../packages/vue-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@codspeed/vitest-plugin': - specifier: ^6.0.1 - version: 6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@6.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vitest@5.0.4) + specifier: ^5.5.0 + version: 5.5.0(debug@4.4.3)(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 '@platformatic/flame': specifier: ^1.6.0 version: 1.6.0 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: 29.1.1 - version: 29.1.1(@noble/hashes@2.0.1) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) benchmarks/ssr: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../packages/react-router @@ -682,72 +479,54 @@ importers: specifier: workspace:* version: link:../../packages/vue-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@codspeed/vitest-plugin': - specifier: ^6.0.1 - version: 6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@6.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vitest@5.0.4) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 + specifier: ^5.5.0 + version: 5.5.0(debug@4.4.3)(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) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: 29.1.1 - version: 29.1.1(@noble/hashes@2.0.1) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) e2e/e2e-utils: devDependencies: - '@msw/playwright': - specifier: 0.6.7 - version: 0.6.7(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2)) - msw: - specifier: 2.15.0 - version: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + get-port-please: + specifier: ^3.2.0 + version: 3.2.0 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) e2e/eslint-plugin-start: devDependencies: @@ -768,19 +547,19 @@ importers: version: 19.2.9 '@typescript-eslint/parser': specifier: ^8.23.0 - version: 8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) + version: 8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) eslint: specifier: ^9.22.0 - version: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + version: 9.22.0(jiti@2.7.0) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 typescript: specifier: ^5.7.2 version: 5.9.2 vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@5.9.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)) e2e/react-router/basepath-file-based: dependencies: @@ -794,15 +573,15 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -814,16 +593,16 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -831,24 +610,21 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 - zod: - specifier: 'catalog:' - version: 4.5.4 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -860,10 +636,10 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-esbuild-file-based: dependencies: @@ -877,21 +653,21 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -909,7 +685,7 @@ importers: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -920,13 +696,13 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -936,8 +712,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -949,19 +725,19 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-file-based-code-splitting: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -972,14 +748,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - redaxios: - specifier: 'catalog:' - version: 0.5.1 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -988,8 +761,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1001,22 +774,22 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-react-query: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1024,21 +797,21 @@ importers: specifier: workspace:* version: link:../../../packages/router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1050,22 +823,22 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-react-query-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1076,13 +849,13 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -1092,8 +865,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1105,16 +878,16 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-scroll-restoration: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1123,23 +896,23 @@ importers: version: link:../../../packages/react-router-devtools '@tanstack/react-virtual': specifier: ^3.13.0 - version: 3.13.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 3.13.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1151,19 +924,19 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: specifier: ~5.9.0 version: 5.9.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-virtual-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1177,13 +950,13 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -1193,8 +966,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1206,16 +979,16 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/basic-virtual-named-export-config-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1229,13 +1002,13 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -1245,8 +1018,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1258,10 +1031,10 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/escaped-special-strings: dependencies: @@ -1272,15 +1045,15 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1292,16 +1065,16 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/generator-cli-only: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1312,21 +1085,21 @@ importers: specifier: workspace:* version: link:../../../packages/router-cli react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1338,25 +1111,25 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/i18n-paraglide: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -1365,8 +1138,8 @@ importers: specifier: ^2.4.0 version: 2.4.0(babel-plugin-macros@3.1.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1382,126 +1155,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-router/issue-4759: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-router/issue-7120: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/router-plugin': - specifier: workspace:* - version: link:../../../packages/router-plugin - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-router/issue-7457: - dependencies: - '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/router-plugin': - specifier: workspace:* - version: link:../../../packages/router-plugin - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/js-only-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1509,21 +1177,21 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1538,10 +1206,10 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/match-params: dependencies: @@ -1549,15 +1217,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1568,48 +1236,8 @@ importers: specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-router/react-compiler: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@babel/core': - specifier: ^7.29.0 - version: 7.29.0(supports-color@10.2.2) - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@rolldown/plugin-babel': - specifier: ^0.2.0 - version: 0.2.3(@babel/core@7.29.0(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.0(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - babel-plugin-react-compiler: - specifier: ^1.0.0 - version: 1.0.0 - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/rspack-basic-file-based: dependencies: @@ -1620,24 +1248,24 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -1653,9 +1281,6 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.3 @@ -1663,8 +1288,8 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 e2e/react-router/rspack-basic-virtual-named-export-config-file-based: dependencies: @@ -1675,24 +1300,24 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -1711,9 +1336,6 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.3 @@ -1721,14 +1343,14 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 e2e/react-router/scroll-restoration-sandbox-vite: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1739,13 +1361,13 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -1755,8 +1377,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1768,25 +1390,25 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/sentry-integration: dependencies: '@sentry/react': specifier: ^10.32.0 - version: 10.32.0(react@19.2.9) + version: 10.32.0(react@19.2.3) '@sentry/tracing': specifier: ^7.120.4 version: 7.120.4 '@sentry/vite-plugin': specifier: ^4.6.1 - version: 4.6.1(supports-color@10.2.2) + version: 4.6.1 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1794,21 +1416,21 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1820,16 +1442,16 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-router/view-transitions: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1840,13 +1462,13 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -1856,8 +1478,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1867,18 +1489,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/basic: dependencies: @@ -1893,44 +1512,41 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 http-proxy-middleware: specifier: ^3.0.5 - version: 3.0.5(supports-color@10.2.2) - iron-session: - specifier: ^9.0.1 - version: 9.0.1 + version: 3.0.5 js-cookie: specifier: ^3.0.5 version: 3.0.5 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -1946,27 +1562,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) zod: specifier: ^4.4.3 version: 4.4.3 @@ -1981,7 +1594,7 @@ importers: version: 7.0.0 '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -1991,28 +1604,25 @@ importers: '@tanstack/react-start': specifier: workspace:* version: link:../../../packages/react-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2025,27 +1635,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) dotenv: specifier: ^17.2.3 version: 17.2.3 prisma: specifier: ^7.0.0 - version: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/basic-cloudflare: dependencies: @@ -2059,21 +1666,21 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20260317.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2086,21 +1693,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) wrangler: specifier: ^4.74.0 version: 4.75.0 @@ -2108,11 +1712,11 @@ importers: e2e/react-start/basic-react-query: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -2126,13 +1730,13 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -2142,11 +1746,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2159,24 +1763,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/basic-tsr-config: dependencies: @@ -2187,11 +1788,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tanstack/router-e2e-utils': specifier: workspace:^ @@ -2205,27 +1806,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - rimraf: - specifier: 'catalog:' - version: 6.1.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/clerk-basic: dependencies: '@clerk/tanstack-react-start': specifier: ^0.19.0 - version: 0.19.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 0.19.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -2236,24 +1831,24 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2266,21 +1861,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/csp: dependencies: @@ -2291,15 +1883,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2312,18 +1904,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/css-inline: dependencies: @@ -2335,26 +1924,26 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2367,18 +1956,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/css-modules: dependencies: @@ -2389,27 +1975,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@rsbuild/plugin-react': - specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) - '@rsbuild/plugin-sass': - specifier: ^2.0.1 - version: 2.0.1(@rsbuild/core@2.3.1) + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:* version: link:../../e2e-utils @@ -2422,33 +1999,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - cf: - specifier: 1.0.0-beta.28 - version: 1.0.0-beta.28(@types/node@25.0.9) + version: 6.0.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: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta - rsbuild-plugin-cloudflare: - specifier: ^0.0.4 - version: 0.0.4(@rsbuild/core@2.3.1)(@types/node@25.0.9)(workerd@1.20261104.1) + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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)) sass: specifier: ^1.97.2 version: 1.97.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) wrangler: specifier: ^4.74.0 version: 4.75.0 @@ -2466,23 +2034,23 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2498,18 +2066,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) cross-env: specifier: ^10.0.0 version: 10.0.0 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -2517,11 +2082,11 @@ importers: specifier: ^4.20.3 version: 4.20.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/custom-server-rsbuild: dependencies: @@ -2533,23 +2098,23 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -2568,15 +2133,12 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 cross-env: specifier: ^10.0.0 version: 10.0.0 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -2584,8 +2146,8 @@ importers: specifier: ^4.20.3 version: 4.20.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 e2e/react-start/deferred-hydration: dependencies: @@ -2596,18 +2158,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2620,21 +2182,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/dev-ssr-styles: dependencies: @@ -2645,15 +2204,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-core': specifier: workspace:* version: link:../../../packages/router-core @@ -2669,24 +2228,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) zod: specifier: ^4.4.3 version: 4.4.3 @@ -2700,15 +2256,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2724,27 +2280,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) node-forge: specifier: ^1.3.1 version: 1.3.1 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: 0.11.15 + version: 0.11.15 tsx: specifier: 4.20.3 version: 4.20.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/flamegraph-bench: dependencies: @@ -2755,24 +2308,21 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 devDependencies: '@platformatic/flame': - specifier: latest - version: 1.7.0 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 + specifier: 1.6.0 + version: 1.6.0 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) autocannon: specifier: ^8.0.0 version: 8.0.0 @@ -2780,14 +2330,14 @@ importers: specifier: 9.2.1 version: 9.2.1 nitro: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/hmr: dependencies: @@ -2798,27 +2348,27 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2831,21 +2381,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/i18n-paraglide: dependencies: @@ -2859,21 +2406,21 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@inlang/paraglide-js': specifier: ^2.4.0 version: 2.4.0(babel-plugin-macros@3.1.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2886,21 +2433,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/import-protection: dependencies: @@ -2911,24 +2455,24 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) react-tweet: specifier: ^3.3.0 - version: 3.3.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 3.3.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2941,21 +2485,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/import-protection-custom-config: dependencies: @@ -2966,15 +2507,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -2987,64 +2528,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-start/issue-8049: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/query-integration: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -3058,11 +2562,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -3071,11 +2575,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3088,159 +2592,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-start/response-reconciliation: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@rsbuild/plugin-react': - specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - srvx: - specifier: ^1.0.0 - version: 1.0.5 typescript: specifier: ^6.0.2 version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-start/root-document-hydration: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:* - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-start/rsbuild: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@rsbuild/plugin-react': - specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: ^5.7.2 - version: 5.9.3 + 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) e2e/react-start/rsc: dependencies: @@ -3254,21 +2617,21 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/eslint-plugin-start': specifier: workspace:^ version: link:../../../packages/eslint-plugin-start @@ -3286,25 +2649,25 @@ importers: version: 19.2.3(@types/react@19.2.9) '@typescript-eslint/parser': specifier: ^8.23.0 - version: 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) + version: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-rsc': - specifier: ^0.5.39 - version: 0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^0.5.20 + version: 0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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)) eslint: specifier: ^9.22.0 - version: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + version: 9.22.0(jiti@2.7.0) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.10.0 + version: 0.10.0 typescript: specifier: ^5.7.2 version: 5.9.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/rsc-deferred-hydration: dependencies: @@ -3315,15 +2678,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3336,33 +2699,30 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-rsc': - specifier: ^0.5.39 - version: 0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^0.5.20 + version: 0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/rsc-query: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -3376,15 +2736,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3399,19 +2759,19 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-rsc': - specifier: ^0.5.39 - version: 0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^0.5.20 + version: 0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.10.0 + version: 0.10.0 typescript: specifier: ^5.7.2 version: 5.9.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/rsc-rsbuild: dependencies: @@ -3422,21 +2782,21 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.8 + version: 2.0.8 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.8)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3450,8 +2810,8 @@ importers: specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.10.0 + version: 0.10.1 typescript: specifier: ^5.7.2 version: 5.9.3 @@ -3468,13 +2828,13 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -3484,11 +2844,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3501,27 +2861,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/selective-ssr: dependencies: @@ -3535,18 +2892,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3559,24 +2916,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/serialization-adapters: dependencies: @@ -3590,18 +2944,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3614,30 +2968,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/server-functions: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -3654,13 +3005,13 @@ importers: specifier: ^3.0.5 version: 3.0.5 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -3670,20 +3021,20 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3699,27 +3050,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/server-functions-global-middleware: dependencies: @@ -3730,18 +3078,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3754,30 +3102,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/server-routes: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -3794,13 +3139,13 @@ importers: specifier: ^3.0.5 version: 3.0.5 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -3810,11 +3155,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3830,27 +3175,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/server-routes-global-middleware: dependencies: @@ -3861,18 +3203,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3885,85 +3227,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/react-start/session-handling: - dependencies: - '@hono/session': - specifier: 0.2.1 - version: 0.2.1(hono@4.13.9) - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - hono: - specifier: 4.13.9 - version: 4.13.9 - hono-sessions: - specifier: 0.8.1 - version: 0.8.1(hono@4.13.9) - iron-session: - specifier: 9.0.1 - version: 9.0.1 - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@rsbuild/plugin-react': - specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - srvx: - specifier: ^1.0.0 - version: 1.0.5 typescript: specifier: ^6.0.2 version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/spa-mode: dependencies: @@ -3977,15 +3255,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -3998,18 +3276,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/split-base-and-basepath: dependencies: @@ -4021,17 +3296,17 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4044,21 +3319,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/start-manifest: dependencies: @@ -4069,15 +3341,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4090,21 +3362,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/static-server-functions: dependencies: @@ -4118,18 +3387,18 @@ importers: specifier: workspace:* version: link:../../../packages/start-static-server-functions nitro: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.1-alpha.2 + version: 3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.9.2)(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.56.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)) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:* version: link:../../e2e-utils @@ -4142,24 +3411,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/streaming-ssr: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -4170,15 +3436,15 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4191,21 +3457,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/transform-asset-urls: dependencies: @@ -4217,17 +3477,17 @@ importers: version: link:../../../packages/react-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4240,21 +3500,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/virtual-routes: dependencies: @@ -4271,13 +3528,13 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -4287,11 +3544,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4304,27 +3561,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/react-start/website: dependencies: @@ -4338,13 +3592,13 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 @@ -4354,11 +3608,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4371,27 +3625,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/solid-router/basepath-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4402,27 +3656,30 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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: workspace:^ version: link:../../../packages/solid-router @@ -4430,30 +3687,33 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-esbuild-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4464,18 +3724,18 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4484,13 +3744,16 @@ importers: version: 0.27.4 esbuild-plugin-solid: specifier: ^0.6.0 - version: 0.6.0(esbuild@0.27.4)(solid-js@1.9.12)(supports-color@10.2.2) + version: 0.6.0(esbuild@0.27.4)(solid-js@2.0.0-beta.25) e2e/solid-router/basic-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4501,11 +3764,11 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4514,8 +3777,8 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4523,17 +3786,20 @@ importers: specifier: ^1.1.11 version: 1.1.11 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-file-based-code-splitting: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4543,12 +3809,9 @@ importers: '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools - redaxios: - specifier: 'catalog:' - version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4557,23 +3820,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-scroll-restoration: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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: workspace:^ version: link:../../../packages/solid-router @@ -4582,20 +3848,20 @@ importers: version: link:../../../packages/solid-router-devtools '@tanstack/solid-virtual': specifier: ^3.13.0 - version: 3.13.12(solid-js@1.9.12) + version: 3.13.12(solid-js@2.0.0-beta.25) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4603,23 +3869,26 @@ importers: specifier: ~5.9.0 version: 5.9.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -4627,42 +3896,45 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-solid-query-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -4670,11 +3942,11 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4683,23 +3955,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-virtual-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4713,11 +3988,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4726,23 +4001,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/basic-virtual-named-export-config-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4756,11 +4034,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4769,23 +4047,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/generator-cli-only: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-cli': specifier: workspace:* version: link:../../../packages/router-cli @@ -4796,33 +4077,36 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/js-only-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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: workspace:^ version: link:../../../packages/solid-router @@ -4830,18 +4114,18 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -4849,14 +4133,17 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/rspack-basic-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -4864,24 +4151,24 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-solid': - specifier: ^1.1.1 - version: 1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -4891,9 +4178,6 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.3 @@ -4901,11 +4185,14 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 e2e/solid-router/rspack-basic-virtual-named-export-config-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -4913,24 +4200,24 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-solid': - specifier: ^1.1.1 - version: 1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -4943,9 +4230,6 @@ importers: '@tanstack/virtual-file-routes': specifier: workspace:* version: link:../../../packages/virtual-file-routes - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.3 @@ -4953,14 +4237,17 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 e2e/solid-router/scroll-restoration-sandbox-vite: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -4971,11 +4258,11 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -4984,32 +4271,35 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/sentry-integration: dependencies: '@sentry/solid': specifier: ^10.32.0 - version: 10.32.0(@tanstack/solid-router@packages+solid-router)(solid-js@1.9.12) + version: 10.32.0(@tanstack/solid-router@packages+solid-router)(solid-js@2.0.0-beta.25) '@sentry/tracing': specifier: ^7.120.4 version: 7.120.4 '@sentry/vite-plugin': specifier: ^4.6.1 - version: 4.6.1(supports-color@10.2.2) + version: 4.6.1 + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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: workspace:^ version: link:../../../packages/solid-router @@ -5017,33 +4307,36 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-router/view-transitions: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -5054,11 +4347,11 @@ importers: specifier: workspace:^ version: link:../../../packages/solid-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -5067,26 +4360,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/basic: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5098,19 +4391,19 @@ importers: version: link:../../../packages/solid-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 http-proxy-middleware: specifier: ^3.0.5 - version: 3.0.5(supports-color@10.2.2) + version: 3.0.5 js-cookie: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5119,23 +4412,23 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-solid': - specifier: ^1.1.1 - version: 1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -5145,27 +4438,24 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/basic-auth: dependencies: @@ -5177,7 +4467,10 @@ importers: version: 7.0.0 '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5187,58 +4480,55 @@ importers: '@tanstack/solid-start': specifier: workspace:* version: link:../../../packages/solid-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 dotenv: specifier: ^17.2.3 version: 17.2.3 prisma: specifier: ^7.0.0 - version: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/basic-cloudflare: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5249,51 +4539,51 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) wrangler: specifier: ^4.74.0 version: 4.75.0 e2e/solid-start/basic-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5307,11 +4597,11 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5320,38 +4610,38 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/basic-tsr-config: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5362,8 +4652,8 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@tanstack/router-e2e-utils': specifier: workspace:^ @@ -5371,27 +4661,24 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - rimraf: - specifier: 'catalog:' - version: 6.1.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/csp: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5399,36 +4686,36 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/css-modules: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:* version: link:../../../packages/solid-router @@ -5436,39 +4723,42 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:* version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 sass: specifier: ^1.97.2 version: 1.97.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) e2e/solid-start/custom-basepath: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5480,20 +4770,20 @@ importers: version: link:../../../packages/solid-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -5503,15 +4793,12 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 cross-env: specifier: ^10.0.0 version: 10.0.0 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -5519,17 +4806,23 @@ importers: specifier: ^4.20.3 version: 4.20.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) e2e/solid-start/deferred-hydration: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5537,88 +4830,48 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-solid': - specifier: ^1.1.1 - version: 1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - - e2e/solid-start/dev-ssr-styles: - dependencies: - '@tanstack/solid-router': - specifier: workspace:* - version: link:../../../packages/solid-router - '@tanstack/solid-start': - specifier: workspace:* - version: link:../../../packages/solid-start - solid-js: - specifier: 1.9.12 - version: 1.9.12 - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-core': - specifier: workspace:* - version: link:../../../packages/router-core - '@tanstack/router-e2e-utils': - specifier: workspace:* - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/query-integration: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5632,8 +4885,8 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5642,35 +4895,35 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/scroll-restoration: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5681,11 +4934,11 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5694,41 +4947,41 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/selective-ssr: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5736,39 +4989,42 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) e2e/solid-start/serialization-adapters: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5779,45 +5035,51 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/server-functions: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) + '@tanstack/solid-query-devtools': + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5834,11 +5096,11 @@ importers: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5847,11 +5109,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -5861,33 +5123,33 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/server-routes: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5904,11 +5166,11 @@ importers: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -5917,11 +5179,11 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -5931,33 +5193,33 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/solid-query-layout-suspense: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -5965,33 +5227,33 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/spa-mode: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -6002,36 +5264,39 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) e2e/solid-start/start-manifest: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -6039,79 +5304,36 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - - e2e/solid-start/streaming-ssr: - dependencies: - '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) - '@tanstack/solid-router': - specifier: workspace:^ - version: link:../../../packages/solid-router - '@tanstack/solid-router-ssr-query': - specifier: workspace:* - version: link:../../../packages/solid-router-ssr-query - '@tanstack/solid-start': - specifier: workspace:* - version: link:../../../packages/solid-start - solid-js: - specifier: 1.9.12 - version: 1.9.12 - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/virtual-routes: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -6125,11 +5347,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -6138,41 +5360,41 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/solid-start/website: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:^ version: link:../../../packages/solid-router @@ -6183,11 +5405,11 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -6196,50 +5418,47 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) e2e/vue-router/basepath-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6247,7 +5466,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6257,32 +5476,32 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6290,7 +5509,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6300,23 +5519,23 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-esbuild-file-based: dependencies: @@ -6333,11 +5552,11 @@ importers: specifier: ^8.5.1 version: 8.5.6 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 @@ -6346,44 +5565,41 @@ importers: specifier: ^9.36.0 version: 9.36.0 '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@typescript-eslint/eslint-plugin': specifier: ^8.44.1 - version: 8.44.1(@typescript-eslint/parser@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@typescript-eslint/parser': specifier: ^8.44.1 - version: 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 + version: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) esbuild: specifier: ^0.27.4 version: 0.27.4 esbuild-plugin-vue3: specifier: ^0.5.1 - version: 0.5.1(cheerio@1.0.0)(sass@1.97.2)(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 0.5.1(cheerio@1.0.0)(sass@1.97.2)(vue@3.5.25(typescript@6.0.2)) eslint-plugin-vue: specifier: ^9.33.0 - version: 9.33.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.33.0(eslint@9.22.0(jiti@2.7.0)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vue-eslint-parser: specifier: ^9.4.3 - version: 9.4.3(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.4.3(eslint@9.22.0(jiti@2.7.0)) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.5 + version: 3.1.5(typescript@6.0.2) e2e/vue-router/basic-file-based-jsx: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -6394,7 +5610,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6410,44 +5626,44 @@ importers: specifier: ^9.36.0 version: 9.36.0 '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@typescript-eslint/eslint-plugin': specifier: ^8.44.1 - version: 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + version: 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^8.44.1 - version: 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + version: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) eslint-plugin-vue: specifier: ^9.33.0 - version: 9.33.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.33.0(eslint@9.22.0(jiti@2.7.0)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-eslint-parser: specifier: ^9.4.3 - version: 9.4.3(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.4.3(eslint@9.22.0(jiti@2.7.0)) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-file-based-sfc: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -6458,7 +5674,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6471,32 +5687,32 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-scroll-restoration: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6507,7 +5723,7 @@ importers: specifier: ^3.13.0 version: 3.13.13(vue@3.5.25(typescript@5.9.3)) redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6517,32 +5733,32 @@ importers: version: 3.5.25(typescript@5.9.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.9.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.9.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.9.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.9.3)) typescript: specifier: ~5.9.0 version: 5.9.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.9.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.9.3) e2e/vue-router/basic-virtual-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -6550,11 +5766,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6562,7 +5778,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6572,32 +5788,32 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-virtual-named-export-config-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -6605,11 +5821,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6617,7 +5833,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6627,38 +5843,38 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-vue-query: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6666,7 +5882,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6676,41 +5892,41 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/basic-vue-query-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6718,7 +5934,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6731,32 +5947,32 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/generator-cli-only: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-cli': specifier: workspace:* version: link:../../../packages/router-cli @@ -6767,7 +5983,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6777,41 +5993,41 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/js-only-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -6819,7 +6035,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6829,20 +6045,20 @@ importers: version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-router/rspack-basic-file-based: dependencies: @@ -6853,27 +6069,27 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-vue': specifier: ^1.2.7 - version: 1.2.7(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@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.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23))(vue@3.5.25(typescript@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.3.1)(supports-color@10.2.2) + version: 2.0.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -6886,9 +6102,6 @@ importers: '@tanstack/virtual-file-routes': specifier: workspace:* version: link:../../../packages/virtual-file-routes - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.6 @@ -6896,11 +6109,11 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.5 + version: 3.1.5(typescript@6.0.2) e2e/vue-router/rspack-basic-virtual-named-export-config-file-based: dependencies: @@ -6911,27 +6124,27 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-vue': specifier: ^1.2.7 - version: 1.2.7(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@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.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23))(vue@3.5.25(typescript@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.3.1)(supports-color@10.2.2) + version: 2.0.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 @@ -6944,9 +6157,6 @@ importers: '@tanstack/virtual-file-routes': specifier: workspace:* version: link:../../../packages/virtual-file-routes - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 postcss: specifier: ^8.5.1 version: 8.5.6 @@ -6954,17 +6164,17 @@ importers: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.5 + version: 3.1.5(typescript@6.0.2) e2e/vue-router/scroll-restoration-sandbox-vite: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -6975,7 +6185,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -6988,26 +6198,26 @@ importers: version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/sentry-integration: dependencies: @@ -7016,13 +6226,13 @@ importers: version: 7.120.4 '@sentry/vite-plugin': specifier: ^4.6.1 - version: 4.6.1(supports-color@10.2.2) + version: 4.6.1 '@sentry/vue': specifier: ^10.32.0 version: 10.32.0(@tanstack/vue-router@packages+vue-router)(vue@3.5.25(typescript@5.8.3)) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7030,7 +6240,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -7040,38 +6250,38 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-router/view-transitions: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(typescript@5.8.3)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7079,7 +6289,7 @@ importers: specifier: workspace:* version: link:../../../packages/vue-router-devtools redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwindcss: specifier: ^4.2.2 @@ -7089,26 +6299,26 @@ importers: version: 3.5.25(typescript@5.8.3) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) e2e/vue-start/basic: dependencies: @@ -7123,47 +6333,47 @@ importers: version: link:../../../packages/vue-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 http-proxy-middleware: specifier: ^3.0.5 - version: 3.0.5(supports-color@10.2.2) + version: 3.0.5 js-cookie: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': - specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + specifier: ^1.0.5 + version: 1.0.6(@rsbuild/core@2.0.14) '@rsbuild/plugin-vue': - specifier: ^1.2.7 - version: 1.2.7(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^1.2.2 + version: 1.2.2(@rsbuild/core@2.0.14)(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(vue@3.5.25(typescript@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.3.1)(supports-color@10.2.2) + specifier: ^1.1.1 + version: 1.1.1(@babel/core@7.29.0)(@rsbuild/core@2.0.14) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -7173,30 +6383,27 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/basic-auth: dependencies: @@ -7208,7 +6415,7 @@ importers: version: 7.0.0 '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7218,58 +6425,52 @@ importers: '@tanstack/vue-start': specifier: workspace:* version: link:../../../packages/vue-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) dotenv: specifier: ^17.2.3 version: 17.2.3 prisma: specifier: ^7.0.0 - version: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/basic-cloudflare: dependencies: @@ -7284,41 +6485,38 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) wrangler: specifier: ^4.74.0 version: 4.75.0 @@ -7336,7 +6534,7 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@tanstack/router-e2e-utils': specifier: workspace:^ @@ -7344,36 +6542,30 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/basic-vue-query: dependencies: '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-query-devtools': specifier: ^6.1.2 - version: 6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7387,51 +6579,48 @@ importers: specifier: workspace:* version: link:../../../packages/vue-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/css-modules: dependencies: @@ -7443,35 +6632,32 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:* version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) sass: specifier: ^1.97.2 version: 1.97.2 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/custom-basepath: dependencies: @@ -7486,20 +6672,20 @@ importers: version: link:../../../packages/vue-start express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -7509,21 +6695,18 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) cross-env: specifier: ^10.0.0 version: 10.0.0 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -7531,63 +6714,20 @@ importers: specifier: ^4.20.3 version: 4.20.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/vue-start/dev-ssr-styles: - dependencies: - '@tanstack/vue-router': - specifier: workspace:* - version: link:../../../packages/vue-router - '@tanstack/vue-start': - specifier: workspace:* - version: link:../../../packages/vue-start - vue: - specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-core': - specifier: workspace:* - version: link:../../../packages/router-core - '@tanstack/router-e2e-utils': - specifier: workspace:* - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - '@vitejs/plugin-vue': - specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - '@vitejs/plugin-vue-jsx': - specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/query-integration: dependencies: '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-query-devtools': specifier: ^5.90.0 - version: 5.91.0(@tanstack/vue-query@5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.91.0(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7605,41 +6745,38 @@ importers: version: 3.6.0 vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/scroll-restoration: dependencies: @@ -7653,54 +6790,51 @@ importers: specifier: workspace:* version: link:../../../packages/vue-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/selective-ssr: dependencies: @@ -7712,41 +6846,38 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.8 + version: 3.1.8(typescript@6.0.2) e2e/vue-start/serialization-adapters: dependencies: @@ -7761,47 +6892,44 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.8 + version: 3.1.8(typescript@6.0.2) e2e/vue-start/server-functions: dependencies: '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7818,24 +6946,24 @@ importers: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -7845,36 +6973,33 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/server-routes: dependencies: '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-router': specifier: workspace:* version: link:../../../packages/vue-router @@ -7891,24 +7016,24 @@ importers: specifier: ^3.0.5 version: 3.0.5 redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils @@ -7918,30 +7043,27 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/spa-mode: dependencies: @@ -7956,35 +7078,32 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/start-manifest: dependencies: @@ -7996,75 +7115,29 @@ importers: version: link:../../../packages/vue-start vue: specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tanstack/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.15 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - e2e/vue-start/streaming-ssr: - dependencies: - '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) - '@tanstack/vue-router': - specifier: workspace:* - version: link:../../../packages/vue-router - '@tanstack/vue-router-ssr-query': - specifier: workspace:* - version: link:../../../packages/vue-router-ssr-query - '@tanstack/vue-start': - specifier: workspace:* - version: link:../../../packages/vue-start - vue: - specifier: ^3.5.16 - version: 3.5.25(@typescript/typescript6@6.0.2) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@tanstack/router-e2e-utils': - specifier: workspace:^ - version: link:../../e2e-utils - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - '@vitejs/plugin-vue-jsx': - specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - srvx: - specifier: ^1.0.0 - version: 1.0.5 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/virtual-routes: dependencies: @@ -8081,54 +7154,51 @@ importers: specifier: workspace:* version: link:../../../packages/vue-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) combinate: specifier: ^1.1.11 version: 1.1.11 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) e2e/vue-start/website: dependencies: @@ -8142,57 +7212,54 @@ importers: specifier: workspace:* version: link:../../../packages/vue-start redaxios: - specifier: 'catalog:' + specifier: ^0.5.1 version: 0.5.1 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 vue: specifier: ^3.5.25 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) zod: specifier: ^4.4.3 version: 4.4.3 devDependencies: '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 + specifier: ^1.57.0 + version: 1.58.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-e2e-utils': specifier: workspace:^ version: link:../../e2e-utils '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/authenticated-routes: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8203,11 +7270,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8224,24 +7291,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/authenticated-routes-firebase: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8255,11 +7319,11 @@ importers: specifier: ^11.4.0 version: 11.4.0 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8279,24 +7343,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8304,11 +7365,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8322,27 +7383,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-default-search-params: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8350,11 +7408,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8371,30 +7429,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-devtools-panel: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + 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/react-query-devtools': specifier: ^5.67.2 - version: 5.67.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.67.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8402,11 +7454,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8420,24 +7472,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8448,11 +7497,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8469,24 +7518,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-non-nested-devtools: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8494,11 +7540,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8512,30 +7558,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-react-query: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8543,11 +7586,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8561,30 +7604,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-react-query-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8595,11 +7635,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8616,18 +7656,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-ssr-file-based: dependencies: @@ -8639,10 +7676,10 @@ importers: version: link:../../../packages/router-plugin compression: specifier: ^1.8.0 - version: 1.8.0(supports-color@10.2.2) + version: 1.8.0 express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 get-port: specifier: ^7.1.0 version: 7.1.0 @@ -8650,11 +7687,11 @@ importers: specifier: ^3.3.2 version: 3.3.2 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tanstack/react-router-devtools': specifier: workspace:^ @@ -8668,18 +7705,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-ssr-streaming-file-based: dependencies: @@ -8691,10 +7725,10 @@ importers: version: link:../../../packages/router-plugin compression: specifier: ^1.8.0 - version: 1.8.0(supports-color@10.2.2) + version: 1.8.0 express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 get-port: specifier: ^7.1.0 version: 7.1.0 @@ -8702,11 +7736,11 @@ importers: specifier: ^3.3.2 version: 3.3.2 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tanstack/react-router-devtools': specifier: workspace:^ @@ -8720,24 +7754,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-virtual-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8751,11 +7782,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8772,24 +7803,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/basic-virtual-inside-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8803,11 +7831,11 @@ importers: specifier: workspace:* version: link:../../../packages/virtual-file-routes react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8824,24 +7852,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/deferred-data: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8849,11 +7874,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8870,24 +7895,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/i18n-paraglide: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8895,11 +7917,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -8916,24 +7938,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/kitchen-sink: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8944,11 +7963,11 @@ importers: specifier: ^10.1.1 version: 10.1.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -8965,24 +7984,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/kitchen-sink-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -8996,11 +8012,11 @@ importers: specifier: ^10.1.1 version: 10.1.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9017,30 +8033,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/kitchen-sink-react-query: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9051,11 +8064,11 @@ importers: specifier: ^10.1.1 version: 10.1.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9072,30 +8085,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/kitchen-sink-react-query-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9109,11 +8119,11 @@ importers: specifier: ^10.1.1 version: 10.1.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9130,27 +8140,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/large-file-based: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9161,11 +8168,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9182,30 +8189,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/location-masking: dependencies: '@radix-ui/react-dialog': specifier: ^1.1.6 - version: 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9213,11 +8217,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9231,27 +8235,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/navigation-blocking: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9259,11 +8260,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9277,24 +8278,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/quickstart: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9302,11 +8300,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -9317,18 +8315,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/quickstart-esbuild-file-based: dependencies: @@ -9342,11 +8337,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9368,7 +8363,7 @@ importers: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9379,11 +8374,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9400,18 +8395,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/quickstart-rspack-file-based: dependencies: @@ -9428,21 +8420,21 @@ importers: specifier: ^8.5.1 version: 8.5.3 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-react': specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) + version: 2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23)) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -9452,12 +8444,9 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 examples/react/quickstart-webpack-file-based: dependencies: @@ -9468,11 +8457,11 @@ importers: specifier: workspace:^ version: link:../../../packages/react-router-devtools react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@swc/core': specifier: ^1.15.33 @@ -9486,9 +8475,6 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 html-webpack-plugin: specifier: ^5.6.3 version: 5.6.3(webpack@5.97.1) @@ -9499,8 +8485,8 @@ importers: specifier: ^0.2.6 version: 0.2.6(@swc/core@1.15.33(@swc/helpers@0.5.23))(webpack@5.97.1) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 webpack: specifier: ^5.97.1 version: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) @@ -9509,16 +8495,16 @@ importers: version: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) webpack-dev-server: specifier: ^5.2.4 - version: 5.2.4(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1) + version: 5.2.4(webpack-cli@5.1.4)(webpack@5.97.1) examples/react/router-monorepo-react-query: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -9529,11 +8515,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9547,21 +8533,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-react-query/packages/app: dependencies: @@ -9572,18 +8555,18 @@ importers: specifier: workspace:* version: link:../router '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router-devtools': specifier: workspace:^ version: link:../../../../../packages/react-router-devtools @@ -9593,24 +8576,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-react-query/packages/post-feature: dependencies: @@ -9621,14 +8601,14 @@ importers: specifier: workspace:* version: link:../router '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@types/react': specifier: ^19.2.8 @@ -9636,27 +8616,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-react-query/packages/post-query: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9664,18 +8641,15 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/router-monorepo-react-query/packages/router: dependencies: @@ -9686,8 +8660,8 @@ importers: specifier: workspace:* version: link:../../../../../packages/history '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../../../packages/react-router @@ -9695,11 +8669,11 @@ importers: specifier: workspace:* version: link:../../../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9713,21 +8687,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple: dependencies: @@ -9741,11 +8712,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9759,21 +8730,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple-lazy: dependencies: @@ -9787,11 +8755,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9805,21 +8773,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple-lazy/packages/app: dependencies: @@ -9830,15 +8795,15 @@ importers: specifier: workspace:* version: link:../router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router-devtools': specifier: workspace:^ version: link:../../../../../packages/react-router-devtools @@ -9848,24 +8813,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple-lazy/packages/post-feature: dependencies: @@ -9873,14 +8835,14 @@ importers: specifier: workspace:* version: link:../router '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@types/react': specifier: ^19.2.8 @@ -9888,21 +8850,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple-lazy/packages/router: dependencies: @@ -9916,11 +8875,11 @@ importers: specifier: workspace:* version: link:../../../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -9934,21 +8893,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple/packages/app: dependencies: @@ -9959,15 +8915,15 @@ importers: specifier: workspace:* version: link:../router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router-devtools': specifier: workspace:^ version: link:../../../../../packages/react-router-devtools @@ -9977,24 +8933,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple/packages/post-feature: dependencies: @@ -10002,11 +8955,11 @@ importers: specifier: workspace:* version: link:../router react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@types/react': specifier: ^19.2.8 @@ -10014,21 +8967,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/router-monorepo-simple/packages/router: dependencies: @@ -10042,11 +8992,11 @@ importers: specifier: workspace:* version: link:../../../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10060,27 +9010,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) examples/react/scroll-restoration: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10089,13 +9036,13 @@ importers: version: link:../../../packages/react-router-devtools '@tanstack/react-virtual': specifier: ^3.13.0 - version: 3.13.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 3.13.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -10106,30 +9053,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/search-validator-adapters: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/arktype-adapter': specifier: workspace:* version: link:../../../packages/arktype-adapter '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10149,51 +9093,42 @@ importers: specifier: ^2.1.7 version: 2.1.7 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 valibot: specifier: 1.0.0-beta.15 - version: 1.0.0-beta.15(@typescript/typescript6@6.0.2) + version: 1.0.0-beta.15(typescript@6.0.2) zod: specifier: ^3.24.2 version: 3.25.76 devDependencies: '@testing-library/jest-dom': - specifier: ^7.0.1 - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': specifier: ^16.2.0 - version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/react': specifier: ^19.2.8 version: 19.2.9 '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - jsdom: - specifier: ^27.0.0 - version: 27.0.0(supports-color@10.2.2) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: ^5.0.4 - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) examples/react/start-bare: dependencies: @@ -10207,11 +9142,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) zod: specifier: ^4.4.3 version: 4.4.3 @@ -10225,18 +9160,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-basic: dependencies: @@ -10250,11 +9182,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -10264,7 +9196,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10274,24 +9206,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-basic-auth: dependencies: @@ -10303,7 +9232,7 @@ importers: version: 7.0.0 '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10313,15 +9242,12 @@ importers: '@tanstack/react-start': specifier: workspace:* version: link:../../../packages/react-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10331,7 +9257,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10341,27 +9267,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) dotenv: specifier: ^17.2.3 version: 17.2.3 prisma: specifier: ^7.0.0 - version: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-basic-authjs: dependencies: @@ -10378,11 +9301,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) start-authjs: specifier: ^1.0.0 version: 1.0.0(@auth/core@0.41.1) @@ -10392,7 +9315,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10402,21 +9325,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-basic-cloudflare: dependencies: @@ -10430,18 +9350,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10451,21 +9371,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) wrangler: specifier: ^4.74.0 version: 4.75.0 @@ -10473,11 +9390,11 @@ importers: examples/react/start-basic-react-query: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10491,11 +9408,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10503,12 +9420,9 @@ importers: specifier: ^3.6.0 version: 3.6.0 devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10518,76 +9432,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - examples/react/start-basic-rsbuild: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-router-devtools': - specifier: workspace:^ - version: link:../../../packages/react-router-devtools - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - tailwind-merge: - specifier: ^3.6.0 - version: 3.6.0 - zod: - specifier: ^4.4.3 - version: 4.4.3 - devDependencies: - '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 - '@rsbuild/plugin-react': - specifier: ^2.0.0 - version: 2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23)) - '@rsbuild/plugin-tailwindcss': - specifier: ^2.0.3 - version: 2.0.3(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(webpack@5.110.3) - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - srvx: - specifier: ^1.0.0 - version: 1.0.5 - tailwindcss: - specifier: ^4.2.2 - version: 4.2.2 - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + 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) examples/react/start-basic-static: dependencies: @@ -10605,13 +9461,13 @@ importers: version: link:../../../packages/start-static-server-functions '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10621,7 +9477,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10631,27 +9487,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-bun: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-devtools': specifier: ^0.7.0 - version: 0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12) + version: 0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10668,24 +9521,24 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@tanstack/eslint-config': specifier: ^0.3.2 - version: 0.3.2(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 0.3.2(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@testing-library/dom': specifier: ^10.4.1 version: 10.4.1 '@testing-library/react': specifier: ^16.3.0 - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/bun': specifier: ^1.2.22 version: 1.2.22(@types/react@19.2.9) @@ -10698,27 +9551,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) jsdom: specifier: ^27.0.0 - version: 27.0.0(supports-color@10.2.2) + version: 27.0.0(postcss@8.5.15) prettier: specifier: ^3.6.2 version: 3.6.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vitest: - specifier: ^5.0.4 - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@27.0.0(postcss@8.5.15))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) web-vitals: specifier: ^5.1.0 version: 5.1.0 @@ -10727,7 +9577,7 @@ importers: dependencies: '@clerk/tanstack-react-start': specifier: ^0.27.14 - version: 0.27.14(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 0.27.14(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10739,26 +9589,26 @@ importers: version: link:../../../packages/react-start '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10768,30 +9618,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-convex-trellaux: dependencies: '@convex-dev/react-query': specifier: 0.0.0-alpha.8 - version: 0.0.0-alpha.8(@tanstack/react-query@5.102.0(react@19.2.9))(convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)) + version: 0.0.0-alpha.8(@tanstack/react-query@5.99.0(react@19.2.3))(convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10809,22 +9656,22 @@ importers: version: 8.2.2 convex: specifier: ^1.19.0 - version: 1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) ky: specifier: ^1.7.4 version: 1.7.4 msw: specifier: ^2.7.0 - version: 2.7.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) + version: 2.7.0(@types/node@25.0.9)(typescript@6.0.2) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) react-hot-toast: specifier: ^2.5.1 - version: 2.5.1(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 2.5.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10837,7 +9684,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10847,21 +9694,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-counter: dependencies: @@ -10875,11 +9719,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@types/node': specifier: 25.0.9 @@ -10890,24 +9734,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-i18n-paraglide: dependencies: '@tanstack/react-devtools': specifier: ^0.7.0 - version: 0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12) + version: 0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10918,18 +9759,18 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@inlang/paraglide-js': specifier: ^2.4.0 version: 2.4.0(babel-plugin-macros@3.1.0) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10939,27 +9780,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-large: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -10970,11 +9808,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -10983,11 +9821,11 @@ importers: version: 3.6.0 valibot: specifier: ^1.0.0-beta.15 - version: 1.0.0-beta.15(@typescript/typescript6@6.0.2) + version: 1.0.0-beta.15(typescript@6.0.2) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -10997,21 +9835,18 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-material-ui: dependencies: @@ -11020,16 +9855,16 @@ importers: version: 11.14.0 '@emotion/react': specifier: 11.14.0 - version: 11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + version: 11.14.0(@types/react@19.2.9)(react@19.2.3) '@emotion/styled': specifier: 11.14.0 - version: 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + version: 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3) '@fontsource-variable/roboto': specifier: 5.2.5 version: 5.2.5 '@mui/material': specifier: 6.4.7 - version: 6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11040,11 +9875,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) zod: specifier: ^4.4.3 version: 4.4.3 @@ -11058,64 +9893,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - examples/react/start-next-migration: - dependencies: - '@tanstack/react-router': - specifier: workspace:* - version: link:../../../packages/react-router - '@tanstack/react-start': - specifier: workspace:* - version: link:../../../packages/react-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 - next: - specifier: 16.3.4 - version: 16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.97.2) - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - devDependencies: - '@playwright/test': - specifier: ^1.63.0 - version: 1.63.0 - '@types/node': - specifier: 25.0.9 - version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - nitro: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta - typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' - vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-rscs: dependencies: @@ -11132,11 +9918,11 @@ importers: specifier: ^4.0.10 version: 4.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -11145,11 +9931,11 @@ importers: version: 4.4.3 zustand: specifier: ^5.0.10 - version: 5.0.12(@types/react@19.2.9)(immer@10.1.1)(react@19.2.9)(use-sync-external-store@1.6.0(react@19.2.9)) + version: 5.0.12(@types/react@19.2.9)(immer@10.1.1)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)) devDependencies: '@tailwindcss/vite': specifier: ^4.1.18 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -11161,13 +9947,13 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) '@vitejs/plugin-rsc': - specifier: ^0.5.39 - version: 0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^0.5.20 + version: 0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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: specifier: ^4.1.18 version: 4.2.2 @@ -11175,8 +9961,8 @@ importers: specifier: ^5.7.2 version: 5.9.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-streaming-data-from-server-functions: dependencies: @@ -11190,11 +9976,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) zod: specifier: ^4.4.3 version: 4.4.3 @@ -11208,18 +9994,15 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-supabase-basic: dependencies: @@ -11239,39 +10022,36 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/react': specifier: ^19.2.8 version: 19.2.9 '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-tailwind-v4: dependencies: @@ -11285,11 +10065,11 @@ importers: specifier: workspace:* version: link:../../../packages/react-start react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -11299,7 +10079,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -11309,30 +10089,27 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-trellaux: dependencies: '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11350,16 +10127,16 @@ importers: version: 1.7.4 msw: specifier: ^2.7.0 - version: 2.7.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) + version: 2.7.0(@types/node@25.0.9)(typescript@6.0.2) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) react-hot-toast: specifier: ^2.5.1 - version: 2.5.1(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 2.5.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -11372,7 +10149,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 @@ -11382,27 +10159,24 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/start-workos: dependencies: '@radix-ui/themes': specifier: ^3.3.0 - version: 3.3.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 3.3.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11414,13 +10188,13 @@ importers: version: link:../../../packages/react-start '@workos/authkit-tanstack-react-start': specifier: ^0.5.0 - version: 0.5.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 0.5.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: '@types/react': specifier: ^19.2.8 @@ -11428,24 +10202,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/view-transitions: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11456,11 +10227,11 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -11477,24 +10248,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/with-framer-motion: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11503,13 +10271,13 @@ importers: version: link:../../../packages/react-router-devtools framer-motion: specifier: ^11.18.2 - version: 11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -11526,24 +10294,21 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/with-trpc: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11555,19 +10320,19 @@ importers: version: link:../../../packages/router-plugin '@trpc/client': specifier: ^11.4.3 - version: 11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2) + version: 11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2) '@trpc/server': specifier: ^11.4.3 - version: 11.4.3(@typescript/typescript6@6.0.2) + version: 11.4.3(typescript@6.0.2) express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -11589,25 +10354,25 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tsx: specifier: ^4.20.3 version: 4.20.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/react/with-trpc-react-query: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-query-devtools': specifier: ^5.90.0 - version: 5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9) + version: 5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../../../packages/react-router @@ -11619,22 +10384,22 @@ importers: version: link:../../../packages/router-plugin '@trpc/client': specifier: ^11.4.3 - version: 11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2) + version: 11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2) '@trpc/server': specifier: ^11.4.3 - version: 11.4.3(@typescript/typescript6@6.0.2) + version: 11.4.3(typescript@6.0.2) '@trpc/tanstack-react-query': specifier: ^11.4.3 - version: 11.4.3(@tanstack/react-query@5.102.0(react@19.2.9))(@trpc/client@11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2))(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 11.4.3(@tanstack/react-query@5.99.0(react@19.2.3))(@trpc/client@11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2))(@trpc/server@11.4.3(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) redaxios: specifier: ^0.5.1 version: 0.5.1 @@ -11656,24 +10421,27 @@ importers: version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': specifier: ^6.0.1 - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 6.0.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)) tsx: specifier: ^4.20.3 version: 4.20.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) examples/solid/authenticated-routes: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11682,8 +10450,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11691,29 +10459,29 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/authenticated-routes-firebase: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11728,8 +10496,8 @@ importers: specifier: ^14.9.0 version: 14.9.0 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11737,26 +10505,26 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11765,8 +10533,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11777,29 +10545,29 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-default-search-params: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11808,8 +10576,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11817,26 +10585,26 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-devtools-panel: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11845,32 +10613,32 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11879,8 +10647,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11891,26 +10659,26 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-non-nested-devtools: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11919,8 +10687,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11931,32 +10699,32 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -11965,8 +10733,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -11974,32 +10742,32 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-solid-query-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12008,8 +10776,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12020,33 +10788,33 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-ssr-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router compression: specifier: ^1.8.0 - version: 1.8.0(supports-color@10.2.2) + version: 1.8.0 express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 get-port: specifier: ^7.1.0 version: 7.1.0 @@ -12054,8 +10822,8 @@ importers: specifier: ^3.3.2 version: 3.3.2 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12063,36 +10831,36 @@ importers: '@types/express': specifier: ^5.0.6 version: 5.0.6 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-ssr-streaming-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools compression: specifier: ^1.8.0 - version: 1.8.0(supports-color@10.2.2) + version: 1.8.0 express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 get-port: specifier: ^7.1.0 version: 7.1.0 @@ -12103,8 +10871,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12118,29 +10886,29 @@ importers: '@types/express': specifier: ^5.0.6 version: 5.0.6 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-virtual-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12152,8 +10920,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12161,29 +10929,29 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/basic-virtual-inside-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12195,8 +10963,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12204,26 +10972,26 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/deferred-data: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12232,8 +11000,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12241,33 +11009,33 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/i18n-paraglide: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12278,26 +11046,26 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/kitchen-sink: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12309,8 +11077,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12318,26 +11086,26 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/kitchen-sink-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12349,8 +11117,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12361,32 +11129,32 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/kitchen-sink-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12398,8 +11166,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12407,35 +11175,35 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/kitchen-sink-solid-query-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12447,8 +11215,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12456,32 +11224,32 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/large-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12490,8 +11258,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12499,29 +11267,29 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/location-masking: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12530,35 +11298,35 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/navigation-blocking: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12567,63 +11335,63 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/quickstart: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/quickstart-esbuild-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12632,8 +11400,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12646,15 +11414,18 @@ importers: version: 0.27.4 esbuild-plugin-solid: specifier: ^0.6.0 - version: 0.6.0(esbuild@0.27.4)(solid-js@1.9.12)(supports-color@10.2.2) + version: 0.6.0(esbuild@0.27.4)(solid-js@2.0.0-beta.25) examples/solid/quickstart-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12663,8 +11434,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -12675,26 +11446,26 @@ importers: '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/quickstart-rspack-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/postcss': specifier: ^4.2.2 version: 4.2.2 '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12703,64 +11474,61 @@ importers: specifier: ^8.5.1 version: 8.5.6 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@rsbuild/core': - specifier: ^2.3.1 - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@rsbuild/plugin-babel': specifier: ^1.1.2 - version: 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) + version: 1.1.2(@rsbuild/core@2.0.14) '@rsbuild/plugin-solid': - specifier: ^1.1.1 - version: 1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2) + specifier: ^2.0.0-beta.0 + version: 2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 examples/solid/quickstart-webpack-file-based: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@babel/core': specifier: ^7.28.5 - version: 7.28.5(supports-color@10.2.2) + version: 7.28.5 '@babel/preset-typescript': specifier: ^7.27.1 - version: 7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) + version: 7.27.1(@babel/core@7.28.5) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 babel-loader: specifier: ^10.0.0 - version: 10.0.0(@babel/core@7.28.5(supports-color@10.2.2))(webpack@5.97.1) + version: 10.0.0(@babel/core@7.28.5)(webpack@5.97.1) babel-preset-solid: - specifier: ^1.9.10 - version: 1.9.10(@babel/core@7.28.5(supports-color@10.2.2))(solid-js@1.9.12) + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(@babel/core@7.28.5)(solid-js@2.0.0-beta.25) css-loader: specifier: ^7.1.2 version: 7.1.2(webpack@5.97.1) @@ -12772,30 +11540,33 @@ importers: version: 8.5.6 postcss-loader: specifier: ^8.2.0 - version: 8.2.0(@typescript/typescript6@6.0.2)(postcss@8.5.6)(webpack@5.97.1) + version: 8.2.0(postcss@8.5.6)(typescript@6.0.2)(webpack@5.97.1) style-loader: specifier: ^4.0.0 version: 4.0.0(webpack@5.97.1) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 webpack: specifier: ^5.97.1 - version: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + version: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 version: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) webpack-dev-server: specifier: ^5.2.4 - version: 5.2.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1) + version: 5.2.4(webpack-cli@5.1.4)(webpack@5.97.1) examples/solid/router-monorepo-simple: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12804,35 +11575,35 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/router-monorepo-simple-lazy: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12841,41 +11612,41 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/router-monorepo-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12884,67 +11655,67 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-dts: specifier: 4.2.3 - version: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/scroll-restoration: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools '@tanstack/solid-virtual': specifier: ^3.13.0 - version: 3.13.12(solid-js@1.9.12) + version: 3.13.12(solid-js@2.0.0-beta.25) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/search-validator-adapters: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/arktype-adapter': specifier: workspace:* version: link:../../../packages/arktype-adapter @@ -12952,10 +11723,10 @@ importers: specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -12970,47 +11741,41 @@ importers: specifier: ^2.1.7 version: 2.1.7 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 valibot: specifier: 1.0.0-beta.15 - version: 1.0.0-beta.15(@typescript/typescript6@6.0.2) + version: 1.0.0-beta.15(typescript@6.0.2) zod: specifier: ^3.24.2 version: 3.25.76 devDependencies: '@solidjs/testing-library': specifier: ^0.8.10 - version: 0.8.10(solid-js@1.9.12) + version: 0.8.10(solid-js@2.0.0-beta.25) '@testing-library/jest-dom': - specifier: ^7.0.1 - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - jsdom: - specifier: ^27.0.0 - version: 27.0.0(supports-color@10.2.2) + specifier: ^6.6.3 + version: 6.6.3 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: ^5.0.4 - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/start-basic: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13022,36 +11787,36 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 nitro: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-auth: dependencies: @@ -13063,9 +11828,12 @@ importers: version: 7.0.0 '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + version: 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13073,54 +11841,54 @@ importers: '@tanstack/solid-start': specifier: workspace:* version: link:../../../packages/solid-start - iron-session: - specifier: ^9.0.1 - version: 9.0.1 redaxios: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 dotenv: specifier: ^17.2.3 version: 17.2.3 prisma: specifier: ^7.0.0 - version: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-authjs: dependencies: '@auth/core': specifier: ^0.41.1 version: 0.41.1 + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13129,8 +11897,8 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 start-authjs: specifier: ^1.0.0 version: 1.0.0(@auth/core@0.41.1) @@ -13140,30 +11908,33 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-cloudflare: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13172,41 +11943,44 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@cloudflare/vite-plugin': specifier: ^1.29.0 - version: 1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0) + version: 1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) wrangler: specifier: ^4.74.0 version: 4.75.0 examples/solid/start-basic-netlify: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13215,38 +11989,41 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@netlify/vite-plugin-tanstack-start': - specifier: ^1.3.19 - version: 1.3.19(@tanstack/solid-start@packages+solid-start)(babel-plugin-macros@3.1.0)(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^1.1.4 + version: 1.1.4(@tanstack/solid-start@packages+solid-start)(babel-plugin-macros@3.1.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.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)) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-nitro: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13255,44 +12032,47 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 nitro: - specifier: ^3.0.260903-beta - version: 3.0.260903-beta + specifier: ^3.0.260311-beta + version: 3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-solid-query: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-query-devtools': - specifier: ^5.90.0 - version: 5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13307,38 +12087,41 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-basic-static: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13353,47 +12136,50 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.3 + version: 5.1.4(typescript@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)) examples/solid/start-bun: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-devtools': specifier: ^0.7.0 - version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12) + version: 0.7.14(csstype@3.2.3)(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13405,18 +12191,18 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 devDependencies: '@solidjs/testing-library': specifier: ^0.8.10 - version: 0.8.10(solid-js@1.9.12) + version: 0.8.10(solid-js@2.0.0-beta.25) '@tanstack/eslint-config': specifier: ^0.3.2 - version: 0.3.2(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 0.3.2(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@testing-library/dom': specifier: ^10.4.1 version: 10.4.1 @@ -13426,27 +12212,24 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 jsdom: specifier: ^27.0.0 - version: 27.0.0(supports-color@10.2.2) + version: 27.0.0(postcss@8.5.15) prettier: specifier: ^3.6.2 version: 3.6.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - specifier: ^5.0.4 - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.4 + version: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@27.0.0(postcss@8.5.15))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) web-vitals: specifier: ^5.1.0 version: 5.1.0 @@ -13455,12 +12238,15 @@ importers: dependencies: '@convex-dev/better-auth': specifier: ^0.9.7 - version: 0.9.7(@standard-schema/spec@1.1.0)(@typescript/typescript6@6.0.2)(better-auth@1.6.19(@opentelemetry/api@1.9.1)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)(vitest@4.1.4)(vue@3.5.25(@typescript/typescript6@6.0.2)))(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9))(hono@4.13.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + version: 0.9.7(@standard-schema/spec@1.1.0)(better-auth@1.6.19(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)(vitest@4.1.4)(vue@3.5.25(typescript@6.0.2)))(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.7.10)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13469,23 +12255,23 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start better-auth: - specifier: ^1.6.19 - version: 1.6.19(@opentelemetry/api@1.9.1)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)(vitest@4.1.4)(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^1.3.27 + version: 1.6.19(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)(vitest@4.1.4)(vue@3.5.25(typescript@6.0.2)) clsx: specifier: ^2.1.1 version: 2.1.1 convex: specifier: ^1.28.2 - version: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9) + version: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) convex-solidjs: specifier: ^0.0.3 - version: 0.0.3(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9)(solid-js@1.9.12) + version: 0.0.3(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25) redaxios: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -13499,26 +12285,29 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-counter: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13530,8 +12319,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -13542,29 +12331,29 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 combinate: specifier: ^1.1.11 version: 1.1.11 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/start-i18n-paraglide: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-devtools': specifier: ^0.7.0 - version: 0.7.14(csstype@3.2.3)(solid-js@1.9.12) + version: 0.7.14(csstype@3.2.3)(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13573,41 +12362,41 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@inlang/paraglide-js': specifier: ^2.4.0 version: 2.4.0(babel-plugin-macros@3.1.0) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/start-large: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13619,41 +12408,41 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 valibot: specifier: ^1.0.0-beta.15 - version: 1.0.0-beta.15(@typescript/typescript6@6.0.2) + version: 1.0.0-beta.15(typescript@6.0.2) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/start-streaming-data-from-server-functions: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13662,8 +12451,8 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 zod: specifier: ^4.4.3 version: 4.4.3 @@ -13671,21 +12460,21 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/start-supabase-basic: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@supabase/ssr': specifier: ^0.5.2 version: 0.5.2(@supabase/supabase-js@2.48.1) @@ -13693,7 +12482,7 @@ importers: specifier: ^2.48.1 version: 2.48.1 '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13705,35 +12494,38 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/start-tailwind-v4: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13742,8 +12534,8 @@ importers: specifier: workspace:* version: link:../../../packages/solid-start solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwind-merge: specifier: ^3.6.0 version: 3.6.0 @@ -13753,36 +12545,39 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 tailwindcss: specifier: ^4.2.2 version: 4.2.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) + vite-tsconfig-paths: + specifier: ^5.1.4 + version: 5.1.4(typescript@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)) examples/solid/view-transitions: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13791,8 +12586,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -13800,26 +12595,26 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/with-framer-motion: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ @@ -13828,11 +12623,11 @@ importers: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 solid-motionone: specifier: ^1.0.4 - version: 1.0.4(solid-js@1.9.12) + version: 1.0.4(solid-js@2.0.0-beta.25) tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -13840,48 +12635,48 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/solid/with-trpc: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin '@tanstack/solid-router': - specifier: ^1.170.43 + specifier: ^2.0.0-beta.26 version: link:../../../packages/solid-router '@tanstack/solid-router-devtools': specifier: workspace:^ version: link:../../../packages/solid-router-devtools '@trpc/client': specifier: ^11.4.3 - version: 11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2) + version: 11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2) '@trpc/server': specifier: ^11.4.3 - version: 11.4.3(@typescript/typescript6@6.0.2) + version: 11.4.3(typescript@6.0.2) express: specifier: ^5.2.1 - version: 5.2.1(supports-color@10.2.2) + version: 5.2.1 redaxios: specifier: ^0.5.1 version: 0.5.1 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 tailwindcss: specifier: ^4.2.2 version: 4.2.2 @@ -13896,11 +12691,11 @@ importers: specifier: ^4.20.3 version: 4.20.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: ^2.11.11 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) examples/vue/basic: dependencies: @@ -13918,35 +12713,32 @@ importers: version: 4.1.18 vue: specifier: ^3.5.13 - version: 3.5.25(@typescript/typescript6@6.0.2) + version: 3.5.25(typescript@6.0.2) devDependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.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)) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 6.0.5(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))(vue@3.5.25(typescript@6.0.2)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 5.1.5(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))(vue@3.5.25(typescript@6.0.2)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(@typescript/typescript6@6.0.2) + specifier: ^3.1.5 + version: 3.1.5(typescript@6.0.2) examples/vue/basic-file-based-jsx: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -13974,37 +12766,37 @@ importers: version: 9.36.0 '@typescript-eslint/eslint-plugin': specifier: ^8.44.1 - version: 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + version: 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@typescript-eslint/parser': specifier: ^8.44.1 - version: 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + version: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) eslint-plugin-vue: specifier: ^9.33.0 - version: 9.33.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.33.0(eslint@9.22.0(jiti@2.7.0)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-eslint-parser: specifier: ^9.4.3 - version: 9.4.3(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 9.4.3(eslint@9.22.0(jiti@2.7.0)) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) examples/vue/basic-file-based-sfc: dependencies: '@tailwindcss/vite': specifier: ^4.2.2 - version: 4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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/router-plugin': specifier: workspace:* version: link:../../../packages/router-plugin @@ -14029,159 +12821,99 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^6.0.5 - version: 6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 6.0.5(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))(vue@3.5.25(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': specifier: ^5.1.5 - version: 5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3)) + version: 5.1.5(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))(vue@3.5.25(typescript@5.8.3)) typescript: specifier: ~5.8.3 version: 5.8.3 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vue-tsc: - specifier: ^3.3.8 - version: 3.3.8(typescript@5.8.3) + specifier: ^3.1.5 + version: 3.1.5(typescript@5.8.3) packages/arktype-adapter: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/react-router': specifier: workspace:* version: link:../react-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) + specifier: ^16.2.0 + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) arktype: specifier: ^2.1.7 version: 2.1.7 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/eslint-plugin-router: dependencies: '@typescript-eslint/utils': specifier: ^8.23.0 - version: 8.23.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@typescript-eslint/rule-tester': specifier: ^8.23.0 - version: 8.23.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + version: 8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) combinate: - specifier: 'catalog:' + specifier: ^1.1.11 version: 1.1.11 eslint: specifier: ^9.22.0 - version: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + version: 9.22.0(jiti@2.7.0) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/eslint-plugin-start: dependencies: '@typescript-eslint/utils': specifier: ^8.44.1 - version: 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) + version: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) globals: specifier: ^16.2.0 version: 16.4.0 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@tanstack/vite-config': - specifier: 'catalog:' - version: 0.5.2(@types/node@25.0.9)(rollup@4.63.1)(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@typescript-eslint/rule-tester': specifier: ^8.44.1 - version: 8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) + version: 8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) eslint: specifier: ^9.22.0 - version: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + version: 9.22.0(jiti@2.7.0) typescript: specifier: ^5.8.2 version: 5.9.2 - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) packages/history: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) + + packages/nitro-v2-vite-plugin: + dependencies: + nitropack: + specifier: ^2.13.1 + version: 2.13.1(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(mysql2@3.15.3)(rolldown@1.0.2) + pathe: + specifier: ^2.0.3 + version: 2.0.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) packages/react-router: dependencies: @@ -14189,75 +12921,42 @@ importers: specifier: workspace:* version: link:../history '@tanstack/react-store': - specifier: ^0.11.2 - version: 0.11.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + specifier: ^0.9.3 + version: 0.9.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/router-core': specifier: workspace:* version: link:../router-core isbot: - specifier: 'catalog:' + specifier: ^5.1.22 version: 5.1.28 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) - '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + specifier: ^16.2.0 + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.3.4 + version: 4.3.4(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)) combinate: - specifier: 'catalog:' + specifier: ^1.1.11 version: 1.1.11 - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 packages/react-router-devtools: dependencies: @@ -14271,109 +12970,49 @@ importers: specifier: workspace:^ version: link:../router-devtools-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^4.3.4 + version: 4.3.4(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.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/react-router-ssr-query: dependencies: '@tanstack/query-core': - specifier: ^5.102.0 - version: 5.102.0 + specifier: ^5.99.0 + version: 5.99.0 '@tanstack/router-ssr-query-core': specifier: workspace:* version: link:../router-ssr-query-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) '@tanstack/react-query': - specifier: ^5.102.0 - version: 5.102.0(react@19.2.9) + specifier: ^5.99.0 + version: 5.99.0(react@19.2.3) '@tanstack/react-router': specifier: workspace:* version: link:../react-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^4.3.4 + version: 4.6.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)) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/react-start: dependencies: @@ -14402,54 +13041,24 @@ importers: specifier: workspace:* version: link:../start-server-core pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 + react: + specifier: ^19.2.3 + version: 19.2.3 + react-dom: + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) '@rsbuild/core': - specifier: 'catalog:' - version: 2.3.1 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^2.0.11 + version: 2.0.14 '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) packages/react-start-client: dependencies: @@ -14462,55 +13071,25 @@ importers: '@tanstack/start-client-core': specifier: workspace:* version: link:../start-client-core + react: + specifier: ^19.2.3 + version: 19.2.3 + react-dom: + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + specifier: ^16.2.0 + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^4.3.4 + version: 4.3.4(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)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/react-start-rsc: dependencies: @@ -14532,64 +13111,37 @@ importers: '@tanstack/start-plugin-core': specifier: workspace:* version: link:../start-plugin-core + '@tanstack/start-server-core': + specifier: workspace:* + version: link:../start-server-core '@tanstack/start-storage-context': specifier: workspace:* version: link:../start-storage-context pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 - devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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.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)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@vitejs/plugin-rsc': - specifier: ^0.5.39 - version: 0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) + devDependencies: + '@rspack/core': + specifier: 2.0.0 + version: 2.0.0(@swc/helpers@0.5.23) + '@testing-library/react': + specifier: ^16.2.0 + version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vitejs/plugin-react': + specifier: ^4.3.4 + version: 4.7.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)) + '@vitejs/plugin-rsc': + specifier: ^0.5.20 + version: 0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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-server-dom-rspack: - specifier: ^0.1.1 - version: 0.1.1(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/react-start-server: dependencies: @@ -14603,88 +13155,43 @@ importers: specifier: workspace:* version: link:../start-server-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^4.3.4 + version: 4.3.4(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.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-cli: dependencies: '@tanstack/router-generator': specifier: workspace:* version: link:../router-generator - cac: - specifier: ^7.1.0 - version: 7.1.0 chokidar: - specifier: 'catalog:' + specifier: ^5.0.0 version: 5.0.0 + yargs: + specifier: ^17.7.2 + version: 17.7.2 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + '@types/yargs': + specifier: ^17.0.33 + version: 17.0.33 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-core: dependencies: @@ -14695,42 +13202,24 @@ importers: specifier: ^3.0.0 version: 3.1.1 seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 seroval-plugins: - specifier: ^1.6.7 - version: 1.6.7(seroval@1.6.7) + specifier: ^1.5.4 + version: 1.5.4(seroval@1.5.4) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/store': - 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.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^0.9.3 + version: 0.9.3 '@types/node': specifier: 25.0.9 version: 25.0.9 esbuild: specifier: ^0.27.4 version: 0.27.4 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-devtools: dependencies: @@ -14744,45 +13233,18 @@ importers: specifier: ^3.0.10 version: 3.2.3 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) '@vitejs/plugin-react': - specifier: 'catalog:' - version: 6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^4.3.4 + version: 4.3.4(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.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-devtools-core: dependencies: @@ -14799,42 +13261,21 @@ importers: specifier: ^2.1.16 version: 2.1.16(csstype@3.2.3) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 solid-js: specifier: 1.9.12 version: 1.9.12 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^2.11.10 + version: 2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(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)) packages/router-generator: dependencies: '@babel/types': - specifier: 'catalog:' - version: 7.29.8 + specifier: ^7.28.5 + version: 7.29.0 '@tanstack/router-core': specifier: workspace:* version: link:../router-core @@ -14851,54 +13292,36 @@ importers: specifier: ^0.30.21 version: 0.30.21 prettier: - specifier: ^3.9.6 - version: 3.9.6 + specifier: ^3.5.0 + version: 3.5.0 zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/react-router': specifier: workspace:* version: link:../react-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - publint: - specifier: 'catalog:' - version: 0.3.17 - react: - specifier: ~19.2.9 - version: 19.2.9 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-plugin: dependencies: '@babel/core': - specifier: 'catalog:' - version: 7.29.7(supports-color@10.2.2) + specifier: ^7.28.5 + version: 7.28.5 '@babel/template': - specifier: ^7.29.7 - version: 7.29.7 + specifier: ^7.27.2 + version: 7.27.2 '@babel/types': - specifier: 'catalog:' - version: 7.29.8 + specifier: ^7.28.5 + version: 7.28.5 + '@rsbuild/core': + specifier: '>=1.0.2 || ^2.0.0' + version: 2.0.1 '@tanstack/react-router': specifier: workspace:* version: link:../react-router @@ -14912,30 +13335,24 @@ importers: specifier: workspace:* version: link:../router-utils chokidar: - specifier: 'catalog:' + specifier: ^5.0.0 version: 5.0.0 unplugin: - specifier: ^3.5.0 - version: 3.7.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(esbuild@0.28.1)(rolldown@1.2.13)(rollup@4.63.1)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3) + specifier: ^3.0.0 + version: 3.0.0 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: specifier: ^2.11.10 || ^3.0.0-0 - version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: + specifier: '>=5.92.0' + version: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4) zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@rsbuild/core': - specifier: 'catalog:' - version: 2.3.1 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -14945,118 +13362,55 @@ importers: '@types/node': specifier: 25.0.9 version: 25.0.9 - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - prettier: - specifier: ^3.9.6 - version: 3.9.6 - publint: - specifier: 'catalog:' - version: 0.3.17 - react: - specifier: ~19.2.9 - version: 19.2.9 - react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - webpack: - specifier: ^5.104.1 - version: 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) packages/router-ssr-query-core: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/query-core': - specifier: ^5.102.0 - version: 5.102.0 + specifier: ^5.99.0 + version: 5.99.0 '@tanstack/router-core': specifier: workspace:* version: link:../router-core - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-utils: dependencies: '@babel/generator': - specifier: ^7.29.8 - version: 7.29.8 + specifier: ^7.28.5 + version: 7.28.5 '@babel/parser': - specifier: ^7.29.8 - version: 7.29.8 + specifier: ^7.28.5 + version: 7.28.5 '@babel/types': - specifier: 'catalog:' - version: 7.29.8 + specifier: ^7.28.5 + version: 7.28.5 ansis: - specifier: ^4.3.1 - version: 4.3.1 + specifier: ^4.1.0 + version: 4.1.0 babel-dead-code-elimination: specifier: ^1.0.12 - version: 1.0.12(supports-color@10.2.2) + version: 1.0.12 diff: - specifier: ^9.0.0 - version: 9.0.0 + specifier: ^8.0.2 + version: 8.0.2 pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 tinyglobby: - specifier: 'catalog:' - version: 0.2.17 + specifier: ^0.2.15 + version: 0.2.15 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/babel__generator': specifier: ^7.27.0 version: 7.27.0 '@types/node': specifier: 25.0.9 version: 25.0.9 - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/router-vite-plugin: dependencies: @@ -15064,33 +13418,24 @@ importers: specifier: workspace:* version: link:../router-plugin devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/solid-router: dependencies: + '@solid-devtools/logger': + specifier: ^0.9.4 + version: 0.9.7(solid-js@2.0.0-beta.25) '@solid-primitives/refs': specifier: ^1.0.8 - version: 1.1.0(solid-js@1.9.12) + version: 1.1.0(solid-js@2.0.0-beta.25) '@solidjs/meta': specifier: ^0.29.4 - version: 0.29.4(solid-js@1.9.12) + version: 0.29.4(solid-js@2.0.0-beta.25) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/history': specifier: workspace:* version: link:../history @@ -15098,54 +13443,42 @@ importers: specifier: workspace:* version: link:../router-core isbot: - specifier: 'catalog:' + specifier: ^5.1.22 version: 5.1.28 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@solidjs/testing-library': specifier: ^0.8.10 - version: 0.8.10(solid-js@1.9.12) - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + version: 0.8.10(solid-js@2.0.0-beta.25) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@types/node': specifier: 25.0.9 version: 25.0.9 combinate: - specifier: 'catalog:' + specifier: ^1.1.11 version: 1.1.11 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + eslint-plugin-solid: + specifier: ^0.14.5 + version: 0.14.5(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 packages/solid-router-devtools: dependencies: + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-core': specifier: workspace:* version: link:../router-core @@ -15156,82 +13489,55 @@ importers: specifier: workspace:^ version: link:../solid-router devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) packages/solid-router-ssr-query: dependencies: '@tanstack/query-core': - specifier: ^5.102.0 - version: 5.102.0 + specifier: ^5.99.0 + version: 5.99.0 '@tanstack/router-ssr-query-core': specifier: workspace:* version: link:../router-ssr-query-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/solid-query': - specifier: ^5.102.0 - version: 5.102.0(solid-js@1.9.12) + specifier: ^6.0.0-beta.5 + version: 6.0.0-beta.5(solid-js@2.0.0-beta.25) '@tanstack/solid-router': specifier: workspace:* version: link:../solid-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) eslint-plugin-solid: specifier: ^0.14.5 - version: 0.14.5(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + version: 0.14.5(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) packages/solid-start: dependencies: + '@tanstack/router-core': + specifier: workspace:* + version: link:../router-core '@tanstack/solid-router': specifier: workspace:* version: link:../solid-router @@ -15251,48 +13557,36 @@ importers: specifier: workspace:* version: link:../start-server-core pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 - solid-js: - specifier: 1.9.12 - version: 1.9.12 + seroval: + specifier: ^1.5.4 + version: 1.5.4 + seroval-plugins: + specifier: ^1.5.4 + version: 1.5.4(seroval@1.5.4) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@eslint-react/eslint-plugin': - 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)) '@rsbuild/core': - specifier: 'catalog:' - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@tanstack/router-utils': specifier: workspace:* version: link:../router-utils - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - eslint-plugin-react-hooks: - specifier: 'catalog:' - version: 5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + solid-js: + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) + vite-plugin-solid: + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) packages/solid-start-client: dependencies: @@ -15305,37 +13599,25 @@ importers: '@tanstack/start-client-core': specifier: workspace:* version: link:../start-client-core - solid-js: - specifier: 1.9.12 - version: 1.9.12 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + '@solidjs/testing-library': + specifier: ^0.8.10 + version: 0.8.10(solid-js@2.0.0-beta.25) + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^6.6.3 + version: 6.6.3 + solid-js: + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) packages/solid-start-server: dependencies: @@ -15349,39 +13631,21 @@ importers: specifier: workspace:* version: link:../start-server-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + '@solidjs/web': + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25(solid-js@2.0.0-beta.25) solid-js: - specifier: 1.9.12 - version: 1.9.12 + specifier: 2.0.0-beta.25 + version: 2.0.0-beta.25 typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) vite-plugin-solid: - specifier: 'catalog:' - version: 2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^3.0.0-next.16 + version: 3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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)) packages/start-client-core: dependencies: @@ -15395,69 +13659,33 @@ importers: specifier: workspace:* version: link:../start-storage-context seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/start-fn-stubs: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/start-plugin-core: dependencies: '@babel/code-frame': - specifier: 7.29.7 - version: 7.29.7 + specifier: 7.27.1 + version: 7.27.1 '@babel/core': - specifier: 'catalog:' - version: 7.29.7(supports-color@10.2.2) + specifier: ^7.28.5 + version: 7.28.5 '@babel/types': - specifier: 'catalog:' - version: 7.29.8 - '@jridgewell/remapping': - specifier: ^2.3.5 - version: 2.3.5 + specifier: ^7.28.5 + version: 7.28.5 '@tanstack/router-core': specifier: workspace:* version: link:../router-core @@ -15474,51 +13702,45 @@ importers: specifier: workspace:* version: link:../start-server-core exsolve: - specifier: ^1.1.3 - version: 1.2.0 + specifier: ^1.0.7 + version: 1.0.7 lightningcss: - specifier: ^1.33.0 - version: 1.33.0 + specifier: ^1.32.0 + version: 1.32.0 pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 picomatch: - specifier: ^4.0.7 - version: 4.0.7 + specifier: ^4.0.3 + version: 4.0.3 seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 source-map: specifier: ^0.7.6 version: 0.7.6 srvx: - specifier: ^1.0.0 - version: 1.0.5 + specifier: ^0.11.9 + version: 0.11.12 tinyglobby: - specifier: 'catalog:' - version: 0.2.17 + specifier: ^0.2.15 + version: 0.2.15 ufo: - specifier: ^1.6.4 - version: 1.6.4 + specifier: ^1.5.4 + version: 1.6.1 vitefu: - specifier: ^1.1.3 - version: 1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^1.1.1 + version: 1.1.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)) xmlbuilder2: specifier: ^4.0.3 version: 4.0.3 zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@rsbuild/core': - specifier: 'catalog:' - version: 2.3.1 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^2.0.11 + version: 2.0.14 '@types/babel__code-frame': specifier: ^7.0.6 version: 7.0.6 @@ -15531,21 +13753,9 @@ importers: '@types/picomatch': specifier: ^4.0.2 version: 4.0.2 - prettier: - specifier: ^3.9.6 - version: 3.9.6 - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/start-server-core: dependencies: @@ -15561,46 +13771,28 @@ importers: '@tanstack/start-storage-context': specifier: workspace:* version: link:../start-storage-context - cookie-es: - specifier: ^3.0.0 - version: 3.1.1 fetchdts: - specifier: ^0.2.0 - version: 0.2.0 + specifier: ^0.1.6 + version: 0.1.7 + h3-v2: + specifier: npm:h3@2.0.1-rc.20 + version: h3@2.0.1-rc.20(crossws@0.4.9(srvx@0.11.20)) seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@standard-schema/spec': specifier: ^1.0.0 version: 1.0.0 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - iron-session: - specifier: 9.0.1 - version: 9.0.1 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + cookie-es: + specifier: ^3.0.0 + version: 3.1.1 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/start-static-server-functions: dependencies: @@ -15614,33 +13806,15 @@ importers: specifier: workspace:* version: link:../start-client-core seroval: - specifier: ^1.6.7 - version: 1.6.7 + specifier: ^1.5.4 + version: 1.5.4 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/start-storage-context: dependencies: @@ -15648,102 +13822,42 @@ importers: specifier: workspace:* version: link:../router-core devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/valibot-adapter: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/react-router': specifier: workspace:* version: link:../react-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^16.2.0 + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) valibot: specifier: 1.0.0-beta.15 - version: 1.0.0-beta.15(@typescript/typescript6@6.0.2) + version: 1.0.0-beta.15(typescript@6.0.2) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/virtual-file-routes: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) packages/vue-router: dependencies: @@ -15754,60 +13868,39 @@ importers: specifier: workspace:* version: link:../router-core '@tanstack/vue-store': - specifier: ^0.11.2 - version: 0.11.2(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^0.9.3 + version: 0.9.3(vue@3.5.25(typescript@6.0.2)) '@vue/runtime-dom': specifier: ^3.5.25 version: 3.5.25 isbot: - specifier: 'catalog:' + specifier: ^5.1.22 version: 5.1.28 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/vue': specifier: ^8.1.0 - version: 8.1.0(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2)) + version: 8.1.0(@vue/compiler-sfc@3.5.25)(vue@3.5.25(typescript@6.0.2)) '@types/node': specifier: 25.0.9 version: 25.0.9 '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - '@vitest/ui': - specifier: 'catalog:' - version: 5.0.4(vitest@5.0.4) + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) combinate: - specifier: 'catalog:' + specifier: ^1.1.11 version: 1.1.11 - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.25 + version: 3.5.25(typescript@6.0.2) zod: - specifier: 'catalog:' - version: 4.5.4 + specifier: ^4.4.3 + version: 4.4.3 packages/vue-router-devtools: dependencies: @@ -15821,73 +13914,43 @@ importers: specifier: workspace:* version: link:../vue-router vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + 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) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.13 + version: 3.5.25(typescript@6.0.2) packages/vue-router-ssr-query: dependencies: '@tanstack/query-core': - specifier: ^5.102.0 - version: 5.102.0 + specifier: ^5.99.0 + version: 5.99.0 '@tanstack/router-ssr-query-core': specifier: workspace:* version: link:../router-ssr-query-core '@tanstack/vue-query': - specifier: ^5.102.0 - version: 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) + specifier: ^5.99.0 + version: 5.99.0(vue@3.5.25(typescript@6.0.2)) devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@tanstack/vue-router': specifier: workspace:* version: link:../vue-router '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.25 + version: 3.5.25(typescript@6.0.2) packages/vue-start: dependencies: @@ -15910,45 +13973,27 @@ importers: specifier: workspace:* version: link:../vue-start-server pathe: - specifier: 'catalog:' + specifier: ^2.0.3 version: 2.0.3 devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@rsbuild/core': - specifier: 'catalog:' - version: 2.3.1 + specifier: ^2.0.11 + version: 2.0.14 '@tanstack/router-utils': specifier: workspace:* version: link:../router-utils - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@types/node': specifier: 25.0.9 version: 25.0.9 '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.25 + version: 3.5.25(typescript@6.0.2) packages/vue-start-client: dependencies: @@ -15962,33 +14007,15 @@ importers: specifier: workspace:* version: link:../vue-router devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.25 + version: 3.5.25(typescript@6.0.2) packages/vue-start-server: dependencies: @@ -16002,84 +14029,39 @@ importers: specifier: workspace:* version: link:../vue-router devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - '@typescript/native': - specifier: npm:typescript@^7.0.2 - version: typescript@7.0.2 '@vitejs/plugin-vue-jsx': - specifier: 'catalog:' - version: 4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2)) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^4.1.2 + version: 4.2.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))(vue@3.5.25(typescript@6.0.2)) typescript: - specifier: npm:@typescript/typescript6@^6.0.2 - version: '@typescript/typescript6@6.0.2' + specifier: ^6.0.2 + version: 6.0.2 vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) vue: - specifier: 'catalog:' - version: 3.5.25(@typescript/typescript6@6.0.2) + specifier: ^3.5.25 + version: 3.5.25(typescript@6.0.2) packages/zod-adapter: devDependencies: - '@arethetypeswrong/cli': - specifier: 'catalog:' - version: 0.18.4 '@tanstack/react-router': specifier: workspace:* version: link:../react-router - '@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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) '@testing-library/jest-dom': - specifier: 'catalog:' - version: 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': - specifier: 'catalog:' - version: 16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@types/react': - specifier: ^19.2.8 - version: 19.2.9 - '@types/react-dom': - specifier: ^19.2.3 - version: 19.2.3(@types/react@19.2.9) - jsdom: - specifier: 'catalog:' - version: 25.0.1(supports-color@10.2.2) - publint: - specifier: 'catalog:' - version: 0.3.17 + specifier: ^16.2.0 + version: 16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react: - specifier: ~19.2.9 - version: 19.2.9 + specifier: ^19.2.3 + version: 19.2.3 react-dom: - specifier: ~19.2.9 - version: 19.2.9(react@19.2.9) - rimraf: - specifier: 'catalog:' - version: 6.1.2 + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) vite: - specifier: ^8.3.4 - version: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: - specifier: 'catalog:' - version: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + 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) zod: specifier: ^3.24.2 version: 3.25.57 @@ -16093,6 +14075,10 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + '@andrewbranch/untar.js@1.0.3': resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} @@ -16152,8 +14138,12 @@ packages: nodemailer: optional: true - '@babel/code-frame@7.29.7': - resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + '@babel/code-frame@7.27.1': + resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} + engines: {node: '>=6.9.0'} + + '@babel/code-frame@7.29.0': + resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.27.5': @@ -16164,10 +14154,6 @@ packages: resolution: {integrity: sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.29.7': - resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} - engines: {node: '>=6.9.0'} - '@babel/core@7.28.5': resolution: {integrity: sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==} engines: {node: '>=6.9.0'} @@ -16176,12 +14162,12 @@ packages: resolution: {integrity: sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==} engines: {node: '>=6.9.0'} - '@babel/core@7.29.7': - resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + '@babel/generator@7.28.5': + resolution: {integrity: sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==} engines: {node: '>=6.9.0'} - '@babel/generator@7.29.8': - resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} + '@babel/generator@7.29.1': + resolution: {integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.27.3': @@ -16196,16 +14182,18 @@ packages: resolution: {integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.29.7': - resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} - engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.27.1': resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-create-class-features-plugin@7.28.5': + resolution: {integrity: sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-create-class-features-plugin@7.28.6': resolution: {integrity: sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==} engines: {node: '>=6.9.0'} @@ -16216,10 +14204,6 @@ packages: resolution: {integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==} engines: {node: '>=6.9.0'} - '@babel/helper-globals@7.29.7': - resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} - engines: {node: '>=6.9.0'} - '@babel/helper-member-expression-to-functions@7.27.1': resolution: {integrity: sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==} engines: {node: '>=6.9.0'} @@ -16240,10 +14224,6 @@ packages: resolution: {integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.29.7': - resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} - engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.28.3': resolution: {integrity: sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==} engines: {node: '>=6.9.0'} @@ -16256,12 +14236,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.29.7': - resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.27.1': resolution: {integrity: sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==} engines: {node: '>=6.9.0'} @@ -16290,22 +14264,18 @@ packages: resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.29.7': - resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.29.7': - resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + '@babel/helper-validator-identifier@7.28.5': + resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} '@babel/helper-validator-option@7.27.1': resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.29.7': - resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} - engines: {node: '>=6.9.0'} - '@babel/helpers@7.28.4': resolution: {integrity: sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==} engines: {node: '>=6.9.0'} @@ -16314,26 +14284,34 @@ packages: resolution: {integrity: sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.29.7': - resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} - engines: {node: '>=6.9.0'} - '@babel/parser@7.28.5': resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.29.8': - resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==} + '@babel/parser@7.29.2': + resolution: {integrity: sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/plugin-proposal-decorators@7.28.0': + resolution: {integrity: sha512-zOiZqvANjWDUaUS9xMxbMcK/Zccztbe/6ikvUXaG9nsPH3w6qh5UaPGAnirI/WhIbZ8m3OHU0ReyPrknG+ZKeg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-proposal-decorators@7.29.0': resolution: {integrity: sha512-CVBVv3VY/XRMxRYq5dwr2DS7/MvqPm23cOCjbwNnVrfOqcWlnefua1uUs0sjdKOGjvPUG633o07uWzJq4oI6dA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-decorators@7.27.1': + resolution: {integrity: sha512-YMq8Z87Lhl8EGkmb0MwYkt36QnxC+fzCgrl66ereamPlYToRpIk5nUjKUY3QKLWq8mwUB1BgbeXcTJhZOCDg5A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-decorators@7.28.6': resolution: {integrity: sha512-71EYI0ONURHJBL4rSFXnITXqXrrY8q4P0q006DPfN+Rk+ASM+++IBXem/ruokgBZR8YNEWZ8R6B+rCb8VcUTqA==} engines: {node: '>=6.9.0'} @@ -16358,6 +14336,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-class-properties@7.27.1': + resolution: {integrity: sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-class-properties@7.28.6': resolution: {integrity: sha512-dY2wS3I2G7D697VHndN91TJr8/AAfXQNt5ynCTI/MpxMsSzHp+52uNivYT5wCPax3whc47DR8Ba7cmlQMg24bw==} engines: {node: '>=6.9.0'} @@ -16370,12 +14354,42 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx-self@7.25.9': + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-self@7.27.1': + resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.25.9': + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.27.1': + resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-typescript@7.27.1': resolution: {integrity: sha512-Q5sT5+O4QUebHdbwKedFBEwRLb02zJ7r4A5Gg2hUoLuU3FjdMcyqcywqUrLCaDsFCxzokf7u9kuy7qz51YUuAg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-typescript@7.28.5': + resolution: {integrity: sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-typescript@7.28.6': resolution: {integrity: sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==} engines: {node: '>=6.9.0'} @@ -16398,8 +14412,12 @@ packages: resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} engines: {node: '>=6.9.0'} - '@babel/template@7.29.7': - resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + '@babel/template@7.27.2': + resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} + engines: {node: '>=6.9.0'} + + '@babel/template@7.28.6': + resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} engines: {node: '>=6.9.0'} '@babel/traverse@7.28.5': @@ -16410,12 +14428,16 @@ packages: resolution: {integrity: sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.29.8': - resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==} + '@babel/types@7.28.4': + resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==} engines: {node: '>=6.9.0'} - '@babel/types@7.29.8': - resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} + '@babel/types@7.28.5': + resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.0': + resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} '@better-auth/core@1.6.19': @@ -16497,6 +14519,9 @@ packages: '@better-fetch/fetch@1.3.1': resolution: {integrity: sha512-ABkD1WhyfPZprKRQI3bhATjeiFuNWC9PXhfGWqL+sg/gKrM977oFrYkdb4msM3hgUGonr7KlOsOFT5TU2rht9g==} + '@blazediff/core@1.9.1': + resolution: {integrity: sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA==} + '@braidai/lang@1.1.2': resolution: {integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==} @@ -16504,9 +14529,6 @@ packages: resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==} hasBin: true - '@bufbuild/protobuf@2.16.0': - resolution: {integrity: sha512-FWa0sPlqYGJgpTs6OxBRcL/AW4JT0OIO+W1ajerluoTVh8CV0B7XM1qsNCRgnkSCkRCgOICKHRQlY17jrsm0+Q==} - '@bundled-es-modules/cookie@2.0.1': resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==} @@ -16589,14 +14611,6 @@ packages: '@chevrotain/utils@10.5.0': resolution: {integrity: sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==} - '@clack/core@1.4.3': - resolution: {integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==} - engines: {node: '>= 20.12.0'} - - '@clack/prompts@1.7.0': - resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==} - engines: {node: '>= 20.12.0'} - '@clerk/backend@2.18.3': resolution: {integrity: sha512-fWMq/Tb2hgfUXLKJN8jr6pbpA5XLUwC4BjWz7lB5Y+YhXhBrO7GtfpZIS91L/aDhNb17X6IaE6XvS6tDJBCUUw==} engines: {node: '>=18.17.0'} @@ -16610,23 +14624,23 @@ packages: engines: {node: '>=18.17.0'} deprecated: 'This package is no longer supported. Please use @clerk/react instead. See the upgrade guide for more info: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3' peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@clerk/clerk-react@5.59.3': resolution: {integrity: sha512-r1gmAYxhXs+QkXjDwj5Eqvm0Io8PtJ4FKkA45khiAzIQXcaQLFq/wFy7d1K8OSIYAIdFbuO0bnIOU/FdgWOc+A==} engines: {node: '>=18.17.0'} deprecated: 'This package is no longer supported. Please use @clerk/react instead. See the upgrade guide for more info: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3' peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@clerk/shared@3.28.2': resolution: {integrity: sha512-BfBCPaoPoLCiU0b0MhQUfCjs+bWRRLkdHw0vBffSjtsFLxp1b5IL5D8nKgDPIKIIv7DmCCmO15tr+GqG3CGpYQ==} engines: {node: '>=18.17.0'} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: react: optional: true @@ -16637,8 +14651,8 @@ packages: resolution: {integrity: sha512-sJUur/7jnHHlAsdoDosxpOmfV05VR7K5rvqlFskj3GaAMFEJrvdOztw0hmhBGVSWiCpjTZfdGITegton8mo7mQ==} engines: {node: '>=18.17.0'} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: react: optional: true @@ -16651,8 +14665,8 @@ packages: peerDependencies: '@tanstack/react-router': workspace:* '@tanstack/react-start': workspace:* - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@clerk/tanstack-react-start@0.27.14': resolution: {integrity: sha512-So+pchhM3NUIY0sFqxh3yv2hG9bifPUqkCIDUKVzq0+korMhHTsMXBwcsbt2LpQ9UBXob1dW5v1WxtdWkqELFw==} @@ -16660,8 +14674,8 @@ packages: peerDependencies: '@tanstack/react-router': workspace:* '@tanstack/react-start': workspace:* - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@clerk/types@4.101.10': resolution: {integrity: sha512-qlmgnAm/IeK02RKEKVN8/Glx07xw/Lcv67jBfikM8HXhHc5v7bfYLD8UiWTr6H2RGtvB09cIt9JezRRlsuVBew==} @@ -16673,19 +14687,10 @@ packages: engines: {node: '>=18.17.0'} deprecated: 'This package is no longer supported. Please import types from @clerk/shared/types instead. See the upgrade guide for more info: https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3' - '@cloudflare/build-output-utils@0.9.10': - resolution: {integrity: sha512-9F6RSV0FJnF0zQLIoMVgxc0ub57FrZBGKZ8oUQHyVAbbjodlcIHk0BF5fd3B89N/Y4cE+FSqzWfpq3RzFy3tjA==} - - '@cloudflare/config@0.30.2': - resolution: {integrity: sha512-YTasjo8Kvfn3SlVs5gHZ6fy73BNQafY2Y8aosasicO8CTRVj2h8K7h+IJnjHK+tzM00Qi96VcOCfefCNLuMauw==} - '@cloudflare/kv-asset-handler@0.4.2': resolution: {integrity: sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ==} engines: {node: '>=18.0.0'} - '@cloudflare/runtime-types@0.1.23': - resolution: {integrity: sha512-uQVuBfVlJqGFryfyiMG+62KKS6NNC/EKYqbHGnNE2ExhcPNUihfYp3hWtTKshikZe7STTmIaLpDqT+h7J8Fdrw==} - '@cloudflare/unenv-preset@2.15.0': resolution: {integrity: sha512-EGYmJaGZKWl+X8tXxcnx4v2bOZSjQeNI5dWFeXivgX9+YCT69AkzHHwlNbVpqtEUTbew8eQurpyOpeN8fg00nw==} peerDependencies: @@ -16695,19 +14700,10 @@ packages: workerd: optional: true - '@cloudflare/unenv-preset@2.16.2': - resolution: {integrity: sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==} - peerDependencies: - unenv: 2.0.0-rc.24 - workerd: '>1.20260305.0 <2.0.0-0' - peerDependenciesMeta: - workerd: - optional: true - '@cloudflare/vite-plugin@1.29.1': resolution: {integrity: sha512-HTbVG43olzk3KTZD8b0nlmJTI3G6sQdFTmuD9HMJy7bkQbxKppkt16jayFo/NWAAs1GJXpFjLkC8udRdyn3aEg==} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 wrangler: ^4.75.0 '@cloudflare/workerd-darwin-64@1.20260317.1': @@ -16716,69 +14712,39 @@ packages: cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-64@1.20261104.1': - resolution: {integrity: sha512-5Bl+P1HT1/Ezk7Yrhyd+QkJ4VC/3naO0L3so/AkpgdaAHG3bmUmcCJBAtwH7O4JdVt8SMfm6EV89seiPpdjHJQ==} - engines: {node: '>=16'} - cpu: [x64] - os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20260317.1': resolution: {integrity: sha512-M/MnNyvO5HMgoIdr3QHjdCj2T1ki9gt0vIUnxYxBu9ISXS/jgtMl6chUVPJ7zHYBn9MyYr8ByeN6frjYxj0MGg==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20261104.1': - resolution: {integrity: sha512-2fM+0klAjspAQ3Jl0iw0gVyGpNnkvPiZ50WHigPLhWQRiS+zhabFXVR07zz1RaPGkJHrMjEpWoEfjjm8nU5IOg==} - engines: {node: '>=16'} - cpu: [arm64] - os: [darwin] - '@cloudflare/workerd-linux-64@1.20260317.1': resolution: {integrity: sha512-1ltuEjkRcS3fsVF7CxsKlWiRmzq2ZqMfqDN0qUOgbUwkpXsLVJsXmoblaLf5OP00ELlcgF0QsN0p2xPEua4Uug==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-64@1.20261104.1': - resolution: {integrity: sha512-VgpZIOooZHjSxjEZIJ1hkyt/jTfL3KeavkWCc0x7xxVu9zgkplaJF78Iv6CzoCTamQXyZeBaRQHS2bbAc70Vgg==} - engines: {node: '>=16'} - cpu: [x64] - os: [linux] - '@cloudflare/workerd-linux-arm64@1.20260317.1': resolution: {integrity: sha512-3QrNnPF1xlaNwkHpasvRvAMidOvQs2NhXQmALJrEfpIJ/IDL2la8g499yXp3eqhG3hVMCB07XVY149GTs42Xtw==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20261104.1': - resolution: {integrity: sha512-uEBJJHh2SbeQauRGrad7tIFIrpUQ5LUqZX40l7IKwYd0yeemvsno8f57w34Bx/pPpaSsNYVcV5oNFVbv+v/BOw==} - engines: {node: '>=16'} - cpu: [arm64] - os: [linux] - '@cloudflare/workerd-windows-64@1.20260317.1': resolution: {integrity: sha512-MfZTz+7LfuIpMGTa3RLXHX8Z/pnycZLItn94WRdHr8LPVet+C5/1Nzei399w/jr3+kzT4pDKk26JF/tlI5elpQ==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workerd-windows-64@1.20261104.1': - resolution: {integrity: sha512-b/fnEU1leVm8UrI2EHQ4MSrK2vmnWdR1jefRyEUDZe3ucpKY0PWi4bVxWh5niZdlL0MIc4C5tXNXTlAMZpKDdA==} - engines: {node: '>=16'} - cpu: [x64] - os: [win32] + '@codspeed/core@5.5.0': + resolution: {integrity: sha512-5FbjNlxSVOfemB85orEecikZiTz0C8aZYUfCkt5HY6QLLd1mqkrHAfekEJw0gkHcgCjNgD6DVp2TXm0V/xtt4w==} - '@codspeed/core@6.0.1': - resolution: {integrity: sha512-p6yrZIoz/Bf5vW/QfGhiPOCKccGPES3jQ8NA+03qGcUYR3/U0tZ9h6ZkxVg2zLN10YaHrABEY4GtmTEEE5xF5Q==} - - '@codspeed/vitest-plugin@6.0.1': - resolution: {integrity: sha512-QEIkp3UtXwbT3eB7NZ49+Jz5xpzHopSFMscASF4lpbjTgbOt/Xax6vIPShDSPKB5JErexyJBze7AwCOPgkoNqQ==} + '@codspeed/vitest-plugin@5.5.0': + resolution: {integrity: sha512-u7NTLXujxo0bQVCYDXk2mDJ+lA8h5vPY96FvUpPYLUbzVRsM6HO62gXXn4ABJOGYwx1bIwXtgSpUlK/V63iIcg==} peerDependencies: tinybench: '>=2.9.0' - vite: ^8.3.4 - vitest: ^3.2 || ^4 || ^5 + vite: ^8.0.14 + vitest: ^3.2 || ^4 '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} @@ -16793,19 +14759,23 @@ packages: peerDependencies: better-auth: 1.3.27 convex: '>=1.28.2 <1.35.0' - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@convex-dev/react-query@0.0.0-alpha.8': resolution: {integrity: sha512-Rv/q7/CplU75f7ckBd2vh+HoeeQ0tOrjwMl14Hk7D/03e55oUIU0TV5JYYzC79ZQyyAtoj7CmCo5ZxcmtKNv1Q==} peerDependencies: - '@tanstack/react-query': ^5.102.0 + '@tanstack/react-query': ^5.99.0 convex: ^1.17.0 '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@csstools/color-helpers@5.0.1': + resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} + engines: {node: '>=18'} + '@csstools/color-helpers@5.1.0': resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} engines: {node: '>=18'} @@ -16814,6 +14784,13 @@ packages: resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==} engines: {node: '>=20.19.0'} + '@csstools/css-calc@2.1.1': + resolution: {integrity: sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-calc@2.1.4': resolution: {integrity: sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==} engines: {node: '>=18'} @@ -16828,6 +14805,13 @@ packages: '@csstools/css-parser-algorithms': ^4.0.0 '@csstools/css-tokenizer': ^4.0.0 + '@csstools/css-color-parser@3.0.7': + resolution: {integrity: sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-color-parser@3.1.0': resolution: {integrity: sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==} engines: {node: '>=18'} @@ -16842,6 +14826,12 @@ packages: '@csstools/css-parser-algorithms': ^4.0.0 '@csstools/css-tokenizer': ^4.0.0 + '@csstools/css-parser-algorithms@3.0.4': + resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.3 + '@csstools/css-parser-algorithms@3.0.5': resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} engines: {node: '>=18'} @@ -16854,6 +14844,12 @@ packages: peerDependencies: '@csstools/css-tokenizer': ^4.0.0 + '@csstools/css-syntax-patches-for-csstree@1.0.14': + resolution: {integrity: sha512-zSlIxa20WvMojjpCSy8WrNpcZ61RqfTfX3XTaOeVlGJrt/8HF3YbzgFZa01yTbT4GWQLwfTcC3EB8i3XnB647Q==} + engines: {node: '>=18'} + peerDependencies: + postcss: ^8.4 + '@csstools/css-syntax-patches-for-csstree@1.1.5': resolution: {integrity: sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==} peerDependencies: @@ -16862,6 +14858,10 @@ packages: css-tree: optional: true + '@csstools/css-tokenizer@3.0.3': + resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + engines: {node: '>=18'} + '@csstools/css-tokenizer@3.0.4': resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} engines: {node: '>=18'} @@ -16877,10 +14877,6 @@ packages: resolution: {integrity: sha512-Th8u7pvoguTfbUx/mlZLHD9TxFCHO+wRAvlEaYFAYAmMvbPLww4YowvTy1UMvpi8LbUbwil3Fo8rKCrilvXHhQ==} engines: {node: '>=16'} - '@datadog/pprof@5.15.1': - resolution: {integrity: sha512-4mI750tX6okNROS4YKvGQjyAQ+VqfzDqzysCytOJhL2E2ktK/q4M0PtC7j70tiirGb/fO9fjma3IMNSRLYX+xQ==} - engines: {node: '>=16'} - '@dependents/detective-less@5.0.1': resolution: {integrity: sha512-Y6+WUMsTFWE5jb20IFP4YGa5IrGY/+a/FbOSjDF/wz9gepU2hwCYSXRHP/vPwBvwcY3SVMASt4yXxbXNXigmZQ==} engines: {node: '>=18'} @@ -16889,6 +14885,45 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} + '@dom-expressions/babel-plugin-jsx@0.50.0-next.25': + resolution: {integrity: sha512-ofFtSBj+cTHahndMNZrIXrNPxrrKk95U/2pY8zllAtPdHZRwOTYf86KCMcQ/i+muIpAIKsCcvI4p8A0B6ENzzw==} + peerDependencies: + '@babel/core': ^7.20.12 + + '@dom-expressions/compiler-darwin-arm64@0.50.0-next.29': + resolution: {integrity: sha512-QJ76cj13gbomntQpCUCvKVSkou8rvXZ+isdwTwNcyZyZQRyCcbke/NzoAQyiO94zuUfRemyDddqsUH/sZDC9gQ==} + cpu: [arm64] + os: [darwin] + + '@dom-expressions/compiler-darwin-x64@0.50.0-next.29': + resolution: {integrity: sha512-JNscWFkW+8scxRr4443GYDflUEYLlDtqysfflqeE35rMDYymmL0LDlqKeRl2eCOxMYCLTMJqYmNxvq6RamwOLA==} + cpu: [x64] + os: [darwin] + + '@dom-expressions/compiler-linux-arm64-gnu@0.50.0-next.29': + resolution: {integrity: sha512-KNEeatpePLIehshIyJmSh8DDetVQ3X1N5MDDfPdqNyxUXZw2AeH33+RgChHBtMhOnVCFFkkRClLKIojF6tcKcg==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@dom-expressions/compiler-linux-x64-gnu@0.50.0-next.29': + resolution: {integrity: sha512-lYe0kcLFQM3bWBjUxQsxtDdCndA9eFHaY0YyhQO5stfcfc4y4JX9H6O4oDCmdOvCgaskVpHMCKuFV+u0yBqiow==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@dom-expressions/compiler-wasm32-wasi@0.50.0-next.29': + resolution: {integrity: sha512-2kctxXRlfWjZd0PSgbHtaxtZoeR0h1lGKQpzf/PcBA5ZEydj8ZXxnYLYH0F/LOKY1HfgMJcYt0h1mEo/DNmjaQ==} + engines: {node: '>=14.0.0'} + + '@dom-expressions/compiler-win32-x64-msvc@0.50.0-next.29': + resolution: {integrity: sha512-iCG1u15skcWFB+c19OwFZKNCsdGry4zeVPsrBLtpp3JgFkPyU4ADpiEMRyEKLFhAEptfneelUQxGB//Y6XRAUw==} + cpu: [x64] + os: [win32] + + '@dom-expressions/compiler@0.50.0-next.29': + resolution: {integrity: sha512-jq2BzvPYWp15DilDcvg8O8xhzsHsc/YKGzpaLfcGlDRq2yonMbhrEcUjj7SBkk0kSUP/UAsqaxfyu2zEOC31lQ==} + '@electric-sql/pglite-socket@0.0.6': resolution: {integrity: sha512-6RjmgzphIHIBA4NrMGJsjNWK4pu+bCWJlEWlwcxFTVY3WT86dFpKwbZaGWZV6C5Rd7sCk1Z0CI76QEfukLAUXw==} hasBin: true @@ -16900,20 +14935,23 @@ packages: peerDependencies: '@electric-sql/pglite': 0.3.2 - '@electric-sql/pglite@0.3.16': - resolution: {integrity: sha512-mZkZfOd9OqTMHsK+1cje8OSzfAQcpD7JmILXTl5ahdempjUDdmg4euf1biDex5/LfQIDJ3gvCu6qDgdnDxfJmA==} - '@electric-sql/pglite@0.3.2': resolution: {integrity: sha512-zfWWa+V2ViDCY/cmUfRqeWY1yLto+EpxjXnZzenB1TyxsTiXaTWeZFIZw6mac52BsuQm0RjCnisjBtdBaXOI6w==} - '@emnapi/core@1.11.3': - resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/core@1.11.2': + resolution: {integrity: sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==} '@emnapi/core@1.4.5': resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} - '@emnapi/runtime@1.11.3': - resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/runtime@1.11.2': + resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==} '@emnapi/runtime@1.4.5': resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==} @@ -16921,8 +14959,11 @@ packages: '@emnapi/wasi-threads@1.0.4': resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} - '@emnapi/wasi-threads@1.2.3': - resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} '@emotion/babel-plugin@11.13.5': resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==} @@ -16943,7 +14984,7 @@ packages: resolution: {integrity: sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==} peerDependencies: '@types/react': '*' - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -16959,7 +15000,7 @@ packages: peerDependencies: '@emotion/react': ^11.0.0-rc.0 '@types/react': '*' - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -16970,7 +15011,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks@1.2.0': resolution: {integrity: sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 '@emotion/utils@1.4.2': resolution: {integrity: sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==} @@ -17015,12 +15056,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.28.1': - resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/android-arm64@0.23.0': resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} engines: {node: '>=18'} @@ -17051,12 +15086,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.28.1': - resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm@0.23.0': resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} engines: {node: '>=18'} @@ -17087,12 +15116,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.28.1': - resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-x64@0.23.0': resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} engines: {node: '>=18'} @@ -17123,12 +15146,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.28.1': - resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/darwin-arm64@0.23.0': resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} engines: {node: '>=18'} @@ -17159,12 +15176,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.28.1': - resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-x64@0.23.0': resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} engines: {node: '>=18'} @@ -17195,12 +15206,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.28.1': - resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/freebsd-arm64@0.23.0': resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} engines: {node: '>=18'} @@ -17231,12 +15236,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.28.1': - resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-x64@0.23.0': resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} engines: {node: '>=18'} @@ -17267,12 +15266,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.28.1': - resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/linux-arm64@0.23.0': resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} engines: {node: '>=18'} @@ -17303,12 +15296,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.28.1': - resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm@0.23.0': resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} engines: {node: '>=18'} @@ -17339,12 +15326,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.28.1': - resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-ia32@0.23.0': resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} engines: {node: '>=18'} @@ -17375,12 +15356,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.28.1': - resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-loong64@0.23.0': resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} engines: {node: '>=18'} @@ -17411,12 +15386,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.28.1': - resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-mips64el@0.23.0': resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} engines: {node: '>=18'} @@ -17447,12 +15416,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.28.1': - resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-ppc64@0.23.0': resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} engines: {node: '>=18'} @@ -17483,12 +15446,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.28.1': - resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-riscv64@0.23.0': resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} engines: {node: '>=18'} @@ -17519,12 +15476,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.28.1': - resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-s390x@0.23.0': resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} engines: {node: '>=18'} @@ -17555,12 +15506,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.28.1': - resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-x64@0.23.0': resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} engines: {node: '>=18'} @@ -17591,12 +15536,6 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.28.1': - resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/netbsd-arm64@0.25.10': resolution: {integrity: sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==} engines: {node: '>=18'} @@ -17621,12 +15560,6 @@ packages: cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-arm64@0.28.1': - resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] - '@esbuild/netbsd-x64@0.23.0': resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} engines: {node: '>=18'} @@ -17657,12 +15590,6 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.28.1': - resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/openbsd-arm64@0.23.0': resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} engines: {node: '>=18'} @@ -17693,12 +15620,6 @@ packages: cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.28.1': - resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-x64@0.23.0': resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} engines: {node: '>=18'} @@ -17729,12 +15650,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.28.1': - resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openharmony-arm64@0.25.10': resolution: {integrity: sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==} engines: {node: '>=18'} @@ -17753,12 +15668,6 @@ packages: cpu: [arm64] os: [openharmony] - '@esbuild/openharmony-arm64@0.28.1': - resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] - '@esbuild/sunos-x64@0.23.0': resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} engines: {node: '>=18'} @@ -17789,12 +15698,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.28.1': - resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/win32-arm64@0.23.0': resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} engines: {node: '>=18'} @@ -17825,12 +15728,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.28.1': - resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-ia32@0.23.0': resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} engines: {node: '>=18'} @@ -17861,12 +15758,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.28.1': - resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-x64@0.23.0': resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} engines: {node: '>=18'} @@ -17897,12 +15788,6 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.28.1': - resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -18256,8 +16141,8 @@ packages: '@floating-ui/react-dom@2.1.2': resolution: {integrity: sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@floating-ui/utils@0.2.9': resolution: {integrity: sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==} @@ -18280,11 +16165,6 @@ packages: peerDependencies: hono: ^4 - '@hono/session@0.2.1': - resolution: {integrity: sha512-9bEkT8DnQDM0KNOrSokXMvx4wp1uLmopu0BCLrHjw5DMWPAEDcONuqyn/1dqosQktcNYA3HwUHGK8WT86JtnYA==} - peerDependencies: - hono: '>=4.0.0' - '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -18309,26 +16189,29 @@ packages: resolution: {integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==} engines: {node: '>=18.18'} - '@img/colour@1.1.0': - resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + '@iarna/toml@2.2.5': + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} + + '@img/colour@1.0.0': + resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} engines: {node: '>=18'} + '@img/sharp-darwin-arm64@0.34.4': + resolution: {integrity: sha512-sitdlPzDVyvmINUdJle3TNHl+AG9QcwiAMsXmccqsCOMZNIdW2/7S26w0LyU8euiLVzFBL3dXPwVCq/ODnf2vA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + '@img/sharp-darwin-arm64@0.34.5': resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-arm64@0.35.4': - resolution: {integrity: sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==} - engines: {node: '>=20.9.0'} - cpu: [arm64] - os: [darwin] - - '@img/sharp-darwin-arm64@0.35.5': - resolution: {integrity: sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==} - engines: {node: '>=20.9.0'} - cpu: [arm64] + '@img/sharp-darwin-x64@0.34.4': + resolution: {integrity: sha512-rZheupWIoa3+SOdF/IcUe1ah4ZDpKBGWcsPX6MT0lYniH9micvIU7HQkYTfrx5Xi8u+YqwLtxC/3vl8TQN6rMg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] os: [darwin] '@img/sharp-darwin-x64@0.34.5': @@ -18337,41 +16220,19 @@ packages: cpu: [x64] os: [darwin] - '@img/sharp-darwin-x64@0.35.4': - resolution: {integrity: sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==} - engines: {node: '>=20.9.0'} - cpu: [x64] + '@img/sharp-libvips-darwin-arm64@1.2.3': + resolution: {integrity: sha512-QzWAKo7kpHxbuHqUC28DZ9pIKpSi2ts2OJnoIGI26+HMgq92ZZ4vk8iJd4XsxN+tYfNJxzH6W62X5eTcsBymHw==} + cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.35.5': - resolution: {integrity: sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [darwin] - - '@img/sharp-freebsd-wasm32@0.35.4': - resolution: {integrity: sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==} - engines: {node: '>=20.9.0'} - os: [freebsd] - - '@img/sharp-freebsd-wasm32@0.35.5': - resolution: {integrity: sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==} - engines: {node: '>=20.9.0'} - os: [freebsd] - '@img/sharp-libvips-darwin-arm64@1.2.4': resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.3.3': - resolution: {integrity: sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==} - cpu: [arm64] - os: [darwin] - - '@img/sharp-libvips-darwin-arm64@1.3.4': - resolution: {integrity: sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==} - cpu: [arm64] + '@img/sharp-libvips-darwin-x64@1.2.3': + resolution: {integrity: sha512-Ju+g2xn1E2AKO6YBhxjj+ACcsPQRHT0bhpglxcEf+3uyPY+/gL8veniKoo96335ZaPo03bdDXMv0t+BBFAbmRA==} + cpu: [x64] os: [darwin] '@img/sharp-libvips-darwin-x64@1.2.4': @@ -18379,15 +16240,11 @@ packages: cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.3.3': - resolution: {integrity: sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==} - cpu: [x64] - os: [darwin] - - '@img/sharp-libvips-darwin-x64@1.3.4': - resolution: {integrity: sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==} - cpu: [x64] - os: [darwin] + '@img/sharp-libvips-linux-arm64@1.2.3': + resolution: {integrity: sha512-I4RxkXU90cpufazhGPyVujYwfIm9Nk1QDEmiIsaPwdnm013F7RIceaCc87kAH+oUB1ezqEvC6ga4m7MSlqsJvQ==} + cpu: [arm64] + os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-arm64@1.2.4': resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} @@ -18395,15 +16252,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-arm64@1.3.3': - resolution: {integrity: sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-arm64@1.3.4': - resolution: {integrity: sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==} - cpu: [arm64] + '@img/sharp-libvips-linux-arm@1.2.3': + resolution: {integrity: sha512-x1uE93lyP6wEwGvgAIV0gP6zmaL/a0tGzJs/BIDDG0zeBhMnuUPm7ptxGhUbcGs4okDJrk4nxgrmxpib9g6HpA==} + cpu: [arm] os: [linux] libc: [glibc] @@ -18413,15 +16264,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-arm@1.3.3': - resolution: {integrity: sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==} - cpu: [arm] - os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-arm@1.3.4': - resolution: {integrity: sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==} - cpu: [arm] + '@img/sharp-libvips-linux-ppc64@1.2.3': + resolution: {integrity: sha512-Y2T7IsQvJLMCBM+pmPbM3bKT/yYJvVtLJGfCs4Sp95SjvnFIjynbjzsa7dY1fRJX45FTSfDksbTp6AGWudiyCg==} + cpu: [ppc64] os: [linux] libc: [glibc] @@ -18431,33 +16276,15 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-ppc64@1.3.3': - resolution: {integrity: sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-ppc64@1.3.4': - resolution: {integrity: sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - '@img/sharp-libvips-linux-riscv64@1.2.4': resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} cpu: [riscv64] os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-riscv64@1.3.3': - resolution: {integrity: sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-riscv64@1.3.4': - resolution: {integrity: sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==} - cpu: [riscv64] + '@img/sharp-libvips-linux-s390x@1.2.3': + resolution: {integrity: sha512-RgWrs/gVU7f+K7P+KeHFaBAJlNkD1nIZuVXdQv6S+fNA6syCcoboNjsV2Pou7zNlVdNQoQUpQTk8SWDHUA3y/w==} + cpu: [s390x] os: [linux] libc: [glibc] @@ -18467,15 +16294,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-s390x@1.3.3': - resolution: {integrity: sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-s390x@1.3.4': - resolution: {integrity: sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==} - cpu: [s390x] + '@img/sharp-libvips-linux-x64@1.2.3': + resolution: {integrity: sha512-3JU7LmR85K6bBiRzSUc/Ff9JBVIFVvq6bomKE0e63UXGeRw2HPVEjoJke1Yx+iU4rL7/7kUjES4dZ/81Qjhyxg==} + cpu: [x64] os: [linux] libc: [glibc] @@ -18485,17 +16306,11 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-x64@1.3.3': - resolution: {integrity: sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==} - cpu: [x64] + '@img/sharp-libvips-linuxmusl-arm64@1.2.3': + resolution: {integrity: sha512-F9q83RZ8yaCwENw1GieztSfj5msz7GGykG/BA+MOUefvER69K/ubgFHNeSyUu64amHIYKGDs4sRCMzXVj8sEyw==} + cpu: [arm64] os: [linux] - libc: [glibc] - - '@img/sharp-libvips-linux-x64@1.3.4': - resolution: {integrity: sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==} - cpu: [x64] - os: [linux] - libc: [glibc] + libc: [musl] '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} @@ -18503,15 +16318,9 @@ packages: os: [linux] libc: [musl] - '@img/sharp-libvips-linuxmusl-arm64@1.3.3': - resolution: {integrity: sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@img/sharp-libvips-linuxmusl-arm64@1.3.4': - resolution: {integrity: sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==} - cpu: [arm64] + '@img/sharp-libvips-linuxmusl-x64@1.2.3': + resolution: {integrity: sha512-U5PUY5jbc45ANM6tSJpsgqmBF/VsL6LnxJmIf11kB7J5DctHgqm0SkuXzVWtIY90GnJxKnC/JT251TDnk1fu/g==} + cpu: [x64] os: [linux] libc: [musl] @@ -18521,17 +16330,12 @@ packages: os: [linux] libc: [musl] - '@img/sharp-libvips-linuxmusl-x64@1.3.3': - resolution: {integrity: sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==} - cpu: [x64] + '@img/sharp-linux-arm64@0.34.4': + resolution: {integrity: sha512-YXU1F/mN/Wu786tl72CyJjP/Ngl8mGHN1hST4BGl+hiW5jhCnV2uRVTNOcaYPs73NeT/H8Upm3y9582JVuZHrQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] os: [linux] - libc: [musl] - - '@img/sharp-libvips-linuxmusl-x64@1.3.4': - resolution: {integrity: sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==} - cpu: [x64] - os: [linux] - libc: [musl] + libc: [glibc] '@img/sharp-linux-arm64@0.34.5': resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} @@ -18540,17 +16344,10 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-arm64@0.35.4': - resolution: {integrity: sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==} - engines: {node: '>=20.9.0'} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@img/sharp-linux-arm64@0.35.5': - resolution: {integrity: sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==} - engines: {node: '>=20.9.0'} - cpu: [arm64] + '@img/sharp-linux-arm@0.34.4': + resolution: {integrity: sha512-Xyam4mlqM0KkTHYVSuc6wXRmM7LGN0P12li03jAnZ3EJWZqj83+hi8Y9UxZUbxsgsK1qOEwg7O0Bc0LjqQVtxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] os: [linux] libc: [glibc] @@ -18561,17 +16358,10 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-arm@0.35.4': - resolution: {integrity: sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==} - engines: {node: '>=20.9.0'} - cpu: [arm] - os: [linux] - libc: [glibc] - - '@img/sharp-linux-arm@0.35.5': - resolution: {integrity: sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==} - engines: {node: '>=20.9.0'} - cpu: [arm] + '@img/sharp-linux-ppc64@0.34.4': + resolution: {integrity: sha512-F4PDtF4Cy8L8hXA2p3TO6s4aDt93v+LKmpcYFLAVdkkD3hSxZzee0rh6/+94FpAynsuMpLX5h+LRsSG3rIciUQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ppc64] os: [linux] libc: [glibc] @@ -18582,20 +16372,6 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-ppc64@0.35.4': - resolution: {integrity: sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==} - engines: {node: '>=20.9.0'} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@img/sharp-linux-ppc64@0.35.5': - resolution: {integrity: sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==} - engines: {node: '>=20.9.0'} - cpu: [ppc64] - os: [linux] - libc: [glibc] - '@img/sharp-linux-riscv64@0.34.5': resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -18603,17 +16379,10 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-riscv64@0.35.4': - resolution: {integrity: sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==} - engines: {node: '>=20.9.0'} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@img/sharp-linux-riscv64@0.35.5': - resolution: {integrity: sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==} - engines: {node: '>=20.9.0'} - cpu: [riscv64] + '@img/sharp-linux-s390x@0.34.4': + resolution: {integrity: sha512-qVrZKE9Bsnzy+myf7lFKvng6bQzhNUAYcVORq2P7bDlvmF6u2sCmK2KyEQEBdYk+u3T01pVsPrkj943T1aJAsw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] os: [linux] libc: [glibc] @@ -18624,17 +16393,10 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-s390x@0.35.4': - resolution: {integrity: sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==} - engines: {node: '>=20.9.0'} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@img/sharp-linux-s390x@0.35.5': - resolution: {integrity: sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==} - engines: {node: '>=20.9.0'} - cpu: [s390x] + '@img/sharp-linux-x64@0.34.4': + resolution: {integrity: sha512-ZfGtcp2xS51iG79c6Vhw9CWqQC8l2Ot8dygxoDoIQPTat/Ov3qAa8qpxSrtAEAJW+UjTXc4yxCjNfxm4h6Xm2A==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] os: [linux] libc: [glibc] @@ -18645,19 +16407,12 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-x64@0.35.4': - resolution: {integrity: sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==} - engines: {node: '>=20.9.0'} - cpu: [x64] + '@img/sharp-linuxmusl-arm64@0.34.4': + resolution: {integrity: sha512-8hDVvW9eu4yHWnjaOOR8kHVrew1iIX+MUgwxSuH2XyYeNRtLUe4VNioSqbNkB7ZYQJj9rUTT4PyRscyk2PXFKA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] os: [linux] - libc: [glibc] - - '@img/sharp-linux-x64@0.35.5': - resolution: {integrity: sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [linux] - libc: [glibc] + libc: [musl] '@img/sharp-linuxmusl-arm64@0.34.5': resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} @@ -18666,17 +16421,10 @@ packages: os: [linux] libc: [musl] - '@img/sharp-linuxmusl-arm64@0.35.4': - resolution: {integrity: sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==} - engines: {node: '>=20.9.0'} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@img/sharp-linuxmusl-arm64@0.35.5': - resolution: {integrity: sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==} - engines: {node: '>=20.9.0'} - cpu: [arm64] + '@img/sharp-linuxmusl-x64@0.34.4': + resolution: {integrity: sha512-lU0aA5L8QTlfKjpDCEFOZsTYGn3AEiO6db8W5aQDxj0nQkVrZWmN3ZP9sYKWJdtq3PWPhUNlqehWyXpYDcI9Sg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] os: [linux] libc: [musl] @@ -18687,42 +16435,21 @@ packages: os: [linux] libc: [musl] - '@img/sharp-linuxmusl-x64@0.35.4': - resolution: {integrity: sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [linux] - libc: [musl] - - '@img/sharp-linuxmusl-x64@0.35.5': - resolution: {integrity: sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [linux] - libc: [musl] + '@img/sharp-wasm32@0.34.4': + resolution: {integrity: sha512-33QL6ZO/qpRyG7woB/HUALz28WnTMI2W1jgX3Nu2bypqLIKx/QKMILLJzJjI+SIbvXdG9fUnmrxR7vbi1sTBeA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] '@img/sharp-wasm32@0.34.5': resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [wasm32] - '@img/sharp-wasm32@0.35.4': - resolution: {integrity: sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==} - engines: {node: '>=20.9.0'} - - '@img/sharp-wasm32@0.35.5': - resolution: {integrity: sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==} - engines: {node: '>=20.9.0'} - - '@img/sharp-webcontainers-wasm32@0.35.4': - resolution: {integrity: sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==} - engines: {node: '>=20.9.0'} - cpu: [wasm32] - - '@img/sharp-webcontainers-wasm32@0.35.5': - resolution: {integrity: sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==} - engines: {node: '>=20.9.0'} - cpu: [wasm32] + '@img/sharp-win32-arm64@0.34.4': + resolution: {integrity: sha512-2Q250do/5WXTwxW3zjsEuMSv5sUU4Tq9VThWKlU2EYLm4MB7ZeMwF+SFJutldYODXF6jzc6YEOC+VfX0SZQPqA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [win32] '@img/sharp-win32-arm64@0.34.5': resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} @@ -18730,16 +16457,10 @@ packages: cpu: [arm64] os: [win32] - '@img/sharp-win32-arm64@0.35.4': - resolution: {integrity: sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==} - engines: {node: '>=20.9.0'} - cpu: [arm64] - os: [win32] - - '@img/sharp-win32-arm64@0.35.5': - resolution: {integrity: sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==} - engines: {node: '>=20.9.0'} - cpu: [arm64] + '@img/sharp-win32-ia32@0.34.4': + resolution: {integrity: sha512-3ZeLue5V82dT92CNL6rsal6I2weKw1cYu+rGKm8fOCCtJTR2gYeUfY3FqUnIJsMUPIH68oS5jmZ0NiJ508YpEw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] os: [win32] '@img/sharp-win32-ia32@0.34.5': @@ -18748,16 +16469,10 @@ packages: cpu: [ia32] os: [win32] - '@img/sharp-win32-ia32@0.35.4': - resolution: {integrity: sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==} - engines: {node: ^20.9.0} - cpu: [ia32] - os: [win32] - - '@img/sharp-win32-ia32@0.35.5': - resolution: {integrity: sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==} - engines: {node: ^20.9.0} - cpu: [ia32] + '@img/sharp-win32-x64@0.34.4': + resolution: {integrity: sha512-xIyj4wpYs8J18sVN3mSQjwrw7fKUqRw+Z5rnHNCy5fYTxigBz81u5mOMPmFumwjcn8+ld1ppptMBCLic1nz6ig==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] os: [win32] '@img/sharp-win32-x64@0.34.5': @@ -18766,18 +16481,6 @@ packages: cpu: [x64] os: [win32] - '@img/sharp-win32-x64@0.35.4': - resolution: {integrity: sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [win32] - - '@img/sharp-win32-x64@0.35.5': - resolution: {integrity: sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==} - engines: {node: '>=20.9.0'} - cpu: [x64] - os: [win32] - '@import-maps/resolve@2.0.0': resolution: {integrity: sha512-RwzRTpmrrS6Q1ZhQExwuxJGK1Wqhv4stt+OF2JzS+uawewpwNyU7EJL1WpBex7aDiiGLs4FsXGkfUBdYuX7xiQ==} @@ -18792,38 +16495,16 @@ packages: resolution: {integrity: sha512-cvz/C1rF5WBxzHbEoiBoI6Sz6q6M+TdxfWkEGBYTD77opY8i8WN01prUWXEM87GPF4SZcyIySez9U0Ccm12oFQ==} engines: {node: '>=18.0.0'} - '@inquirer/ansi@2.0.8': - resolution: {integrity: sha512-WpQM+Ti6Z40EFwwt+uL2p4UabT+W179zHp6HhLVOzfbwnVn05IPO/eXIZXGNqcT1jbQ15SujNLzQ39k4QPPxBQ==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/confirm@5.1.4': resolution: {integrity: sha512-EsiT7K4beM5fN5Mz6j866EFA9+v9d5o9VUra3hrg8zY4GHmCS8b616FErbdo5eyKoVotBQkHzMIeeKYsKDStDw==} engines: {node: '>=18'} peerDependencies: '@types/node': 25.0.9 - '@inquirer/confirm@6.3.2': - resolution: {integrity: sha512-Xvr/0HggjddPtGppuqVmxhTw+Hr8PvsZ/k0HmOEaAqQEt80OITNkFWnsdNmyT0/eM4Ab+iJLx2R8rctlEyfSVg==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - peerDependencies: - '@types/node': 25.0.9 - peerDependenciesMeta: - '@types/node': - optional: true - '@inquirer/core@10.1.5': resolution: {integrity: sha512-/vyCWhET0ktav/mUeBqJRYTwmjFPIKPRYb3COAw7qORULgipGSUO2vL32lQKki3UxDKJ8BvuEbokaoyCA6YlWw==} engines: {node: '>=18'} - '@inquirer/core@12.0.3': - resolution: {integrity: sha512-wsSy0sznmXwkty+2PzZwx00Cazc/E0r0B7mAzdGROz2Ct+DFZXaK7WDjGZvgjRldxH5ZhFVfF2lgkYrqgOw2KA==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - peerDependencies: - '@types/node': 25.0.9 - peerDependenciesMeta: - '@types/node': - optional: true - '@inquirer/external-editor@1.0.3': resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} engines: {node: '>=18'} @@ -18837,10 +16518,6 @@ packages: resolution: {integrity: sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==} engines: {node: '>=18'} - '@inquirer/figures@2.0.9': - resolution: {integrity: sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - '@inquirer/type@3.0.4': resolution: {integrity: sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==} engines: {node: '>=18'} @@ -18850,17 +16527,8 @@ packages: '@types/node': optional: true - '@inquirer/type@4.1.1': - resolution: {integrity: sha512-yJoHYrMnxIsJZCY+0Vb66Dy3he3kL3e2wOBKhoSwWWAzZAY82emlxwgprCtp6yRixvNRNq9ztfRWQYPNr3Go7A==} - engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} - peerDependencies: - '@types/node': 25.0.9 - peerDependenciesMeta: - '@types/node': - optional: true - - '@ioredis/commands@1.10.0': - resolution: {integrity: sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==} + '@ioredis/commands@1.5.0': + resolution: {integrity: sha512-eUgLqrMf8nJkZxT24JvVRrQya1vZkQh8BBeYNwGDqa5I0VUi8ACx7uFvAaLxintokpTenkK6DASvo/bvNbBGow==} '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -18890,9 +16558,6 @@ packages: '@jridgewell/sourcemap-codec@1.5.5': resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@jridgewell/sourcemap-codec@1.6.0': - resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} - '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} @@ -19088,20 +16753,10 @@ packages: resolution: {integrity: sha512-JwqeCQ1U3fvccttHZq7Tk0m/TMC6WcFAQZdukypW3AzlJYKYTGNVd1ANU2GuhKnv4UQuOFj3oAl0LLG/gxFN1w==} engines: {node: '>=16'} - '@msw/playwright@0.6.7': - resolution: {integrity: sha512-q7m2JtnN1Iz25xauqx5lkD+tbbDM3oXZBg67aXr4EbxK7IZKTh6c71bbTCnDi/F2SuHq/jPUfS8NJXPcdroARA==} - engines: {node: '>=20.0.0'} - peerDependencies: - msw: ^2.12.10 - '@mswjs/interceptors@0.37.6': resolution: {integrity: sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==} engines: {node: '>=18'} - '@mswjs/interceptors@0.41.9': - resolution: {integrity: sha512-VVPPgHyQ6ShqnrmDWuxjmUIsO9gWyOZFmuOfLd9LfBGQJwZfy0gvv9pbHSJuoFNIYC7ZDX9aoFwowjcdSC4E8w==} - engines: {node: '>=18'} - '@mui/core-downloads-tracker@6.4.7': resolution: {integrity: sha512-XjJrKFNt9zAKvcnoIIBquXyFyhfrHYuttqMsoDS7lM7VwufYG4fAPw4kINjBFg++fqXM2BNAuWR9J7XVIuKIKg==} @@ -19113,8 +16768,8 @@ packages: '@emotion/styled': ^11.3.0 '@mui/material-pigment-css': ^6.4.7 '@types/react': ^19.2.8 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@emotion/react': optional: true @@ -19130,7 +16785,7 @@ packages: engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -19141,7 +16796,7 @@ packages: peerDependencies: '@emotion/react': ^11.4.1 '@emotion/styled': ^11.3.0 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@emotion/react': optional: true @@ -19155,7 +16810,7 @@ packages: '@emotion/react': ^11.5.0 '@emotion/styled': ^11.3.0 '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@emotion/react': optional: true @@ -19177,24 +16832,23 @@ packages: engines: {node: '>=14.0.0'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true - '@napi-rs/lzma-linux-x64-gnu@1.5.1': - resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} - engines: {node: ^22.20 || ^24.12 || >=25} - cpu: [x64] - os: [linux] - libc: [glibc] - '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} '@napi-rs/wasm-runtime@0.2.4': resolution: {integrity: sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==} + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@napi-rs/wasm-runtime@1.1.6': resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} peerDependencies: @@ -19204,204 +16858,125 @@ packages: '@neon-rs/load@0.0.4': resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==} - '@netlify/ai@1.0.1': - resolution: {integrity: sha512-jicymJwSK2/PPi0c3TjWRSp2h1Q/R+SrDd2NMY6bjckFYJJ6jyfToJj+gaypMycknSWI5LCgFwnJS209CMXtMw==} - engines: {node: '>=22.12.0'} - - '@netlify/api@15.1.2': - resolution: {integrity: sha512-mwDpddsem/KJw0CDAKUBnzKsM9UUfgUgRntvL3yyOZ+L12amaXmj38T/1ndnxmRIx1rIJtfbq4eEzxloaniylA==} - engines: {node: '>=22.12.0'} + '@netlify/api@14.0.7': + resolution: {integrity: sha512-smSD3MnyUwi+rdcvRlD2EAGEpzK9RRMiGxaXzKW7FGqIlZSEe08aPySuC0d5BXwl/7EmT43hOkBHH4KtP8DxcQ==} + engines: {node: '>=18.14.0'} '@netlify/binary-info@1.0.0': resolution: {integrity: sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw==} - '@netlify/blobs@11.0.3': - resolution: {integrity: sha512-Z8IXQtQC8BQjm76i1bN+l12TTyKQ/s1R92Ajhou7+fpP0KSxnJ65QzLEb5WuFuFutn8ORrcd4mlF8A2xhw8dzA==} - engines: {node: '>=22.12.0'} + '@netlify/blobs@10.1.0': + resolution: {integrity: sha512-dFpqDc6/x5LEu9L7kblCQu00CFEchH8J42jmQoXPuhKoE7avajzeLTbVKA8Olk3S/c2m9ejegrgbhL8NRA2Jyw==} + engines: {node: ^14.16.0 || >=16.0.0} - '@netlify/cache@4.0.0': - resolution: {integrity: sha512-tRWkLmO6pyqZetFkhYgtX6LH1umqaJAZN5mRNOJubca/+Mqm0VTUyl51FeS0UbVfetLwiwgpzbGmABpc5gGHyg==} - engines: {node: '>=22.12.0'} + '@netlify/cache@3.3.0': + resolution: {integrity: sha512-rKHmfPreOJhOz0FEKzqFdykIAdO2fC98hNXab6JuIKycySWZtLq+YtythuR/qL6AWBtdn1DQTAsOh8zBz7va7w==} + engines: {node: '>=20.6.1'} - '@netlify/config@25.2.5': - resolution: {integrity: sha512-VqJeiQk2eZ9o3ls7C57e2TEalQdR2U3oLjI/Rlo9njU0l8bD3Cr6kBTU5shGIPQgeJVGU9rQLaX24Yd7WXrWVA==} - engines: {node: '>=22.12.0'} + '@netlify/config@23.2.0': + resolution: {integrity: sha512-zlI792/efPUY1XKtBML2OJBgKMyfNQIeGEYibH8SqeDxPjNuCy0qELE0U9Sc6+Ss34XryPBUPdV60tYhSoe6lw==} + engines: {node: '>=18.14.0'} hasBin: true - '@netlify/database-dev@1.0.1': - resolution: {integrity: sha512-Zu8cM4AeXNuQI/cNAI6vrammtdDnWIGO6PYKDAECDMzsb3IcoTsVOZAePup7cGdjaGcBBVdi1qx/PoI5hNZcxg==} - engines: {node: '>=22.12.0'} + '@netlify/dev-utils@4.3.0': + resolution: {integrity: sha512-vZAL8pMuj3yPQlmHSgyaA/UQFxc6pZgU0LucFJ1+IPWGJtIzBXHRvuR4acpoP72HtyQPUHJ42s7U9GaaSGVNHg==} + engines: {node: ^18.14.0 || >=20} - '@netlify/dev-utils@6.0.1': - resolution: {integrity: sha512-q5g70dO3q/M/XTBQz7uIECJxVlJoS8UBlzpjf22DV6q61UzXa8EONTPXPmvisrFcUi1I3AUKplPcHGQYZZj+Vw==} - engines: {node: '>=22.12.0'} + '@netlify/dev@4.6.3': + resolution: {integrity: sha512-PT23zofsvrH/y28HwdLpa3VDsXaJPG+aauJ9MTWC2xQBUlMvlhuLBB+WtjxbnEuQUTzxQ7sgVXnt2o5WyqWb7A==} + engines: {node: '>=20.6.1'} - '@netlify/dev@5.1.0': - resolution: {integrity: sha512-g4fIVlz62NXshbLMx+UjHkcF/cr28AXAU/xpTJiFntkKddsoO5ahQjtBEoiKSQsBPtUrT7a7vMk6VFlrB3RDrg==} - engines: {node: '>=22.12.0'} - - '@netlify/edge-bundler@16.0.4': - resolution: {integrity: sha512-J7joSRuOIwg7bSMQBc+zq7Lb3p6gwsLMU/NYSFbXNIZtk6gSQnY3ZwnAncEhRqvN8lKsKx+27bn+4B2+B0N8ag==} - engines: {node: '>=22.12.0'} + '@netlify/edge-bundler@14.7.0': + resolution: {integrity: sha512-EvjYzhY0qrDhapJQ8n/fXvEsjImai36VKs6kuVey20Qos5jC0oljdUBOeQ35nXTxiWi2Vo91IhjIWEQCLcUNdQ==} + engines: {node: '>=18.14.0'} '@netlify/edge-functions-bootstrap@2.16.0': resolution: {integrity: sha512-v8QQihSbBHj3JxtJsHoepXALpNumD9M7egHoc8z62FYl5it34dWczkaJoFFopEyhiBVKi4K/n0ZYpdzwfujd6g==} - '@netlify/edge-functions-dev@2.0.1': - resolution: {integrity: sha512-IIIBoBhbqoOeOQLEfYLmW55IHOAxXc9athsUH7ZHKUUs3agi7ehVaZYZwhkQxB+l/K9/vRYHUnAZD715auIDpA==} - engines: {node: '>=22.12.0'} + '@netlify/edge-functions-dev@1.0.0': + resolution: {integrity: sha512-bAUOuyxkqjEnX64Xel2QKqa7RNA13axrHYI089Vh9w5/+MCtf+CEuwexQ0Y3RoCyefjg8arHShL7lBccWFh4cg==} + engines: {node: '>=20.6.1'} - '@netlify/edge-functions@4.0.0': - resolution: {integrity: sha512-0jerPQQ5mLczl7jwCRfTJsLcaiXbvPOC+Whtxxk7IHdz24OvZGjUtVHAxhppjT8wcX48I7C6oAff04QdQDMTfw==} - engines: {node: '>=22.12.0'} + '@netlify/edge-functions@3.0.0': + resolution: {integrity: sha512-qvwxrrOFeB9phD4zok/8FDWCXtipYpmLav/B2M6mUyjwB+XTZA769WfNWRElTG4cSUgrNM+GkyLuFHU2D0aY4Q==} + engines: {node: '>=18.0.0'} - '@netlify/functions-dev@2.0.5': - resolution: {integrity: sha512-SSlmwe5GMfQmTDPbHfVTPe4h6lI3kbcepRxT2CKN30L9gx0NmwTGoMgns36DV64fHvabT5gNzzRxOx5sxYgzNg==} - engines: {node: '>=22.12.0'} + '@netlify/functions-dev@1.0.0': + resolution: {integrity: sha512-Ws/NZiSjz2X2KW4fpZIPkfKGwoFcTFItm6iAgpY06TOol+n+sy2+qgvvjvF6Plm1l7mT2kttxXdsk6kVnR31Qg==} + engines: {node: '>=20.6.1'} - '@netlify/functions@6.0.0': - resolution: {integrity: sha512-Pee+FoFnAtdejTkl62a7mZxj6Wx4eqVNuYyDc5T4XPJN9GaAWaUf4cZQFlf2m4Fqq0HoghjtcPKo+BZviVPPKA==} - engines: {node: '>=22.12.0'} + '@netlify/functions@5.0.0': + resolution: {integrity: sha512-gyKzl+P5SPp6P4iqykwPagSy7ODgRoQqi9TkjFJjM74FVJgxdiBQoLAmz+Pjl7kE5avJWtIvlQ+akAFaChekQQ==} + engines: {node: '>=18.0.0'} - '@netlify/headers-parser@10.1.1': - resolution: {integrity: sha512-ooiSc/eN/ktuugZmY4GVPh6nBYz2um0zpemokDvTLLQPF12QyXil8N6fr82wdLi03WNowwiL98eultZkTyHlyw==} - engines: {node: '>=22.12.0'} + '@netlify/headers-parser@9.0.2': + resolution: {integrity: sha512-86YEGPxVemhksY1LeSr8NSOyH11RHvYHq+FuBJnTlPZoRDX+TD+0TAxF6lwzAgVTd1VPkyFEHlNgUGqw7aNzRQ==} + engines: {node: '>=18.14.0'} - '@netlify/headers@3.0.1': - resolution: {integrity: sha512-LcEu16gy28dkEp2+pa5EafauTfmFl6hkwiPqmoMBY+GiLLWQC00X8L4O1ZUrPqbKynsraSqEeKEfocC2FktrEQ==} - engines: {node: '>=22.12.0'} + '@netlify/headers@2.1.0': + resolution: {integrity: sha512-+7MgRPBYhRjizrd6JHxlD9KCjUyYk5yMqa16Ib3VNOSWYzaYiQi8Muyb1pn1pQVfBN2oPeK/q7J3pEdc/PWznQ==} + engines: {node: '>=20.6.1'} - '@netlify/images@2.0.1': - resolution: {integrity: sha512-47DzR/PqIJqbUIef6P7EmhbNQbUOD4IuGNhTG7h3+xcynhQdBLBkCaBwY2DXOzUloA1MxYhKGYV2z4R3pO36hg==} - engines: {node: '>=22.12.0'} + '@netlify/images@1.3.0': + resolution: {integrity: sha512-edQefgR4aeL04oSgkGyjza3CObdU2C24EmRuF/FPXIR1GHa/TkEKMamppxFjZ6qj1i5tX0RGTLKvnREmtW34NA==} + engines: {node: '>=20.6.1'} - '@netlify/open-api@2.57.1': - resolution: {integrity: sha512-4YKcf35SKDp8N1JPw5cN/P0n/rJmVg8igL3UQUtAPIA9lBea6IigUknWRAXZEHhmXHAyR2ptiejSuQk+YFmlEA==} + '@netlify/open-api@2.40.0': + resolution: {integrity: sha512-Dp4lilDnkRKGWnljGkFVxfoh1wsWqxheE5/ZOf/sMZPsh3jGu5QZ4hVLEidzXYB/zIKFFqLaUbP2XYVxTqWqyQ==} engines: {node: '>=14.8.0'} - '@netlify/otel@7.0.2': - resolution: {integrity: sha512-MHEsRJTZtOCrLa2fR+Y3GN51rvgxUHazuRVxuWuG7R1qzwynXAZB20Ufwp7BxKSTKcp7LNVEnKAZ/k2ytVmYvQ==} - engines: {node: '>=22.12.0'} + '@netlify/redirect-parser@15.0.3': + resolution: {integrity: sha512-/HB3fcRRNgf6O/pbLn4EYNDHrU2kiadMMnazg8/OjvQK2S9i4y61vQcrICvDxYKUKQdgeEaABUuaCNAJFnfD9w==} + engines: {node: '>=18.14.0'} - '@netlify/redirect-parser@16.1.1': - resolution: {integrity: sha512-2Wg2em5rUi9EXKz5z4MAUb2Pfoyxm+jJpERYyIuYOwm6pfQHQCBjOD+HoW2CzDS859c0FlxNdnxq50bkfdKiLA==} - engines: {node: '>=22.12.0'} + '@netlify/redirects@3.1.0': + resolution: {integrity: sha512-Eo50oNaTybEfB/4W6JFWdzQ1EbpObbaf83sIpT6H0DzfBgQIzPc3azdb7eD9eEFi3IAQjR5kZ6bOb2i4wbFDHQ==} + engines: {node: '>=20.6.1'} - '@netlify/redirects@4.0.2': - resolution: {integrity: sha512-4Qpz6FpwrLITrScg34zjK9Iv0BiyyPVAGO7HvUZg0txihHPgKBRtLMByEwfP6mhuzTExoxMXYklqgHg2xtbPxA==} - engines: {node: '>=22.12.0'} - - '@netlify/runtime-utils@3.0.0': - resolution: {integrity: sha512-OHo40+V3QZkR+UrDjqhN+LekrAby/dSSJxsvyYs9i88E/mSl3goB/ysoL+VYROm190egxmQyRYlHK7vL4GeHBQ==} - engines: {node: '>=22.12.0'} - - '@netlify/runtime@5.0.3': - resolution: {integrity: sha512-MGoAWvFDuD0BbpIo8pwYPxxWsfMGBiiI4HetQOMkrx7ytnEZjq/qKKfzNCQKJg0Ed86XdQefKToVcP10wc38IQ==} - engines: {node: '>=22.12.0'} - - '@netlify/server-dev@0.1.1': - resolution: {integrity: sha512-yA+uMfscw2Unz8JvC0dRP9z5P0lnCOy//9YICFF4nzDijYXe80bsnvrblB8wOPYBq0/KmVhl4s0gCP/3roTp4w==} - engines: {node: '>=22.12.0'} - - '@netlify/serverless-functions-api@2.18.0': - resolution: {integrity: sha512-Uo5XyMFZOinq6AonHu6dUOkLvVydn+SaldoVkB4yQSpDrtqYWi56CoA26IIOur1EMJqRdt6JIzjzIe4jpzYdhQ==} - engines: {node: '>=18.0.0'} - - '@netlify/serverless-functions-api@2.21.2': - resolution: {integrity: sha512-hlWyAXqwPXXujQ59fago956xft8EykD9jBncM6h+M/06mBR6E4stO1r1tDgAqRYm+XqgA7ZZNZU5TtBD+ZhLVw==} - engines: {node: '>=18.0.0'} - - '@netlify/static@4.0.0': - resolution: {integrity: sha512-YJcyaByknJ/JMmcqUFb9XId2NLgZitJlQC2FGP1a6mqndiMzAd9qoKtHxNRHX4NefI49+UABGtKF4UkL5rM8tw==} - engines: {node: '>=22.12.0'} - - '@netlify/types@2.8.0': - resolution: {integrity: sha512-8/g0Pt6y6wXj5Ia5eeYLiXhRfWeqZXGXpGFeCiiQdUOem+FPtXdA4+YdGxqzWc7D0AvptKSO01KGeeVWHSu8Kg==} + '@netlify/runtime-utils@2.2.0': + resolution: {integrity: sha512-K3kWIxIMucibzQsATU2xw2JI+OpS9PZfPW/a+81gmeLC8tLv5YAxTVT0NFY/3imk1kcOJb9g7658jPLqDJaiAw==} engines: {node: ^18.14.0 || >=20} - '@netlify/types@3.0.0': - resolution: {integrity: sha512-zRCidsQgI4CZWrZB/kmwdPf0QbSNljakfNSLizFvrsSA3UcUrTWSBNMVKmZnob92/8ESeUN0ewXLOlffJU+ATQ==} - engines: {node: '>=22.12.0'} + '@netlify/runtime@4.1.1': + resolution: {integrity: sha512-5qnHsri4X5r2spdD2tvdbU78grFV4fq7uVh/rMXF19qlgcHiuo0yr1JBEim1oINs/w+pyjusXMfnFEZjvV2qlQ==} + engines: {node: '>=20.6.1'} - '@netlify/vite-plugin-tanstack-start@1.3.19': - resolution: {integrity: sha512-qLrbU7ZWyHtoCdtmTUOUc9VQwMRHfJ5EqAVOwZyXHbp4okdFGeJkpcpwNGa1pHDOvdrVf8dyIK0Plc0KvX829g==} - engines: {node: ^22.12.0 || >=24.0.0} + '@netlify/serverless-functions-api@2.7.1': + resolution: {integrity: sha512-NQcLB8BHbIsgSBPk9A/OBR5mGpc6dOAg1iRsYHWK0IoKsvwQ9a7bZc2+E40nE41Mnk24UjfK09vDLxP85O/zwA==} + engines: {node: '>=18.0.0'} + + '@netlify/static@3.1.0': + resolution: {integrity: sha512-XbxiXpHaAakBASBFL5qc0SJhLlJdzYD0MYdM9sfCnRI38YJdvr0F2eHQlQDF016gn/iXhG6fJDxcWHEt2hEFDA==} + engines: {node: '>=20.6.1'} + + '@netlify/types@2.1.0': + resolution: {integrity: sha512-ktUb5d58pt1lQGXO5E9S0F1ljM0g+CoQuGTVII0IxBc0apmPq5RI0o3OWLY7U3ZERRiYTg5UfjiMihBEzuZsuw==} + engines: {node: ^18.14.0 || >=20} + + '@netlify/vite-plugin-tanstack-start@1.1.4': + resolution: {integrity: sha512-GahhrKT7B1LRi4Bnj+O+Yhs2Bu4N6AfILzz/b06YxXEO7rRfX2yUDRBtv7/AFVLkyVOtkypkFZhZBbK9craVEA==} + engines: {node: ^22.12.0} peerDependencies: '@tanstack/react-start': workspace:* '@tanstack/solid-start': workspace:* - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: '@tanstack/react-start': optional: true '@tanstack/solid-start': optional: true - '@netlify/vite-plugin@3.0.1': - resolution: {integrity: sha512-63vL+KpnbfJv+xQSfOn37j8aSOWjiljeaFL9g/HY+YNJpDJ3Y5BPPW1VExx4dcPqXBkggBHm5Y6HpTvBeTSx3Q==} - engines: {node: '>=22.12.0'} + '@netlify/vite-plugin@2.7.4': + resolution: {integrity: sha512-Eid41kWWruhONKA7eS+bGMs+JjEXaBhQEkH82+SyjeSVj+FhHQGSHdrejMI0nj1jSgVUa3JMh+l57OgRB6Lvkg==} + engines: {node: ^20.6.1 || >=22} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 - '@netlify/zip-it-and-ship-it@15.5.1': - resolution: {integrity: sha512-ECHwLIHkSgfkxqF+q40xLMTTSxir1/pDGK6d55oKvwKidrW4qyTyHCAkuKtjOTJ30A+E238X2iiRyI+SCDjTuA==} - engines: {node: '>=22.12.0'} + '@netlify/zip-it-and-ship-it@14.1.11': + resolution: {integrity: sha512-5Ed9XH1JVPL7pAdq9zpC2WHjqHhHkaghuV3r2bvTTpx9JrTdzZxPeNnjZRjJMkjQAi8xSped5hNFJuD0QYmOuw==} + engines: {node: '>=18.14.0'} hasBin: true - '@next/env@16.3.4': - resolution: {integrity: sha512-cjWZnUUa6jZq2kFaNe/ZyJdZonOZ/QoN0Zka2nz/FLOrfx14pQuM9c5RaSVkWMqgdt4ksgPAMWPyHSs/CyV48Q==} - - '@next/swc-darwin-arm64@16.3.4': - resolution: {integrity: sha512-iBr3I5LZNk5/bgl5//iTgD2tcym14MX0Xo7fD//u9dYAEgGzza1y9oywluPtf74YnOswVdH1908aK9xVz7zQTw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@next/swc-darwin-x64@16.3.4': - resolution: {integrity: sha512-2dpiSyl2Jw/NrBPaU2MAKGSa+2MR82pJIn4Sm5Rjr+gxAeuh0z158Su3Z2O8zn7UNNq+ej4bToed6RcRN/Lydg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@next/swc-linux-arm64-gnu@16.3.4': - resolution: {integrity: sha512-+t+U8HZT+fApePCS5h89CSH3datz29MkzyfCn+6fpsZBG/oiEOhINcb9rtkv6sdpToLGFn2e6146NzaKCXkqrA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@next/swc-linux-arm64-musl@16.3.4': - resolution: {integrity: sha512-mx03GNs1ocQA5JQ4FxDMmIsNkdrZh8cuezKCrId28e5/gIPU/l7Kcy2+vmCCzdjnnmXJy+iOAu+7K0QppO6Urg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@next/swc-linux-x64-gnu@16.3.4': - resolution: {integrity: sha512-YIhGY6fSMfha52bnVxnzc9zaVBzJg+cqQTOD8tXIBSx4fuv0pVMxQTE0PaS59YhnMOiYiG09IMwxJAf/CFm/Dw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@next/swc-linux-x64-musl@16.3.4': - resolution: {integrity: sha512-+eaaX6axpDb0yF1GCpiERe6njplvdC+nks/fKfcHu3XPGRrald8P3/X7yv7QLdjA51knnxwl9pxdIJsg+w1L+Q==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - libc: [musl] - - '@next/swc-win32-arm64-msvc@16.3.4': - resolution: {integrity: sha512-0jcXW7Xs/uzICrmgV3MhDYDeRy++1CqnpDIerlPIqYO4bhzB4WNbX/aRnQclustsAyTkFKB0z6rbcjmNg5tR8A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@next/swc-win32-x64-msvc@16.3.4': - resolution: {integrity: sha512-vvBzwu1pYQCp92maZCFCIw/XgOTMR5tur9GjakwIo2cmwRTMKajRZZDS9+e4KsUZWKu1E007WUeAFXRRjZeuzw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@noble/ciphers@2.2.0': resolution: {integrity: sha512-Z6pjIZ/8IJcCGzb2S/0Px5J81yij85xASuk1teLNeg75bfT07MV3a/O2Mtn1I2se43k3lkVEcFaR10N4cgQcZA==} engines: {node: '>= 20.19.0'} @@ -19426,62 +17001,65 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@nx/devkit@24.0.0': - resolution: {integrity: sha512-t5E5VOCoNECLFMMp6qUczUx5kYduyvMMsHFGvuXPCKX32Ny4aFbeIrYNqCrsNKr9KgzMr0tOvRA+EMT0v7BXEA==} - peerDependencies: - nx: '>= 23 <= 25 || ^24.0.0-0' + '@nothing-but/utils@0.17.0': + resolution: {integrity: sha512-TuCHcHLOqDL0SnaAxACfuRHBNRgNJcNn9X0GiH5H3YSDBVquCr3qEIG3FOQAuMyZCbu9w8nk2CHhOsn7IvhIwQ==} - '@nx/nx-darwin-arm64@24.0.0': - resolution: {integrity: sha512-ZHXmqkMVF7aA6QShvc5lVkCU6JHjGV19m8eplw0pL06AFgNdQ9u16013HJPm+Ys6fKnltYDWl/Ef7meQjT+u3Q==} + '@nx/devkit@22.7.5': + resolution: {integrity: sha512-/63ziS7kdHXYTLLhwWBu9hFwoFFT8xf+PkcQjsNdPqc5JmkYkSew0cE/vp5ORgBpGLWWnFPJgmfqjbJoO2C7jA==} + peerDependencies: + nx: '>= 21 <= 23 || ^22.0.0-0' + + '@nx/nx-darwin-arm64@22.7.5': + resolution: {integrity: sha512-eoPtwx0qZqvRUD+VVOHm150AlSYwYoPxkDHBBGqKCn5nzPspb0lLWw8q83crM/L1M928YgK0WmGf3C++7eqsTA==} cpu: [arm64] os: [darwin] - '@nx/nx-darwin-x64@24.0.0': - resolution: {integrity: sha512-a+cpg/VQvD/vF7BJsl70vulc1GxCamtU0XwzkGOzzDATn3JcKBNpBFx0Iqp5frJYN0X00Supz4zhgCEe9LpCow==} + '@nx/nx-darwin-x64@22.7.5': + resolution: {integrity: sha512-VLOn/ZoEn3HfjSj+yIHLCM56/el79r+9I28CkZNHaSXJQWZ3edSkcgcfYjVxCurpN2VEwDQHLBeFCH8M+lQ7wQ==} cpu: [x64] os: [darwin] - '@nx/nx-freebsd-x64@24.0.0': - resolution: {integrity: sha512-PAGVaLbJxEzBXSQvg82g/8mDoqoMQFIX/EchuJbJGekIiz3BM2Xgyiy5qAD2/2meLVOTFtbkBQR+4ZSymgqGWw==} + '@nx/nx-freebsd-x64@22.7.5': + resolution: {integrity: sha512-LEVer/E2xfGvK9Go+imMQoEninOoq/38Z2bhV1SD3AThXrp1xaLFVkW5jQ6juebeVkAeztEoMLFlr576egS0vw==} cpu: [x64] os: [freebsd] - '@nx/nx-linux-arm-gnueabihf@24.0.0': - resolution: {integrity: sha512-WOWBIlTb+1FNP86GcodUF4BHdjVyGCwrVH/lqUvNAmT/FPopirCzVLdoj1P5kfWC/F0II/qAu7X698yKzIu71A==} + '@nx/nx-linux-arm-gnueabihf@22.7.5': + resolution: {integrity: sha512-NP27EFGpmFJM6RL1Ey/AFJ7gA2xuqtIHaw6jjSNGvfrnZRUNaway30GrVaGGeODf0DsvAty/unqoBMPy6kDHbw==} cpu: [arm] os: [linux] - '@nx/nx-linux-arm64-gnu@24.0.0': - resolution: {integrity: sha512-vASWIfOijXd5cdOn0Z6Wcd2iwtFxlBoBre6w+c8wuLLLPN3r4SRQyL+jAEB+eHkUHz39mMxSwa8DY+VlS9luVw==} + '@nx/nx-linux-arm64-gnu@22.7.5': + resolution: {integrity: sha512-QLnkJl3HkHsPfpLiNiAiMfpfAeFpic0U1diAxF8RqChOkCpQ7ulvyBVgE1UrQxvhd+gFQ3ed5RNDxtCRw8nTiw==} cpu: [arm64] os: [linux] libc: [glibc] - '@nx/nx-linux-arm64-musl@24.0.0': - resolution: {integrity: sha512-ZiG9Kjq1AvYmFK3p03OOjCcYXwiBpF2Z7Ih/QnKsRMcnT7GbjDpfuO3FkSMtuE0OWoAdAt9Kb2yXBP3L9IZc6w==} + '@nx/nx-linux-arm64-musl@22.7.5': + resolution: {integrity: sha512-cEP6KmwBgnb38+jTTaibWCjwXcHmigqhTfy0tN1be7WZr6bHxbqNLsXqKRN70PSNA3HouZcxw1cdRL8tqbPBBA==} cpu: [arm64] os: [linux] libc: [musl] - '@nx/nx-linux-x64-gnu@24.0.0': - resolution: {integrity: sha512-FstnaQtRkxD0RGYtCJb7QYq9Sgzu+vCKYO+p3/uq+q2kKLwlu4ovvzUeDctTuCIjx1tFamp/Uu8n+bHavUE7KQ==} + '@nx/nx-linux-x64-gnu@22.7.5': + resolution: {integrity: sha512-tbaX1tZCSpGifDNBfDdEZAMxVF3Yg4bhFP/bm1needc0diqb+Zflc0u5tM5/6BWDMITQDwenJVsNiQ8ZdtJURA==} cpu: [x64] os: [linux] libc: [glibc] - '@nx/nx-linux-x64-musl@24.0.0': - resolution: {integrity: sha512-dBFcWaSOhl17ZzZ+ybi9ctPlYPwDTlJjGgkpV5e/O6D7V9MFziJ4xZG/mVgacYbW3f5HS6QRVno9yPtSyLj2MA==} + '@nx/nx-linux-x64-musl@22.7.5': + resolution: {integrity: sha512-H0M7csOZIgPT822LqjxSXzf4MXRND15vIkAQe3F3Jlr3Si8LC3tzbL52aVcRfgb8MF/xOB5U47mSwxWt1M2bPQ==} cpu: [x64] os: [linux] libc: [musl] - '@nx/nx-win32-arm64-msvc@24.0.0': - resolution: {integrity: sha512-u2t4v71qCT7Nj4QbxuJ8X3iii881goaXJ7fjTcYw4EhSk1FemF6lh7mlSaHSczQ+/JFbiVppu649NYaVlIxGcw==} + '@nx/nx-win32-arm64-msvc@22.7.5': + resolution: {integrity: sha512-JTcZch9YAnDL1gbhqePz3DZ4x7iYemLn1yJzrjbbXAmXju2eiiJiZvJJHbV06+SP9HKXDT8RjTKuAWTdVxnHug==} cpu: [arm64] os: [win32] - '@nx/nx-win32-x64-msvc@24.0.0': - resolution: {integrity: sha512-Rv464/mLVw3lKdsxhFJXk3WI2KyaCoGbTNUzLi8nlzEuZ0ZcBK4VKxAxlvVCAVrxPIZkbUFDYE7vRvdZ2DGikg==} + '@nx/nx-win32-x64-msvc@22.7.5': + resolution: {integrity: sha512-ngcMyHdBJ9FSz2nHdbZ7gtJlFq0O2b05sPAsVMkZ18CKzdaA1qrBDJfsMO49hPCny505eiT766+CkKdaCDl5kA==} cpu: [x64] os: [win32] @@ -19507,77 +17085,148 @@ packages: '@open-draft/deferred-promise@2.2.0': resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} - '@open-draft/deferred-promise@3.0.0': - resolution: {integrity: sha512-XW375UK8/9SqUVNVa6M0yEy8+iTi4QN5VZ7aZuRFQmy76LRwI9wy5F4YIBU6T+eTe2/DNDo8tqu8RHlwLHM6RA==} - '@open-draft/logger@0.3.0': resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.221.0': - resolution: {integrity: sha512-OlanaW1vv7ufTqQ3/fPLI4arGt5ZoM+P8abOMki6uEYnpRazepSWDwDnnw+la7kE26SHVC18//SMccrDvLKOXQ==} - engines: {node: '>=8.0.0'} - - '@opentelemetry/api@1.8.0': - resolution: {integrity: sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==} - engines: {node: '>=8.0.0'} - - '@opentelemetry/api@1.9.1': - resolution: {integrity: sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==} - engines: {node: '>=8.0.0'} - - '@opentelemetry/context-async-hooks@2.10.0': - resolution: {integrity: sha512-bvyMcgLEkozzSzpEEEo1OMoeQ97bxj6Qs2uN3mPrSdDvObMI1myffD/BPqcLlzZO9//d1SqQA/WPw7Cz2AiqhA==} - engines: {node: ^18.19.0 || >=20.6.0} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/core@2.10.0': - resolution: {integrity: sha512-/wNZ8twnEQQA4HoHu22+vcsdru6pWPWxW+7w+FlxT6Id7PE/WIbZmVKkte+PF72e0F2dnImFeHD2syyE1Mw6MQ==} - engines: {node: ^18.19.0 || >=20.6.0} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/instrumentation@0.221.0': - resolution: {integrity: sha512-cCk80Z/iRDf/5gfsKMB4f74LqVA5yKETB/9ojPzVW/6/f70iu89nJvGxsFCxx4XfSohaOofkU19kiYm84AiAlw==} - engines: {node: ^18.19.0 || >=20.6.0} - peerDependencies: - '@opentelemetry/api': ^1.3.0 - - '@opentelemetry/resources@2.10.0': - resolution: {integrity: sha512-q6MMm2zhggzsHVNbabYwut+a6nbuQQe3URUoxaojM/8K1IBfwwPzvxIjNi2/lI1TFe+fMHMW9MWhrtDLEXEnkA==} - engines: {node: ^18.19.0 || >=20.6.0} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - - '@opentelemetry/sdk-trace-base@2.10.0': - resolution: {integrity: sha512-GuYQQT7QD2EeO8lcZLRQzcbOyhqAzL+6WWTKTU9mSUBYBazkEDl+VrQcXQhbB08OWM9anD1aHleVadzulpOaUQ==} - engines: {node: ^18.19.0 || >=20.6.0} - deprecated: Use @opentelemetry/sdk-trace package - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - - '@opentelemetry/sdk-trace-node@2.10.0': - resolution: {integrity: sha512-GZK/G6oZyBLGlH1pUgeDch7D91KoHd2uotUGIkWCPi9GI5T9X0p4L7nNAMDR1BQjkRYoDqo+ddfVx9t5Uhys+Q==} - engines: {node: ^18.19.0 || >=20.6.0} - deprecated: Use @opentelemetry/sdk-trace package - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - - '@opentelemetry/sdk-trace@2.10.0': - resolution: {integrity: sha512-MfQGq3GRmTh5fM/y+OjaO0vj6+luCB1XO2gfXCalKCfgKw0eHL++sm75DNweC6ohlp+aFvACqeE0fYayqdRaoQ==} - engines: {node: ^18.19.0 || >=20.6.0} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/semantic-conventions@1.41.1': resolution: {integrity: sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA==} engines: {node: '>=14'} - '@oxc-project/types@0.153.0': - resolution: {integrity: sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw==} + '@oxc-minify/binding-android-arm-eabi@0.110.0': + resolution: {integrity: sha512-43fMTO8/5bMlqfOiNSZNKUzIqeLIYuB9Hr1Ohyf58B1wU11S2dPGibTXOGNaWsfgHy99eeZ1bSgeIHy/fEYqbw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-minify/binding-android-arm64@0.110.0': + resolution: {integrity: sha512-5oQrnn9eK/ccOp80PTrNj0Vq893NPNNRryjGpOIVsYNgWFuoGCfpnKg68oEFcN8bArizYAqw4nvgHljEnar69w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-minify/binding-darwin-arm64@0.110.0': + resolution: {integrity: sha512-dqBDgTG9tF2z2lrZp9E8wU+Godz1i8gCGSei2eFKS2hRploBOD5dmOLp1j4IMornkPvSQmbwB3uSjPq7fjx4EA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-minify/binding-darwin-x64@0.110.0': + resolution: {integrity: sha512-U0AqabqaooDOpYmeeOye8wClv8PSScELXgOfYqyqgrwH9J9KrpCE1jL8Rlqgz68QbL4mPw3V6sKiiHssI4CLeQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-minify/binding-freebsd-x64@0.110.0': + resolution: {integrity: sha512-H0w8o/Wo1072WSdLfhwwrpFpwZnPpjQODlHuRYkTfsSSSJbTxQtjJd4uxk7YJsRv5RQp69y0I7zvdH6f8Xueyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-minify/binding-linux-arm-gnueabihf@0.110.0': + resolution: {integrity: sha512-qd6sW0AvEVYZhbVVMGtmKZw3b1zDYGIW+54Uh42moWRAj6i4Jhk/LGr6r9YNZpOINeuvZfkFuEeDD/jbu7xPUA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-minify/binding-linux-arm-musleabihf@0.110.0': + resolution: {integrity: sha512-7WXP0aXMrWSn0ScppUBi3jf68ebfBG0eri8kxLmBOVSBj6jw1repzkHMITJMBeLr5d0tT/51qFEptiAk2EP2iA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-minify/binding-linux-arm64-gnu@0.110.0': + resolution: {integrity: sha512-LYfADrq5x1W5gs+u9OIbMbDQNYkAECTXX0ufnAuf3oGmO51rF98kGFR5qJqC/6/csokDyT3wwTpxhE0TkcF/Og==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxc-minify/binding-linux-arm64-musl@0.110.0': + resolution: {integrity: sha512-53GjCVY8kvymk9P6qNDh6zyblcehF5QHstq9QgCjv13ONGRnSHjeds0PxIwiihD7h295bxsWs84DN39syLPH4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxc-minify/binding-linux-ppc64-gnu@0.110.0': + resolution: {integrity: sha512-li8XcN81dxbJDMBESnTgGhoiAQ+CNIdM0QGscZ4duVPjCry1RpX+5FJySFbGqG3pk4s9ZzlL/vtQtbRzZIZOzg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxc-minify/binding-linux-riscv64-gnu@0.110.0': + resolution: {integrity: sha512-SweKfsnLKShu6UFV8mwuj1d1wmlNoL/FlAxPUzwjEBgwiT2HQkY24KnjBH+TIA+//1O83kzmWKvvs4OuEhdIEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxc-minify/binding-linux-riscv64-musl@0.110.0': + resolution: {integrity: sha512-oH8G4aFMP8XyTsEpdANC5PQyHgSeGlopHZuW1rpyYcaErg5YaK0vXjQ4EM5HVvPm+feBV24JjxgakTnZoF3aOQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxc-minify/binding-linux-s390x-gnu@0.110.0': + resolution: {integrity: sha512-W9na+Vza7XVUlpf8wMt4QBfH35KeTENEmnpPUq3NSlbQHz8lSlSvhAafvo43NcKvHAXV3ckD/mUf2VkqSdbklg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxc-minify/binding-linux-x64-gnu@0.110.0': + resolution: {integrity: sha512-XJdA4mmmXOjJxSRgNJXsDP7Xe8h3gQhmb56hUcCrvq5d+h5UcEi2pR8rxsdIrS8QmkLuBA3eHkGK8E27D7DTgQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxc-minify/binding-linux-x64-musl@0.110.0': + resolution: {integrity: sha512-QqzvALuOTtSckI8x467R4GNArzYDb/yEh6aNzLoeaY1O7vfT7SPDwlOEcchaTznutpeS9Dy8gUS/AfqtUHaufw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxc-minify/binding-openharmony-arm64@0.110.0': + resolution: {integrity: sha512-gAMssLs2Q3+uhLZxanh1DF+27Kaug3cf4PXb9AB7XK81DR+LVcKySXaoGYoOs20Co0fFSphd6rRzKge2qDK3dA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-minify/binding-wasm32-wasi@0.110.0': + resolution: {integrity: sha512-7Wqi5Zjl022bs2zXq+ICdalDPeDuCH/Nhbi8q2isLihAonMVIT0YH2hqqnNEylRNGYck+FJ6gRZwMpGCgrNxPg==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-minify/binding-win32-arm64-msvc@0.110.0': + resolution: {integrity: sha512-ZPx+0Tj4dqn41ecyoGotlvekQKy6JxJCixn9Rw7h/dafZ3eDuBcEVh3c2ZoldXXsyMIt5ywI8IWzFZsjNedd5Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-minify/binding-win32-ia32-msvc@0.110.0': + resolution: {integrity: sha512-H0Oyd3RWBfpEyvJIrFK94RYiY7KKSQl11Ym7LMDwLEagelIAfRCkt1amHZhFa/S3ZRoaOJFXzEw4YKeSsjVFsg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-minify/binding-win32-x64-msvc@0.110.0': + resolution: {integrity: sha512-Hr3nK90+qXKJ2kepXwFIcNfQQIOBecB4FFCyaMMypthoEEhVP08heRynj4eSXZ8NL9hLjs3fQzH8PJXfpznRnQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxc-project/types@0.115.0': + resolution: {integrity: sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==} + + '@oxc-project/types@0.132.0': + resolution: {integrity: sha512-FESMOxil5Se014ui/Eq8fT5uHJo6nIRwH0PfJrZJXs6Gek3ZVFOrpUv3YIZT20m+extU98Hg1Ym72U58rlsxUQ==} '@oxc-resolver/binding-android-arm-eabi@11.19.1': resolution: {integrity: sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==} @@ -19687,6 +17336,133 @@ packages: cpu: [x64] os: [win32] + '@oxc-transform/binding-android-arm-eabi@0.110.0': + resolution: {integrity: sha512-sE9dxvqqAax1YYJ3t7j+h5ZSI9jl6dYuDfngl6ieZUrIy5P89/8JKVgAzgp8o3wQSo7ndpJvYsi1K4ZqrmbP7w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxc-transform/binding-android-arm64@0.110.0': + resolution: {integrity: sha512-nqtbP4aMCtsCZ6qpHlHaQoWVHSBtlKzwaAgwEOvR+9DWqHjk31BHvpGiDXlMeed6CVNpl3lCbWgygb3RcSjcfw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxc-transform/binding-darwin-arm64@0.110.0': + resolution: {integrity: sha512-oeSeHnL4Z4cMXtc8V0/rwoVn0dgwlS9q0j6LcHn9dIhtFEdp3W0iSBF8YmMQA+E7sILeLDjsHmHE4Kp0sOScXw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxc-transform/binding-darwin-x64@0.110.0': + resolution: {integrity: sha512-nL9K5x7OuZydobAGPylsEW9d4APs2qEkIBLMgQPA+kY8dtVD3IR87QsTbs4l4DBQYyun/+ay6qVCDlxqxdX2Jg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxc-transform/binding-freebsd-x64@0.110.0': + resolution: {integrity: sha512-GS29zXXirDQhZEUq8xKJ1azAWMuUy3Ih3W5Bc5ddk12LRthO5wRLFcKIyeHpAXCoXymQ+LmxbMtbPf84GPxouw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxc-transform/binding-linux-arm-gnueabihf@0.110.0': + resolution: {integrity: sha512-glzDHak8ISyZJemCUi7RCvzNSl+MQ1ly9RceT2qRufhUsvNZ4C/2QLJ1HJwd2N6E88bO4laYn+RofdRzNnGGEA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-transform/binding-linux-arm-musleabihf@0.110.0': + resolution: {integrity: sha512-8JThvgJ2FRoTVfbp7e4wqeZqCZbtudM06SfZmNzND9kPNu/LVYygIR+72RWs+xm4bWkuYHg/islo/boNPtMT5Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxc-transform/binding-linux-arm64-gnu@0.110.0': + resolution: {integrity: sha512-IRh21Ub/g4bkHoErZ0AUWMlWfoZaS0A6EaOVtbcY70RSYIMlrsbjiFwJCzM+b/1DD1rXbH5tsGcH7GweTbfRqg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxc-transform/binding-linux-arm64-musl@0.110.0': + resolution: {integrity: sha512-e5JN94/oy+wevk76q+LMr+2klTTcO60uXa+Wkq558Ms7mdF2TvkKFI++d/JeiuIwJLTi/BxQ4qdT5FWcsHM/ug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxc-transform/binding-linux-ppc64-gnu@0.110.0': + resolution: {integrity: sha512-Y3/Tnnz1GvDpmv8FXBIKtdZPsdZklOEPdrL6NHrN5i2u54BOkybFaDSptgWF53wOrJlTrcmAVSE6fRKK9XCM2Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxc-transform/binding-linux-riscv64-gnu@0.110.0': + resolution: {integrity: sha512-Y0E35iA9/v9jlkNcP6tMJ+ZFOS0rLsWDqG6rU9z+X2R3fBFJBO9UARIK6ngx8upxk81y1TFR2CmBFhupfYdH6Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxc-transform/binding-linux-riscv64-musl@0.110.0': + resolution: {integrity: sha512-JOUSYFfHjBUs7xp2FHmZHb8eTYD/oEu0NklS6JgUauqnoXZHiTLPLVW2o2uVCqldnabYHcomuwI2iqVFYJNhTw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxc-transform/binding-linux-s390x-gnu@0.110.0': + resolution: {integrity: sha512-7blgoXF9D3Ngzb7eun23pNrHJpoV/TtE6LObwlZ3Nmb4oZ6Z+yMvBVaoW68NarbmvNGfZ95zrOjgm6cVETLYBA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxc-transform/binding-linux-x64-gnu@0.110.0': + resolution: {integrity: sha512-YQ2joGWCVDZVEU2cD/r/w49hVjDm/Qu1BvC/7zs8LvprzdLS/HyMXGF2oA0puw0b+AqgYaz3bhwKB2xexHyITQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxc-transform/binding-linux-x64-musl@0.110.0': + resolution: {integrity: sha512-fkjr5qE632ULmNgvFXWDR/8668WxERz3tU7TQFp6JebPBneColitjSkdx6VKNVXEoMmQnOvBIGeP5tUNT384oA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxc-transform/binding-openharmony-arm64@0.110.0': + resolution: {integrity: sha512-HWH9Zj+lMrdSTqFRCZsvDWMz7OnMjbdGsm3xURXWfRZpuaz0bVvyuZNDQXc4FyyhRDsemICaJbU1bgeIpUJDGw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxc-transform/binding-wasm32-wasi@0.110.0': + resolution: {integrity: sha512-ejdxHmYfIcHDPhZUe3WklViLt9mDEJE5BzcW7+R1vc5i/5JFA8D0l7NUSsHBJ7FB8Bu9gF+5iMDm6cXGAgaghw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-transform/binding-win32-arm64-msvc@0.110.0': + resolution: {integrity: sha512-9VTwpXCZs7xkV+mKhQ62dVk7KLnLXtEUxNS2T4nLz3iMl1IJbA4h5oltK0JoobtiUAnbkV53QmMVGW8+Nh3bDQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxc-transform/binding-win32-ia32-msvc@0.110.0': + resolution: {integrity: sha512-5y0fzuNON7/F2hh2P94vANFaRPJ/3DI1hVl5rseCT8VUVqOGIjWaza0YS/D1g6t1WwycW2LWDMi2raOKoWU5GQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxc-transform/binding-win32-x64-msvc@0.110.0': + resolution: {integrity: sha512-QROrowwlrApI1fEScMknGWKM6GTM/Z2xwMnDqvSaEmzNazBsDUlE08Jasw610hFEsYAVU2K5sp/YaCa9ORdP4A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@panva/hkdf@1.2.1': resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==} @@ -19756,8 +17532,8 @@ packages: os: [linux] libc: [musl] - '@parcel/watcher-wasm@2.6.0': - resolution: {integrity: sha512-dtjbDxKSDPQ8AmA+pS4OFaHE1FKrjtGpLGBxw85uKFkRorjNbvDM/aFPgqosu40wprbp1xw2ZSxIKqghCUHe2w==} + '@parcel/watcher-wasm@2.5.1': + resolution: {integrity: sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw==} engines: {node: '>= 10.0.0'} bundledDependencies: - napi-wasm @@ -19833,14 +17609,9 @@ packages: engines: {node: '>=22.6.0'} hasBin: true - '@platformatic/flame@1.7.0': - resolution: {integrity: sha512-WGCrRcRJBMbSb1y7d8L+VOewBDk0Rfs+JQ1K/LLqPkstsNebLFprzk180P8jgHgT3yXe8TyxTwKVcuZkKviLFA==} - engines: {node: '>=22.6.0'} - hasBin: true - - '@playwright/test@1.63.0': - resolution: {integrity: sha512-oxMK4vllB9RK5NQ2l1pq1IfOf2AvnEuj/vYGDj0H2nMtmtZpKtCwt/l00GEO6xjGfpBNAvjovvYdCm50dRQkpQ==} - engines: {node: '>=20'} + '@playwright/test@1.58.0': + resolution: {integrity: sha512-fWza+Lpbj6SkQKCrU6si4iu+fD2dD3gxNHFhUPxsfXBPhnv3rRSQVd0NtBUT9Z/RhF/boCBcuUaMUSTRTopjZg==} + engines: {node: '>=18'} hasBin: true '@polka/url@1.0.0-next.28': @@ -19849,8 +17620,8 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@poppinss/colors@4.1.6': - resolution: {integrity: sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==} + '@poppinss/colors@4.1.5': + resolution: {integrity: sha512-FvdDqtcRCtz6hThExcFOgW0cWX+xwSMWcRuQe5ZEb2m7cVQOAVZOIMt+/v9RxGiD9/OY16qJBXK4CVKWAPalBw==} '@poppinss/dumper@0.6.5': resolution: {integrity: sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==} @@ -19913,8 +17684,8 @@ packages: resolution: {integrity: sha512-SXCcgFvo/SC6/11kEOaQghJgCWNEWZUvPYKn/gpvMB9HLSG/5M8If7dWZtEQHhchvl8bh9A89Hw6mEKpsXFimA==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -19964,8 +17735,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -19977,8 +17748,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -19990,8 +17761,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20003,8 +17774,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20016,8 +17787,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20029,8 +17800,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20042,8 +17813,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20055,8 +17826,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20068,8 +17839,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20080,7 +17851,7 @@ packages: resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20090,8 +17861,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20102,7 +17873,7 @@ packages: resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20112,8 +17883,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20124,7 +17895,7 @@ packages: resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20134,8 +17905,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20147,8 +17918,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20159,7 +17930,7 @@ packages: resolution: {integrity: sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20169,8 +17940,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20182,8 +17953,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20195,8 +17966,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20207,7 +17978,7 @@ packages: resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20217,8 +17988,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20230,8 +18001,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20243,8 +18014,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20256,8 +18027,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20269,8 +18040,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20282,8 +18053,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20295,8 +18066,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20308,8 +18079,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20321,8 +18092,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20334,8 +18105,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20347,8 +18118,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20360,8 +18131,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20373,8 +18144,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20386,8 +18157,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20399,8 +18170,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20412,8 +18183,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20424,7 +18195,7 @@ packages: resolution: {integrity: sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20434,8 +18205,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20447,8 +18218,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20460,8 +18231,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20473,8 +18244,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20486,8 +18257,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20499,8 +18270,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20512,8 +18283,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20524,7 +18295,7 @@ packages: resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20533,7 +18304,7 @@ packages: resolution: {integrity: sha512-YnEXIy8/ga01Y1PN0VfaNH//MhA91JlEGVBDxDzROqwrAtG5Yr2QGEPz8A/rJA3C7ZAHryOYGaUv8fLSW2H/mg==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20542,7 +18313,7 @@ packages: resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20551,7 +18322,7 @@ packages: resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20560,7 +18331,7 @@ packages: resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20569,7 +18340,7 @@ packages: resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20578,7 +18349,7 @@ packages: resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20588,8 +18359,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -20604,130 +18375,219 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true '@types/react-dom': optional: true - '@rolldown/binding-android-arm-eabi@1.2.13': - resolution: {integrity: sha512-Vu/NICrgdRvUOeaJZIyB2FP63s6fO/4ud5l8dXmxDx9yDyn+mN0y+gsvsVviSli+T361Aqo0h46EuMoobrwawA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [android] - - '@rolldown/binding-android-arm64@1.2.13': - resolution: {integrity: sha512-6LEoIrGy5vvCd2boNnv2soPSUZj/PRvhp8R/t9KlX+mIZxThIE/ZqxrGXxmuNX0FuvQFvLdZr7S4HrYpYBVhEQ==} + '@rolldown/binding-android-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.2.13': - resolution: {integrity: sha512-CaJSRzlQ6Q+zkDMVA9OkVxBjVoPRCDEE3v0FSJ9kIQBgRjFApA3Si4ijhbNVUji7ZJt+PfO0e46qy4nPInHUPA==} + '@rolldown/binding-android-arm64@1.0.2': + resolution: {integrity: sha512-ZS4D1JPGn/MYQN/SYDWftIE/nVsM8j/AFOYEzAoOE2O3NktQOZru+/vYXGbR/qtdLdIfGCP0lcoJiYVzsEz+iQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.2.13': - resolution: {integrity: sha512-e4r340I5hxSzJkD3YJBxgzq/rJ3wwxwdLLb2FPt1Zpyem20nrQPT11DDEEkazwxaHumH8wpglsp/Ozgj/wT6mw==} + '@rolldown/binding-darwin-arm64@1.0.2': + resolution: {integrity: sha512-vdFA9+C/rekyGce7WqHs/xoT0ioZEWaOFyZLIV1mEeNFaFDUQrPIo8Vs2GvJ6eetb3rzDUtUBgzto3ExpXJB3w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.0-rc.9': + resolution: {integrity: sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.2.13': - resolution: {integrity: sha512-hoBWDZ4/K/mJKVMbsgUd1jfpA2DiOrJ54mpegObU9TBHBBrtX4FLIXJJQRDPZ/2Dn91GvPob+Z2hwKJzf4E5SQ==} + '@rolldown/binding-darwin-x64@1.0.2': + resolution: {integrity: sha512-BewSOwTHazv77DTYiAZXSqqKZ4KP/KonFisDMVU7PImxoWfB2aepnPhd2E4SWz3zDzYgDNbs6jBmTdgNnF02GA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': + resolution: {integrity: sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.2.13': - resolution: {integrity: sha512-oF9fZu3vTWnTiVAkDFxU9PJLt1nh20K9RRpuHsR7ZnE2L7XookBbDBVLojCVSLGbvtSlxeUNnjAj6DbNsKyzbg==} + '@rolldown/binding-freebsd-x64@1.0.2': + resolution: {integrity: sha512-m41o7M0YWtUdqk61Tb+jnKb2rN++iRdIASlExkUoKfIAH30DOHCB8fVLzSUpbWHHU8esmEioY62PxzexE8MBuA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': + resolution: {integrity: sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.2.13': - resolution: {integrity: sha512-DTpb/+jMiqWMPgphn4ksW1zW+XLJ6dJJ9FMvnIk9I291LhCctMPhMYJrP5t9p6C9qa3KXadDdUEZHBaPh3kNxQ==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.2': + resolution: {integrity: sha512-jcojB9H7W/jS29pMKWAK1N+fU99vXodHDTatS3b3y/XSOCiHo0kkA74pL3jJmkoQtYpOCxDvaKs1fo2Ij/1X5w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-arm64-musl@1.2.13': - resolution: {integrity: sha512-xU+Kvv9N2A3SY35zFh1FWWNjxbadE/BKeqnkXe7vScU4GZsw757BlVmDLITZEq8DPpk6m7uoDYkK7P+x/uU5Ow==} + '@rolldown/binding-linux-arm64-gnu@1.0.2': + resolution: {integrity: sha512-1jn6qDU5iiOgFgygDzKUuKP0maTi0/f1+sBLgvij/76C77Nm3ts6ufz9Bjg5q5dduxiUIxtq86JIoBvo1xQ4Ig==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@rolldown/binding-linux-ppc64-gnu@1.2.13': - resolution: {integrity: sha512-XMk/hnhh25oQ756Lclb1Q11h4ll0xC0Esa5w4Vzp+mAE2S3AGJgeM0SonrIgY8fHhjarb6hcoTuwoFG0VVP2ig==} + '@rolldown/binding-linux-arm64-musl@1.0.2': + resolution: {integrity: sha512-QVLO/czFMdoMFSqlX3bcswcJNm/23r+qoa/jgtmFc/qEp6/jXmIkDjF/XIo8dPfGaiwy1xfQn8o77L79GeXFgw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-s390x-gnu@1.2.13': - resolution: {integrity: sha512-U1BoTHYmlywE2n3HUWjzZ+8EQsKr+OwpxYuDWaubx42tUL8QSL7nOqRz/NVHanibbFP3M1Rxuprz/wNcbMKjqw==} + '@rolldown/binding-linux-ppc64-gnu@1.0.2': + resolution: {integrity: sha512-hgO5Abm0w5UL6FEa2iFnZqo2KlK7TQ5QhV5x09hujBf7t5KzHQ1VmfPuTpqRy/rNlSxua3eWH374xxiVrP+lcA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-gnu@1.2.13': - resolution: {integrity: sha512-J4cm80Pc6wEwV5AZ42o62sIQgDk+Y7R2s646jIwuvO+4V46QB58N4vVuMPWCBaNgursXLpmUWJV//WQAkPvHBQ==} + '@rolldown/binding-linux-s390x-gnu@1.0.2': + resolution: {integrity: sha512-fy8rXxuYEu602abC8MUNaPjYLIFzReOaEIEMKMUa0rFEUxNpVXhs15KSSQ4qlqSaM7B6rcj9rDZgADh/IGDzLQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@rolldown/binding-linux-x64-musl@1.2.13': - resolution: {integrity: sha512-W0euZS40U4V6JkmEnVCIX9mcsL6cbXQ4X8c2w+MMOIjFg68TXUW+u3RT+2e1t1pv9mg/EP3pDtK3POXdQ7Rxyw==} + '@rolldown/binding-linux-x64-gnu@1.0.2': + resolution: {integrity: sha512-0+bOkiQ779+r1WpoHOWHqncvyySci0vKph+myNDYb+im6meJAzHQXay6oEgnkHuUGouM1LKTZwqKpBow6Kj7CQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@rolldown/binding-openharmony-arm64@1.2.13': - resolution: {integrity: sha512-do/AF/4n9MRshia3a5aXoy8xM2c6mgfT6D7H/dY6my5z+hfCIR4ab7mk4IRj++nsEQpKy39kd0DQnDq+r692tw==} + '@rolldown/binding-linux-x64-musl@1.0.2': + resolution: {integrity: sha512-mjSkrzZK5Qsl0a9d1JgILOiuZOSDTVdKENcSXBoqbzSrspLR/4/IRVDo5wd2GgZjNss/viBFJdeq+j7qH2nypw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-win32-arm64-msvc@1.2.13': - resolution: {integrity: sha512-6FtUf2cJZobutJdxnGYX8z0vtbgqU0b2v8vfBhkXb9wp2MppMFtkunE+IaOntyi01rkIQoPW2GHABtfzsC0BRQ==} + '@rolldown/binding-openharmony-arm64@1.0.2': + resolution: {integrity: sha512-1v5vHasdfQAZoEHakBV72LIFAC9JjnymsiKxp+GEr/ma3+NJCPSaYK+qavInOovJkgwFrs7GccX2d6IgDA3Z5w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + resolution: {integrity: sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@rolldown/binding-wasm32-wasi@1.0.2': + resolution: {integrity: sha512-mb1VobWn6NheziTk5/WEaR6AKVbrwT5sOi6C7zk3gy/pD1qtJfU1j4PgTo2NJnOtbL9Dl3Aeei8w9jJ7qC2jZQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.2.13': - resolution: {integrity: sha512-UKhFaZTeTcbKrb3iU82m17jVcPEAoqDkCN5MBqgPyZSwp/cQmib21crTS0DdH7T1B7wZRWEI89YQAOJMet5yhg==} + '@rolldown/binding-win32-arm64-msvc@1.0.2': + resolution: {integrity: sha512-SqKonF56vA/L2yHwHYcEp2P34URpOZ7d1fS635cTkpDnUtEGdUbhI6NzsPdqeSWvAAeGDrxjWjNmibDIdFf9/A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rolldown/plugin-babel@0.2.3': - resolution: {integrity: sha512-+zEk16yGlz1F9STiRr6uG9hmIXb6nprjLczV/htGptYuLoCuxb+itZ03RKCEeOhBpDDd1NU7qF6x1VLMUp62bw==} - engines: {node: '>=22.12.0 || ^24.0.0'} - peerDependencies: - '@babel/core': ^7.29.0 || ^8.0.0-rc.1 - '@babel/plugin-transform-runtime': ^7.29.0 || ^8.0.0-rc.1 - '@babel/runtime': ^7.27.0 || ^8.0.0-rc.1 - rolldown: ^1.0.0-rc.5 - vite: ^8.3.4 - peerDependenciesMeta: - '@babel/plugin-transform-runtime': - optional: true - '@babel/runtime': - optional: true - vite: - optional: true + '@rolldown/binding-win32-x64-msvc@1.0.2': + resolution: {integrity: sha512-v7qRI7gXLRINcOGXt+7YmAZ6iFuyZVMIoXAxhd8oP+DR9dLfL9GfNIx7PLMxmhZdvq8waUJBQiWN9EKNy+TRBQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.0': + resolution: {integrity: sha512-aKs/3GSWyV0mrhNmt/96/Z3yczC3yvrzYATCiCXQebBsGyYzjNdUphRVLeJQ67ySKVXRfMxt2lm12pmXvbPFQQ==} + + '@rolldown/pluginutils@1.0.0-beta.19': + resolution: {integrity: sha512-3FL3mnMbPu0muGOCaKAhhFEYmqv9eTfPSJRJmANrCwtgK8VuxpsZDGK+m0LYAGoyO8+0j5uRe4PeyPDK1yA/hA==} + + '@rolldown/pluginutils@1.0.0-beta.27': + resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} '@rolldown/pluginutils@1.0.0-rc.2': resolution: {integrity: sha512-izyXV/v+cHiRfozX62W9htOAvwMo4/bXKDrQ+vom1L1qRuexPock/7VZDAhnpHCLNejd3NJ6hiab+tO0D44Rgw==} + '@rolldown/pluginutils@1.0.0-rc.4': + resolution: {integrity: sha512-1BrrmTu0TWfOP1riA8uakjFc9bpIUGzVKETsOtzY39pPga8zELGDl8eu1Dx7/gjM5CAz14UknsUMpBO8L+YntQ==} + '@rolldown/pluginutils@1.0.0-rc.7': resolution: {integrity: sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==} @@ -20737,6 +18597,69 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@rollup/plugin-alias@6.0.0': + resolution: {integrity: sha512-tPCzJOtS7uuVZd+xPhoy5W4vThe6KWXNmsFCNktaAh5RTqcLiSfT4huPQIXkgJ6YCOjJHvecOAzQxLFhPxKr+g==} + engines: {node: '>=20.19.0'} + peerDependencies: + rollup: '>=4.0.0' + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-commonjs@29.0.0': + resolution: {integrity: sha512-U2YHaxR2cU/yAiwKJtJRhnyLk7cifnQw0zUpISsocBDoHDJn+HTV74ABqnwr5bEgWUwFZC9oFL6wLe21lHu5eQ==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-inject@5.0.5': + resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-json@6.1.0': + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-node-resolve@16.0.3': + resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-replace@6.0.3': + resolution: {integrity: sha512-J4RZarRvQAm5IF0/LwUUg+obsm+xZhYnbMXmXROyoSE1ATJe3oXSb9L5MMppdxP2ylNSjv6zFBwKYjcKMucVfA==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-terser@0.4.4': + resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -20746,146 +18669,146 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.63.1': - resolution: {integrity: sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==} + '@rollup/rollup-android-arm-eabi@4.56.0': + resolution: {integrity: sha512-LNKIPA5k8PF1+jAFomGe3qN3bbIgJe/IlpDBwuVjrDKrJhVWywgnJvflMt/zkbVNLFtF1+94SljYQS6e99klnw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.63.1': - resolution: {integrity: sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==} + '@rollup/rollup-android-arm64@4.56.0': + resolution: {integrity: sha512-lfbVUbelYqXlYiU/HApNMJzT1E87UPGvzveGg2h0ktUNlOCxKlWuJ9jtfvs1sKHdwU4fzY7Pl8sAl49/XaEk6Q==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.63.1': - resolution: {integrity: sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==} + '@rollup/rollup-darwin-arm64@4.56.0': + resolution: {integrity: sha512-EgxD1ocWfhoD6xSOeEEwyE7tDvwTgZc8Bss7wCWe+uc7wO8G34HHCUH+Q6cHqJubxIAnQzAsyUsClt0yFLu06w==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.63.1': - resolution: {integrity: sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==} + '@rollup/rollup-darwin-x64@4.56.0': + resolution: {integrity: sha512-1vXe1vcMOssb/hOF8iv52A7feWW2xnu+c8BV4t1F//m9QVLTfNVpEdja5ia762j/UEJe2Z1jAmEqZAK42tVW3g==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.63.1': - resolution: {integrity: sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==} + '@rollup/rollup-freebsd-arm64@4.56.0': + resolution: {integrity: sha512-bof7fbIlvqsyv/DtaXSck4VYQ9lPtoWNFCB/JY4snlFuJREXfZnm+Ej6yaCHfQvofJDXLDMTVxWscVSuQvVWUQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.63.1': - resolution: {integrity: sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==} + '@rollup/rollup-freebsd-x64@4.56.0': + resolution: {integrity: sha512-KNa6lYHloW+7lTEkYGa37fpvPq+NKG/EHKM8+G/g9WDU7ls4sMqbVRV78J6LdNuVaeeK5WB9/9VAFbKxcbXKYg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.63.1': - resolution: {integrity: sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==} + '@rollup/rollup-linux-arm-gnueabihf@4.56.0': + resolution: {integrity: sha512-E8jKK87uOvLrrLN28jnAAAChNq5LeCd2mGgZF+fGF5D507WlG/Noct3lP/QzQ6MrqJ5BCKNwI9ipADB6jyiq2A==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.63.1': - resolution: {integrity: sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==} + '@rollup/rollup-linux-arm-musleabihf@4.56.0': + resolution: {integrity: sha512-jQosa5FMYF5Z6prEpTCCmzCXz6eKr/tCBssSmQGEeozA9tkRUty/5Vx06ibaOP9RCrW1Pvb8yp3gvZhHwTDsJw==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.63.1': - resolution: {integrity: sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==} + '@rollup/rollup-linux-arm64-gnu@4.56.0': + resolution: {integrity: sha512-uQVoKkrC1KGEV6udrdVahASIsaF8h7iLG0U0W+Xn14ucFwi6uS539PsAr24IEF9/FoDtzMeeJXJIBo5RkbNWvQ==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.63.1': - resolution: {integrity: sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==} + '@rollup/rollup-linux-arm64-musl@4.56.0': + resolution: {integrity: sha512-vLZ1yJKLxhQLFKTs42RwTwa6zkGln+bnXc8ueFGMYmBTLfNu58sl5/eXyxRa2RarTkJbXl8TKPgfS6V5ijNqEA==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loong64-gnu@4.63.1': - resolution: {integrity: sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==} + '@rollup/rollup-linux-loong64-gnu@4.56.0': + resolution: {integrity: sha512-FWfHOCub564kSE3xJQLLIC/hbKqHSVxy8vY75/YHHzWvbJL7aYJkdgwD/xGfUlL5UV2SB7otapLrcCj2xnF1dg==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-loong64-musl@4.63.1': - resolution: {integrity: sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==} + '@rollup/rollup-linux-loong64-musl@4.56.0': + resolution: {integrity: sha512-z1EkujxIh7nbrKL1lmIpqFTc/sr0u8Uk0zK/qIEFldbt6EDKWFk/pxFq3gYj4Bjn3aa9eEhYRlL3H8ZbPT1xvA==} cpu: [loong64] os: [linux] libc: [musl] - '@rollup/rollup-linux-ppc64-gnu@4.63.1': - resolution: {integrity: sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==} + '@rollup/rollup-linux-ppc64-gnu@4.56.0': + resolution: {integrity: sha512-iNFTluqgdoQC7AIE8Q34R3AuPrJGJirj5wMUErxj22deOcY7XwZRaqYmB6ZKFHoVGqRcRd0mqO+845jAibKCkw==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-ppc64-musl@4.63.1': - resolution: {integrity: sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==} + '@rollup/rollup-linux-ppc64-musl@4.56.0': + resolution: {integrity: sha512-MtMeFVlD2LIKjp2sE2xM2slq3Zxf9zwVuw0jemsxvh1QOpHSsSzfNOTH9uYW9i1MXFxUSMmLpeVeUzoNOKBaWg==} cpu: [ppc64] os: [linux] libc: [musl] - '@rollup/rollup-linux-riscv64-gnu@4.63.1': - resolution: {integrity: sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==} + '@rollup/rollup-linux-riscv64-gnu@4.56.0': + resolution: {integrity: sha512-in+v6wiHdzzVhYKXIk5U74dEZHdKN9KH0Q4ANHOTvyXPG41bajYRsy7a8TPKbYPl34hU7PP7hMVHRvv/5aCSew==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-musl@4.63.1': - resolution: {integrity: sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==} + '@rollup/rollup-linux-riscv64-musl@4.56.0': + resolution: {integrity: sha512-yni2raKHB8m9NQpI9fPVwN754mn6dHQSbDTwxdr9SE0ks38DTjLMMBjrwvB5+mXrX+C0npX0CVeCUcvvvD8CNQ==} cpu: [riscv64] os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.63.1': - resolution: {integrity: sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==} + '@rollup/rollup-linux-s390x-gnu@4.56.0': + resolution: {integrity: sha512-zhLLJx9nQPu7wezbxt2ut+CI4YlXi68ndEve16tPc/iwoylWS9B3FxpLS2PkmfYgDQtosah07Mj9E0khc3Y+vQ==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.63.1': - resolution: {integrity: sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==} + '@rollup/rollup-linux-x64-gnu@4.56.0': + resolution: {integrity: sha512-MVC6UDp16ZSH7x4rtuJPAEoE1RwS8N4oK9DLHy3FTEdFoUTCFVzMfJl/BVJ330C+hx8FfprA5Wqx4FhZXkj2Kw==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.63.1': - resolution: {integrity: sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==} + '@rollup/rollup-linux-x64-musl@4.56.0': + resolution: {integrity: sha512-ZhGH1eA4Qv0lxaV00azCIS1ChedK0V32952Md3FtnxSqZTBTd6tgil4nZT5cU8B+SIw3PFYkvyR4FKo2oyZIHA==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-openbsd-x64@4.63.1': - resolution: {integrity: sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==} + '@rollup/rollup-openbsd-x64@4.56.0': + resolution: {integrity: sha512-O16XcmyDeFI9879pEcmtWvD/2nyxR9mF7Gs44lf1vGGx8Vg2DRNx11aVXBEqOQhWb92WN4z7fW/q4+2NYzCbBA==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.63.1': - resolution: {integrity: sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==} + '@rollup/rollup-openharmony-arm64@4.56.0': + resolution: {integrity: sha512-LhN/Reh+7F3RCgQIRbgw8ZMwUwyqJM+8pXNT6IIJAqm2IdKkzpCh/V9EdgOMBKuebIrzswqy4ATlrDgiOwbRcQ==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.63.1': - resolution: {integrity: sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==} + '@rollup/rollup-win32-arm64-msvc@4.56.0': + resolution: {integrity: sha512-kbFsOObXp3LBULg1d3JIUQMa9Kv4UitDmpS+k0tinPBz3watcUiV2/LUDMMucA6pZO3WGE27P7DsfaN54l9ing==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.63.1': - resolution: {integrity: sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==} + '@rollup/rollup-win32-ia32-msvc@4.56.0': + resolution: {integrity: sha512-vSSgny54D6P4vf2izbtFm/TcWYedw7f8eBrOiGGecyHyQB9q4Kqentjaj8hToe+995nob/Wv48pDqL5a62EWtg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.63.1': - resolution: {integrity: sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==} + '@rollup/rollup-win32-x64-gnu@4.56.0': + resolution: {integrity: sha512-FeCnkPCTHQJFbiGG49KjV5YGW/8b9rrXAM2Mz2kiIoktq2qsJxRD5giEMEOD2lPdgs72upzefaUvS+nc8E3UzQ==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.63.1': - resolution: {integrity: sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==} + '@rollup/rollup-win32-x64-msvc@4.56.0': + resolution: {integrity: sha512-H8AE9Ur/t0+1VXujj90w0HrSOuv0Nq9r1vSZF2t5km20NTfosQsGGUXDaKdQZzwuLts7IyL1fYT4hM95TI9c4g==} cpu: [x64] os: [win32] - '@rsbuild/core@2.3.1': - resolution: {integrity: sha512-dv5tL7djb8ex5z4sqnDmUbd5PnGNr/CXuFfiMD4RkUsF1JEZZkGH8lc+QW4fqYQIHM7RTvcMUakgvwVU/O9WMw==} + '@rsbuild/core@2.0.1': + resolution: {integrity: sha512-5TwUpb10Y+VYaYH8oLL/rfJGrhxrk16BiGzv101kzaMPT60MtOXgjEUTxztbjRuq0ifbtRJ/w7rsIZQ4VziWYg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -20894,6 +18817,31 @@ packages: core-js: optional: true + '@rsbuild/core@2.0.14': + resolution: {integrity: sha512-SSPer6vM+v82CV6JXIOzyyT++A1ECgsVvvUuveD5rfGxX/W58vWGnB+zWcYbMfYOjTntD+9ve6QGGh6kBjPx6A==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + + '@rsbuild/core@2.0.8': + resolution: {integrity: sha512-V5Bhn3zqljsaB5grw9oMkSk6XZFvMkr6UpIYPZnDmOWsRAT1fNQ6XF6cn8fVUKv/KILblBrKLUZf0DpvDt3exw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + + '@rsbuild/plugin-babel@1.0.6': + resolution: {integrity: sha512-tWnqG938MedKJx7U4F1lHb156VDtNzj7mSsi2ZoxZVBnECQE01/V6QTN1XKw7nWunGyGoETb+nQBGc+fkVZjvw==} + peerDependencies: + '@rsbuild/core': 1.x + '@rsbuild/plugin-babel@1.1.2': resolution: {integrity: sha512-qIZzosQlkj7VyFz8mmz1vAKDFlk79xrIvCRYzROqNwQHDXep+gd91nCnUPJdRPHrktzN8Yqa190CPTii3rON6w==} peerDependencies: @@ -20910,26 +18858,20 @@ packages: '@rsbuild/core': optional: true - '@rsbuild/plugin-sass@2.0.1': - resolution: {integrity: sha512-BZRpVTZW+za+sv84nYYdIjR7XwVqyS8+1wAha/7BvQ1igdzlmT6xPd6h4jTWfNzdHuzIHZsuWY7kPS/ybzcndA==} - peerDependencies: - '@rsbuild/core': ^2.0.0 - peerDependenciesMeta: - '@rsbuild/core': - optional: true - - '@rsbuild/plugin-solid@1.1.1': - resolution: {integrity: sha512-IMlxjAVDrgPPx7KHQXyiJiQn5x11jibC7WIVIkZg7uxkcgBuHyE6InmVNc+C6M3Y1djXYL7GG2M7CH4Jdg+RUw==} + '@rsbuild/plugin-solid@2.0.0-beta.0': + resolution: {integrity: sha512-J3GiIVNJQc/sjeIs9N0ZAEjXJJ1QgOeACRlDjDTSVMBseyIJH4LjNQRgYZAoah61o6/kiRtAh5sHfdRcOAVb9g==} peerDependencies: '@rsbuild/core': ^1.0.0 || ^2.0.0-0 + '@solidjs/web': '>=2.0.0-beta.0 <2.0.0-experimental.0' + solid-js: '>=2.0.0-beta.0 <2.0.0-experimental.0' peerDependenciesMeta: '@rsbuild/core': optional: true - '@rsbuild/plugin-tailwindcss@2.0.3': - resolution: {integrity: sha512-sl7mN0fyoP0W+zEyFR2xEMVAS2cZPlOAqsXwI8Ei9tUSvV7V4G8Xw2WBVCOQ/B4KEFfJ6H1+TEuPlAzHLEfc4g==} + '@rsbuild/plugin-vue-jsx@1.1.1': + resolution: {integrity: sha512-6QHm0dmx5cdgpvMXv7bSrTzuDi1uDBw7SaydmN8kQ/uhaxRPWMNMU3g6rGYKhu+6ExHKwtXOf8CI2YtXwDaP9Q==} peerDependencies: - '@rsbuild/core': ^2.0.0 + '@rsbuild/core': 1.x peerDependenciesMeta: '@rsbuild/core': optional: true @@ -20942,6 +18884,11 @@ packages: '@rsbuild/core': optional: true + '@rsbuild/plugin-vue@1.2.2': + resolution: {integrity: sha512-BVCejQjVIxsaG0WF3WSBy1jyVjoLjmrWyslSi0eq1zGxLB4BlyEkIvBQguXI9YsxKxKg0VsXIJQjXus03Rzqkg==} + peerDependencies: + '@rsbuild/core': 1.x + '@rsbuild/plugin-vue@1.2.7': resolution: {integrity: sha512-epDSChyeR4U+gwq2vfTARV9hbfrmdFTdmhBWIcv7MFyckn3yxJhweJVwdx14Wf3d8s1p4XZzDpqmphDyvX443Q==} peerDependencies: @@ -20950,168 +18897,188 @@ packages: '@rsbuild/core': optional: true - '@rspack/binding-darwin-arm64@2.2.7': - resolution: {integrity: sha512-m0ijteZwZfUZeFcbyxwTe6N+I7aceV5/iW39b7fIIoMN/mSv9zL0ieeRzwuFe7mTYGwCuwNieDZHXfMFdp2Q2w==} + '@rspack/binding-darwin-arm64@2.0.0': + resolution: {integrity: sha512-ICBHDKYyndFqljLhjxvKfWWZu39RJSH2jkSmbceXl0kmptLSE0cLWpvk+eGSzLqtxKN0jVchwCw+5P5mWCzwAw==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-arm64@2.3.1': - resolution: {integrity: sha512-koLyL2r8PUcLD0StjuZ/n5XM6GJ0C8dzJN0IuIV9d7nQcibJxwjjSAWEPGVz6bm8WuzypvuVKNoa1+GGAHeMQA==} + '@rspack/binding-darwin-arm64@2.0.5': + resolution: {integrity: sha512-++wjLQjQ20GcR0DwbzQmVXg9qy4XCX5NlfSzkzj2icHoDxr3KkrXhyVrQkdWuNG6l/bQrGLPnvLEAqkroC2Y7A==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@2.2.7': - resolution: {integrity: sha512-f27/OubIeCe5Hzze1bm+k/CQ2XX9hk3E/FuK4lym1bjqZ9spWSuolC3sK/yU/Pc3kwMPuf53byUm3FM+QC/blw==} + '@rspack/binding-darwin-arm64@2.0.8': + resolution: {integrity: sha512-vCgbgH7B7qom+uID+RCZsTCOYFb9wC4/4+1U6rMfytrXGVJ72eNQs2tbdjOl0lb18CT3N/n+VkWynUiLk84GwA==} + 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.3.1': - resolution: {integrity: sha512-YK39JLiu1YC6+3BMxkP7e848pHD7e2T/0OSNogDi7whfiZNg95wa9Ncd7I5ppAf0nhmV+FNew/sCBIFp5h67Jw==} + '@rspack/binding-darwin-x64@2.0.5': + resolution: {integrity: sha512-JBD5mCN3JKjV64Mh9nDYx8lLUrWDfEl5tLBuMkREUnqEKbo+z4nfwotyqHHM8/XgZwL+Gr7ps4GLWuQQrZB8+Q==} cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@2.2.7': - resolution: {integrity: sha512-uGEX6kY/Pi3wPZgaEk6vTevZOHjKw8qmd5pqWVwRmpLhwvPB7LGqVqx5BMnNYBjsndVUWJQQRlGL8DoVG5IXXQ==} + '@rspack/binding-darwin-x64@2.0.8': + resolution: {integrity: sha512-satPm2PD4B7jDTVlVAdvMVdUszwLvWUEnUDzLb77mvVkezKNDZmuhb+e8s+FfKs8hJpNbZ9VAejuA2rr8o985w==} + 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.3.1': - resolution: {integrity: sha512-Q+RCA/KM2tn6m6R5U4lktXDs5cCRm3SyleQk86iqqUFX7wKzVRUvr5BTsreg6K9of3gpYmQ6+g1PGT5cwo0rLA==} + '@rspack/binding-linux-arm64-gnu@2.0.5': + resolution: {integrity: sha512-JI8+//woanJPNsfL7iGjX39zyiWumnrKHznWQM/7lEtE5nPmk+j+X7TYXxczSWC9zfZegiqI74D3L5JPDC84Fw==} cpu: [arm64] os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-musl@2.2.7': - resolution: {integrity: sha512-qBvztXsOgdi69zi8BhIUz+yc/alqR/wQVmcdCh+1SbhcsNpMsFUndxvVoR1tOboBsEo//gxOG4GxH8zlemhbUA==} + '@rspack/binding-linux-arm64-gnu@2.0.8': + resolution: {integrity: sha512-pSI+npPQE/uDtiboqvcOIRJbEV2+B+H1xffmko/gw50la92oTUW60kVULFwsb6L0+GVCzIcwX3yq60GtYIn+Ug==} + 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.3.1': - resolution: {integrity: sha512-He+muVDON1fohGtdYamh3zHVwf6/E6fZu/+iEAkxjclE0P94bsCfYVcZW/a4/l1tJ2zvLZtB4jD7Qr6r4vG/WA==} + '@rspack/binding-linux-arm64-musl@2.0.5': + resolution: {integrity: sha512-5LujilxLtJFRiiPz5i5iWcWJriK9oy4gN7gZtTo8YRB7wwmwA8LMypTjjO0GLbkPS4/KeCfY4fDfTC29KmK+tA==} cpu: [arm64] os: [linux] libc: [musl] - '@rspack/binding-linux-ppc64-gnu@2.2.7': - resolution: {integrity: sha512-t+/tOPoMu3ZZF8I1Wvqd4Jrib1teOOgb0S4jGb4nSVryuDIWgjny0FLGv5xc8RC7e4esVF93D4wF62Kt9Pxfvw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-ppc64-gnu@2.3.1': - resolution: {integrity: sha512-blIZUgyPt4FcSHkZL6sJ2xbzc7ACgDeU49An4mXLSebwdgnlhTzxeSFnh2VeJDlGza8CUaZYB/zS/6oZ2kCDcw==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-riscv64-gnu@2.2.7': - resolution: {integrity: sha512-ZkN6K4PRTPqfYI7gPYv1PqgUXKsZDeeFPFoQ4LLiFxhIGczdJY5XAPPoHN+N7d91hAGWi6u+UHYrUp1HvudBOw==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-riscv64-gnu@2.3.1': - resolution: {integrity: sha512-3FtW2DUFmXxhBORUA3zSc+ot4d6R/1/U6z/48TDN4jeIYDUG9VqYBF6LUohX4vBY6IP0DCyXb2N9WayD/9QXoA==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-riscv64-musl@2.2.7': - resolution: {integrity: sha512-ywcmeNAC59HtVJ4a5jy5cEUA4JNa19QlVtTW09Pzh0+luNEasWaDfOaXJpYJTGWcycVwzMm3A9aNN3MqvO87EQ==} - cpu: [riscv64] + '@rspack/binding-linux-arm64-musl@2.0.8': + resolution: {integrity: sha512-igjJ43yxWQ72GZqjDDZSSHax9/Vg+6rLMmOvFglTJUkQpB4Tyvu/YjW+WRjYj2xRw6blOjLxUSJWASvuSqqlvg==} + cpu: [arm64] os: [linux] libc: [musl] - '@rspack/binding-linux-riscv64-musl@2.3.1': - resolution: {integrity: sha512-+5qNgdNdXzp/K8f8BjgJ3m7tcbBKPENN7WPDfBcSHvWb5GF4+o/pbrX26c0+LEugo0bYUOAoitBNd94AwcNvpA==} - cpu: [riscv64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-s390x-gnu@2.2.7': - resolution: {integrity: sha512-U/np+nOj9mka5CdM9FKNkrAShw0UoaarBLzOxbBHu4sqMt3iXQCi91fblLdhUDoWuIQrnV/WrqygFeIP2qAHIw==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-s390x-gnu@2.3.1': - resolution: {integrity: sha512-yNcg/y1+MV0wZ984CVU4d1HAYYwMcDPXoQO0xynU+K5YuBxPWALHOxuRRCKCcykBdL1GIEshAIewEFrsW/cmJg==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-x64-gnu@2.2.7': - resolution: {integrity: sha512-PkryZX3GZeBQfzvKEhwGGd9m43PwqcsqWd14kmsVADeBCqHLxJahMGiGmajd28vSa42xbw7HTb8yY4jXzv5QtA==} + '@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.3.1': - resolution: {integrity: sha512-ffclKBuH8wwimOBd6xGUxrBfVKKY5Ow4E7OFdHZeg4xffm2O8auGszmOgvFu1eoDoOYHaVJn+cEV6UD0KwZk8A==} + '@rspack/binding-linux-x64-gnu@2.0.5': + resolution: {integrity: sha512-241wqE132jh+/U/pn97qUPV4KpIy4bSrTH0tqfzQCocgw+8hrUj02GqNG+3MXVC3qtwaQeJFYgEBy3TqFKsrIQ==} cpu: [x64] os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-musl@2.2.7': - resolution: {integrity: sha512-atJn62IgXnc/RhWiFgEiNx7IHAJbHunttzjMpWJLjWiFuJ2c+tLQrTBIiqO3VAIXh+haN1jZLHXuMVj5/J+edA==} + '@rspack/binding-linux-x64-gnu@2.0.8': + resolution: {integrity: sha512-zrkoEOnqj1hOEBO5T2I/2Ts2HSJsYFh1qXwMpK4dMJFGGNWDfNeUa6/LF5uq3VINF3JUl7RL47AgrucoSZJXPA==} + 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.3.1': - resolution: {integrity: sha512-qcDwwuyxR7TMtrW+r5Y9RIW25boXd1Ip/9jz04jhdq/OiU/Am7rCP2X90CH8sWdzovIF9UNmsGjY4KklR0F2Mg==} + '@rspack/binding-linux-x64-musl@2.0.5': + resolution: {integrity: sha512-BhaXZD064Lci3Kia0kLDAb4TyxO2C+0UidMlj44e8+ctasxIfFZgnrhCJrhTFHAtOiAwqhU3FHun2UuxPqX0Eg==} cpu: [x64] os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@2.2.7': - resolution: {integrity: sha512-SRDYrqWnD8Y+VNj8+11KggFaVMFSbyu+9WC2f9sygzjFu78GmF0kLKaHNQMaJv6MUMSBk/OhtEbUB4hmH7czVQ==} + '@rspack/binding-linux-x64-musl@2.0.8': + resolution: {integrity: sha512-6CtDaGZjNDvJd9TBp7a9zABbrPORO21W96+3ZcGBn0YNUPUk4ARxIxrTTpeJ/1F41QDM8AYIkGDdqEYMqTYBsA==} + 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.3.1': - resolution: {integrity: sha512-3dr6zjFaCK3A920ftCriSJkiRhEfhHtat7LtBdj6g0mcV5Rt+iealmli0vjeAvD0UdpE1u8EKWlfw82JLgFLSQ==} + '@rspack/binding-wasm32-wasi@2.0.5': + resolution: {integrity: sha512-duEkRoXrl9SW8uGHv7JURJ5lgKu87qFDQ4Exy6UQPvsUJVXhtRXTfvMHCb/CejVJuW2Bw2D632/axZq3qRSuBQ==} cpu: [wasm32] - '@rspack/binding-win32-arm64-msvc@2.2.7': - resolution: {integrity: sha512-etHFjzSP/jnnrVYuim9C/nhSlN0/tQowVz0CSJOUHtDH7ZZiUsvWtkH9Zx3tDaZOB7sAw9cbL36mbmdkb4U6cw==} + '@rspack/binding-wasm32-wasi@2.0.8': + resolution: {integrity: sha512-Yf4SiqTUroT5Ju+te0YAY2xxKOb35tECsO21v7hYyGa705wrgoAK/MmF7enOvs9GR1iZIqgiLD/wxsIxl8GjJw==} + 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.3.1': - resolution: {integrity: sha512-AZbuLPylt1xvWssN93AsirbYs3WgfcrA8tMsqHmVJIHahLu9E+JPKZ3Gmsw6IYEZk3EfnV3ujQzeQ1/VfF0Vsw==} + '@rspack/binding-win32-arm64-msvc@2.0.5': + resolution: {integrity: sha512-q2WT3HFoWL+2g84l3s2kY7CiE1gEZ1bwB3txx3eZzQQ6YKP7bE82z6sl6S/pTOHGjHdAO4snQXpSaHwUt3LX5g==} cpu: [arm64] os: [win32] - '@rspack/binding-win32-ia32-msvc@2.2.7': - resolution: {integrity: sha512-26HiMUQk8QKVw477gW9HorIQ3r0le3AL4OFigJr1/HAumi5qyOPazck+wWtUDh1R9bSf8etZjkuseBGtjN5+KQ==} + '@rspack/binding-win32-arm64-msvc@2.0.8': + resolution: {integrity: sha512-8NCuiQsAhXrwRBy57QZoypqrws/zLBkaQVGiB8hksr6v++8hNigNjqpQARLbd0iyMuHsQQ++8+auGk6xlDXmzw==} + 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.3.1': - resolution: {integrity: sha512-R5NVU68TePZcgRdYUzrQX9YFNxmcyXZEPwaPv40AAgsqNyacG3iRaYVmV79jt3rWYfa0QJaqvRLUchDe2SZ6zQ==} + '@rspack/binding-win32-ia32-msvc@2.0.5': + resolution: {integrity: sha512-nMJGIY7kvgbyMolEE7tXDe+Z9jSItDshTIqMQQkkD3WTHdjlBQozHxk4kBtKLsunO+3NkCLe5Oa3hXg1yyStIg==} cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@2.2.7': - resolution: {integrity: sha512-ut8tVSXP8DWQE/JUwQ1oqwuAaAgySgYF66HpWmxfR9J4nLzGmhd7CnnaCTT3vUyQQNmLKFida/AbiqJ/gWmPrw==} + '@rspack/binding-win32-ia32-msvc@2.0.8': + resolution: {integrity: sha512-bxiekytbX7V9KFAra+HkwtNWC6pYfHEBBZFpiT0xUs3mCFOmAAFVBsBSQsoCP9AdCEXoMAvNdnrHNw3iov4OZw==} + 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.3.1': - resolution: {integrity: sha512-5T9DYjNPQpLbrNXjCssGd2B6xMQPlc3LxVOKHGUA1O0GV+88vBkTXAcryJ+Fo+yVEMPCzp4VvwBMGAVDpCjcSA==} + '@rspack/binding-win32-x64-msvc@2.0.5': + resolution: {integrity: sha512-vP0BR6fxdPL9cb02HAuZATg/CjR07aecWel3s1vqRwW1aDffgXh9PVmqEKIHTgyaNsNR55kSKNJsB9AcQ8/QrA==} cpu: [x64] os: [win32] - '@rspack/binding@2.2.7': - resolution: {integrity: sha512-opY7Sw6iwtBa23CeNj18GOqKBlaJUZXp52kNIGyNq+7jpCQKrJYeX5wiK7uBn8/ZpHQfhwNL2xxu5yzG4JFH1g==} + '@rspack/binding-win32-x64-msvc@2.0.8': + resolution: {integrity: sha512-7zPs8YCe/ZVJTwd+5lpB0CP0tkn2pONf/T1ycmVY76u21Nrwt8mXQGc/2yH2eWP4B7fikYBr3hGr7mpR2fajqQ==} + cpu: [x64] + os: [win32] - '@rspack/binding@2.3.1': - resolution: {integrity: sha512-pfCJGBFNK2tnNnoDP6ZoTbOjxbKr1U2eGFDJ8bIuZQai4FBNhWQlKFmNup+X5K935XYRulZBomIBAL6GL6W2YQ==} + '@rspack/binding@2.0.0': + resolution: {integrity: sha512-WA2f9eQpejkvf5Vrnf6wNCn1m8RT1p08NjgOZpKhsCzr0uBjWeRvGduawlrFFHZh/jPnWZTVaVdQ08FEAWbwGw==} - '@rspack/core@2.2.7': - resolution: {integrity: sha512-kWKd4lYp13GPAQy2eQITLTvPbl+ST7ffG/MCGHoX138o5eTetMQMe/oc7UAZAfjervAM6UOzEhiiCirPTpRBUQ==} + '@rspack/binding@2.0.5': + resolution: {integrity: sha512-Ta1y4WXJA87wM1OstqaMddoPsBGv7Cu779bYToKxEAqR/Yy9DxLkp7bdgBaAx2JH++BwVjV+toWts2V9AaiTFQ==} + + '@rspack/binding@2.0.8': + resolution: {integrity: sha512-3uZ+y8aQxq33ty2srMxg2Nu0XuBI6vVrG50rkDaXqwWqOohfgGUSfFuQK7EnSUNy4aFUQlCG6NHialQHJov0wg==} + + '@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/core@2.0.5': + resolution: {integrity: sha512-9tv2HAnSiTote5WPH2tmz1hLZ1zKbzkiZc1eYp7LP/8jcsiJBuf40ihiWidAgbbuYtJo3kWET6q+qOm5UhNiGA==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -21122,8 +19089,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@2.3.1': - resolution: {integrity: sha512-9BWfaiEJLgLK9U53Q4WVruBZ19Mu/XWHXHEu0UFla4lUtH8Z+/ET2m044tiqbtyIgqQyG58fMrxHeVIAiXMXHg==} + '@rspack/core@2.0.8': + resolution: {integrity: sha512-+NLGJf8gZxihDmMFzjlly3toc2SMjeDmuvz0/Cai9AMdV4F+Pqcnt2BA9V4e3SY2jmhJQtPwgyyLtR1RiJO77g==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -21264,7 +19231,7 @@ packages: resolution: {integrity: sha512-vMfGz7x3Ahplcdm0RlEtTNUZ08qpUSr3NRJMQ6duUDxxe0Mqo6DisyQWNQKSROZ7BtLCJUfio6/LRGpkRUoo8A==} engines: {node: '>=18'} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 '@sentry/solid@10.32.0': resolution: {integrity: sha512-T+i0L+uB67Z+ttJJwETLQuXhBOor3mC82YqXBBxFX8H4hLZ0Idpbuw2Vmqd5+E1vQFxgsoHnuu3uBR6LblafFQ==} @@ -21272,7 +19239,7 @@ packages: peerDependencies: '@solidjs/router': ^0.13.4 || ^0.14.0 || ^0.15.0 '@tanstack/solid-router': ^1.132.27 - solid-js: 1.9.12 + solid-js: ^1.8.4 peerDependenciesMeta: '@solidjs/router': optional: true @@ -21319,94 +19286,166 @@ packages: resolution: {integrity: sha512-7F/yz2IphV39hiS2zB4QYVkivrptHHh0K8qJJd9HhuWSdvf8AN7NpebW3CcDZDBQsUPMoDKWsY2WWgW7bqOcfA==} engines: {node: '>=18'} + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + '@so-ric/colorspace@1.1.6': resolution: {integrity: sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw==} + '@solid-devtools/debugger@0.26.0': + resolution: {integrity: sha512-36QxZ+s/lY60E+Pb9q0eTsdqgaog4c823WIj5dC2LFdGrGXbVGBQEj6k7CgvMnEETdwndrd0Fm72fQyYPlZrVA==} + peerDependencies: + solid-js: ^1.9.0 + + '@solid-devtools/logger@0.9.7': + resolution: {integrity: sha512-JHZ0ejkQnRoMcV8bgqogSYFlYdo0wJ1S/vAHEROSHQk1jNtErTXJwLrCXdR+LNuBWhJJ0aq/y7Pjit/ssvKrDw==} + peerDependencies: + solid-js: ^1.9.0 + + '@solid-devtools/shared@0.19.0': + resolution: {integrity: sha512-OGo6l84f9X5YEAqSEM4Xl94+xKXSqmACMzKWsAqO0BStLBMVL0vIVu286AQk5XkNxn11/EB9wrdkZc9GUzKlxA==} + peerDependencies: + solid-js: ^1.9.0 + + '@solid-primitives/bounds@0.0.122': + resolution: {integrity: sha512-kUq/IprOdFr/rg2upon5lQGOoTnDAmxQS4ASKK2l+VwoKSctdPwgu/4qJxEITZikL+nB0myYZzBZWptySV0cRg==} + peerDependencies: + solid-js: ^1.6.12 + '@solid-primitives/context@0.3.2': resolution: {integrity: sha512-6fvTtpK17PFHnUf/UOc1TzBjd+kLFjtA62aRFEm1kDP9ufTo7FYW2kUzQAWbfbRHi30yjBJtopbR8qd6nShwyg==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 + + '@solid-primitives/cursor@0.0.115': + resolution: {integrity: sha512-8nEmUN/sacXPChwuJOAi6Yi6VnxthW/Jk8VGvvcF38AenjUvOA6FHI6AkJILuFXjQw1PGxia1YbH/Mn77dPiOA==} + peerDependencies: + solid-js: ^1.6.12 '@solid-primitives/event-listener@2.4.0': resolution: {integrity: sha512-TSfR1PNTfojFEYGSxSMCnUhXsaYWBo4p+cm73QmWODa9YnaQAk6PB7VjzG2bOT2D817VlvuOqTj0Qdq+MZrdGg==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/event-listener@2.4.3': resolution: {integrity: sha512-h4VqkYFv6Gf+L7SQj+Y6puigL/5DIi7x5q07VZET7AWcS+9/G3WfIE9WheniHWJs51OEkRB43w6lDys5YeFceg==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/keyboard@1.3.0': resolution: {integrity: sha512-0QX9O3eUaQorNNmXZn8a4efSByayIScVq+iGSwheD7m3SL/ACLM5oZlCNpTPLcemnVVfUPAHFiViEj86XpN5qw==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/keyboard@1.3.3': resolution: {integrity: sha512-9dQHTTgLBqyAI7aavtO+HnpTVJgWQA1ghBSrmLtMu1SMxLPDuLfuNr+Tk5udb4AL4Ojg7h9JrKOGEEDqsJXWJA==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 + + '@solid-primitives/media@2.3.0': + resolution: {integrity: sha512-7+C3wfbWnGE/WPoNsqcp/EeOP2aNNB92RCpsWhBth8E5lZo/J+rK6jMb7umVsK0zguT8HBpeXp1pFyFbcsHStA==} + peerDependencies: + solid-js: ^1.6.12 + + '@solid-primitives/platform@0.1.2': + resolution: {integrity: sha512-sSxcZfuUrtxcwV0vdjmGnZQcflACzMfLriVeIIWXKp8hzaS3Or3tO6EFQkTd3L8T5dTq+kTtLvPscXIpL0Wzdg==} + peerDependencies: + solid-js: ^1.6.12 '@solid-primitives/props@3.2.2': resolution: {integrity: sha512-lZOTwFJajBrshSyg14nBMEP0h8MXzPowGO0s3OeiR3z6nXHTfj0FhzDtJMv+VYoRJKQHG2QRnJTgCzK6erARAw==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/refs@1.1.0': resolution: {integrity: sha512-QJ3bTSQOlPdHBP2m6llrT13FvVzAwZfx41lTN8lQrRwwcZoWb7kfCAjhaohPnwkAsQ6nJpLjtGfT5GOyuCA4tA==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 + + '@solid-primitives/resize-observer@2.1.0': + resolution: {integrity: sha512-tO9MDAc2pNjpcRd5B8LWbiR1qzIgvGZ5BtTuO98N7CLwd+fnuyGwtlQtJpz5hcLcTnoawpQYLpiRGNgaYW+YzQ==} + peerDependencies: + solid-js: ^1.6.12 '@solid-primitives/resize-observer@2.1.3': resolution: {integrity: sha512-zBLje5E06TgOg93S7rGPldmhDnouNGhvfZVKOp+oG2XU8snA+GoCSSCz1M+jpNAg5Ek2EakU5UVQqL152WmdXQ==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/rootless@1.5.0': resolution: {integrity: sha512-YJ+EveQeDv9DLqfDKfsPAAGy2x3vBruoD23yn+nD2dT84QjoBxWT1T0qA0TMFjek6/xuN3flqnHtQ4r++4zdjg==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/rootless@1.5.2': resolution: {integrity: sha512-9HULb0QAzL2r47CCad0M+NKFtQ+LrGGNHZfteX/ThdGvKIg2o2GYhBooZubTCd/RTu2l2+Nw4s+dEfiDGvdrrQ==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 + + '@solid-primitives/scheduled@1.5.0': + resolution: {integrity: sha512-RVw24IRNh1FQ4DCMb3OahB70tXIwc5vH8nhR4nNPsXwUPQeuOkLsDI5BlxaPk0vyZgqw9lDpufgI3HnPwplgDw==} + peerDependencies: + solid-js: ^1.6.12 + + '@solid-primitives/static-store@0.0.8': + resolution: {integrity: sha512-ZecE4BqY0oBk0YG00nzaAWO5Mjcny8Fc06CdbXadH9T9lzq/9GefqcSe/5AtdXqjvY/DtJ5C6CkcjPZO0o/eqg==} + peerDependencies: + solid-js: ^1.6.12 + + '@solid-primitives/static-store@0.1.0': + resolution: {integrity: sha512-6Coau0Kv/dF83UQpbBzc+gnJafOQAPe2jCbB4jmTK5UocsR5cWmFBVRm3kin+nZFVaO4WkuELw0cKANWgTVh8Q==} + peerDependencies: + solid-js: ^1.6.12 '@solid-primitives/static-store@0.1.2': resolution: {integrity: sha512-ReK+5O38lJ7fT+L6mUFvUr6igFwHBESZF+2Ug842s7fvlVeBdIVEdTCErygff6w7uR6+jrr7J8jQo+cYrEq4Iw==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 + + '@solid-primitives/styles@0.0.114': + resolution: {integrity: sha512-SFXr16mgr6LvZAIj6L7i59HHg+prAmIF8VP/U3C6jSHz68Eh1G71vaWr9vlJVpy/j6bh1N8QUzu5CgtvIC92OQ==} + peerDependencies: + solid-js: ^1.6.12 '@solid-primitives/transition-group@1.1.2': resolution: {integrity: sha512-gnHS0OmcdjeoHN9n7Khu8KNrOlRc8a2weETDt2YT6o1zeW/XtUC6Db3Q9pkMU/9cCKdEmN4b0a/41MKAHRhzWA==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/utils@6.3.0': resolution: {integrity: sha512-e7hTlJ1Ywh2+g/Qug+n4L1mpfxsikoIS4/sHE2EK9WatQt8UJqop/vE6bsLnXlU1xuhb/jo94Ah5Y27rd4wP7A==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solid-primitives/utils@6.3.2': resolution: {integrity: sha512-hZ/M/qr25QOCcwDPOHtGjxTD8w2mNyVAYvcfgwzBHq2RwNqHNdDNsMZYap20+ruRwW4A3Cdkczyoz0TSxLCAPQ==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.12 '@solidjs/meta@0.29.4': resolution: {integrity: sha512-zdIWBGpR9zGx1p1bzIPqF5Gs+Ks/BH8R6fWhmUa/dcK1L2rUC8BAcZJzNRYBQv74kScf1TSOs0EY//Vd/I0V8g==} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.8.4' + + '@solidjs/signals@2.0.0-beta.25': + resolution: {integrity: sha512-Y4oSSCwt1rouvgz9LZxb3Wx2yLFMCjNhad/M2YZxOL4x7+sW6ST2BwI8ZP5vzEtyHUQX+5Pn5ltqkalaHjvlVA==} '@solidjs/testing-library@0.8.10': resolution: {integrity: sha512-qdeuIerwyq7oQTIrrKvV0aL9aFeuwTd86VYD3afdq5HYEwoox1OBTJy4y8A3TFZr8oAR0nujYgCzY/8wgHGfeQ==} engines: {node: '>= 14'} peerDependencies: '@solidjs/router': '>=0.9.0' - solid-js: 1.9.12 + solid-js: '>=1.0.0' peerDependenciesMeta: '@solidjs/router': optional: true + '@solidjs/web@2.0.0-beta.25': + resolution: {integrity: sha512-ZuEhEpTXyUU6ERDGuZkShM1VdDoL6ib02pClRNjJmWR3MC5nvPDVXVJxsiUq/xBBQGX5XkzuWIQbE0i51ZsfGA==} + peerDependencies: + solid-js: ^2.0.0-beta.25 + '@speed-highlight/core@1.2.14': resolution: {integrity: sha512-G4ewlBNhUtlLvrJTb88d2mdy2KRijzs4UhnlrOSRT4bmjh/IqNElZa3zkrZ+TC47TwtlDWzVLFADljF1Ijp5hA==} @@ -21462,11 +19501,6 @@ packages: '@supabase/supabase-js@2.48.1': resolution: {integrity: sha512-VMD+CYk/KxfwGbI4fqwSUVA7CLr1izXpqfFerhnYPSi6LEKD8GoR4kuO5Cc8a+N43LnfSQwLJu4kVm2e4etEmA==} - '@sveltejs/acorn-typescript@1.0.13': - resolution: {integrity: sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==} - peerDependencies: - acorn: ^8.9.0 - '@swc-node/core@1.14.1': resolution: {integrity: sha512-jrt5GUaZUU6cmMS+WTJEvGvaB6j1YNKPHPzC2PUi2BjaFbtxURHj6641Az6xN7b665hNniAIdvjxWcRml5yCnw==} engines: {node: '>= 10'} @@ -21576,6 +19610,9 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@swc/helpers@0.5.21': + resolution: {integrity: sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==} + '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} @@ -21585,69 +19622,36 @@ packages: '@tailwindcss/node@4.2.2': resolution: {integrity: sha512-pXS+wJ2gZpVXqFaUEjojq7jzMpTGf8rU6ipJz5ovJV6PUGmlJ+jvIwGrzdHdQ80Sg+wmQxUFuoW1UAAwHNEdFA==} - '@tailwindcss/node@4.3.1': - resolution: {integrity: sha512-6NDaqRoAMSXD1mr/RXu0HBvNE9a2n5tHPsxu9XHLws8o4Twes5rBM2205SUUiJ9goAtadrN6xTGX0UDEwp/N4A==} - '@tailwindcss/oxide-android-arm64@4.2.2': resolution: {integrity: sha512-dXGR1n+P3B6748jZO/SvHZq7qBOqqzQ+yFrXpoOWWALWndF9MoSKAT3Q0fYgAzYzGhxNYOoysRvYlpixRBBoDg==} engines: {node: '>= 20'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-android-arm64@4.3.1': - resolution: {integrity: sha512-SVlyf61g374l5cHyg8x9kf5xmLcOaxvOTsbsqDnSsDJaKOEFZ7GCvi84VAVGpxojYOs1+3K6M0UjXfqPU8vmOQ==} - engines: {node: '>= 20'} - cpu: [arm64] - os: [android] - '@tailwindcss/oxide-darwin-arm64@4.2.2': resolution: {integrity: sha512-iq9Qjr6knfMpZHj55/37ouZeykwbDqF21gPFtfnhCCKGDcPI/21FKC9XdMO/XyBM7qKORx6UIhGgg6jLl7BZlg==} engines: {node: '>= 20'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-arm64@4.3.1': - resolution: {integrity: sha512-hVnWLwv+e/l7c4WKyVtHVrIPvYdqWHjRB3MDIqARynzFtnQg85kmQEFCbV9Ja0VVx4xXTIiDWY60Y7iz/iNoDA==} - engines: {node: '>= 20'} - cpu: [arm64] - os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.2.2': resolution: {integrity: sha512-BlR+2c3nzc8f2G639LpL89YY4bdcIdUmiOOkv2GQv4/4M0vJlpXEa0JXNHhCHU7VWOKWT/CjqHdTP8aUuDJkuw==} engines: {node: '>= 20'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.3.1': - resolution: {integrity: sha512-Cf7abu0WVgbhU7ANgPUnSAvm7nCvMweusHb8FnaHlLfv/Caq4GYaEZg7ZImzzmjx4lIAfuS8q+eLIS7A7IzxIg==} - engines: {node: '>= 20'} - cpu: [x64] - os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.2.2': resolution: {integrity: sha512-YUqUgrGMSu2CDO82hzlQ5qSb5xmx3RUrke/QgnoEx7KvmRJHQuZHZmZTLSuuHwFf0DJPybFMXMYf+WJdxHy/nQ==} engines: {node: '>= 20'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-freebsd-x64@4.3.1': - resolution: {integrity: sha512-ZZqzX2Y+GXtXXfqSfpJhDm60OoZfvLHLCgm+J7NVqgHHJjG/m9ugZI77RwTsVd4fnBJuCFP6Ae6kTJb71UdS8g==} - engines: {node: '>= 20'} - cpu: [x64] - os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.2.2': resolution: {integrity: sha512-FPdhvsW6g06T9BWT0qTwiVZYE2WIFo2dY5aCSpjG/S/u1tby+wXoslXS0kl3/KXnULlLr1E3NPRRw0g7t2kgaQ==} engines: {node: '>= 20'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': - resolution: {integrity: sha512-/Ah/xik0LaMYfv9DZ0S/t4pBlBNYOcqtRwusjgovHkvT8ixueWCLyJjsaF5kQIckjb4IT8Q6K6p/iPmZMixYgg==} - engines: {node: '>= 20'} - cpu: [arm] - os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.2.2': resolution: {integrity: sha512-4og1V+ftEPXGttOO7eCmW7VICmzzJWgMx+QXAJRAhjrSjumCwWqMfkDrNu1LXEQzNAwz28NCUpucgQPrR4S2yw==} engines: {node: '>= 20'} @@ -21655,13 +19659,6 @@ packages: os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': - resolution: {integrity: sha512-gqdFoVJlw444GvpnheZLHmvTzSxI/cOUUh2KSNejQjTcYkW062SVD+En0rUgD+QV91bz1XGIGtt1HJd48xUGbQ==} - engines: {node: '>= 20'} - cpu: [arm64] - os: [linux] - libc: [glibc] - '@tailwindcss/oxide-linux-arm64-musl@4.2.2': resolution: {integrity: sha512-oCfG/mS+/+XRlwNjnsNLVwnMWYH7tn/kYPsNPh+JSOMlnt93mYNCKHYzylRhI51X+TbR+ufNhhKKzm6QkqX8ag==} engines: {node: '>= 20'} @@ -21669,13 +19666,6 @@ packages: os: [linux] libc: [musl] - '@tailwindcss/oxide-linux-arm64-musl@4.3.1': - resolution: {integrity: sha512-Bwv9KwOvE0VKa86xPFif9b9c3Y1NxOV1P0gLti/IYaWEsQYZXDlxfGEtA8mdDZ7SG3wyNXAWYT5SIn3giL57oA==} - engines: {node: '>= 20'} - cpu: [arm64] - os: [linux] - libc: [musl] - '@tailwindcss/oxide-linux-x64-gnu@4.2.2': resolution: {integrity: sha512-rTAGAkDgqbXHNp/xW0iugLVmX62wOp2PoE39BTCGKjv3Iocf6AFbRP/wZT/kuCxC9QBh9Pu8XPkv/zCZB2mcMg==} engines: {node: '>= 20'} @@ -21683,13 +19673,6 @@ packages: os: [linux] libc: [glibc] - '@tailwindcss/oxide-linux-x64-gnu@4.3.1': - resolution: {integrity: sha512-Ymi8O8T15HYQdOUWUtTI6ldN0neHP85FC+Qz32xTcZ7iJXtem/x8ITev0o1e9e5rkqj4lONZfTRLvkmin1+tKg==} - engines: {node: '>= 20'} - cpu: [x64] - os: [linux] - libc: [glibc] - '@tailwindcss/oxide-linux-x64-musl@4.2.2': resolution: {integrity: sha512-XW3t3qwbIwiSyRCggeO2zxe3KWaEbM0/kW9e8+0XpBgyKU4ATYzcVSMKteZJ1iukJ3HgHBjbg9P5YPRCVUxlnQ==} engines: {node: '>= 20'} @@ -21697,13 +19680,6 @@ packages: os: [linux] libc: [musl] - '@tailwindcss/oxide-linux-x64-musl@4.3.1': - resolution: {integrity: sha512-M+P/91qJ6uILLw4k2G93GMDRAXj61SMvFQYt39AqvUqYgExXpLL5aepfns7sj4HiAQeolirQF9E0lzRvdf4zPQ==} - engines: {node: '>= 20'} - cpu: [x64] - os: [linux] - libc: [musl] - '@tailwindcss/oxide-wasm32-wasi@4.2.2': resolution: {integrity: sha512-eKSztKsmEsn1O5lJ4ZAfyn41NfG7vzCg496YiGtMDV86jz1q/irhms5O0VrY6ZwTUkFy/EKG3RfWgxSI3VbZ8Q==} engines: {node: '>=14.0.0'} @@ -21716,68 +19692,29 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-wasm32-wasi@4.3.1': - resolution: {integrity: sha512-zsM8uOeqvVGHsAXsJxsT28ttosFahLJKCLOTUBqRAtKnVgGSRitds9T432QiT8b77Yga7JIBkulIRRlJPtYhRA==} - engines: {node: '>=14.0.0'} - cpu: [wasm32] - bundledDependencies: - - '@napi-rs/wasm-runtime' - - '@emnapi/core' - - '@emnapi/runtime' - - '@tybys/wasm-util' - - '@emnapi/wasi-threads' - - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.2.2': resolution: {integrity: sha512-qPmaQM4iKu5mxpsrWZMOZRgZv1tOZpUm+zdhhQP0VhJfyGGO3aUKdbh3gDZc/dPLQwW4eSqWGrrcWNBZWUWaXQ==} engines: {node: '>= 20'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': - resolution: {integrity: sha512-aiNvSq9BsVk8V513lDKlrCFAgf8qBMPZTpgEhInL+NwQqs97mYmupVMrPrgBBSL8Pv/0zXu9MrMF9rMun1ZeNg==} - engines: {node: '>= 20'} - cpu: [arm64] - os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.2.2': resolution: {integrity: sha512-1T/37VvI7WyH66b+vqHj/cLwnCxt7Qt3WFu5Q8hk65aOvlwAhs7rAp1VkulBJw/N4tMirXjVnylTR72uI0HGcA==} engines: {node: '>= 20'} cpu: [x64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.3.1': - resolution: {integrity: sha512-xDEyu1rg290472FEGaKHnzyDyh5QH+AlWvsU5hMoMtPpzmKlRI0jaYKCgSHDYtaQWZOYbMaduSyCwFwY4n1HmA==} - engines: {node: '>= 20'} - cpu: [x64] - os: [win32] - '@tailwindcss/oxide@4.2.2': resolution: {integrity: sha512-qEUA07+E5kehxYp9BVMpq9E8vnJuBHfJEC0vPC5e7iL/hw7HR61aDKoVoKzrG+QKp56vhNZe4qwkRmMC0zDLvg==} engines: {node: '>= 20'} - '@tailwindcss/oxide@4.3.1': - resolution: {integrity: sha512-yVPyo8RNkabVr3O2EhHEE0Rewu7YKzc1DhIqfL46LKveFrmu9XbDazNOJY7/GRuvw1h6u3utWnR29H/p5JPlgA==} - engines: {node: '>= 20'} - '@tailwindcss/postcss@4.2.2': resolution: {integrity: sha512-n4goKQbW8RVXIbNKRB/45LzyUqN451deQK0nzIeauVEqjlI49slUlgKYJM2QyUzap/PcpnS7kzSUmPb1sCRvYQ==} '@tailwindcss/vite@4.2.2': resolution: {integrity: sha512-mEiF5HO1QqCLXoNEfXVA1Tzo+cYsrqV7w9Juj2wdUFyW07JRenqMG225MvPwr3ZD9N1bFQj46X7r33iHxLUW0w==} peerDependencies: - vite: ^8.3.4 - - '@tailwindcss/webpack@4.3.1': - resolution: {integrity: sha512-HM33EjYPbkMlBGcYoVA/pk/hML3wAn2JOnjF79eDWVLuktOhRczDwWsSBQBOWV6LLBVAgGZS/pZ519OHUF8vKg==} - peerDependencies: - '@rspack/core': ^1.0.0 || ^2.0.0 - webpack: ^5.0.0 - peerDependenciesMeta: - '@rspack/core': - optional: true - webpack: - optional: true + vite: ^8.0.14 '@tanstack/devtools-client@0.0.4': resolution: {integrity: sha512-LefnH9KE9uRDEWifc3QDcooskA8ikfs41bybDTgpYQpyTUspZnaEdUdya9Hry0KYxZ8nos0S3nNbsP79KHqr6Q==} @@ -21799,25 +19736,25 @@ packages: resolution: {integrity: sha512-DU8OfLntngnph+Tb7ivQvh4F4w+rDu6r01fXlhjq/Nmgdr0gtsOox4kdmyq5rCs+C6aPgP3M7+BE+fv4dN+VvA==} engines: {node: '>=18'} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.9.7' '@tanstack/devtools-ui@0.4.4': resolution: {integrity: sha512-5xHXFyX3nom0UaNfiOM92o6ziaHjGo3mcSGe2HD5Xs8dWRZNpdZ0Smd0B9ddEhy0oB+gXyMzZgUJb9DmrZV0Mg==} engines: {node: '>=18'} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.9.7' '@tanstack/devtools@0.6.14': resolution: {integrity: sha512-dOtHoeLjjcHeNscu+ZEf89EFboQsy0ggb6pf8Sha59qBUeQbjUsaAvwP8Ogwg89oJxFQbTP7DKYNBNw5CxlNEA==} engines: {node: '>=18'} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.9.7' '@tanstack/devtools@0.8.1': resolution: {integrity: sha512-ZyKX+IJvMaTY0TywdA6r6kbD6V+0dxWQVDGC3jd2q4RP9OMHzpXd0cKreDvqOGrAPtEUXpGBxW0AtsaauDWurQ==} engines: {node: '>=18'} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.9.7' '@tanstack/eslint-config@0.3.2': resolution: {integrity: sha512-2g+PuGR3GuvvCiR3xZs+IMqAvnYU9bvH+jRml0BFBSxHBj22xFCTNvJWhvgj7uICFF9IchDkFUto91xDPMu5cg==} @@ -21833,8 +19770,11 @@ packages: resolution: {integrity: sha512-Wo1iKt2b9OT7d+YGhvEPD3DXvPv2etTusIMhMUoG7fbhmxcXCtIjJDEygy91Y2JFlwGyjqiBPRozme7UD8hoqg==} engines: {node: '>=12'} - '@tanstack/query-core@5.102.0': - resolution: {integrity: sha512-tvBzr11Q7StuMCEsIJdqX8TAWt6WZIzfw/yrSAjObZDerwTTPeCxeLXN2R8ZSn4ZxFpQV819Xn8QmoO+vtnDvw==} + '@tanstack/query-core@5.99.0': + resolution: {integrity: sha512-3Jv3WQG0BCcH7G+7lf/bP8QyBfJOXeY+T08Rin3GZ1bshvwlbPt7NrDHMEzGdKIOmOzvIQmxjk28YEQX60k7pQ==} + + '@tanstack/query-devtools@5.101.0': + resolution: {integrity: sha512-MVqw17k08RQtGGLEL654+dX/btbX9p/8WjkznO//zusLTMaObxi3Q+MoFwGVkC9K3tqjn8qrrNhJevXx4fJTeQ==} '@tanstack/query-devtools@5.67.2': resolution: {integrity: sha512-O4QXFFd7xqp6EX7sdvc9tsVO8nm4lpWBqwpgjpVLW5g7IeOY6VnS/xvs/YzbRhBVkKTMaJMOUGU7NhSX+YGoNg==} @@ -21851,62 +19791,62 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@tanstack/react-query-devtools@5.67.2': resolution: {integrity: sha512-cmj2DxBc+/9btQ66n5xI8wTtAma2BLVa403K7zIYiguzJ/kV201jnGensYqJeu1Rd8uRMLLRM74jLVMLDWNRJA==} peerDependencies: - '@tanstack/react-query': ^5.102.0 - react: ~19.2.9 + '@tanstack/react-query': ^5.99.0 + react: ^19.2.3 '@tanstack/react-query-devtools@5.90.2': resolution: {integrity: sha512-vAXJzZuBXtCQtrY3F/yUNJCV4obT/A/n81kb3+YqLbro5Z2+phdAbceO+deU3ywPw8B42oyJlp4FhO0SoivDFQ==} peerDependencies: - '@tanstack/react-query': ^5.102.0 - react: ~19.2.9 + '@tanstack/react-query': ^5.99.0 + react: ^19.2.3 - '@tanstack/react-query@5.102.0': - resolution: {integrity: sha512-0GyVyEcGt9M7jHPCua16hNVtstUXE2R4HsnNubFYcDs7DJaLzh1dSiXsADDU/cNn/SqrLfa0vRKyjUmbx4rZLA==} + '@tanstack/react-query@5.99.0': + resolution: {integrity: sha512-OY2bCqPemT1LlqJ8Y2CUau4KELnIhhG9Ol3ZndPbdnB095pRbPo1cHuXTndg8iIwtoHTgwZjyaDnQ0xD0mYwAw==} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 - '@tanstack/react-store@0.11.2': - resolution: {integrity: sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ==} + '@tanstack/react-store@0.9.3': + resolution: {integrity: sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@tanstack/react-virtual@3.13.0': resolution: {integrity: sha512-CchF0NlLIowiM2GxtsoKBkXA4uqSnY2KvnXo+kyUFD4a4ll6+J0qzoRsUPMwXV/H26lRsxgJIr/YmjYum2oEjg==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@tanstack/solid-devtools@0.7.14': resolution: {integrity: sha512-hyaB29d1fU2n9v2XeFEB6t2k5gKionK8mxxb9MNtF7qJheZ6z9259jU8OsBdA/f6v2oYck1K1Ia9+ooJsdy4jg==} engines: {node: '>=18'} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=1.9.7' - '@tanstack/solid-query-devtools@5.90.4': - resolution: {integrity: sha512-ygyAiXZ+NR1tw33jVibpjiWB1IoAQWCeqSLmO/6PoSWrI9yDTwaPNAXheniEMrO6/a/vTQq2tB4N+FPNjhGaNw==} + '@tanstack/solid-query-devtools@6.0.0-beta.5': + resolution: {integrity: sha512-AXTqg/tr3KcxW1KUTwK0EZ7nvrB9AGT1JB4/duy0JkOfPOl16Tb0WOOEcjnkYDHKnDIFUVFqjSXHhzh8W076vg==} peerDependencies: - '@tanstack/solid-query': ^5.102.0 - solid-js: 1.9.12 + '@tanstack/solid-query': ^6.0.0-beta.5 + solid-js: '>=2.0.0-beta.0 <3.0.0' - '@tanstack/solid-query@5.102.0': - resolution: {integrity: sha512-76mXTuap9xt/l+nHBTT2/EZhw+0dDMDdi5shFuR8lASuNEvDapMGYHIrmD27Tw5WUNPLRYMMoakVtujpJPLj4Q==} + '@tanstack/solid-query@6.0.0-beta.5': + resolution: {integrity: sha512-vKVLgo9yfVnQYGvLAsZ2qro+dzQJSftyBVxRrd198/fDjq+mwpAR/bEWWq1FZFsfHMIXfBrvZ5IQAYcwbWmbgA==} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=2.0.0-beta.0 <3.0.0' '@tanstack/solid-virtual@3.13.12': resolution: {integrity: sha512-0dS8GkBTmbuM9cUR6Jni0a45eJbd32CAEbZj8HrZMWIj3lu974NpGz5ywcomOGJ9GdeHuDaRzlwtonBbKV1ihQ==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.3.0 - '@tanstack/store@0.11.2': - resolution: {integrity: sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q==} + '@tanstack/store@0.9.3': + resolution: {integrity: sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==} '@tanstack/virtual-core@3.13.0': resolution: {integrity: sha512-NBKJP3OIdmZY3COJdWkSonr50FMVIi+aj5ZJ7hI/DTpEKg2RMfo/KvP8A3B/zOSpMgIe52B5E2yn7rryULzA6g==} @@ -21921,22 +19861,22 @@ packages: resolution: {integrity: sha512-cTswDmoTn5UZA5pV2z/IWhGYgb8NS0zPRYYLv5q9JxHY4WxL/l/Riy6Aq76QttH8w6IHAIO/ZGwHBfF/OV0Kcw==} engines: {node: '>=18'} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 '@tanstack/vue-query-devtools@5.91.0': resolution: {integrity: sha512-Kn6p5ffEKUj+YGEP+BapoPI8kUiPtNnFDyzjTvUx6GHbyfzfefQPhYoRtFiWeyrGHjUB/Mvtnr7Rosbzs/ngVg==} peerDependencies: - '@tanstack/vue-query': ^5.102.0 + '@tanstack/vue-query': ^5.99.0 vue: ^3.3.0 '@tanstack/vue-query-devtools@6.1.2': resolution: {integrity: sha512-1E886RHorY432aOJU3dyzLbI67PhqQzvAPQyp8hU6UR4EVXKZSVzVT0O0utmTT2jnBpbbUiCFt2uNSs8W3grHw==} peerDependencies: - '@tanstack/vue-query': ^5.102.0 + '@tanstack/vue-query': ^5.99.0 vue: ^3.3.0 - '@tanstack/vue-query@5.102.0': - resolution: {integrity: sha512-etqK2+b1pvilfdmcKl5Be+A5vHe8OY2dQoBx1VbhGqN8bMZ4g1+prP91cYr92Q+0KGbPf3F7lTeBhhPMZfpXUQ==} + '@tanstack/vue-query@5.99.0': + resolution: {integrity: sha512-okrHNkouasL5cjo7O8hUxul22DiIL335KUQus/cfoAdCOUytF/OIv3BpNDevfqE6zHqqJ651Fb9OkUJPUCL0ZQ==} peerDependencies: '@vue/composition-api': ^1.1.2 vue: ^2.6.0 || ^3.3.0 @@ -21944,8 +19884,8 @@ packages: '@vue/composition-api': optional: true - '@tanstack/vue-store@0.11.2': - resolution: {integrity: sha512-wZmkfsvc0dNvOg/Xb/a7uTPKejleI0dR3HHi0t3ZyVM/23MJ7AC0bH6C7rp2seSY4mIYo0pLLbGJGZ/UpO93Zw==} + '@tanstack/vue-store@0.9.3': + resolution: {integrity: sha512-YZb5SAR3f2kLt58Ip6gig2+z8vRAfSkJK30Bq7enZ7cG4epyygmRsbrrDMxvmoYSJu33CY5uJ6MvI74KGP0ZvQ==} peerDependencies: '@vue/composition-api': ^1.2.1 vue: ^2.5.0 || ^3.0.0 @@ -21970,16 +19910,6 @@ packages: resolution: {integrity: sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} - '@testing-library/jest-dom@7.0.1': - resolution: {integrity: sha512-oMDTC3oA+6CXSO2JZnvOI7CA6oVub6kij5ggk9ohwye5slmkwxYDXcPOVxgMw/RQlticjtO0C1RZkR97HgrWMw==} - engines: {node: '>=22', npm: '>=6', yarn: '>=1'} - peerDependencies: - '@testing-library/dom': '>=10 <11' - vitest: '>= 0.32' - peerDependenciesMeta: - vitest: - optional: true - '@testing-library/react@16.2.0': resolution: {integrity: sha512-2cSskAvA1QNtKc8Y9VJQRv0tm3hLVgxRGDB+KYhIaPQJ1I+RHbhIXcM+zClKXzMes/wshsMVzf4B9vS4IZpqDQ==} engines: {node: '>=18'} @@ -21987,8 +19917,8 @@ packages: '@testing-library/dom': ^10.0.0 '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -22002,8 +19932,8 @@ packages: '@testing-library/dom': ^10.0.0 '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -22034,13 +19964,16 @@ packages: '@trpc/tanstack-react-query@11.4.3': resolution: {integrity: sha512-aYPp12wE9IrakccGWoQU/waZuWr3FLw9RtagsqJmX9NKHpQOVzoDvHA1W0amwyTQSAfL98Bn5rWmD7KTdr5AWg==} peerDependencies: - '@tanstack/react-query': ^5.102.0 + '@tanstack/react-query': ^5.99.0 '@trpc/client': 11.4.3 '@trpc/server': 11.4.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 typescript: '>=5.7.2' + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} + '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} @@ -22104,9 +20037,6 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/estree@1.0.9': - resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@types/express-serve-static-core@4.19.6': resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} @@ -22180,6 +20110,9 @@ packages: '@types/react@19.2.9': resolution: {integrity: sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==} + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@types/retry@0.12.2': resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} @@ -22195,18 +20128,12 @@ packages: '@types/serve-static@2.2.0': resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==} - '@types/set-cookie-parser@2.4.10': - resolution: {integrity: sha512-GGmQVGpQWUe5qglJozEjZV/5dyxbOOZ0LHe/lqyWssB88Y4svNfst0uqBVscdDeIKl5Jy5+aPSvy7mI9tYRguw==} - '@types/sockjs@0.3.36': resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} '@types/statuses@2.0.5': resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} - '@types/statuses@2.0.6': - resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} - '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} @@ -22216,6 +20143,15 @@ packages: '@types/ws@8.5.14': resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.33': + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + '@typescript-eslint/eslint-plugin@8.44.1': resolution: {integrity: sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -22317,6 +20253,13 @@ packages: peerDependencies: typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/type-utils@8.23.0': + resolution: {integrity: sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.22.0 + typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/type-utils@8.44.1': resolution: {integrity: sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -22415,130 +20358,6 @@ packages: resolution: {integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - '@typescript/typescript6@6.0.2': - resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==} - hasBin: true - '@unrs/resolver-binding-android-arm-eabi@1.11.1': resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} cpu: [arm] @@ -22642,31 +20461,54 @@ packages: cpu: [x64] os: [win32] - '@vercel/nft@1.3.1': - resolution: {integrity: sha512-ihNT1rswiq3cy4WKQAV5kJi6UjWX1vLUzlLc+Vvq83G8CU9nMgfDWz5f1tOnSlS8LeC4Wp4qTB3+HGj/ccUrFQ==} + '@vercel/nft@0.29.4': + resolution: {integrity: sha512-6lLqMNX3TuycBPABycx7A9F1bHQR7kiQln6abjFbPrf5C/05qHM9M5E4PeTE59c7z8g6vHnx1Ioihb2AQl7BTA==} + engines: {node: '>=18'} + hasBin: true + + '@vercel/nft@1.3.0': + resolution: {integrity: sha512-i4EYGkCsIjzu4vorDUbqglZc5eFtQI2syHb++9ZUDm6TU4edVywGpVnYDein35x9sevONOn9/UabfQXuNXtuzQ==} engines: {node: '>=20'} hasBin: true + '@vitejs/plugin-react@4.3.4': + resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^8.0.14 + + '@vitejs/plugin-react@4.6.0': + resolution: {integrity: sha512-5Kgff+m8e2PB+9j51eGHEpn5kUzRKH2Ry0qGoe8ItJg7pqnkPrYPkDQZGgGmTa0EGarHrkjLvOdU3b1fzI8otQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^8.0.14 + + '@vitejs/plugin-react@4.7.0': + resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^8.0.14 + '@vitejs/plugin-react@6.0.1': resolution: {integrity: sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 babel-plugin-react-compiler: ^1.0.0 - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: '@rolldown/plugin-babel': optional: true babel-plugin-react-compiler: optional: true - '@vitejs/plugin-rsc@0.5.39': - resolution: {integrity: sha512-hRa6CK119r1NkwgPWlPRiDP8e4rELCsIZwjGmQK0sOnayAkYPBkyJMip0GhYEt2ukBZaO0Uw3ICHHO9T692OFw==} + '@vitejs/plugin-rsc@0.5.20': + resolution: {integrity: sha512-JHPqfR8SSE2oNzCDRoyzEpbgxCxDks0PJAlo0KpK+OldYUxvozHroYpn0QtSdbZWq9YQ/ok1JUJ3GMc1xOmN0g==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 react-server-dom-webpack: '*' - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: react-server-dom-webpack: optional: true @@ -22675,23 +20517,28 @@ packages: resolution: {integrity: sha512-DSTrmrdLp+0LDNF77fqrKfx7X0ErRbOcUAgJL/HbSesqQwoUvUQ4uYQqaex+rovqgGcoPqVk+AwUh3v9CuiYIw==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 vue: ^3.0.0 '@vitejs/plugin-vue-jsx@5.1.5': resolution: {integrity: sha512-jIAsvHOEtWpslLOI2MeElGFxH7M8pM83BU/Tor4RLyiwH0FM4nUW3xdvbw20EeU9wc5IspQwMq225K3CMnJEpA==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 vue: ^3.0.0 '@vitejs/plugin-vue@6.0.5': resolution: {integrity: sha512-bL3AxKuQySfk1iGcBsQnoRVexTPJq0Z/ixFVM8OhVJAP6ZXXXLtM7NFKWhLl30Kg7uTBqIaPXbh+nuQCuBDedg==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 vue: ^3.2.25 + '@vitest/browser@4.1.4': + resolution: {integrity: sha512-TrNaY/yVOwxtrxNsDUC/wQ56xSwplpytTeRAqF/197xV/ZddxxulBsxR6TrhVMyniJmp9in8d5u0AcDaNRY30w==} + peerDependencies: + vitest: 4.1.4 + '@vitest/expect@4.1.4': resolution: {integrity: sha512-iPBpra+VDuXmBFI3FMKHSFXp3Gx5HfmSCE8X67Dn+bwephCnQCaB7qWK2ldHa+8ncN8hJU8VTMcxjPpyMkUjww==} @@ -22699,18 +20546,7 @@ packages: resolution: {integrity: sha512-R9HTZBhW6yCSGbGQnDnH3QHfJxokKN4KB+Yvk9Q1le7eQNYwiCyKxmLmurSpFy6BzJanSLuEUDrD+j97Q+ZLPg==} peerDependencies: msw: ^2.4.9 - vite: ^8.3.4 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - - '@vitest/mocker@5.0.4': - resolution: {integrity: sha512-tqAlrYWce4iUxhr3ncNohejtCTOcHeE8XWrSNZY3OhPoDn01yeGv+gnaBy64ATp7o6pb03eIbBAjzmibpc9vIQ==} - peerDependencies: - msw: ^2.4.9 || ^3.0.0 - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: msw: optional: true @@ -22720,9 +20556,6 @@ packages: '@vitest/pretty-format@4.1.4': resolution: {integrity: sha512-ddmDHU0gjEUyEVLxtZa7xamrpIefdEETu3nZjWtHeZX4QxqJ7tRxSteHVXJOcr8jhiLoGAhkK4WJ3WqBpjx42A==} - '@vitest/pretty-format@5.0.4': - resolution: {integrity: sha512-kh/bp0oLr6w18kt4MFn5/zS+Hpc5k3bsf6S2m2Qksj7sKHrnc7Tu90UVYyiXnRvkYruN6kSCHQ3RR+SBE6FinA==} - '@vitest/runner@4.1.4': resolution: {integrity: sha512-xTp7VZ5aXP5ZJrn15UtJUWlx6qXLnGtF6jNxHepdPHpMfz/aVPx+htHtgcAL2mDXJgKhpoo2e9/hVJsIeFbytQ==} @@ -22732,52 +20565,31 @@ packages: '@vitest/spy@4.1.4': resolution: {integrity: sha512-XxNdAsKW7C+FLydqFJLb5KhJtl3PGCMmYwFRfhvIgxJvLSXhhVI1zM8f1qD3Zg7RCjTSzDVyct6sghs9UEgBEQ==} - '@vitest/spy@5.0.4': - resolution: {integrity: sha512-MZKk/gSkm2q+ICobMxCpH1mA+cCAWm8WV7UhxlqGjq/sJ3AGc1BqFOs5CRVXxH78wQtme9q/NAAgBquj4AcyMw==} - '@vitest/ui@4.1.4': resolution: {integrity: sha512-EgFR7nlj5iTDYZYCvavjFokNYwr3c3ry0sFiCg+N7B233Nwp+NNx7eoF/XvMWDCKY71xXAG3kFkt97ZHBJVL8A==} peerDependencies: vitest: 4.1.4 - '@vitest/ui@5.0.4': - resolution: {integrity: sha512-L40ToOGwFgeZ+JVPMKHb7T0b671mqcmCpMUh9P68xq9YZ+TXM72rkDf9ljuv02e5Y1zj8ww0CnWIUnqs3FEWKQ==} - peerDependencies: - vitest: 5.0.4 - '@vitest/utils@4.1.4': resolution: {integrity: sha512-13QMT+eysM5uVGa1rG4kegGYNp6cnQcsTc67ELFbhNLQO+vgsygtYJx2khvdt4gVQqSSpC/KT5FZZxUpP3Oatw==} - '@vitest/utils@5.0.4': - resolution: {integrity: sha512-hgpnyMuMqCz2PARmk3v62FxUr8jHIkY13ygvUeh8s+dmQxfnvkB/sgtoZFzG4lMitnEdnrg/lCvDbtVzuAsGWQ==} + '@volar/language-core@2.4.23': + resolution: {integrity: sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==} '@volar/language-core@2.4.26': resolution: {integrity: sha512-hH0SMitMxnB43OZpyF1IFPS9bgb2I3bpCh76m2WEK7BE0A0EzpYsRp0CCH2xNKshr7kacU5TQBLYn4zj7CG60A==} - '@volar/language-core@2.4.28': - resolution: {integrity: sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==} + '@volar/source-map@2.4.23': + resolution: {integrity: sha512-Z1Uc8IB57Lm6k7q6KIDu/p+JWtf3xsXJqAX/5r18hYOTpJyBn0KXUR8oTJ4WFYOcDzWC9n3IflGgHowx6U6z9Q==} '@volar/source-map@2.4.26': resolution: {integrity: sha512-JJw0Tt/kSFsIRmgTQF4JSt81AUSI1aEye5Zl65EeZ8H35JHnTvFGmpDOBn5iOxd48fyGE+ZvZBp5FcgAy/1Qhw==} - '@volar/source-map@2.4.28': - resolution: {integrity: sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==} + '@volar/typescript@2.4.23': + resolution: {integrity: sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==} '@volar/typescript@2.4.26': resolution: {integrity: sha512-N87ecLD48Sp6zV9zID/5yuS1+5foj0DfuYGdQ6KHj/IbKvyKv1zNX6VCmnKYwtmHadEO6mFc2EKISiu3RDPAvA==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@volar/typescript@2.4.28': - resolution: {integrity: sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true '@vue/babel-helper-vue-transform-on@1.5.0': resolution: {integrity: sha512-0dAYkerNhhHutHZ34JtTl2czVQHUNWv6xEbkdF5W+Yrv5pCWsqjeORdOgbtW2I9gWlt+wBmVn+ttqN9ZxR5tzA==} @@ -22837,8 +20649,21 @@ packages: typescript: optional: true - '@vue/language-core@3.3.8': - resolution: {integrity: sha512-ieGT8jJdhhy0mGzStZhsg/qPw5bQZJg5yF+3+XU6saf4sM7yo9ZXy3h+nCwrm2+b4qS/SypkNdR2jAF3uei9tA==} + '@vue/language-core@3.1.5': + resolution: {integrity: sha512-FMcqyzWN+sYBeqRMWPGT2QY0mUasZMVIuHvmb5NT3eeqPrbHBYtCP8JWEUCDCgM+Zr62uuWY/qoeBrPrzfa78w==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/language-core@3.1.8': + resolution: {integrity: sha512-PfwAW7BLopqaJbneChNL6cUOTL3GL+0l8paYP5shhgY5toBNidWnMXWM+qDwL7MC9+zDtzCF2enT8r6VPu64iw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true '@vue/reactivity@3.5.25': resolution: {integrity: sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==} @@ -22934,20 +20759,20 @@ packages: resolution: {integrity: sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw==} engines: {node: '>=18.0.0'} - '@whatwg-node/fetch@0.10.13': - resolution: {integrity: sha512-b4PhJ+zYj4357zwk4TTuF2nEe0vVtOrwdsrNo5hL+u1ojXNhh1FgJ6pg1jzDlwlT4oBdzfSwaBwMCtFCsIWg8Q==} + '@whatwg-node/fetch@0.10.11': + resolution: {integrity: sha512-eR8SYtf9Nem1Tnl0IWrY33qJ5wCtIWlt3Fs3c6V4aAaTFLtkEQErXu3SSZg/XCHrj9hXSJ8/8t+CdMk5Qec/ZA==} engines: {node: '>=18.0.0'} - '@whatwg-node/node-fetch@0.8.6': - resolution: {integrity: sha512-BDMdYFcerLQkwA2RTldxOqRCs6ZQD1S7UgP3pUdGUkcbgTrP/V5ko77ZkCww9DHmC4lpoYuwigGfQYj285gMvA==} + '@whatwg-node/node-fetch@0.8.1': + resolution: {integrity: sha512-cQmQEo7IsI0EPX9VrwygXVzrVlX43Jb7/DBZSmpnC7xH4xkyOnn/HykHpTaQk7TUs7zh59A5uTGqx3p2Ouzffw==} engines: {node: '>=18.0.0'} '@whatwg-node/promise-helpers@1.3.2': resolution: {integrity: sha512-Nst5JdK47VIl9UcGwtv2Rcgyn5lWtZ0/mhRQ4G8NN2isxpq2TO30iqHzmwoJycjWuyUfg3GFXqP/gFHXeV57IA==} engines: {node: '>=16.0.0'} - '@whatwg-node/server@0.11.0': - resolution: {integrity: sha512-VSdkwnJRr8Yv9UgB2aXB3VUPWwd6Oqnn0hycFwhg9pZgWxJXb7JmhsiXe9tmpMwjHFxli12PGcz9aI63YYloGQ==} + '@whatwg-node/server@0.10.13': + resolution: {integrity: sha512-Otmxo+0mp8az3B48pLI1I4msNOXPIoP7TLm6h5wOEQmynqHt8oP9nR6NJUeJk6iI5OtFpQtkbJFwfGkmplvc3Q==} engines: {node: '>=18.0.0'} '@workos-inc/node@8.0.0': @@ -22964,8 +20789,8 @@ packages: peerDependencies: '@tanstack/react-router': workspace:* '@tanstack/react-start': workspace:* - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@xtuc/ieee754@1.2.0': resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -23008,6 +20833,12 @@ packages: peerDependencies: acorn: ^8 + acorn-import-phases@1.0.4: + resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==} + engines: {node: '>=10.13.0'} + peerDependencies: + acorn: ^8.14.0 + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -23023,11 +20854,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.18.0: - resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} - engines: {node: '>=0.4.0'} - hasBin: true - agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -23090,8 +20916,8 @@ packages: ajv@8.18.0: resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} - alien-signals@3.2.1: - resolution: {integrity: sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==} + alien-signals@3.1.1: + resolution: {integrity: sha512-ogkIWbVrLwKtHY6oOAXaYkAxP+cTH7V5FZ5+Tm4NZFd8VDZ6uNMDrfzqctTZ42eTMCSR3ne3otpcxmqSnFfPYA==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -23107,6 +20933,7 @@ packages: ansi-html-community@0.0.8: resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} + engines: {'0': node >= 0.8.0} hasBin: true ansi-regex@5.0.1: @@ -23129,8 +20956,8 @@ packages: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} - ansis@4.3.1: - resolution: {integrity: sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA==} + ansis@4.1.0: + resolution: {integrity: sha512-BGcItUBWSMRgOCe+SVZJ+S7yTRG0eGt9cXAHev72yuGcY23hnLA7Bky5L/xLyPINoSN95geovfBkqoTlNZYa7w==} engines: {node: '>=14'} any-promise@1.3.0: @@ -23140,9 +20967,13 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - archiver@8.0.0: - resolution: {integrity: sha512-fV1orZfsnPn9BaSByR/qE67rJCLJEy2Ox5bq7nJh+jquWaNh6Sfec75kJ2T6PtdGUbPQlrVoSVCEOa5SdiTQ1g==} - engines: {node: '>=18'} + archiver-utils@5.0.2: + resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} + engines: {node: '>= 14'} + + archiver@7.0.1: + resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} + engines: {node: '>= 14'} argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -23205,9 +21036,6 @@ packages: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} - atomically@2.1.1: - resolution: {integrity: sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==} - autocannon@8.0.0: resolution: {integrity: sha512-fMMcWc2JPFcUaqHeR6+PbmEpTxCrPZyBUM95oG4w3ngJ8NfBNas/ZXA+pTHXLqJ0UlFVTcy05GC25WxKx/M20A==} hasBin: true @@ -23223,8 +21051,11 @@ packages: resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} engines: {node: '>= 6.0.0'} - axios@1.18.1: - resolution: {integrity: sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==} + axios@1.16.0: + resolution: {integrity: sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==} + + axios@1.17.0: + resolution: {integrity: sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==} b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} @@ -23248,9 +21079,6 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} - babel-plugin-react-compiler@1.0.0: - resolution: {integrity: sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==} - babel-plugin-vue-jsx-hmr@1.0.0: resolution: {integrity: sha512-XRq+XTD4bub6HkavELMhihvLX2++JkSBAxRXlqQK32b+Tb0S9PEqxrDSMpOEZ1iGyOaJZj9Y0uU/FzICdyL9MA==} @@ -23258,7 +21086,16 @@ packages: resolution: {integrity: sha512-HCelrgua/Y+kqO8RyL04JBWS/cVdrtUv/h45GntgQY+cJl4eBcKkCDV3TdMjtKx1nXwRaR9QXslM/Npm1dxdZQ==} peerDependencies: '@babel/core': ^7.0.0 - solid-js: 1.9.12 + solid-js: ^1.9.10 + peerDependenciesMeta: + solid-js: + optional: true + + babel-preset-solid@2.0.0-beta.25: + resolution: {integrity: sha512-84U7dFD/zCS9SfSBNuy2GY4GhMYx5TynTAl133aVngnI3Au26NhCm3lJ7qpjTY7W+jcgCpBJ5ZfCm/KKB8k0og==} + peerDependencies: + '@babel/core': ^7.0.0 + solid-js: ^2.0.0-beta.25 peerDependenciesMeta: solid-js: optional: true @@ -23270,9 +21107,8 @@ packages: resolution: {integrity: sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==} engines: {node: 20 || >=22} - balanced-match@4.0.4: - resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} - engines: {node: 18 || 20 || >=22} + bare-events@2.5.4: + resolution: {integrity: sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==} bare-events@2.9.1: resolution: {integrity: sha512-Z0oHEHAFDZkffN8Qc39zNZjQlMDkPJRyyyZieU1VH7u8c5S+qHZ2S8ixdKIAxEjfHO7FJxXmJWgteOghVanIsg==} @@ -23318,9 +21154,8 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - baseline-browser-mapping@2.11.23: - resolution: {integrity: sha512-le521dGVfxM7yRX0EikCoSz+rOK+hHzdDt/E7mG1jOJB/6WAAUuwVroLwaB7ApaUsz5Q0kFlDXLSA9MheUIfRQ==} - engines: {node: '>=6.0.0'} + baseline-browser-mapping@2.9.8: + resolution: {integrity: sha512-Y1fOuNDowLfgKOypdc9SPABfoWXuZHBOyCS4cD52IeZBhr4Md6CLLs6atcxVrzRmQ06E7hSlm5bHHApPKR/byA==} hasBin: true batch@0.6.1: @@ -23348,9 +21183,9 @@ packages: next: ^14.0.0 || ^15.0.0 || ^16.0.0 pg: ^8.0.0 prisma: ^5.0.0 || ^6.0.0 || ^7.0.0 - react: ~19.2.9 - react-dom: ~19.2.9 - solid-js: 1.9.12 + react: ^19.2.3 + react-dom: ^19.2.3 + solid-js: ^1.0.0 svelte: ^4.0.0 || ^5.0.0 vitest: ^2.0.0 || ^3.0.0 || ^4.0.0 vue: ^3.0.0 @@ -23409,9 +21244,6 @@ packages: bidi-js@1.0.3: resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} - big.js@5.2.2: - resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} - binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -23448,13 +21280,9 @@ packages: brace-expansion@2.1.1: resolution: {integrity: sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==} - brace-expansion@5.0.12: - resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} - engines: {node: 20 || >=22} - - brace-expansion@5.0.9: - resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==} - engines: {node: 20 || >=22} + brace-expansion@5.0.6: + resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} + engines: {node: 18 || 20 || >=22} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -23470,6 +21298,9 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + buffer-crc32@1.0.0: resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} engines: {node: '>=8.0.0'} @@ -23511,9 +21342,13 @@ packages: magicast: optional: true - cac@7.1.0: - resolution: {integrity: sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA==} - engines: {node: '>=20.19.0'} + c12@3.3.3: + resolution: {integrity: sha512-750hTRvgBy5kcMNPdh95Qo+XUBeGo8C7nsKSmedDmaQI+E0r82DwHeM6vBewDe4rGFbnxoa4V9pw+sPh5+Iz8Q==} + peerDependencies: + magicast: '*' + peerDependenciesMeta: + magicast: + optional: true call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} @@ -23543,13 +21378,8 @@ packages: caniuse-lite@1.0.30001760: resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==} - cf@1.0.0-beta.28: - resolution: {integrity: sha512-sMt4G50Mvz0+wvp6ScckPmmJSrEtfN3BeYJbtJ9yN5wAgECgFUGy0twoup1KySG9Md4Ow4ifSkllPLBFQV9ePw==} - engines: {node: ^22.23.0 || ^24.22.0 || ^26.12.0} - hasBin: true - - chai@6.3.0: - resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} chalk@3.0.0: @@ -23564,10 +21394,6 @@ packages: resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - chalk@6.0.0: - resolution: {integrity: sha512-2uNTXIuTTxk7ciZgAU1BQcgnchcG0xXnrs6jzkQfj9SsRa9M2s5zE8WT96hS6KmG4MzWHSrvH43DF1m4XRkrFg==} - engines: {node: '>=22'} - char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -23611,15 +21437,9 @@ packages: citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} - citty@0.2.2: - resolution: {integrity: sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w==} - cjs-module-lexer@1.4.3: resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} - cjs-module-lexer@2.2.1: - resolution: {integrity: sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==} - classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} @@ -23640,10 +21460,6 @@ packages: resolution: {integrity: sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==} engines: {node: '>=6'} - cli-spinners@2.9.2: - resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} - engines: {node: '>=6'} - cli-table3@0.6.5: resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} engines: {node: 10.* || >= 12.*} @@ -23652,8 +21468,9 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} - client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + clipboardy@4.0.0: + resolution: {integrity: sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==} + engines: {node: '>=18'} cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} @@ -23674,8 +21491,8 @@ packages: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} - cluster-key-slot@1.1.1: - resolution: {integrity: sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==} + cluster-key-slot@1.1.2: + resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==} engines: {node: '>=0.10.0'} color-convert@2.0.1: @@ -23708,9 +21525,6 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - colorjs.io@0.7.1: - resolution: {integrity: sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA==} - combinate@1.1.11: resolution: {integrity: sha512-+2MNAQ29HtNejOxkgaTQPC2Bm+pQvFuqf7o18uObl/Bx3daX06kjLUNY/qa9f+YSqzqm/ic3SdrlfN0fvTlw2g==} @@ -23752,12 +21566,18 @@ packages: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compare-versions@6.1.1: resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} - compress-commons@7.0.1: - resolution: {integrity: sha512-g0S8KAD8qf4+V//pr3BfB1aBnARLXNz2Gx+jmHU0LEriUuoQUOPOulVquHKTJ8+EAIIO7fhseNDr9wK5Q9FKBQ==} - engines: {node: '>=18'} + compatx@0.2.0: + resolution: {integrity: sha512-6gLRNt4ygsi5NyMVhceOCFv14CIdDFN7fQjX1U4+47qVE/+kjPoXMK65KWK+dWxmFzMTuKazoQ9sch6pM0p5oA==} + + compress-commons@6.0.2: + resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} + engines: {node: '>= 14'} compressible@2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} @@ -23833,7 +21653,7 @@ packages: '@standard-schema/spec': ^1.0.0 convex: ^1.24.0 hono: ^4.0.5 - react: ~19.2.9 + react: ^19.2.3 typescript: ^5.5 zod: ^3.22.4 || ^4.0.15 peerDependenciesMeta: @@ -23852,7 +21672,7 @@ packages: resolution: {integrity: sha512-DCKgtE1rzLUe2x3M7CzjFnN8q4e2ig7d/eudMkjyQOWzMyj19v52AL3JxKH1zpCxGFszQANygQvAltr9R99bfw==} engines: {node: '>=18', pnpm: '>=9.0.0'} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.6.0 convex@1.19.0: resolution: {integrity: sha512-TcglkEi392oK0Ah+zDoetFCRFXBM/lvCewi6AWfIgVCtVc9I/xdimdFOLN602V5wp7H4PN8wotpdIoixwSH7mQ==} @@ -23861,8 +21681,8 @@ packages: peerDependencies: '@auth0/auth0-react': ^2.0.1 '@clerk/clerk-react': ^4.12.8 || ^5.0.0 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@auth0/auth0-react': optional: true @@ -23880,7 +21700,7 @@ packages: peerDependencies: '@auth0/auth0-react': ^2.0.1 '@clerk/clerk-react': ^4.12.8 || ^5.0.0 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@auth0/auth0-react': optional: true @@ -23889,8 +21709,11 @@ packages: react: optional: true - cookie-es@1.2.3: - resolution: {integrity: sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==} + cookie-es@1.2.2: + resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} + + cookie-es@2.0.0: + resolution: {integrity: sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==} cookie-es@3.1.1: resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==} @@ -23910,14 +21733,6 @@ packages: resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} engines: {node: '>=18'} - cookie@1.1.1: - resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} - engines: {node: '>=18'} - - cookie@2.0.1: - resolution: {integrity: sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w==} - engines: {node: '>=22'} - copy-file@11.1.0: resolution: {integrity: sha512-X8XDzyvYaA6msMyAM575CUoygY5b44QzLcGRKsK3MFmXcOvQa518dNPLsKYwkYsn72g3EiW+LE0ytd/FlqWmyw==} engines: {node: '>=18'} @@ -23943,13 +21758,17 @@ packages: engines: {node: '>=0.8'} hasBin: true - crc32-stream@7.0.1: - resolution: {integrity: sha512-IBWsY8xznyQrcHn8h4bC8/4ErNke5elzgG8GcqF4RFPw6aHkWWRc7Tgw6upjaTX/CT/yQgqYENkxYsTYN+hW2g==} - engines: {node: '>=18'} + crc32-stream@6.0.0: + resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} + engines: {node: '>= 14'} - cron-parser@5.10.1: - resolution: {integrity: sha512-pKRrRagItwk9rGIStcUyMxFX34x56zoX3KDf9HJ4ttwkXIK1qxK63EvXvEDmlxI9AdPJ+Y7TEKRftRlW5eSS7A==} - engines: {node: '>=18'} + cron-parser@4.9.0: + resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} + engines: {node: '>=12.0.0'} + + croner@9.1.0: + resolution: {integrity: sha512-p9nwwR4qyT5W996vBZhdvBCnMhicY5ytZkR4D1Xj0wuTDEiMnjwR57Q3RXYY/s0EpX6Ay3vgIcfaR+ewGHsi+g==} + engines: {node: '>=18.0'} cross-argv@2.0.0: resolution: {integrity: sha512-YIaY9TR5Nxeb8SMdtrU8asWVM4jqJDNDYlKV21LxtYcfNJhp1kEsgSa6qXwXgzN0WQWGODps0+TlGp2xQSHwOg==} @@ -23966,8 +21785,24 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} - crossws@0.4.12: - resolution: {integrity: sha512-aypfsr6t0uNvkqaZc6zvBfXzC6pLI0/sIulpkV6RwCVtZqG5ebBzv4weImKK0VNCj91Wl9F5j7p5WU4MNrybng==} + crossws@0.4.3: + resolution: {integrity: sha512-lmf5mtwHiToP3HumOx53cqS0T5TK8GMBpsbSCXRB5OuszbltTgGOO4B1WhrDYqTeXOk3BAemibNjJx8E0/ecNw==} + peerDependencies: + srvx: '>=0.7.1' + peerDependenciesMeta: + srvx: + optional: true + + crossws@0.4.4: + resolution: {integrity: sha512-w6c4OdpRNnudVmcgr7brb/+/HmYjMQvYToO/oTrprTwxRUiom3LYWU1PMWuD006okbUWpII1Ea9/+kwpUfmyRg==} + peerDependencies: + srvx: '>=0.7.1' + peerDependenciesMeta: + srvx: + optional: true + + crossws@0.4.9: + resolution: {integrity: sha512-iWx+1OMSG2aOHpjyf9AESOzkwsVdS49cXM9dVrI2PDhxU5l2RIWE/KG56gk4BbAnsMoycvniJ9OnOxO9LRzHVA==} peerDependencies: srvx: '>=0.11.5' peerDependenciesMeta: @@ -23996,6 +21831,10 @@ packages: resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + css-tree@3.1.0: + resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + css-tree@3.2.1: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -24056,8 +21895,28 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} - db0@0.4.1: - resolution: {integrity: sha512-6RBY/bSn42UrqATwsiULj2uYFyEykB3XeA/NLIVQeHNXlYV6D4Idxx3/aa6k5Y45Dwzx7sygeLotnqHWSeURYA==} + db0@0.3.4: + resolution: {integrity: sha512-RiXXi4WaNzPTHEOu8UPQKMooIbqOEyqA1t7Z6MsdxSCeb8iUC9ko3LcmsLmeUt2SM5bctfArZKkRQggKZz7JNw==} + peerDependencies: + '@electric-sql/pglite': '*' + '@libsql/client': '*' + better-sqlite3: '*' + drizzle-orm: '*' + mysql2: '*' + sqlite3: '*' + peerDependenciesMeta: + '@electric-sql/pglite': + optional: true + '@libsql/client': + optional: true + better-sqlite3: + optional: true + drizzle-orm: + optional: true + mysql2: + optional: true + sqlite3: + optional: true de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} @@ -24082,6 +21941,9 @@ packages: decache@4.6.2: resolution: {integrity: sha512-2LPqkLeu8XWHU8qNCS3kcF6sCcb5zIzvWaAHYSvPfwhdd7mHuah29NssMzrTYyHN4F5oFy2ko9OBYxegtU0FEw==} + decimal.js@10.5.0: + resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} + decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} @@ -24093,8 +21955,8 @@ packages: babel-plugin-macros: optional: true - dedent@1.7.2: - resolution: {integrity: sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==} + dedent@1.7.0: + resolution: {integrity: sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==} peerDependencies: babel-plugin-macros: ^3.1.0 peerDependenciesMeta: @@ -24116,8 +21978,8 @@ packages: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} - default-browser-id@5.0.1: - resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} + default-browser-id@5.0.0: + resolution: {integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==} engines: {node: '>=18'} default-browser@5.2.1: @@ -24131,6 +21993,10 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} @@ -24142,9 +22008,6 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} - defu@6.1.7: - resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} - delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} @@ -24248,8 +22111,8 @@ packages: dexie@4.2.1: resolution: {integrity: sha512-Ckej0NS6jxQ4Po3OrSQBFddayRhTCic2DoCAG5zacOfOVB9P2Q5Xc5uL/nVa7ZVs+HdMnvUPzLFCB/JwpB6Csg==} - diff@9.0.0: - resolution: {integrity: sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==} + diff@8.0.2: + resolution: {integrity: sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==} engines: {node: '>=0.3.1'} dir-glob@3.0.1: @@ -24298,6 +22161,10 @@ packages: dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dot-prop@10.1.0: + resolution: {integrity: sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q==} + engines: {node: '>=20'} + dot-prop@9.0.0: resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==} engines: {node: '>=18'} @@ -24318,6 +22185,10 @@ packages: resolution: {integrity: sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==} engines: {node: '>=12'} + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} + engines: {node: '>=12'} + dotenv@8.6.0: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} @@ -24326,6 +22197,9 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} + duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -24363,10 +22237,6 @@ packages: emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} - emojis-list@3.0.0: - resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} - engines: {node: '>= 4'} - empathic@2.0.0: resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} engines: {node: '>=14'} @@ -24396,13 +22266,13 @@ packages: resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==} engines: {node: '>=10.13.0'} - enhanced-resolve@5.21.6: - resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} + enhanced-resolve@5.20.1: + resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} engines: {node: '>=10.13.0'} - enhanced-resolve@5.24.5: - resolution: {integrity: sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==} - engines: {node: '>=10.13.0'} + enquirer@2.3.6: + resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + engines: {node: '>=8.6'} enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} @@ -24431,9 +22301,14 @@ packages: resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - env-runner@0.2.3: - resolution: {integrity: sha512-S8EFBKyznRwPVwayK187cYjvnpgC92xy+q0BIF++V965pfjMVVRbQ/HoTYGA/1EHmZ7E68k6Heq+4WnvVhOL5w==} + env-runner@0.1.6: + resolution: {integrity: sha512-fSb7X1zdda8k6611a6/SdSQpDe7a/bqMz2UWdbHjk9YWzpUR4/fn9YtE/hqgGQ2nhvVN0zUtcL1SRMKwIsDbAA==} hasBin: true + peerDependencies: + miniflare: ^4.0.0 + peerDependenciesMeta: + miniflare: + optional: true envinfo@7.14.0: resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} @@ -24467,14 +22342,12 @@ packages: es-module-lexer@1.7.0: resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - es-module-lexer@2.3.2: - resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + es-module-lexer@2.0.0: + resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} - es-module-lexer@3.0.3: - resolution: {integrity: sha512-yWGe1O/j+almnV4hOYrmZo8u58JdnmXEMneRQAYkWtqSiT86yoMIEKF4rpqEDj52tbYl3xceBD3DQIBwcsC9Pw==} - - es-module-lexer@3.0.4: - resolution: {integrity: sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} @@ -24488,7 +22361,7 @@ packages: resolution: {integrity: sha512-V1FvDALwLDX6K0XNYM9CMRAnMzA0+Ecu55qBUT9q/eAJh1KIDsTMFoOzMSgyHqbOfvrVfO3Mws3z7TW2GVnIZA==} peerDependencies: esbuild: '>=0.20' - solid-js: 1.9.12 + solid-js: '>= 1.0' esbuild-plugin-vue3@0.5.1: resolution: {integrity: sha512-rhTPImJ1Zi7FbVa4xWlu9dJdt+mqWxc9Z+AQd+ArbHHwtyQRe8FvER8gaTw0O6bNsBjAtU5rq0rpZEkP3QaThg==} @@ -24533,11 +22406,6 @@ packages: engines: {node: '>=18'} hasBin: true - esbuild@0.28.1: - resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} - engines: {node: '>=18'} - hasBin: true - escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -24726,7 +22594,6 @@ packages: eslint@9.22.0: resolution: {integrity: sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true peerDependencies: jiti: '*' @@ -24795,8 +22662,8 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - expect-type@1.4.0: - resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} express@4.22.2: @@ -24807,15 +22674,23 @@ packages: resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} engines: {node: '>= 18'} - exsolve@1.1.1: - resolution: {integrity: sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==} + exsolve@1.0.7: + resolution: {integrity: sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==} - exsolve@1.2.0: - resolution: {integrity: sha512-h1pQPR9XoeSMdntRNCjyTznaume4UpfXrULBnlkZ2CUM/G5eSa+pBByGldO5uR8dxbPC+OuJXsPPNf+JZ81ADg==} + exsolve@1.0.8: + resolution: {integrity: sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==} + + exsolve@1.1.0: + resolution: {integrity: sha512-D+42+T12DdIlJM3uepa55qGiL3sYdLBOxIl2ifQCzCHz4c7eiolaHsi3BIqEr7JxBzxv2pYZQX9kw16ziMcEmw==} extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + fast-check@3.23.2: resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==} engines: {node: '>=8.0.0'} @@ -24851,18 +22726,9 @@ packages: fast-sha256@1.3.0: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} - fast-string-truncated-width@3.0.3: - resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} - - fast-string-width@3.0.2: - resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} - fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} - fast-wrap-ansi@0.2.0: - resolution: {integrity: sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==} - fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} @@ -24877,6 +22743,9 @@ packages: resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} engines: {node: '>=0.8.0'} + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -24893,8 +22762,11 @@ packages: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} - fetchdts@0.2.0: - resolution: {integrity: sha512-PJb4ZTGT2/wK78RmVrxZITStWabhZlKBsL52VOgq+c7clEkdHdEB+0rtzrXCbZJqeYJj+IwNWYqB5/G6vouA6A==} + fetchdts@0.1.7: + resolution: {integrity: sha512-YoZjBdafyLIop9lSxXVI33oLD5kN31q4Td+CasofLLYeLXRFeOsuOw0Uo+XNRi9PZlbfdlN2GmRtm4tCEQ9/KA==} + + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} fflate@0.8.3: resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} @@ -24949,6 +22821,10 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + find-up@6.3.0: + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + find-up@7.0.0: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} @@ -24964,12 +22840,12 @@ packages: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} - flatted@3.4.4: - resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} - fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} @@ -24990,12 +22866,12 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@4.0.5: - resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} - form-data@4.0.6: - resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + form-data@4.0.5: + resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} formdata-polyfill@4.0.10: @@ -25010,8 +22886,8 @@ packages: resolution: {integrity: sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w==} peerDependencies: '@emotion/is-prop-valid': '*' - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@emotion/is-prop-valid': optional: true @@ -25039,6 +22915,11 @@ packages: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -25087,6 +22968,10 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} @@ -25145,6 +23030,10 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + globby@16.1.0: + resolution: {integrity: sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==} + engines: {node: '>=20'} + globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -25175,24 +23064,41 @@ packages: resolution: {integrity: sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} - graphql@16.14.2: - resolution: {integrity: sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==} - engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + gzip-size@7.0.0: + resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - h3@1.15.11: - resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==} + h3@1.15.5: + resolution: {integrity: sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg==} - h3@2.0.1-rc.32: - resolution: {integrity: sha512-Epg1E85L8yIKd9UeAQAVdm6QVrnHbppMsQ641EjpNi4c0IlAg+PJlwp4Xw03Z1loRXPQaH9k64gJT5qDELqm+g==} + h3@2.0.1-rc.14: + resolution: {integrity: sha512-163qbGmTr/9rqQRNuqMqtgXnOUAkE4KTdauiC9y0E5iG1I65kte9NyfWvZw5RTDMt6eY+DtyoNzrQ9wA2BfvGQ==} engines: {node: '>=20.11.1'} hasBin: true peerDependencies: - crossws: ^0.4.12 - ocache: '>=0.3.0' + crossws: ^0.4.1 peerDependenciesMeta: crossws: optional: true - ocache: + + h3@2.0.1-rc.16: + resolution: {integrity: sha512-h+pjvyujdo9way8qj6FUbhaQcHlR8FEq65EhTX9ViT5pK8aLj68uFl4hBkF+hsTJAH+H1END2Yv6hTIsabGfag==} + engines: {node: '>=20.11.1'} + hasBin: true + peerDependencies: + crossws: ^0.4.1 + peerDependenciesMeta: + crossws: + optional: true + + h3@2.0.1-rc.20: + resolution: {integrity: sha512-28ljodXuUp0fZovdiSRq4G9OgrxCztrJe5VdYzXAB7ueRvI7pIUqLU14Xi3XqdYJ/khXjfpUOOD2EQa6CmBgsg==} + engines: {node: '>=20.11.1'} + hasBin: true + peerDependencies: + crossws: ^0.4.1 + peerDependenciesMeta: + crossws: optional: true handle-thing@2.0.1: @@ -25246,9 +23152,6 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} - headers-polyfill@5.0.1: - resolution: {integrity: sha512-1TJ6Fih/b8h5TIcv+1+Hw0PDQWJTKDKzFZzcKOiW1wJza3XoAQlkCuXLbymPYB8+ZQyw8mHvdw560e8zVFIWyA==} - hey-listen@1.0.8: resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} @@ -25258,30 +23161,20 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - hono-sessions@0.8.1: - resolution: {integrity: sha512-YLSKuIP13yhXTQe2x3sCc1JWsqt1Z3WZB2DWE+oX+YpOsC3lv8uCHnCoNHcY9DPyflDw4XQJN+MFVvcp5QwWdw==} - peerDependencies: - hono: ^4.0.0 - - hono@4.13.9: - resolution: {integrity: sha512-7dMkQmZoC4E6F7AtaQSPhlWAdnBti+j7rreMZl8QB4jFiEhP9TWbGWUMi8WYzBCgmgulxuvLQupKqo+Co6Omyg==} - engines: {node: '>=16.9.0'} - hono@4.7.10: resolution: {integrity: sha512-QkACju9MiN59CKSY5JsGZCYmPZkA6sIW6OFCUp7qDjZu6S6KHtJHhAc9Uy9mV9F8PJ1/HQ3ybZF2yjCa/73fvQ==} engines: {node: '>=16.9.0'} - hookable@6.1.2: - resolution: {integrity: sha512-+abwxtiEA52GCVIsQqut3S/uKTbUwYIp4Pe/vv+6py5XiXBCqMZHg6pA6Y5qhgLSEys0/cYuPbO0z1QFj5ZCmg==} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + + hookable@6.1.0: + resolution: {integrity: sha512-ZoKZSJgu8voGK2geJS+6YtYjvIzu9AOM/KZXsBxr83uhLL++e9pEv/dlgwgy3dvHg06kTz6JOh1hk3C8Ceiymw==} hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} - hosted-git-info@9.0.3: - resolution: {integrity: sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg==} - engines: {node: ^20.17.0 || >=22.9.0} - hpack.js@2.1.6: resolution: {integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==} @@ -25380,8 +23273,11 @@ packages: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} - httpxy@0.5.5: - resolution: {integrity: sha512-uDjmnPyp1q4Sgzf3w+J/Fc6UqcCEj0x4Wjp7OqK5dGhNeDgpyrAmnS6ey8QWrX3SWDon2DMKf9sBa5X9+CVyMA==} + httpxy@0.1.7: + resolution: {integrity: sha512-pXNx8gnANKAndgga5ahefxc++tJvNL87CXoRwxn1cJE2ZkWEojF3tNfQIEhZX/vfpt+wzeAzpUI4qkediX1MLQ==} + + httpxy@0.3.1: + resolution: {integrity: sha512-XjG/CEoofEisMrnFr0D6U6xOZ4mRfnwcYQ9qvvnT4lvnX8BoeA3x3WofB75D+vZwpaobFVkBIHrZzoK40w8XSw==} human-id@4.1.1: resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} @@ -25426,10 +23322,6 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.12: - resolution: {integrity: sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==} - engines: {node: '>= 4'} - ignore@7.0.5: resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} @@ -25437,23 +23329,21 @@ packages: image-meta@0.2.2: resolution: {integrity: sha512-3MOLanc3sb3LNGWQl1RlQlNWURE5g32aUphrDyFeCsxBTk08iE3VNe4CwsUZ0Qs1X+EfX0+r29Sxdpza4B+yRA==} + image-size@2.0.2: + resolution: {integrity: sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w==} + engines: {node: '>=16.x'} + hasBin: true + immer@10.1.1: resolution: {integrity: sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==} immutable@5.1.4: resolution: {integrity: sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==} - immutable@5.1.9: - resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} - import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} - import-in-the-middle@3.5.1: - resolution: {integrity: sha512-mPKuL8bPQzecui2KK6Gb+M8JvJoHnhS1FeYGa22QopBmlevF5F0FE6ued/B5EgHDeIoMTONIpDWWFKUPOG0DBQ==} - engines: {node: '>=18'} - import-lazy@4.0.0: resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} engines: {node: '>=8'} @@ -25499,8 +23389,8 @@ packages: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} - ioredis@5.11.1: - resolution: {integrity: sha512-ehuGcf94bQXhfagULNXrJdfnWO38v070jxSx/qE87Kjzmu2fU7ro5EFAb+OPituLqgfyuQaym5DlrNydW2sJ9A==} + ioredis@5.9.2: + resolution: {integrity: sha512-tAAg/72/VxOUW7RQSX1pIxJVucYKcjFjfvj60L57jrZpYCHC3XN0WCQ3sNYL4Gmvv+7GPvTAjc+KSdeNuE8oWQ==} engines: {node: '>=12.22.0'} ipaddr.js@1.9.1: @@ -25515,10 +23405,6 @@ packages: resolution: {integrity: sha512-7Xnt54Dco7uYkfdAw0r2vCly3z0rSaVhEXMzPvl3FndsTVm5p26j+PO+gyinkYmcsEUvX2Rh7OGK7KzYWRu6BA==} hasBin: true - iron-session@9.0.1: - resolution: {integrity: sha512-ELSZdcLvA0AMhxUCY+rwKCh42UV88SqEb1ia/bHLF9G+6kScikO6mShtlIq+OtF2UlkZP0dmI2dMdG9vh4rebA==} - engines: {node: '>=22.13.0'} - iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} @@ -25560,6 +23446,11 @@ packages: resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} engines: {node: '>= 0.4'} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -25600,6 +23491,9 @@ packages: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + is-network-error@1.1.0: resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==} engines: {node: '>=16'} @@ -25648,6 +23542,12 @@ packages: is-property@1.0.2: resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -25715,10 +23615,18 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} - is-wsl@3.1.0: - resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} engines: {node: '>=16'} + is64bit@2.0.0: + resolution: {integrity: sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==} + engines: {node: '>=18'} + isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -25760,6 +23668,9 @@ packages: jose@6.1.3: resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==} + jpeg-js@0.4.4: + resolution: {integrity: sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==} + js-base64@3.7.8: resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==} @@ -25772,15 +23683,18 @@ packages: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} + js-image-generator@1.0.4: + resolution: {integrity: sha512-ckb7kyVojGAnArouVR+5lBIuwU1fcrn7E/YYSd0FK7oIngAkMmRvHASLro9Zt5SQdWToaI66NybG+OGxPw/HlQ==} + js-sha256@0.11.1: resolution: {integrity: sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==} - js-tokens@10.0.0: - resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -25848,8 +23762,8 @@ packages: engines: {node: '>=6'} hasBin: true - jsonc-parser@3.3.1: - resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -25858,19 +23772,19 @@ packages: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} - jsonwebtoken@9.0.3: - resolution: {integrity: sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==} + jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} engines: {node: '>=12', npm: '>=6'} junk@4.0.1: resolution: {integrity: sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==} engines: {node: '>=12.20'} - jwa@2.0.1: - resolution: {integrity: sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==} + jwa@1.4.2: + resolution: {integrity: sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==} - jws@4.0.1: - resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==} + jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} jwt-decode@3.1.2: resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==} @@ -25893,6 +23807,13 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + klona@2.0.6: + resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} + engines: {node: '>= 8'} + + knitwork@1.3.0: + resolution: {integrity: sha512-4LqMNoONzR43B1W0ek0fhXMsDNW/zxa1NdFAVMY+k28pgZLovR4G3PB5MrpTxCy1QaZCqNoiaKPr5w5qZHfSNw==} + known-css-properties@0.30.0: resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==} @@ -25953,60 +23874,30 @@ packages: cpu: [arm64] os: [android] - lightningcss-android-arm64@1.33.0: - resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [android] - lightningcss-darwin-arm64@1.32.0: resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-arm64@1.33.0: - resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [darwin] - lightningcss-darwin-x64@1.32.0: resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-darwin-x64@1.33.0: - resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [darwin] - lightningcss-freebsd-x64@1.32.0: resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] - lightningcss-freebsd-x64@1.33.0: - resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [freebsd] - lightningcss-linux-arm-gnueabihf@1.32.0: resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm-gnueabihf@1.33.0: - resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm] - os: [linux] - lightningcss-linux-arm64-gnu@1.32.0: resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} engines: {node: '>= 12.0.0'} @@ -26014,13 +23905,6 @@ packages: os: [linux] libc: [glibc] - lightningcss-linux-arm64-gnu@1.33.0: - resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - libc: [glibc] - lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} @@ -26028,13 +23912,6 @@ packages: os: [linux] libc: [musl] - lightningcss-linux-arm64-musl@1.33.0: - resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - libc: [musl] - lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} @@ -26042,13 +23919,6 @@ packages: os: [linux] libc: [glibc] - lightningcss-linux-x64-gnu@1.33.0: - resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - libc: [glibc] - lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} @@ -26056,45 +23926,22 @@ packages: os: [linux] libc: [musl] - lightningcss-linux-x64-musl@1.33.0: - resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - libc: [musl] - lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] - lightningcss-win32-arm64-msvc@1.33.0: - resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [win32] - lightningcss-win32-x64-msvc@1.32.0: resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss-win32-x64-msvc@1.33.0: - resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [win32] - lightningcss@1.32.0: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} - lightningcss@1.33.0: - resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} - engines: {node: '>= 12.0.0'} - lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -26106,27 +23953,26 @@ packages: resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - listhen@1.10.1: - resolution: {integrity: sha512-6nt/86SkqUQSLW1ofz8MxC6RhRMqOl3ONISe6qqvJ3xj09aJWQx6DhgSZpugs3PX4PXdOas/WD6A9jx6J2N19A==} + listhen@1.9.0: + resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} hasBin: true - peerDependencies: - '@parcel/watcher': ^2.5.6 - peerDependenciesMeta: - '@parcel/watcher': - optional: true loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} - loader-utils@2.0.4: - resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} - engines: {node: '>=8.9.0'} + loader-runner@4.3.1: + resolution: {integrity: sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==} + engines: {node: '>=6.11.5'} local-pkg@0.5.1: resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} engines: {node: '>=14'} + local-pkg@1.1.2: + resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==} + engines: {node: '>=14'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -26148,12 +23994,18 @@ packages: lodash.clonedeep@4.5.0: resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + lodash.defaults@4.2.0: + resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} + lodash.flatten@4.4.0: resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} + lodash.isarguments@3.1.0: + resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} + lodash.isboolean@3.0.3: resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} @@ -26202,6 +24054,10 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@11.2.2: + resolution: {integrity: sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==} + engines: {node: 20 || >=22} + lru-cache@11.5.1: resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==} engines: {node: 20 || >=22} @@ -26236,11 +24092,8 @@ packages: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} engines: {node: '>=12'} - magic-string@1.4.3: - resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==} - - magic-string@1.4.5: - resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + magicast@0.5.1: + resolution: {integrity: sha512-xrHS24IxaLrvuo613F719wvOIv9xPHFWQHuvGUBmPnCA/3MQxKI3b+r7n1jAoDHmsbC5bRhTZYR77invLAxVnw==} manage-path@2.0.0: resolution: {integrity: sha512-NJhyB+PJYTpxhxZJ3lecIGgh4kwIY2RAh44XvAz9UlqthlQwtPBf62uBVR8XaD8CRuSjQ6TnZH2lNJkbLPZM2A==} @@ -26275,6 +24128,9 @@ packages: mdn-data@2.0.28: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} + mdn-data@2.12.2: + resolution: {integrity: sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==} + mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} @@ -26345,6 +24201,11 @@ packages: engines: {node: '>=4'} hasBin: true + mime@4.1.0: + resolution: {integrity: sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw==} + engines: {node: '>=16'} + hasBin: true + mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -26362,10 +24223,6 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - miniflare@5.20261104.0-beta: - resolution: {integrity: sha512-pYZ2n85+FYUb7s0oIVcQxO63/+wgaknm+A/kQjctJqshvHPJs3UtnzaIZ7xrrHMOk8atD7yAfauf6G9VAv7Upg==} - engines: {node: '>=22.0.0'} - minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -26379,6 +24236,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + minimatch@9.0.1: resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} engines: {node: '>=16 || 14 >=14.17'} @@ -26390,61 +24251,6 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minimizer-webpack-plugin@5.10.0: - resolution: {integrity: sha512-2//60T4S0X1Ug/dqLDOgDaGlZsN1Lv8hf8oB0NOV/KIHSaXlPwXBBIbim79dE2Z7NEs52ES8YHoSv6Lmsk+XNg==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@minify-html/node': '*' - '@napi-rs/image': '*' - '@swc/core': '*' - '@swc/css': '*' - '@swc/html': '*' - clean-css: '*' - cssnano: '*' - csso: '*' - esbuild: '*' - html-minifier-terser: '*' - imagemin: '*' - lightningcss: '*' - postcss: '*' - sharp: '*' - svgo: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@minify-html/node': - optional: true - '@napi-rs/image': - optional: true - '@swc/core': - optional: true - '@swc/css': - optional: true - '@swc/html': - optional: true - clean-css: - optional: true - cssnano: - optional: true - csso: - optional: true - esbuild: - optional: true - html-minifier-terser: - optional: true - imagemin: - optional: true - lightningcss: - optional: true - postcss: - optional: true - sharp: - optional: true - svgo: - optional: true - uglify-js: - optional: true - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -26453,10 +24259,6 @@ packages: resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} engines: {node: '>= 18'} - minizlib@3.1.0: - resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==} - engines: {node: '>= 18'} - mkdirp@3.0.1: resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} @@ -26470,9 +24272,6 @@ packages: engines: {node: '>=18'} hasBin: true - module-details-from-path@1.0.4: - resolution: {integrity: sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==} - motion-dom@11.18.1: resolution: {integrity: sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==} @@ -26493,16 +24292,6 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.15.0: - resolution: {integrity: sha512-2wQAmKkQKxRuXvYJxVhPGG0wZNBQyD06oJvxqw90XqLvptdqxdlHrFUfEteKkpaNORX3Xzc+HtEl/q0nfmN2wQ==} - engines: {node: '>=18'} - hasBin: true - peerDependencies: - typescript: '>= 4.8.x' - peerDependenciesMeta: - typescript: - optional: true - msw@2.7.0: resolution: {integrity: sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==} engines: {node: '>=18'} @@ -26524,10 +24313,6 @@ packages: resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} engines: {node: ^18.17.0 || >=20.5.0} - mute-stream@3.0.0: - resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} - engines: {node: ^20.17.0 || >=22.9.0} - mysql2@3.15.3: resolution: {integrity: sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==} engines: {node: '>= 8.0'} @@ -26544,13 +24329,8 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - nanoid@3.3.18: - resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - nanoid@3.3.19: - resolution: {integrity: sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==} + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -26584,34 +24364,68 @@ packages: netlify-redirector@0.5.0: resolution: {integrity: sha512-4zdzIP+6muqPCuE8avnrgDJ6KW/2+UpHTRcTbMXCIRxiRmyrX+IZ4WSJGZdHPWF3WmQpXpy603XxecZ9iygN7w==} - next@16.3.4: - resolution: {integrity: sha512-/Ztf6CeRH+ejEXUrYtqI4gkS66eFIHuSwqi60RgcpWKodxFZx2/dqVCMKBwILfAHXQ+F1b1vAudgj3mnxqtoIA==} - engines: {node: '>=20.9.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.63.0 - babel-plugin-react-compiler: '*' - react: ~19.2.9 - react-dom: ~19.2.9 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - babel-plugin-react-compiler: - optional: true - sass: - optional: true + nf3@0.3.11: + resolution: {integrity: sha512-ObKp/SA3f1g1f/OMeDlRWaZmqGgk7A0NnDIbeO7c/MV4r/quMlpP/BsqMGuTi3lUlXbC1On8YH7ICM2u2bIAOw==} - nf3@0.3.24: - resolution: {integrity: sha512-HxLK4bo+5jNsEETZp4w3tJblHOA9MCBY14IN9nZJJV8JDxt9yNIYxuBuLMjTAR5GFa3HL61+8VQDUrXv3/C8fw==} + nf3@0.3.6: + resolution: {integrity: sha512-/XRUUILTAyuy1XunyVQuqGp8aEmZ2TfRTn8Rji+FA4xqv20qzL4jV7Reqbuey2XucKgPeRVcEYGScmJM0UnB6Q==} - nitro@3.0.260903-beta: - resolution: {integrity: sha512-54gANPi62O8rfMvepiJUVuIzEIinYfpeHbebywlLxvVTgIYXDwSvpaU9Id+0sJOBjBx0wC1/CVYXJkH7SY+l0g==} + nitro@3.0.1-alpha.2: + resolution: {integrity: sha512-YviDY5J/trS821qQ1fpJtpXWIdPYiOizC/meHavlm1Hfuhx//H+Egd1+4C5SegJRgtWMnRPW9n//6Woaw81cTQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + peerDependencies: + rolldown: '>=1.0.0-beta.0' + rollup: ^4 + vite: ^8.0.14 + xml2js: ^0.6.2 + peerDependenciesMeta: + rolldown: + optional: true + rollup: + optional: true + vite: + optional: true + xml2js: + optional: true + + nitro@3.0.260311-beta: + resolution: {integrity: sha512-0o0fJ9LUh4WKUqJNX012jyieUOtMCnadkNDWr0mHzdraoHpJP/1CGNefjRyZyMXSpoJfwoWdNEZu2iGf35TUvQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + dotenv: '*' + giget: '*' + jiti: ^2.6.1 + rollup: ^4.59.0 + vite: ^8.0.14 + xml2js: ^0.6.2 + zephyr-agent: ^0.1.15 + peerDependenciesMeta: + dotenv: + optional: true + giget: + optional: true + jiti: + optional: true + rollup: + optional: true + vite: + optional: true + xml2js: + optional: true + zephyr-agent: + optional: true + + nitropack@2.13.1: + resolution: {integrity: sha512-2dDj89C4wC2uzG7guF3CnyG+zwkZosPEp7FFBGHB3AJo11AywOolWhyQJFHDzve8COvGxJaqscye9wW2IrUsNw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + xml2js: ^0.6.2 + peerDependenciesMeta: + xml2js: + optional: true no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -26648,10 +24462,6 @@ packages: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} - node-forge@1.4.0: - resolution: {integrity: sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==} - engines: {node: '>= 6.13.0'} - node-gyp-build@3.9.0: resolution: {integrity: sha512-zLcTg6P4AbcHPq465ZMFNXx7XpKKJh+7kkN699NiQWisR2uWYOWNWqRHAmbnmKiL4e9aLSlmy5U7rEMUXV59+A==} hasBin: true @@ -26691,10 +24501,6 @@ packages: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} - normalize-package-data@8.0.0: - resolution: {integrity: sha512-RWk+PI433eESQ7ounYxIp67CYuVsS1uYSonX3kA6ps/3LWfjVQa/ptEg6Y3T6uAMq1mWpX9PQ+qx+QaHpsc7gQ==} - engines: {node: ^20.17.0 || >=22.9.0} - normalize-path@2.1.1: resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} engines: {node: '>=0.10.0'} @@ -26717,8 +24523,8 @@ packages: nwsapi@2.2.16: resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} - nx@24.0.0: - resolution: {integrity: sha512-LchM3SyEUYL6qjHUneiSuyYlUscv8t6qpAYWUqnUY5OoSQSLIOLT/xrerLCKUTTcu7Yq1o/TDo9TiwhaBLvM4Q==} + nx@22.7.5: + resolution: {integrity: sha512-zoxsJabb33jl1QYnalDn0bicryrEBgSzdKp90d7VGGv/jDgzKrcLg/hw2ZxeYiOjWPIT/o8QNT9G9vTs4dv3AQ==} hasBin: true peerDependencies: '@swc-node/register': ^1.11.1 @@ -26763,19 +24569,21 @@ packages: obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} - obug@3.0.0: - resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} - engines: {node: '>=12.20.0'} - - ocache@0.3.0: - resolution: {integrity: sha512-RS/9P0zeBb0gDJmadGERLH8lZNXK7xbufTDhclkXGvFGTsj0G4M5/cLk+mizcERH29mLXNnocfB5wjcK70wGJg==} + ocache@0.1.2: + resolution: {integrity: sha512-lI34wjM7cahEdrq2I5obbF7MEdE97vULf6vNj6ZCzwEadzyXO1w7QOl2qzzG4IL8cyO7wDtXPj9CqW/aG3mn7g==} ofetch@1.5.1: resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==} + ofetch@2.0.0-alpha.3: + resolution: {integrity: sha512-zpYTCs2byOuft65vI3z43Dd6iSdFbOZZLb9/d21aCpx2rGastVU9dOCv0lu4ykc1Ur1anAYjDi3SUvR0vq50JA==} + ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + omit.js@2.0.2: + resolution: {integrity: sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg==} + on-exit-leak-free@2.1.2: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} engines: {node: '>=14.0.0'} @@ -26814,12 +24622,16 @@ packages: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@5.4.1: - resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + ora@5.3.0: + resolution: {integrity: sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==} engines: {node: '>=10'} outdent@0.5.0: @@ -26828,9 +24640,17 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + oxc-minify@0.110.0: + resolution: {integrity: sha512-KWGTzPo83QmGrXC4ml83PM9HDwUPtZFfasiclUvTV4i3/0j7xRRqINVkrL77CbQnoWura3CMxkRofjQKVDuhBw==} + engines: {node: ^20.19.0 || >=22.12.0} + oxc-resolver@11.19.1: resolution: {integrity: sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==} + oxc-transform@0.110.0: + resolution: {integrity: sha512-/fymQNzzUoKZweH0nC5yvbI2eR0yWYusT9TEKDYVgOgYrf9Qmdez9lUFyvxKR9ycx+PTHi/reIOzqf3wkShQsw==} + engines: {node: ^20.19.0 || >=22.12.0} + p-event@6.0.1: resolution: {integrity: sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==} engines: {node: '>=16.17'} @@ -26883,6 +24703,10 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + p-wait-for@5.0.2: + resolution: {integrity: sha512-lwx6u1CotQYPVju77R+D0vFomni/AqRfqLmqQ8hekklqZ6gAY9rONh7lBQ0uxWMkC2AuX9b2DVAl8To0NyP1JA==} + engines: {node: '>=12'} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -26993,6 +24817,9 @@ packages: resolution: {integrity: sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==} engines: {node: '>=18'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -27002,8 +24829,11 @@ packages: perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} - pg-gateway@0.3.0-beta.4: - resolution: {integrity: sha512-CTjsM7Z+0Nx2/dyZ6r8zRsc3f9FScoD5UAOlfUx1Fdv/JOIWvRbF7gou6l6vP+uypXQVoYPgw8xZDXgMGvBa4Q==} + perfect-debounce@2.0.0: + resolution: {integrity: sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow==} + + periscopic@4.0.2: + resolution: {integrity: sha512-sqpQDUy8vgB7ycLkendSKS6HnVz1Rneoc3Rc+ZBUCe2pbqlVuCC5vF52l0NJ1aiMg/r1qfYF9/myz8CZeI2rjA==} picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -27016,8 +24846,8 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} - picomatch@4.0.7: - resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} picoquery@2.5.0: @@ -27055,16 +24885,20 @@ packages: resolution: {integrity: sha512-emEcLuomt2j03vxD54giVB4SxTjnsqkU692xZOZXHDVoYyypEm+b3jpiTcc+Cf+myooc+/Ly0z01jqeNHVgJGw==} engines: {node: '>=16.0.0'} - playwright-core@1.63.0: - resolution: {integrity: sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==} - engines: {node: '>=20'} + playwright-core@1.58.0: + resolution: {integrity: sha512-aaoB1RWrdNi3//rOeKuMiS65UCcgOVljU46At6eFcOFPFHWtd2weHRRow6z/n+Lec0Lvu0k9ZPKJSjPugikirw==} + engines: {node: '>=18'} hasBin: true - playwright@1.63.0: - resolution: {integrity: sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==} - engines: {node: '>=20'} + playwright@1.58.0: + resolution: {integrity: sha512-2SVA0sbPktiIY/MCOPX8e86ehA/e+tDNq+e5Y8qjKYti2Z/JG7xnronT/TXTIkKbYGWlCbuucZ6dziEgkoEjQQ==} + engines: {node: '>=18'} hasBin: true + pngjs@7.0.0: + resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} + engines: {node: '>=14.19.0'} + possible-typed-array-names@1.1.0: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} @@ -27123,12 +24957,8 @@ packages: peerDependencies: postcss: ^8.2.9 - postcss@8.5.23: - resolution: {integrity: sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==} - engines: {node: ^10 || ^12 || >=14} - - postcss@8.5.29: - resolution: {integrity: sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==} + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} engines: {node: ^10 || ^12 || >=14} postcss@8.5.3: @@ -27155,11 +24985,6 @@ packages: engines: {node: '>=22.6.0'} hasBin: true - pprof-to-md@0.2.0: - resolution: {integrity: sha512-+xo3aSoDHI+M6DnM5jW6Iva4I0LS3NmAAkci3fGSIj6JiP8hs5o8IWpmkTtoQ62l9joDC8eSSOZE9dt1t38HHw==} - engines: {node: '>=22.6.0'} - hasBin: true - preact-render-to-string@6.5.11: resolution: {integrity: sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==} peerDependencies: @@ -27187,6 +25012,11 @@ packages: engines: {node: '>=14'} hasBin: true + prettier@3.5.0: + resolution: {integrity: sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==} + engines: {node: '>=14'} + hasBin: true + prettier@3.6.2: resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} engines: {node: '>=14'} @@ -27197,15 +25027,14 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.9.6: - resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} - engines: {node: '>=14'} - hasBin: true - pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} + pretty-bytes@7.1.0: + resolution: {integrity: sha512-nODzvTiYVRGRqAOvE84Vk5JDPyyxsVk0/fbA/bq7RqlnhksGpset09XTxbpvLTIjoaF7K8Z8DG8yHtKGTPSYRw==} + engines: {node: '>=20'} + pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} @@ -27282,6 +25111,9 @@ packages: engines: {node: '>=18'} hasBin: true + pump@3.0.3: + resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -27324,8 +25156,8 @@ packages: peerDependencies: '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -27353,17 +25185,17 @@ packages: rc9@2.1.2: resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} - react-dom@19.2.9: - resolution: {integrity: sha512-YceU74W21fXEHszKBLj16MY0CmvpFKOs60iVrIyW/cCgOPsZJNaB6GVJEtIUqt6AG6EjzKLui5lPRrxAeS328Q==} + react-dom@19.2.3: + resolution: {integrity: sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 react-hot-toast@2.5.1: resolution: {integrity: sha512-54Gq1ZD1JbmAb4psp9bvFHjS7lje+8ubboUmvKZkCsQBLH6AOpZ9JemfRvIdHcfb9AZXRaFLrb3qUobGYDJhFQ==} engines: {node: '>=10'} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -27378,6 +25210,14 @@ packages: resolution: {integrity: sha512-bYXfxuIVt49+VrmqxUNxjDSbFCUmG85IxH2yc7h5sddlUrVvosOTgOphMvWtBSz39VYZByTBRAE6uKAsHoz0gg==} hasBin: true + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + + react-refresh@0.17.0: + resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} + engines: {node: '>=0.10.0'} + react-refresh@0.18.0: resolution: {integrity: sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==} engines: {node: '>=0.10.0'} @@ -27387,7 +25227,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -27397,25 +25237,25 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-rspack@0.1.1: - resolution: {integrity: sha512-pgL4M/D3jFzn/2Dv8ppgFPrauyJjP29sFCV5EjSCLI29+NHIhumkhxnkiK8x0h5SQLPqUVVZfiAu3dn7Bl1RNg==} + react-server-dom-rspack@0.0.2: + resolution: {integrity: sha512-PowIm+Z65LkvC3yk4t3YrH2nMejwL361jiBT0BMW2bQCDUaNQknDHMPH0aTgMtJ9ZZ1Gc7KFgBvwB0itSzzELQ==} engines: {node: '>=0.10.0'} peerDependencies: - '@rspack/core': ^2.2.0-0 - react: ~19.2.9 - react-dom: ~19.2.9 + '@rspack/core': ^2.0.0-0 + react: ^19.2.3 + react-dom: ^19.2.3 react-style-singleton@2.2.3: resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==} engines: {node: '>=10'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -27423,31 +25263,23 @@ packages: react-transition-group@4.4.5: resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 react-tweet@3.3.0: resolution: {integrity: sha512-gSIG2169ZK7UH6rBzuU+j1xnQbH3IlOTLEkuGrRiJJTMgETik+h+26yHyyVKrLkzwrOaYPk4K3OtEKycqKgNLw==} peerDependencies: - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 - react@19.2.9: - resolution: {integrity: sha512-RuLdAokXv3sRmZa2/N8QH0KmTBIgDKC+buRUikGqow31+mGSGidLCX2o4XFq8OV+xBFWfhM9DVgTq1PPHADH4w==} + react@19.2.3: + resolution: {integrity: sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==} engines: {node: '>=0.10.0'} read-package-up@11.0.0: resolution: {integrity: sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==} engines: {node: '>=18'} - read-package-up@12.0.0: - resolution: {integrity: sha512-Q5hMVBYur/eQNWDdbF4/Wqqr9Bjvtrw2kjGxxBbKLbx8bVCL8gcArjTy8zDUuLGQicftpMuU0riQNcAsbtOVsw==} - engines: {node: '>=20'} - - read-pkg@10.1.0: - resolution: {integrity: sha512-I8g2lArQiP78ll51UeMZojewtYgIRCKCWqZEgOO8c/uefTI+XDXvCSXu3+YNUaTNvZzobrL5+SqHjBrByRRTdg==} - engines: {node: '>=20'} - read-pkg@9.0.1: resolution: {integrity: sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==} engines: {node: '>=18'} @@ -27467,9 +25299,8 @@ packages: resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - readdir-glob@3.0.0: - resolution: {integrity: sha512-AhNB2KgKeVJr16nK9LLZbJNWnYoT23ZrumNKFDebHBdkC8KHSqWo871JAUhoWC/RtjEVdqNMFpM6qrwRbaUqpw==} - engines: {node: '>=18'} + readdir-glob@1.1.3: + resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -27509,9 +25340,6 @@ packages: reduce-configs@1.1.1: resolution: {integrity: sha512-EYtsVGAQarE8daT54cnaY1PIknF2VB78ug6Zre2rs36EsJfC40EG6hmTU2A2P1ZuXnKAt2KI0fzOGHcX7wzdPw==} - reduce-configs@2.0.1: - resolution: {integrity: sha512-H9KTCWTEb1YM1OoOz0f6TeGZYlW82sIT1viNg3W8CjjY0pD3WI4MHs8GifKt5FKTVIfHh/DenfJqqY+FP9jF2A==} - reflect-metadata@0.2.2: resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} @@ -27559,10 +25387,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-in-the-middle@8.0.1: - resolution: {integrity: sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==} - engines: {node: '>=9.3.0 || >=8.10.0 <9.0.0'} - require-package-name@2.0.1: resolution: {integrity: sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==} @@ -27588,6 +25412,11 @@ packages: resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} engines: {node: '>=10'} + resolve@1.22.10: + resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} + engines: {node: '>= 0.4'} + hasBin: true + resolve@1.22.11: resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} engines: {node: '>= 0.4'} @@ -27616,9 +25445,6 @@ packages: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} - rettime@0.11.11: - resolution: {integrity: sha512-ILJRqVWBCTlg9r42fFgwVZx1gnFAcQF8mRoMkbgQfIrjEDf9nbBFDFx00oloOa+Q869FUtaYDXZvEfnecQSCoQ==} - reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -27635,21 +25461,39 @@ packages: engines: {node: 20 || >=22} hasBin: true - rolldown@1.2.13: - resolution: {integrity: sha512-/5apOkwWxtACcQtZ5WlrAsKS4JwXVThQPJZ3RqIruRY9UG9M8e0VlXN068xum/JRKA4aIUoJ13ghe/kGCvidiQ==} + rolldown@1.0.0-rc.9: + resolution: {integrity: sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.63.1: - resolution: {integrity: sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==} + rolldown@1.0.2: + resolution: {integrity: sha512-oZx5zVDtVB44AW3eaifgDml1gWRDZGvjcfdxonE4swNPG98PrrXjaO/KrnUjzlMnztCCRVlUueA1kCXhARGk6g==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + rollup-plugin-visualizer@6.0.5: + resolution: {integrity: sha512-9+HlNgKCVbJDs8tVtjQ43US12eqaiHyyiLMdBwQ7vSZPiHMysGNo2E88TAp1si5wx8NAoYriI2A5kuKfIakmJg==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + rolldown: 1.x || ^1.0.0-beta + rollup: 2.x || 3.x || 4.x + peerDependenciesMeta: + rolldown: + optional: true + rollup: + optional: true + + rollup@4.56.0: + resolution: {integrity: sha512-9FwVqlgUHzbXtDg9RCMgodF3Ua4Na6Gau+Sdt9vyCN4RhHfVKX2DCHy3BjMLTDd47ITDhYAnTwGulWTblJSDLg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true rou3@0.7.12: resolution: {integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==} - rou3@0.9.2: - resolution: {integrity: sha512-3SOzvaAg8rkHrXtRjpCvCvbyO5to9oOO27Z/XqHEYXfMRVSw/qMIVdmaOk9W2lcRLtR6dlqTjo9hDeJk70QBYQ==} + rou3@0.8.1: + resolution: {integrity: sha512-ePa+XGk00/3HuCqrEnK3LxJW7I0SdNg6EFzKUJG73hMAdDcOUC/i/aSz7LSDwLrGr33kal/rqOGydzwl6U7zBA==} router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} @@ -27661,10 +25505,17 @@ packages: rrweb-cssom@0.8.0: resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} - rsbuild-plugin-cloudflare@0.0.4: - resolution: {integrity: sha512-YIKJGwcvMJNMo922/kNCdK/P7tk+D861SG41sMl1Y/M/BnlzX3b0UMoJZcPeEV1sfDrDBLYCPaqsBPEYC5Ya1g==} + rspack-vue-loader@17.4.4: + resolution: {integrity: sha512-T4rkTZWg9hC7DZapTaJcIphser4ogsTffH/rwnX0pwMpNKjv1XKLBPa5Icd/xNPOh1NiKVxoxcT+gb8NQliukA==} peerDependencies: - '@rsbuild/core': ^2.2.10 + '@vue/compiler-sfc': '*' + vue: '*' + webpack: ^4.1.0 || ^5.0.0-0 + peerDependenciesMeta: + '@vue/compiler-sfc': + optional: true + vue: + optional: true rspack-vue-loader@17.5.0: resolution: {integrity: sha512-hJrL2+jytfTs6ORHBOKTh5lU7BVZvmv7afELuQfyEpGC1ll7MKj1BxlgAIbhd6pZwoEwfdH79Lewtwe4VOlfCQ==} @@ -27680,8 +25531,8 @@ packages: vue: optional: true - run-applescript@7.1.0: - resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} + run-applescript@7.0.0: + resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} engines: {node: '>=18'} run-parallel@1.2.0: @@ -27717,128 +25568,6 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass-embedded-all-unknown@1.105.1: - resolution: {integrity: sha512-kN0G03K9KoUbSf72t7ZvxAudcB4Wbf0M0XFaPc1gaF94jEPUb0xLCQUIPIDPH2Kx8vpYZ/GzzgF7USsB6rUYfw==} - cpu: ['!arm', '!arm64', '!riscv64', '!x64'] - - sass-embedded-android-arm64@1.105.1: - resolution: {integrity: sha512-lWnIFmW3gL4ZDfZgjeUfxazmA0zlwSS/ADe2q9XmP0W2UfM9kuvrXdWvp6KjZOCv0CrTYVQMrIUj8Of1L2M24Q==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [android] - - sass-embedded-android-arm@1.105.1: - resolution: {integrity: sha512-WYltUXkUP9jDaUq4uUiLgZXyYO5c72sa/TvpO4E2MMRdS+WJWgrPUDyvO+DpMR9gKWIm0QQ5cCEYnPDgovjVJw==} - engines: {node: '>=14.0.0'} - cpu: [arm] - os: [android] - - sass-embedded-android-riscv64@1.105.1: - resolution: {integrity: sha512-lWity0qhyQyPgkHUfZz+4IeD0r6mcAqG9KzOwVSjUrcSR9xAfWFKYAtHTA05R28ymyXf2Sf2+XfNV7YkxLgkUQ==} - engines: {node: '>=14.0.0'} - cpu: [riscv64] - os: [android] - - sass-embedded-android-x64@1.105.1: - resolution: {integrity: sha512-FRGZuIZ9eS3qutYPFqz8u12Ti9ccyWKWb7F7rKRI1BkIEmLZV1rC862dUGnTV2d9Tk9qbSAXL71t8alUR+fzIA==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [android] - - sass-embedded-darwin-arm64@1.105.1: - resolution: {integrity: sha512-75qVpHj0qwJKWOo+ZA5NPVFnOGfRrUiBdnLR0dPqsvzp3acvb5gBevptqTtJjVWubpYRIjcRdDDjmeWoXnfacQ==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [darwin] - - sass-embedded-darwin-x64@1.105.1: - resolution: {integrity: sha512-5TV8xyZrOO89ky752favkTuyz9O2hOB2aMoiUpMTk0rFr+UVANcXdIrEvJ9WKoqTHaszim7un3jADumunpW7zQ==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [darwin] - - sass-embedded-linux-arm64@1.105.1: - resolution: {integrity: sha512-arALlVQkXjxN1RPaQR41vbDYXrTIdXwPtEzBWRkOg7FdIN/dSohY8ik96M6M3MSc+niV/UIC7BO47PcspzJGpw==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [linux] - libc: glibc - - sass-embedded-linux-arm@1.105.1: - resolution: {integrity: sha512-Ng9GWIF6heTrwc9r/FFY9oUSoaylV2zcS296Qo2re3tJfLMWR37O2JUMyzPT+vtkRs8k3JOE6jTFVlXYnz4EAA==} - engines: {node: '>=14.0.0'} - cpu: [arm] - os: [linux] - libc: glibc - - sass-embedded-linux-musl-arm64@1.105.1: - resolution: {integrity: sha512-KizYVR3d70U67iLgKdF+HCKBdQYUxYiv0YWCS3zl6GwNGIbGXlkOtnjxus41CKTA4oOK0KsSus9P5zwhOBjiYA==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [linux] - libc: musl - - sass-embedded-linux-musl-arm@1.105.1: - resolution: {integrity: sha512-7u932XawHxGZvuYV4pOqcCvQi05yMONDmNDxVNh8Q7KmpytQP7mnyxBOYWStiw/p665AVL6BYGe7WY/vzCcWGw==} - engines: {node: '>=14.0.0'} - cpu: [arm] - os: [linux] - libc: musl - - sass-embedded-linux-musl-riscv64@1.105.1: - resolution: {integrity: sha512-gs84BgRBVNMX5fHRU3wxc3HuJjl0dUmZFpcVIaDDEVhnp5oXFLQp+gEu0xBBAurTzCHVpPU6GlGK6B1gRKmbhg==} - engines: {node: '>=14.0.0'} - cpu: [riscv64] - os: [linux] - libc: musl - - sass-embedded-linux-musl-x64@1.105.1: - resolution: {integrity: sha512-jFSRc1BSoCo0bw6GXmBWQMzdj0FBl2FTKSRqQSye3vmlI9O466DwBK4OQL9HRp6MGdY9IQFFMZLPZo5LJWIPsQ==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [linux] - libc: musl - - sass-embedded-linux-riscv64@1.105.1: - resolution: {integrity: sha512-tkZs6OvA+omJgSf8EaPQavq6M7bJNLm88eKt3yzYnBy0dVGMao4+lyRb/EnsgIq2R/B2lhxUHhSVNWAcY5bgXw==} - engines: {node: '>=14.0.0'} - cpu: [riscv64] - os: [linux] - libc: glibc - - sass-embedded-linux-x64@1.105.1: - resolution: {integrity: sha512-YF4OyymSlm26OcdPovIZL1blzjTxf5yN/rzgTmoGqAjEk57+yIuYo+7jBCgSQZFov8Rn4uHhZT+u0cpzxNFMRg==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [linux] - libc: glibc - - sass-embedded-unknown-all@1.105.1: - resolution: {integrity: sha512-bd2zDf+MdoPdRDH1awSQ+IL67vHvCbiKsWJ95XchPg3I67zQlXjTSf9KqRiE6twjNT1fRV82JUKoc0Hf6CUmfQ==} - os: ['!android', '!darwin', '!linux', '!win32'] - - sass-embedded-win32-arm64@1.105.1: - resolution: {integrity: sha512-Zpp/RWYL8ZzpLzBrs+/UVMEHOHx7sw4nlq2R52dKQ0qv/0V8oKemAy41PZyLir3c+S2C+YViYyfnFfQLRTAzuA==} - engines: {node: '>=14.0.0'} - cpu: [arm64] - os: [win32] - - sass-embedded-win32-x64@1.105.1: - resolution: {integrity: sha512-DM8EkMDzEsxnYoy11nyA5I4jr8lOV1TVQ/drNYvFQA9undiMzZD+7SkRA0OnCrgD1uCT+uRArCHSpNiiYVks+g==} - engines: {node: '>=14.0.0'} - cpu: [x64] - os: [win32] - - sass-embedded@1.105.1: - resolution: {integrity: sha512-9tKxXG4rq+oGTZUlQehWZwHxBTL80EiB8IWk9AEqz8uOqg910t88JIYbN92eMCxokQ5vrYSQxg15bh0o/3hh3w==} - engines: {node: '>=20.19.0'} - hasBin: true - - sass@1.105.1: - resolution: {integrity: sha512-1CnAWPyrrnVQzXGB/DUep1vYCKCm1CIBr+YxjjiW6wk9qtzemnGP4qicH56T2F9S4Hjtv/Ne3jDz8JqfdDU4oA==} - engines: {node: '>=20.19.0'} - hasBin: true - sass@1.97.2: resolution: {integrity: sha512-y5LWb0IlbO4e97Zr7c3mlpabcbBtS+ieiZ9iwDooShpFKWXf62zz5pEPdwrLYm+Bxn1fnbwFGzHuCLSA9tBmrw==} engines: {node: '>=14.0.0'} @@ -27858,10 +25587,17 @@ packages: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} + schema-utils@4.3.0: + resolution: {integrity: sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==} + engines: {node: '>= 10.13.0'} + schema-utils@4.3.3: resolution: {integrity: sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==} engines: {node: '>= 10.13.0'} + scule@1.3.0: + resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + secure-json-parse@4.1.0: resolution: {integrity: sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==} @@ -27891,13 +25627,13 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.8.2: - resolution: {integrity: sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==} + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} engines: {node: '>=10'} hasBin: true - semver@7.8.5: - resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + semver@7.8.2: + resolution: {integrity: sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==} engines: {node: '>=10'} hasBin: true @@ -27921,24 +25657,17 @@ packages: peerDependencies: seroval: ^1.0 - seroval-plugins@1.6.7: - resolution: {integrity: sha512-4Nk35ttD3DTDJW4hgw5StsVAPeU6qnDFnULAouw6tQ7oLTV/ICXrWpsXo2EE52eSP2joUMazbVf52mFEcADqRw==} - engines: {node: '>=10'} - peerDependencies: - seroval: ^1.0 - seroval@1.5.4: resolution: {integrity: sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==} engines: {node: '>=10'} - seroval@1.6.7: - resolution: {integrity: sha512-AeDcLh0yO2SFm9W71essgnSzLV9DI8ZH0x0knXn2DMnUZj728mpLbxjlbB6IqKCmqh8JA3cEqRyGoNkt584JcQ==} - engines: {node: '>=10'} - serve-index@1.9.1: resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==} engines: {node: '>= 0.8.0'} + serve-placeholder@2.0.2: + resolution: {integrity: sha512-/TMG8SboeiQbZJWRlfTCqMs2DD3SZgWp0kDQePz9yUuCnDfDh/92gf7/PxGhzXTKBIPASIHxFcZndoNbp6QOLQ==} + serve-static@1.16.2: resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} engines: {node: '>= 0.8.0'} @@ -27971,28 +25700,14 @@ packages: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} + sharp@0.34.4: + resolution: {integrity: sha512-FUH39xp3SBPnxWvd5iib1X8XY7J0K0X7d93sie9CJg2PO8/7gmg89Nve6OjItK53/MlAushNNxteBYfM6DEuoA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - sharp@0.35.4: - resolution: {integrity: sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==} - engines: {node: '>=20.9.0'} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - sharp@0.35.5: - resolution: {integrity: sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==} - engines: {node: '>=20.9.0'} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -28043,9 +25758,6 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - skin-tone@2.0.0: resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} engines: {node: '>=8'} @@ -28054,37 +25766,43 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + slashes@3.0.12: resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + smob@1.5.0: + resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} + smol-toml@1.6.1: resolution: {integrity: sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==} engines: {node: '>= 18'} - smol-toml@1.9.0: - resolution: {integrity: sha512-hpd+HLON7HdZXqYchMM/+LaTTbdK0AU3NngIJ4KVyWbY9bfQqdL9cD+4yf6dUoU2Ap4VsU0JkQi6FxAI1B2mXQ==} - engines: {node: '>= 18'} - sockjs@0.3.24: resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==} solid-js@1.9.12: resolution: {integrity: sha512-QzKaSJq2/iDrWR1As6MHZQ8fQkdOBf8GReYb7L5iKwMGceg7HxDcaOHk0at66tNgn9U2U7dXo8ZZpLIAmGMzgw==} + solid-js@2.0.0-beta.25: + resolution: {integrity: sha512-jWyMo3Z+Gv2IX6UvUvwBYSPM8/l9fm3sKM2dORTtC5xFrD4UTyJQBx9YdcawBalGQRXGX2xf+axkyBUUIVsw9Q==} + solid-motionone@1.0.4: resolution: {integrity: sha512-aqEjgecoO9raDFznu/dEci7ORSmA26Kjj9J4Cn1Gyr0GZuOVdvsNxdxClTL9J40Aq/uYFx4GLwC8n70fMLHiuA==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.8.0 solid-refresh@0.6.3: resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==} peerDependencies: - solid-js: 1.9.12 + solid-js: ^1.3 - solid-refresh@0.7.8: - resolution: {integrity: sha512-iG442T3HXJp5jEebCy8okETrWnmX7CnxNOKrJQVeufh6WXSn+xtLXaptUXXMHTWcRqTJOJwQ8UwzxrRtVFSIzA==} + solid-refresh@0.8.0-next.7: + resolution: {integrity: sha512-fqkPRAeiE0tqfo2ZljeQBIXwfYssU2w1FmaWFrXmnV33B/CfGfez7BjtOF0Y1/orUNRXI/DZcJlJThHllcCMsA==} peerDependencies: - solid-js: 1.9.12 + solid-js: '>=2.0.0-beta.7 <2.0.0-experimental.0' sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} @@ -28093,10 +25811,6 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - source-map-js@1.2.2: - resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} - engines: {node: '>=0.10.0'} - source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -28153,13 +25867,28 @@ packages: resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} engines: {node: '>= 0.6'} - srvx@1.0.5: - resolution: {integrity: sha512-KvSKRpgPG/oaq3cyT614OQ2bAa7DynuGamivCZeoZzIUULOdbQz6wUtnnVuC4+DCx2Zglzo8v5gBYmWIWYhDxA==} + srvx@0.10.0: + resolution: {integrity: sha512-NqIsR+wQCfkvvwczBh8J8uM4wTZx41K2lLSEp/3oMp917ODVVMtW5Me4epCmQ3gH8D+0b+/t4xxkUKutyhimTA==} engines: {node: '>=20.16.0'} hasBin: true - srvx@1.0.8: - resolution: {integrity: sha512-ngFS/J6St4PJfHRHGjr78xkPPtbyXtdMOLNE4x/XZunEK3OhV7aGUWMHf9WTUEy6wm1U0W4okkd82ZFFWRVQTw==} + srvx@0.10.1: + resolution: {integrity: sha512-A//xtfak4eESMWWydSRFUVvCTQbSwivnGCEf8YGPe2eHU0+Z6znfUTCPF0a7oV3sObSOcrXHlL6Bs9vVctfXdg==} + engines: {node: '>=20.16.0'} + hasBin: true + + srvx@0.11.12: + resolution: {integrity: sha512-AQfrGqntqVPXgP03pvBDN1KyevHC+KmYVqb8vVf4N+aomQqdhaZxjvoVp+AOm4u6x+GgNQY3MVzAUIn+TqwkOA==} + engines: {node: '>=20.16.0'} + hasBin: true + + srvx@0.11.15: + resolution: {integrity: sha512-iXsux0UcOjdvs0LCMa2Ws3WwcDUozA3JN3BquNXkaFPP7TpRqgunKdEgoZ/uwb1J6xaYHfxtz9Twlh6yzwM6Tg==} + engines: {node: '>=20.16.0'} + hasBin: true + + srvx@0.11.20: + resolution: {integrity: sha512-gdPvbwpJOJpMyBYcp39q78C4pmv/Aw5WwZKB3+/pfeUVxo3EvNXlOi1fxzoy2ECGvUeBhouXy9rBxstjQQOPog==} engines: {node: '>=20.16.0'} hasBin: true @@ -28207,16 +25936,16 @@ packages: std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} - std-env@4.2.0: - resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} - - std-env@4.3.0: - resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + std-env@4.1.0: + resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} + streamx@2.22.0: + resolution: {integrity: sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==} + streamx@2.27.0: resolution: {integrity: sha512-WZ189TKnHoAokYHvwzaAQMpd55cgUmFIcJFzBSgGcb886jau5DL+XdDhTWV4ps3FLvk+OORp0dLRTPsLZ21CSA==} @@ -28268,14 +25997,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@4.0.0: - resolution: {integrity: sha512-PaqAvfUZKBwc/SLmNZtHmzK+v19Z4O4eS3cKPeGvbIv/U3pnyEq4Tuw3/4v/FwfM8VQaEawsyCcOQ0P+kpwWWw==} - - stubborn-fs@2.0.0: - resolution: {integrity: sha512-Y0AvSwDw8y+nlSNFXMm2g6L51rBGdAQT20J3YSOqxC53Lo3bjWRtr2BKcfYoAf352WYpsZSTURrA0tqhfgudPA==} - - stubborn-utils@1.0.2: - resolution: {integrity: sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==} + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} style-loader@4.0.0: resolution: {integrity: sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==} @@ -28286,19 +26009,6 @@ packages: style-to-object@1.0.8: resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} - styled-jsx@5.1.6: - resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: ~19.2.9 - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - stylis@4.2.0: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} @@ -28336,18 +26046,14 @@ packages: swr@2.3.4: resolution: {integrity: sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg==} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - sync-child-process@1.0.2: - resolution: {integrity: sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==} - engines: {node: '>=16.0.0'} - - sync-message-port@1.2.0: - resolution: {integrity: sha512-gAQ9qrUN/UCypHtGFbbe7Rc/f9bzO88IwrG8TDo/aMKAApKyD6E3W4Cm0EfhfBb6Z6SKt59tTCTfD+n1xmAvMg==} - engines: {node: '>=16.0.0'} + system-architecture@0.1.0: + resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} + engines: {node: '>=18'} tagged-tag@1.0.0: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} @@ -28362,15 +26068,12 @@ packages: tailwindcss@4.2.2: resolution: {integrity: sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==} - tailwindcss@4.3.1: - resolution: {integrity: sha512-hk+TB1m+K8CYNrP6rjQaq/Y+4Zylwpa87mLYBKCunwnnQ9p+fHb7kmSfGqyEJoxF/O6CDyABWVFEafNSYKll+Q==} - tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - tapable@2.3.3: - resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + tapable@2.3.0: + resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} engines: {node: '>=6'} tar-stream@2.2.0: @@ -28385,10 +26088,6 @@ packages: engines: {node: '>=18'} deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - tar@7.5.22: - resolution: {integrity: sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==} - engines: {node: '>=18'} - teex@1.0.1: resolution: {integrity: sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==} @@ -28412,15 +26111,29 @@ packages: uglify-js: optional: true + terser-webpack-plugin@5.3.16: + resolution: {integrity: sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + terser@5.37.0: resolution: {integrity: sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==} engines: {node: '>=10'} hasBin: true - terser@5.51.2: - resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} - engines: {node: '>=10'} - hasBin: true + text-decoder@1.2.3: + resolution: {integrity: sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==} text-decoder@1.2.7: resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==} @@ -28455,31 +26168,23 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinybench@6.2.2: - resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==} - engines: {node: '>=20.0.0'} - - tinyclip@0.1.15: - resolution: {integrity: sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A==} - engines: {node: ^16.14.0 || >= 17.3.0} - tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyexec@1.3.1: - resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + tinyexec@1.0.2: + resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} engines: {node: '>=18'} tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tinyglobby@0.2.17: - resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} - tinyrainbow@3.2.0: - resolution: {integrity: sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==} + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} tldts-core@6.1.76: @@ -28499,6 +26204,10 @@ packages: tmp-promise@3.0.3: resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} + tmp@0.2.6: + resolution: {integrity: sha512-5sJPdPjfI5Kx+qbrDesxkglRBxW//g7hCsqspEjwkewGvBMGIKMOTKzLt1hFVJzyadba3lDUN20O9qhvbQUSTA==} + engines: {node: '>=14.14'} + tmp@0.2.7: resolution: {integrity: sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==} engines: {node: '>=14.14'} @@ -28515,9 +26224,8 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - toml@4.3.0: - resolution: {integrity: sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==} - engines: {node: '>=20'} + toml@3.0.0: + resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} tomlify-j0.4@3.0.0: resolution: {integrity: sha512-2Ulkc8T7mXJ2l0W476YC/A209PR38Nw8PuaCNtk9uI3t1zzFdGQeWYGQvmj2PZkVvRC/Yoi4xQKMRnWc/N29tQ==} @@ -28534,6 +26242,10 @@ packages: resolution: {integrity: sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==} engines: {node: '>=16'} + tough-cookie@6.0.0: + resolution: {integrity: sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==} + engines: {node: '>=16'} + tough-cookie@6.0.1: resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==} engines: {node: '>=16'} @@ -28575,6 +26287,11 @@ packages: peerDependencies: typescript: '>=4.8.4' + ts-declaration-location@1.0.5: + resolution: {integrity: sha512-WqmlO9IoeYwCqJ2E9kHMcY9GZhhfLYItC3VnHDlPOrg6nNdUWS4wn4hhDZUPt60m1EvtjPIZyprTjpI992Bgzw==} + peerDependencies: + typescript: '>=4.0.0' + ts-declaration-location@1.0.7: resolution: {integrity: sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==} peerDependencies: @@ -28613,8 +26330,8 @@ packages: resolution: {integrity: sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==} engines: {node: '>= 6.0.0'} - turbo-stream@3.2.1: - resolution: {integrity: sha512-BaX0eWz3IrypOVDFqPv3VGD6uZZW8y3oFAOJqZQ+oopmOyQ8/xNm7IMwAJFvxax2DBa8zSk+/AeqA6D6b1PXGg==} + turbo-stream@3.1.0: + resolution: {integrity: sha512-tVI25WEXl4fckNEmrq70xU1XumxUwEx/FZD5AgEcV8ri7Wvrg2o7GEq8U7htrNx3CajciGm+kDyhRf5JB6t7/A==} type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -28632,8 +26349,8 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - type-fest@5.9.0: - resolution: {integrity: sha512-yANm3Jr3GiJ1qgJlxGAVxTOIcEOk1rhQHamlXtnrCK7EHP4HeM9OGxtMg/W7HFdrVzw/ZWJKGVIJusVH85sLtw==} + type-fest@5.4.1: + resolution: {integrity: sha512-xygQcmneDyzsEuKZrFbRMne5HDqMs++aFzefrJTgEIKjQ3rekM+RPfFCVq2Gp1VIDqddoYeppCj4Pcb+RZW0GQ==} engines: {node: '>=20'} type-is@1.6.18: @@ -28668,6 +26385,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.1-rc: resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} @@ -28703,13 +26425,11 @@ packages: engines: {node: '>=14.17'} hasBin: true - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} - ufo@1.6.4: - resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + ufo@1.6.3: + resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} uint8array-extras@1.5.0: resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} @@ -28719,9 +26439,15 @@ packages: resolution: {integrity: sha512-dPJyqPzx8preQhqq24bBG1YNkvigm87K8kVEHCD+ruZg24t6IFEFv00xMWfxcC4djmFtiTLdFuADn4+DOz6R7Q==} hasBin: true + ultrahtml@1.6.0: + resolution: {integrity: sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==} + uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} + unctx@2.5.0: + resolution: {integrity: sha512-p+Rz9x0R7X+CYDkT+Xg8/GhpcShTlU8n+cf9OtOEf7zEQsNcCZO1dPKNRDqvUTaq+P32PMMkxWHwfrxkqfqAYg==} + undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -28740,14 +26466,6 @@ packages: resolution: {integrity: sha512-uZsKNuzQxDMUY6M3pIMvy5tvlGmtq8XJ2oLAkfRKGNu+1VQAIvLy2xIVG5ATZl5wDXl/tddByAWCizRbOme+TA==} engines: {node: '>=20.18.1'} - undici@7.29.0: - resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} - engines: {node: '>=20.18.1'} - - undici@7.30.1: - resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} - engines: {node: '>=20.18.1'} - unenv@2.0.0-rc.24: resolution: {integrity: sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==} @@ -28763,6 +26481,10 @@ packages: resolution: {integrity: sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==} engines: {node: '>=20'} + unimport@5.6.0: + resolution: {integrity: sha512-8rqAmtJV8o60x46kBAJKtHpJDJWkA2xcBqWKPI14MgUb05o1pnpnCnXSxedUXyeq7p8fR5g3pTo2BaswZ9lD9A==} + engines: {node: '>=18.12.0'} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -28779,6 +26501,10 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + unplugin-utils@0.3.1: + resolution: {integrity: sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==} + engines: {node: '>=20.19.0'} + unplugin@1.0.1: resolution: {integrity: sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==} @@ -28786,47 +26512,15 @@ packages: resolution: {integrity: sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==} engines: {node: '>=18.12.0'} - unplugin@3.7.0: - resolution: {integrity: sha512-GrM2uq3DQo3hvLU2FjeYhooJ8BY9N6j1Fbzgx7Pta3VVJevsD3VP4dPjZkZOS0mLvN8w9zzr9OlP+31bSMyuLw==} + unplugin@3.0.0: + resolution: {integrity: sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==} engines: {node: ^20.19.0 || >=22.12.0} - peerDependencies: - '@farmfe/core': '*' - '@rsbuild/core': '*' - '@rspack/core': '*' - bun-types-no-globals: '*' - esbuild: '*' - rolldown: '*' - rollup: '*' - unloader: '*' - vite: ^8.3.4 - webpack: '*' - peerDependenciesMeta: - '@farmfe/core': - optional: true - '@rsbuild/core': - optional: true - '@rspack/core': - optional: true - bun-types-no-globals: - optional: true - esbuild: - optional: true - rolldown: - optional: true - rollup: - optional: true - unloader: - optional: true - vite: - optional: true - webpack: - optional: true unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} - unstorage@1.17.5: - resolution: {integrity: sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==} + unstorage@1.17.4: + resolution: {integrity: sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==} peerDependencies: '@azure/app-configuration': ^1.8.0 '@azure/cosmos': ^4.2.0 @@ -28887,16 +26581,169 @@ packages: uploadthing: optional: true - unstorage@2.0.0-alpha.10: - resolution: {integrity: sha512-6h1veZp8gnp4dGllf0tDijoXxDYymJu251IpKKkrSVH+QHL6tXFbwG85KM+CBHSgpkkgtPuIiZ9oLCLP5+1Evw==} + unstorage@2.0.0-alpha.5: + resolution: {integrity: sha512-Sj8btci21Twnd6M+N+MHhjg3fVn6lAPElPmvFTe0Y/wR0WImErUdA1PzlAaUavHylJ7uDiFwlZDQKm0elG4b7g==} + peerDependencies: + '@azure/app-configuration': ^1.9.0 + '@azure/cosmos': ^4.7.0 + '@azure/data-tables': ^13.3.1 + '@azure/identity': ^4.13.0 + '@azure/keyvault-secrets': ^4.10.0 + '@azure/storage-blob': ^12.29.1 + '@capacitor/preferences': ^6.0.3 || ^7.0.0 + '@deno/kv': '>=0.12.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.35.6 + '@vercel/blob': '>=0.27.3' + '@vercel/functions': ^2.2.12 || ^3.0.0 + '@vercel/kv': ^1.0.1 + aws4fetch: ^1.0.20 + chokidar: ^4 || ^5 + db0: '>=0.3.4' + idb-keyval: ^6.2.2 + ioredis: ^5.8.2 + lru-cache: ^11.2.2 + mongodb: ^6 || ^7 + ofetch: '*' + uploadthing: ^7.7.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/functions': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + chokidar: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + lru-cache: + optional: true + mongodb: + optional: true + ofetch: + optional: true + uploadthing: + optional: true - until-async@3.0.2: - resolution: {integrity: sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==} + unstorage@2.0.0-alpha.6: + resolution: {integrity: sha512-w5vLYCJtnSx3OBtDk7cG4c1p3dfAnHA4WSZq9Xsurjbl2wMj7zqfOIjaHQI1Bl7yKzUxXAi+kbMr8iO2RhJmBA==} + peerDependencies: + '@azure/app-configuration': ^1.11.0 + '@azure/cosmos': ^4.9.1 + '@azure/data-tables': ^13.3.2 + '@azure/identity': ^4.13.0 + '@azure/keyvault-secrets': ^4.10.0 + '@azure/storage-blob': ^12.31.0 + '@capacitor/preferences': ^6 || ^7 || ^8 + '@deno/kv': '>=0.13.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.36.2 + '@vercel/blob': '>=0.27.3' + '@vercel/functions': ^2.2.12 || ^3.0.0 + '@vercel/kv': ^1.0.1 + aws4fetch: ^1.0.20 + chokidar: ^4 || ^5 + db0: '>=0.3.4' + idb-keyval: ^6.2.2 + ioredis: ^5.9.3 + lru-cache: ^11.2.6 + mongodb: ^6 || ^7 + ofetch: '*' + uploadthing: ^7.7.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/functions': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + chokidar: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + lru-cache: + optional: true + mongodb: + optional: true + ofetch: + optional: true + uploadthing: + optional: true - untun@0.2.2: - resolution: {integrity: sha512-+NnOJcSiEtYsVgJmXUzQbJeRAFXJC4yPJYuh6kF9B0Rm6zunXcs/3GZOTllyocSbUDIxD6Bj7e/4ATw7sph1Sw==} + untun@0.1.3: + resolution: {integrity: sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==} hasBin: true + untyped@2.0.0: + resolution: {integrity: sha512-nwNCjxJTjNuLCgFr42fEak5OcLuB3ecca+9ksPFNvtfYSLpjf+iJqSIaSnIile6ZPbKYxI5k2AfXqeopGudK/g==} + hasBin: true + + unwasm@0.5.3: + resolution: {integrity: sha512-keBgTSfp3r6+s9ZcSma+0chwxQdmLbB5+dAD9vjtB21UTMYuKAxHXCU1K2CbCtnP09EaWeRvACnXk0EJtUx+hw==} + + upath@2.0.1: + resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} + engines: {node: '>=4'} + update-browserslist-db@1.1.2: resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} hasBin: true @@ -28909,8 +26756,8 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - uqr@0.1.3: - resolution: {integrity: sha512-0rjE8iEJe4YmT9TOhwsZtqCMRLc5DXZUI2UEYUUg63ikBkqqE5EYWaI0etFe/5KUcmcYwLih2RND1kq+hrUJXA==} + uqr@0.1.2: + resolution: {integrity: sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==} uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -28929,7 +26776,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -28939,7 +26786,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': ^19.2.8 - react: ~19.2.9 + react: ^19.2.3 peerDependenciesMeta: '@types/react': optional: true @@ -28947,7 +26794,7 @@ packages: use-sync-external-store@1.6.0: resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} peerDependencies: - react: ~19.2.9 + react: ^19.2.3 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -28967,6 +26814,10 @@ packages: deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). @@ -28988,6 +26839,9 @@ packages: typescript: optional: true + validate-html-nesting@1.2.4: + resolution: {integrity: sha512-doQi7e8EJ2OWneSG1aZpJluS6A49aZM0+EICXWKm1i6WvqTLmq0tpUcImc4KTWG50mORO0C4YDBtOCSYvElftw==} + validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -28995,9 +26849,6 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - varint@6.0.0: - resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} - vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -29007,7 +26858,7 @@ packages: engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: typescript: '*' - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: vite: optional: true @@ -29015,14 +26866,14 @@ packages: vite-plugin-externalize-deps@0.10.0: resolution: {integrity: sha512-eQrtpT/Do7AvDn76l1yL6ZHyXJ+UWH2LaHVqhAes9go54qaAnPZuMbgxcroQ/7WY3ZyetZzYW2quQnDF0DV5qg==} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 vite-plugin-solid@2.11.10: resolution: {integrity: sha512-Yr1dQybmtDtDAHkii6hXuc1oVH9CPcS/Zb2jN/P36qqcrkNnVPsMTzQ06jyzFPFjj3U1IYKMVt/9ZqcwGCEbjw==} peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* - solid-js: 1.9.12 - vite: ^8.3.4 + solid-js: ^1.7.2 + vite: ^8.0.14 peerDependenciesMeta: '@testing-library/jest-dom': optional: true @@ -29031,24 +26882,43 @@ packages: resolution: {integrity: sha512-YMZCXsLw9kyuvQFEdwLP27fuTQJLmjNoHy90AOJnbRuJ6DwShUxKFo38gdFrWn9v11hnGicKCZEaeI/TFs6JKw==} peerDependencies: '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* - solid-js: 1.9.12 - vite: ^8.3.4 + solid-js: ^1.7.2 + vite: ^8.0.14 peerDependenciesMeta: '@testing-library/jest-dom': optional: true + vite-plugin-solid@3.0.0-next.16: + resolution: {integrity: sha512-0x3vsnaobiwT9q1Dq67oFDdwJxOgLCXY1tbhwud33ZaKU7rGcPvbiRZzCPDcPVj6Ghya27dlq8rOLdasUvRGcg==} + peerDependencies: + '@solidjs/web': '>=2.0.0-beta.25 <2.0.0-experimental.0' + '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* + solid-js: '>=2.0.0-beta.25 <2.0.0-experimental.0' + vite: ^8.0.14 + peerDependenciesMeta: + '@testing-library/jest-dom': + optional: true + + vite-tsconfig-paths@5.1.4: + resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} + peerDependencies: + vite: ^8.0.14 + peerDependenciesMeta: + vite: + optional: true + vite-tsconfig-paths@6.1.1: resolution: {integrity: sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==} peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 - vite@8.3.4: - resolution: {integrity: sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==} + vite@8.0.14: + resolution: {integrity: sha512-s4BJJ+5y1pYL6Otw51FHhVJQhPnuRinKig64g/1+EUNaJsd3gCKdD31IPFvswUgW9/60QT9oFHbZHbQK5imcxw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': 25.0.9 - '@vitejs/devtools': ^0.7.1 + '@vitejs/devtools': ^0.1.18 esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 @@ -29088,15 +26958,7 @@ packages: vitefu@1.1.1: resolution: {integrity: sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==} peerDependencies: - vite: ^8.3.4 - peerDependenciesMeta: - vite: - optional: true - - vitefu@1.1.3: - resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==} - peerDependencies: - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: vite: optional: true @@ -29117,48 +26979,7 @@ packages: '@vitest/ui': 4.1.4 happy-dom: '*' jsdom: '*' - vite: ^8.3.4 - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@opentelemetry/api': - optional: true - '@types/node': - optional: true - '@vitest/browser-playwright': - optional: true - '@vitest/browser-preview': - optional: true - '@vitest/browser-webdriverio': - optional: true - '@vitest/coverage-istanbul': - optional: true - '@vitest/coverage-v8': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - - vitest@5.0.4: - resolution: {integrity: sha512-z0WxZRV2Sg48wF0FSgMq3TFG8JS38/Qr96vZVZdX6+Em9raQTvnXQvdTFJe2m3rfyJnEHeHQ/snceIdi8D1pVg==} - engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@opentelemetry/api': ^1.9.0 - '@types/node': 25.0.9 - '@vitest/browser-playwright': 5.0.4 - '@vitest/browser-preview': 5.0.4 - '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 - '@vitest/coverage-istanbul': 5.0.4 - '@vitest/coverage-v8': 5.0.4 - '@vitest/ui': 5.0.4 - happy-dom: '*' - jsdom: '*' - vite: ^8.3.4 + vite: ^8.0.14 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -29218,8 +27039,14 @@ packages: peerDependencies: eslint: ^9.22.0 - vue-tsc@3.3.8: - resolution: {integrity: sha512-xXmYlVQpcwJDWyGlqbHrGVOl1h3UOsASymRibrHc+iy9j/UNnOrOn4u+fntHz4D6Cs74RtapeqVV6CzJeg+UlA==} + vue-tsc@3.1.5: + resolution: {integrity: sha512-L/G9IUjOWhBU0yun89rv8fKqmKC+T0HfhrFjlIml71WpfBv9eb4E9Bev8FMbyueBIU9vxQqbd+oOsVcDa5amGw==} + hasBin: true + peerDependencies: + typescript: '>=5.0.0' + + vue-tsc@3.1.8: + resolution: {integrity: sha512-deKgwx6exIHeZwF601P1ktZKNF0bepaSN4jBU3AsbldPx9gylUc1JDxYppl82yxgkAgaz0Y0LCLOi+cXe9HMYA==} hasBin: true peerDependencies: typescript: '>=5.0.0' @@ -29240,8 +27067,8 @@ packages: resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} engines: {node: '>=10.13.0'} - watchpack@2.5.2: - resolution: {integrity: sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==} + watchpack@2.4.4: + resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==} engines: {node: '>=10.13.0'} wbuf@1.7.3: @@ -29267,6 +27094,10 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} + webidl-conversions@8.0.0: + resolution: {integrity: sha512-n4W4YFyz5JzOfQeA8oN7dUYpR+MBP3PIUsn2jLjWXwK5ASUzt0Jc/A5sAUZoCYFJRGF0FBKJ+1JjN43rNdsQzA==} + engines: {node: '>=20'} + webidl-conversions@8.0.1: resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} engines: {node: '>=20'} @@ -29322,18 +27153,14 @@ packages: resolution: {integrity: sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==} engines: {node: '>=10.13.0'} - webpack-sources@3.5.1: - resolution: {integrity: sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==} - engines: {node: '>=10.13.0'} - webpack-virtual-modules@0.5.0: resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==} webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} - webpack@5.110.3: - resolution: {integrity: sha512-GuizBzRvo9YPpyoNMf3ag7AzxbaW85qrRSqTha345KyJbAFPt3/cMzBM0h+RWg7SK/7DdzRLINP3LvQ0hvr4hg==} + webpack@5.104.0: + resolution: {integrity: sha512-5DeICTX8BVgNp6afSPYXAFjskIgWGlygQH58bcozPOXgo2r/6xx39Y1+cULZ3gTxUYQP88jmwLj2anu4Xaq84g==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -29388,9 +27215,6 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - when-exit@2.1.5: - resolution: {integrity: sha512-VGkKJ564kzt6Ms1dbgPP/yuIoQCrsFAnRbptpC5wOEsDaNsbCB2bnfnaA8i/vRs5tjUSEOtIuvl9/MyVsvQZCg==} - which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -29408,21 +27232,11 @@ packages: engines: {node: '>= 8'} hasBin: true - which@3.0.1: - resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hasBin: true - why-is-node-running@2.3.0: resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true - why-is-node-running@3.2.1: - resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} - engines: {node: '>=20.11'} - hasBin: true - wildcard@2.0.1: resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} @@ -29443,11 +27257,6 @@ packages: engines: {node: '>=16'} hasBin: true - workerd@1.20261104.1: - resolution: {integrity: sha512-JuiKY9k/4V4UE2xsupaTvZ1SF6o2a8sg+/zfq/DaSDwvH+o7t2ZEFuIWNEnryfeFdP47/tz/p828Kvl4ptPlrA==} - engines: {node: '>=16'} - hasBin: true - wrangler@4.75.0: resolution: {integrity: sha512-Efk1tcnm4eduBYpH1sSjMYydXMnIFPns/qABI3+fsbDrUk5GksNYX8nYGVP4sFygvGPO7kJc36YJKB5ooA7JAg==} engines: {node: '>=20.0.0'} @@ -29473,6 +27282,10 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -29485,8 +27298,8 @@ packages: utf-8-validate: optional: true - ws@8.20.0: - resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} + ws@8.18.3: + resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -29497,8 +27310,8 @@ packages: utf-8-validate: optional: true - ws@8.21.0: - resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + ws@8.20.0: + resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -29568,9 +27381,8 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} - yauzl@3.4.0: - resolution: {integrity: sha512-jIH9yLR9wqr0wOS0TpBvo/g/2UgZH5qePVbjgRliiF0BYvOZyaBknKsF+x9Iht0O6sqgnB93rCICdOZFecJuDw==} - engines: {node: '>=12'} + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} @@ -29590,12 +27402,18 @@ packages: youch@4.1.0-beta.10: resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} + youch@4.1.0-beta.13: + resolution: {integrity: sha512-3+AG1Xvt+R7M7PSDudhbfbwiyveW6B8PLBIwTyEC598biEYIjHhC89i6DBEvR0EZUjGY3uGSnC429HpIa2Z09g==} + zeptomatch@2.0.2: resolution: {integrity: sha512-H33jtSKf8Ijtb5BW6wua3G5DhnFjbFML36eFu+VdOoVY4HD9e7ggjqdM6639B+L87rjnR6Y+XeRzBXZdy52B/g==} - zip-stream@7.0.5: - resolution: {integrity: sha512-dSvYKdvLsAHCDqPOhIwk/q5CvuWtTB3Dgpoe0uVEFjTzIOAmsQpprX25InCvrvJsirEbu1OHyy67n/kAj1Sw/w==} - engines: {node: '>=18'} + zimmerframe@1.1.4: + resolution: {integrity: sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==} + + zip-stream@6.0.1: + resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} + engines: {node: '>= 14'} zod@3.25.57: resolution: {integrity: sha512-6tgzLuwVST5oLUxXTmBqoinKMd3JeesgbgseXeFasKKj8Q1FCZrHnbqJOyiEvr4cVAlbug+CgIsmJ8cl/pU5FA==} @@ -29606,19 +27424,13 @@ packages: zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} - zod@4.5.4: - resolution: {integrity: sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==} - - zod@4.6.6: - resolution: {integrity: sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==} - zustand@5.0.12: resolution: {integrity: sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g==} engines: {node: '>=12.20.0'} peerDependencies: '@types/react': ^19.2.8 immer: '>=9.0.6' - react: ~19.2.9 + react: ^19.2.3 use-sync-external-store: '>=1.2.0' peerDependenciesMeta: '@types/react': @@ -29636,6 +27448,11 @@ snapshots: '@alloc/quick-lru@5.2.0': {} + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@andrewbranch/untar.js@1.0.3': {} '@arethetypeswrong/cli@0.18.4': @@ -29655,7 +27472,7 @@ snapshots: cjs-module-lexer: 1.4.3 fflate: 0.8.3 lru-cache: 11.5.1 - semver: 7.8.5 + semver: 7.8.2 typescript: 5.6.1-rc validate-npm-package-name: 5.0.1 @@ -29667,10 +27484,10 @@ snapshots: '@asamuzakjp/css-color@2.8.3': dependencies: - '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) - '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) - '@csstools/css-tokenizer': 3.0.4 + '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-color-parser': 3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 lru-cache: 10.4.3 '@asamuzakjp/css-color@4.0.5': @@ -29679,7 +27496,7 @@ snapshots: '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) '@csstools/css-tokenizer': 3.0.4 - lru-cache: 11.5.1 + lru-cache: 11.2.2 '@asamuzakjp/css-color@5.1.11': dependencies: @@ -29693,9 +27510,9 @@ snapshots: dependencies: '@asamuzakjp/nwsapi': 2.3.9 bidi-js: 1.0.3 - css-tree: 3.2.1 + css-tree: 3.1.0 is-potential-custom-element-name: 1.0.1 - lru-cache: 11.5.1 + lru-cache: 11.2.2 '@asamuzakjp/dom-selector@7.1.1': dependencies: @@ -29719,9 +27536,15 @@ snapshots: preact: 10.24.3 preact-render-to-string: 6.5.11(preact@10.24.3) - '@babel/code-frame@7.29.7': + '@babel/code-frame@7.27.1': dependencies: - '@babel/helper-validator-identifier': 7.29.7 + '@babel/helper-validator-identifier': 7.28.5 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/code-frame@7.29.0': + dependencies: + '@babel/helper-validator-identifier': 7.28.5 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -29729,85 +27552,71 @@ snapshots: '@babel/compat-data@7.29.0': {} - '@babel/compat-data@7.29.7': {} - - '@babel/core@7.28.5(supports-color@10.2.2)': + '@babel/core@7.28.5': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.5 '@babel/helper-compilation-targets': 7.27.2 - '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) '@babel/helpers': 7.28.4 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/traverse': 7.28.5(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/parser': 7.28.5 + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.28.5 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/core@7.29.0(supports-color@10.2.2)': + '@babel/core@7.29.0': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 + '@babel/code-frame': 7.29.0 + '@babel/generator': 7.29.1 '@babel/helper-compilation-targets': 7.28.6 - '@babel/helper-module-transforms': 7.28.6(@babel/core@7.29.0(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/helper-module-transforms': 7.28.6(@babel/core@7.29.0) '@babel/helpers': 7.29.2 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/traverse': 7.29.0(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/parser': 7.29.2 + '@babel/template': 7.28.6 + '@babel/traverse': 7.29.0 + '@babel/types': 7.29.0 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/core@7.29.7(supports-color@10.2.2)': + '@babel/generator@7.28.5': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 - '@babel/helper-compilation-targets': 7.29.7 - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helpers': 7.29.7 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 - '@jridgewell/remapping': 2.3.5 - convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@10.2.2) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color + '@babel/parser': 7.28.5 + '@babel/types': 7.29.0 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 - '@babel/generator@7.29.8': + '@babel/generator@7.29.1': dependencies: - '@babel/parser': 7.29.8 - '@babel/types': 7.29.8 + '@babel/parser': 7.29.2 + '@babel/types': 7.29.0 '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 '@babel/helper-annotate-as-pure@7.27.3': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@babel/helper-compilation-targets@7.27.2': dependencies: '@babel/compat-data': 7.27.5 '@babel/helper-validator-option': 7.27.1 - browserslist: 4.28.1 + browserslist: 4.24.4 lru-cache: 5.1.1 semver: 6.3.1 @@ -29819,331 +27628,374 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-compilation-targets@7.29.7': + '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/compat-data': 7.29.7 - '@babel/helper-validator-option': 7.29.7 - browserslist: 4.28.1 - lru-cache: 5.1.1 - semver: 6.3.1 - - '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-member-expression-to-functions': 7.27.1(supports-color@10.2.2) + '@babel/helper-member-expression-to-functions': 7.27.1 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.28.5) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/traverse': 7.28.5 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-create-class-features-plugin@7.28.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-member-expression-to-functions': 7.27.1(supports-color@10.2.2) + '@babel/helper-member-expression-to-functions': 7.28.5 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/helper-replace-supers': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.28.5) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/traverse': 7.28.5 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-class-features-plugin@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-create-class-features-plugin@7.28.5(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.29.0 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-member-expression-to-functions': 7.28.5(supports-color@10.2.2) + '@babel/helper-member-expression-to-functions': 7.28.5 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/helper-replace-supers': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/helper-replace-supers': 7.27.1(@babel/core@7.29.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/traverse': 7.28.5 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-create-class-features-plugin@7.28.6(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-annotate-as-pure': 7.27.3 + '@babel/helper-member-expression-to-functions': 7.28.5 + '@babel/helper-optimise-call-expression': 7.27.1 + '@babel/helper-replace-supers': 7.28.6(@babel/core@7.29.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/traverse': 7.29.0 semver: 6.3.1 transitivePeerDependencies: - supports-color '@babel/helper-globals@7.28.0': {} - '@babel/helper-globals@7.29.7': {} - - '@babel/helper-member-expression-to-functions@7.27.1(supports-color@10.2.2)': + '@babel/helper-member-expression-to-functions@7.27.1': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/traverse': 7.29.0 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-member-expression-to-functions@7.28.5(supports-color@10.2.2)': + '@babel/helper-member-expression-to-functions@7.28.5': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/traverse': 7.29.0 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.18.6': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 - '@babel/helper-module-imports@7.27.1(supports-color@10.2.2)': + '@babel/helper-module-imports@7.27.1': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.28.6(supports-color@10.2.2)': + '@babel/helper-module-imports@7.28.6': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/traverse': 7.29.0 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.29.7(supports-color@10.2.2)': + '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.5)': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/core': 7.28.5 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 + '@babel/traverse': 7.28.5 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-module-transforms@7.28.3(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-module-imports': 7.27.1(supports-color@10.2.2) - '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 + '@babel/traverse': 7.28.5 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.28.6(@babel/core@7.29.0(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-module-transforms@7.28.6(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.0(supports-color@10.2.2) - '@babel/helper-module-imports': 7.28.6(supports-color@10.2.2) - '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.29.7(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) - '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color - - '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) - '@babel/helper-validator-identifier': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-module-imports': 7.28.6 + '@babel/helper-validator-identifier': 7.28.5 + '@babel/traverse': 7.29.0 transitivePeerDependencies: - supports-color '@babel/helper-optimise-call-expression@7.27.1': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@babel/helper-plugin-utils@7.27.1': {} '@babel/helper-plugin-utils@7.28.6': {} - '@babel/helper-replace-supers@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-replace-supers@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-member-expression-to-functions': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.28.5 + '@babel/helper-member-expression-to-functions': 7.28.5 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/traverse': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-replace-supers@7.27.1(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-member-expression-to-functions': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-member-expression-to-functions': 7.28.5 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/traverse': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/helper-replace-supers@7.28.6(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-member-expression-to-functions': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-member-expression-to-functions': 7.28.5 '@babel/helper-optimise-call-expression': 7.27.1 - '@babel/traverse': 7.29.8(supports-color@10.2.2) + '@babel/traverse': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.27.1(supports-color@10.2.2)': + '@babel/helper-skip-transparent-expression-wrappers@7.27.1': dependencies: - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.29.7': {} + '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.29.7': {} + '@babel/helper-validator-identifier@7.28.5': {} '@babel/helper-validator-option@7.27.1': {} - '@babel/helper-validator-option@7.29.7': {} - '@babel/helpers@7.28.4': dependencies: - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 + '@babel/template': 7.27.2 + '@babel/types': 7.29.0 '@babel/helpers@7.29.2': dependencies: - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 - - '@babel/helpers@7.29.7': - dependencies: - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 + '@babel/template': 7.28.6 + '@babel/types': 7.29.0 '@babel/parser@7.28.5': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 - '@babel/parser@7.29.8': + '@babel/parser@7.29.2': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 - '@babel/plugin-proposal-decorators@7.29.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-proposal-decorators@7.28.0(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.28.6 - '@babel/plugin-syntax-decorators': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) + '@babel/core': 7.28.5 + '@babel/helper-create-class-features-plugin': 7.28.5(@babel/core@7.28.5) + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-decorators': 7.27.1(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/plugin-syntax-decorators@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))': + '@babel/plugin-proposal-decorators@7.29.0(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.28.6 - - '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))': - dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.27.1 - - '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.27.1 - - '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))': - dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.27.1 - - '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.27.1 - - '@babel/plugin-syntax-typescript@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.28.6 - - '@babel/plugin-transform-class-properties@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.0) '@babel/helper-plugin-utils': 7.28.6 + '@babel/plugin-syntax-decorators': 7.28.6(@babel/core@7.29.0) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-syntax-decorators@7.27.1(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-syntax-decorators@7.28.6(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.27.1 + + '@babel/plugin-syntax-jsx@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.27.1 + + '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.27.1 + + '@babel/plugin-syntax-typescript@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.27.1 + + '@babel/plugin-syntax-typescript@7.28.6(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-class-properties@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-create-class-features-plugin': 7.28.5(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-transform-class-properties@7.28.6(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.0) + '@babel/helper-plugin-utils': 7.28.6 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.27.1 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-transform-modules-commonjs@7.27.1(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.29.0) + '@babel/helper-plugin-utils': 7.27.1 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-plugin-utils': 7.28.6 + + '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2)) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-typescript@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-transform-typescript@7.28.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.28.5 '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.27.1 - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - transitivePeerDependencies: - - supports-color - - '@babel/plugin-transform-typescript@7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-annotate-as-pure': 7.27.3 - '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/helper-create-class-features-plugin': 7.28.5(@babel/core@7.28.5) '@babel/helper-plugin-utils': 7.28.6 - '@babel/helper-skip-transparent-expression-wrappers': 7.27.1(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/plugin-transform-typescript@7.28.5(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@babel/helper-annotate-as-pure': 7.27.3 + '@babel/helper-create-class-features-plugin': 7.28.5(@babel/core@7.29.0) + '@babel/helper-plugin-utils': 7.28.6 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.29.0) + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-typescript@7.28.6(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-annotate-as-pure': 7.27.3 + '@babel/helper-create-class-features-plugin': 7.28.6(@babel/core@7.29.0) + '@babel/helper-plugin-utils': 7.28.6 + '@babel/helper-skip-transparent-expression-wrappers': 7.27.1 + '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) + transitivePeerDependencies: + - supports-color + + '@babel/preset-typescript@7.27.1(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2)) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/preset-typescript@7.28.5(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.28.5 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/plugin-transform-typescript': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.28.5) transitivePeerDependencies: - supports-color - '@babel/preset-typescript@7.28.5(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@babel/preset-typescript@7.28.5(@babel/core@7.29.0)': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.29.0 '@babel/helper-plugin-utils': 7.27.1 '@babel/helper-validator-option': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.0) + '@babel/plugin-transform-modules-commonjs': 7.27.1(@babel/core@7.29.0) + '@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.29.0) transitivePeerDependencies: - supports-color @@ -30151,100 +28003,102 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.29.7': + '@babel/template@7.27.2': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/parser': 7.29.8 - '@babel/types': 7.29.8 + '@babel/code-frame': 7.27.1 + '@babel/parser': 7.28.5 + '@babel/types': 7.29.0 - '@babel/traverse@7.28.5(supports-color@10.2.2)': + '@babel/template@7.28.6': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 + '@babel/code-frame': 7.29.0 + '@babel/parser': 7.29.2 + '@babel/types': 7.29.0 + + '@babel/traverse@7.28.5': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/generator': 7.28.5 '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 - debug: 4.4.3(supports-color@10.2.2) + '@babel/parser': 7.28.5 + '@babel/template': 7.27.2 + '@babel/types': 7.29.0 + debug: 4.4.3 transitivePeerDependencies: - supports-color - '@babel/traverse@7.29.0(supports-color@10.2.2)': + '@babel/traverse@7.29.0': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 + '@babel/code-frame': 7.29.0 + '@babel/generator': 7.29.1 '@babel/helper-globals': 7.28.0 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 - debug: 4.4.3(supports-color@10.2.2) + '@babel/parser': 7.29.2 + '@babel/template': 7.28.6 + '@babel/types': 7.29.0 + debug: 4.4.3 transitivePeerDependencies: - supports-color - '@babel/traverse@7.29.8(supports-color@10.2.2)': + '@babel/types@7.28.4': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/generator': 7.29.8 - '@babel/helper-globals': 7.29.7 - '@babel/parser': 7.29.8 - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 - debug: 4.4.3(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 - '@babel/types@7.29.8': + '@babel/types@7.28.5': dependencies: - '@babel/helper-string-parser': 7.29.7 - '@babel/helper-validator-identifier': 7.29.7 + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 - '@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0)': + '@babel/types@7.29.0': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 + + '@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0)': dependencies: '@better-auth/utils': 0.4.2 '@better-fetch/fetch': 1.3.1 '@opentelemetry/semantic-conventions': 1.41.1 '@standard-schema/spec': 1.1.0 - better-call: 1.3.6(zod@4.5.4) + better-call: 1.3.6(zod@4.4.3) jose: 6.1.3 kysely: 0.29.2 nanostores: 1.3.0 - zod: 4.5.4 - optionalDependencies: - '@opentelemetry/api': 1.9.1 + zod: 4.4.3 - '@better-auth/drizzle-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': + '@better-auth/drizzle-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 - '@better-auth/kysely-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(kysely@0.29.2)': + '@better-auth/kysely-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(kysely@0.29.2)': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 optionalDependencies: kysely: 0.29.2 - '@better-auth/memory-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': + '@better-auth/memory-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 - '@better-auth/mongo-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': + '@better-auth/mongo-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 - '@better-auth/prisma-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))': + '@better-auth/prisma-adapter@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 optionalDependencies: - '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) - prisma: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@prisma/client': 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) + prisma: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) - '@better-auth/telemetry@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)': + '@better-auth/telemetry@1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)': dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) '@better-auth/utils': 0.4.2 '@better-fetch/fetch': 1.3.1 @@ -30254,14 +28108,14 @@ snapshots: '@better-fetch/fetch@1.3.1': {} + '@blazediff/core@1.9.1': {} + '@braidai/lang@1.1.2': {} '@bramus/specificity@2.4.2': dependencies: css-tree: 3.2.1 - '@bufbuild/protobuf@2.16.0': {} - '@bundled-es-modules/cookie@2.0.1': dependencies: cookie: 0.7.2 @@ -30289,7 +28143,7 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.8.5 + semver: 7.7.3 '@changesets/assemble-release-plan@6.0.9': dependencies: @@ -30298,7 +28152,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 - semver: 7.8.5 + semver: 7.7.3 '@changesets/changelog-git@0.2.1': dependencies: @@ -30363,7 +28217,7 @@ snapshots: '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 picocolors: 1.1.1 - semver: 7.8.5 + semver: 7.7.3 '@changesets/get-github-info@0.8.0': dependencies: @@ -30448,21 +28302,9 @@ snapshots: '@chevrotain/utils@10.5.0': {} - '@clack/core@1.4.3': + '@clerk/backend@2.18.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - fast-wrap-ansi: 0.2.0 - sisteransi: 1.0.5 - - '@clack/prompts@1.7.0': - dependencies: - '@clack/core': 1.4.3 - fast-string-width: 3.0.2 - fast-wrap-ansi: 0.2.0 - sisteransi: 1.0.5 - - '@clerk/backend@2.18.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': - dependencies: - '@clerk/shared': 3.28.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/shared': 3.28.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@clerk/types': 4.95.0 cookie: 1.0.2 standardwebhooks: 1.0.0 @@ -30471,82 +28313,82 @@ snapshots: - react - react-dom - '@clerk/backend@2.29.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/backend@2.29.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.42.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/types': 4.101.10(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/shared': 3.42.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/types': 4.101.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) standardwebhooks: 1.0.0 tslib: 2.8.1 transitivePeerDependencies: - react - react-dom - '@clerk/clerk-react@5.53.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/clerk-react@5.53.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.28.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/shared': 3.28.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@clerk/types': 4.95.0 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.42.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@clerk/shared': 3.42.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/shared@3.28.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/shared@3.28.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@clerk/types': 4.95.0 dequal: 2.0.3 glob-to-regexp: 0.4.1 js-cookie: 3.0.5 std-env: 3.10.0 - swr: 2.3.4(react@19.2.9) + swr: 2.3.4(react@19.2.3) optionalDependencies: - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@clerk/shared@3.42.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/shared@3.42.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: csstype: 3.1.3 dequal: 2.0.3 glob-to-regexp: 0.4.1 js-cookie: 3.0.5 std-env: 3.10.0 - swr: 2.3.4(react@19.2.9) + swr: 2.3.4(react@19.2.3) optionalDependencies: - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@clerk/tanstack-react-start@0.19.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/tanstack-react-start@0.19.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/backend': 2.18.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/clerk-react': 5.53.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/shared': 3.28.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/backend': 2.18.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/clerk-react': 5.53.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 3.28.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@clerk/types': 4.95.0 '@tanstack/react-router': link:packages/react-router '@tanstack/react-start': link:packages/react-start - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/tanstack-react-start@0.27.14(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/tanstack-react-start@0.27.14(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/backend': 2.29.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/clerk-react': 5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/shared': 3.42.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@clerk/types': 4.101.10(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/backend': 2.29.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/clerk-react': 5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/shared': 3.42.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@clerk/types': 4.101.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-router': link:packages/react-router '@tanstack/react-start': link:packages/react-start - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) tslib: 2.8.1 - '@clerk/types@4.101.10(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@clerk/types@4.101.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@clerk/shared': 3.42.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@clerk/shared': 3.42.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) transitivePeerDependencies: - react - react-dom @@ -30555,62 +28397,20 @@ snapshots: dependencies: csstype: 3.1.3 - '@cloudflare/build-output-utils@0.9.10': - dependencies: - '@cloudflare/config': 0.30.2 - - '@cloudflare/config@0.30.2': - dependencies: - zod: 4.6.6 - '@cloudflare/kv-asset-handler@0.4.2': {} - '@cloudflare/runtime-types@0.1.23(@types/node@25.0.9)': - dependencies: - miniflare: 5.20261104.0-beta(@types/node@25.0.9) - workerd: 1.20261104.1 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - utf-8-validate - '@cloudflare/unenv-preset@2.15.0(unenv@2.0.0-rc.24)(workerd@1.20260317.1)': dependencies: unenv: 2.0.0-rc.24 optionalDependencies: workerd: 1.20260317.1 - '@cloudflare/unenv-preset@2.15.0(unenv@2.0.0-rc.24)(workerd@1.20261104.1)': - dependencies: - unenv: 2.0.0-rc.24 - optionalDependencies: - workerd: 1.20261104.1 - - '@cloudflare/unenv-preset@2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261104.1)': - dependencies: - unenv: 2.0.0-rc.24 - optionalDependencies: - workerd: 1.20261104.1 - - '@cloudflare/vite-plugin@1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20260317.1)(wrangler@4.75.0)': + '@cloudflare/vite-plugin@1.29.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))(workerd@1.20260317.1)(wrangler@4.75.0)': dependencies: '@cloudflare/unenv-preset': 2.15.0(unenv@2.0.0-rc.24)(workerd@1.20260317.1) miniflare: 4.20260317.0 unenv: 2.0.0-rc.24 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - wrangler: 4.75.0 - ws: 8.18.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - workerd - - '@cloudflare/vite-plugin@1.29.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(workerd@1.20261104.1)(wrangler@4.75.0)': - dependencies: - '@cloudflare/unenv-preset': 2.15.0(unenv@2.0.0-rc.24)(workerd@1.20261104.1) - miniflare: 4.20260317.0 - unenv: 2.0.0-rc.24 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) wrangler: 4.75.0 ws: 8.18.0 transitivePeerDependencies: @@ -30621,49 +28421,35 @@ snapshots: '@cloudflare/workerd-darwin-64@1.20260317.1': optional: true - '@cloudflare/workerd-darwin-64@1.20261104.1': - optional: true - '@cloudflare/workerd-darwin-arm64@1.20260317.1': optional: true - '@cloudflare/workerd-darwin-arm64@1.20261104.1': - optional: true - '@cloudflare/workerd-linux-64@1.20260317.1': optional: true - '@cloudflare/workerd-linux-64@1.20261104.1': - optional: true - '@cloudflare/workerd-linux-arm64@1.20260317.1': optional: true - '@cloudflare/workerd-linux-arm64@1.20261104.1': - optional: true - '@cloudflare/workerd-windows-64@1.20260317.1': optional: true - '@cloudflare/workerd-windows-64@1.20261104.1': - optional: true - - '@codspeed/core@6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)': + '@codspeed/core@5.5.0(debug@4.4.3)': dependencies: - axios: 1.18.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2) - form-data: 4.0.6 + axios: 1.17.0(debug@4.4.3) + find-up: 6.3.0 + form-data: 4.0.5 node-gyp-build: 4.8.4 stack-trace: 1.0.0-pre2 transitivePeerDependencies: - debug - supports-color - '@codspeed/vitest-plugin@6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(tinybench@6.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vitest@5.0.4)': + '@codspeed/vitest-plugin@5.5.0(debug@4.4.3)(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': 6.0.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2) - tinybench: 6.2.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitest: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + '@codspeed/core': 5.5.0(debug@4.4.3) + 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/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) transitivePeerDependencies: - debug - supports-color @@ -30673,15 +28459,15 @@ snapshots: '@colors/colors@1.6.0': {} - '@convex-dev/better-auth@0.9.7(@standard-schema/spec@1.1.0)(@typescript/typescript6@6.0.2)(better-auth@1.6.19(@opentelemetry/api@1.9.1)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)(vitest@4.1.4)(vue@3.5.25(@typescript/typescript6@6.0.2)))(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9))(hono@4.13.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@convex-dev/better-auth@0.9.7(@standard-schema/spec@1.1.0)(better-auth@1.6.19(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)(vitest@4.1.4)(vue@3.5.25(typescript@6.0.2)))(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.7.10)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2)': dependencies: - better-auth: 1.6.19(@opentelemetry/api@1.9.1)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)(vitest@4.1.4)(vue@3.5.25(@typescript/typescript6@6.0.2)) + better-auth: 1.6.19(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)(vitest@4.1.4)(vue@3.5.25(typescript@6.0.2)) common-tags: 1.8.2 - convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9) - convex-helpers: 0.1.104(@standard-schema/spec@1.1.0)(@typescript/typescript6@6.0.2)(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9))(hono@4.13.9)(react@19.2.9)(zod@3.25.76) + convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + convex-helpers: 0.1.104(@standard-schema/spec@1.1.0)(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.7.10)(react@19.2.3)(typescript@6.0.2)(zod@3.25.76) jose: 6.1.0 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) remeda: 2.32.0 semver: 7.7.3 type-fest: 4.41.0 @@ -30691,19 +28477,26 @@ snapshots: - hono - typescript - '@convex-dev/react-query@0.0.0-alpha.8(@tanstack/react-query@5.102.0(react@19.2.9))(convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9))': + '@convex-dev/react-query@0.0.0-alpha.8(@tanstack/react-query@5.99.0(react@19.2.3))(convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': dependencies: - '@tanstack/react-query': 5.102.0(react@19.2.9) - convex: 1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@tanstack/react-query': 5.99.0(react@19.2.3) + convex: 1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@csstools/color-helpers@5.0.1': {} + '@csstools/color-helpers@5.1.0': {} '@csstools/color-helpers@6.0.2': {} + '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) @@ -30714,6 +28507,13 @@ snapshots: '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) '@csstools/css-tokenizer': 4.0.0 + '@csstools/css-color-parser@3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/color-helpers': 5.0.1 + '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-color-parser@3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/color-helpers': 5.1.0 @@ -30728,6 +28528,10 @@ snapshots: '@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0) '@csstools/css-tokenizer': 4.0.0 + '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-tokenizer': 3.0.3 + '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': dependencies: '@csstools/css-tokenizer': 3.0.4 @@ -30736,10 +28540,16 @@ snapshots: dependencies: '@csstools/css-tokenizer': 4.0.0 + '@csstools/css-syntax-patches-for-csstree@1.0.14(postcss@8.5.15)': + dependencies: + postcss: 8.5.15 + '@csstools/css-syntax-patches-for-csstree@1.1.5(css-tree@3.2.1)': optionalDependencies: css-tree: 3.2.1 + '@csstools/css-tokenizer@3.0.3': {} + '@csstools/css-tokenizer@3.0.4': {} '@csstools/css-tokenizer@4.0.0': {} @@ -30758,12 +28568,6 @@ snapshots: pprof-format: 2.2.1 source-map: 0.7.6 - '@datadog/pprof@5.15.1': - dependencies: - node-gyp-build: 4.8.4 - pprof-format: 2.2.1 - source-map: 0.7.6 - '@dependents/detective-less@5.0.1': dependencies: gonzales-pe: 4.3.0 @@ -30771,6 +28575,57 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} + '@dom-expressions/babel-plugin-jsx@0.50.0-next.25(@babel/core@7.28.5)': + dependencies: + '@babel/core': 7.28.5 + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/types': 7.29.0 + html-entities: 2.3.3 + parse5: 7.3.0 + validate-html-nesting: 1.2.4 + + '@dom-expressions/babel-plugin-jsx@0.50.0-next.25(@babel/core@7.29.0)': + dependencies: + '@babel/core': 7.29.0 + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.0) + '@babel/types': 7.29.0 + html-entities: 2.3.3 + parse5: 7.3.0 + validate-html-nesting: 1.2.4 + + '@dom-expressions/compiler-darwin-arm64@0.50.0-next.29': + optional: true + + '@dom-expressions/compiler-darwin-x64@0.50.0-next.29': + optional: true + + '@dom-expressions/compiler-linux-arm64-gnu@0.50.0-next.29': + optional: true + + '@dom-expressions/compiler-linux-x64-gnu@0.50.0-next.29': + optional: true + + '@dom-expressions/compiler-wasm32-wasi@0.50.0-next.29': + dependencies: + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + optional: true + + '@dom-expressions/compiler-win32-x64-msvc@0.50.0-next.29': + optional: true + + '@dom-expressions/compiler@0.50.0-next.29': + optionalDependencies: + '@dom-expressions/compiler-darwin-arm64': 0.50.0-next.29 + '@dom-expressions/compiler-darwin-x64': 0.50.0-next.29 + '@dom-expressions/compiler-linux-arm64-gnu': 0.50.0-next.29 + '@dom-expressions/compiler-linux-x64-gnu': 0.50.0-next.29 + '@dom-expressions/compiler-wasm32-wasi': 0.50.0-next.29 + '@dom-expressions/compiler-win32-x64-msvc': 0.50.0-next.29 + '@electric-sql/pglite-socket@0.0.6(@electric-sql/pglite@0.3.2)': dependencies: '@electric-sql/pglite': 0.3.2 @@ -30779,23 +28634,34 @@ snapshots: dependencies: '@electric-sql/pglite': 0.3.2 - '@electric-sql/pglite@0.3.16': {} - '@electric-sql/pglite@0.3.2': {} - '@emnapi/core@1.11.3': + '@emnapi/core@1.10.0': dependencies: - '@emnapi/wasi-threads': 1.2.3 + '@emnapi/wasi-threads': 1.2.1 tslib: 2.8.1 + optional: true + + '@emnapi/core@1.11.2': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true '@emnapi/core@1.4.5': dependencies: '@emnapi/wasi-threads': 1.0.4 tslib: 2.8.1 - '@emnapi/runtime@1.11.3': + '@emnapi/runtime@1.10.0': dependencies: tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.2': + dependencies: + tslib: 2.8.1 + optional: true '@emnapi/runtime@1.4.5': dependencies: @@ -30805,13 +28671,19 @@ snapshots: dependencies: tslib: 2.8.1 - '@emnapi/wasi-threads@1.2.3': + '@emnapi/wasi-threads@1.2.1': dependencies: tslib: 2.8.1 + optional: true - '@emotion/babel-plugin@11.13.5(supports-color@10.2.2)': + '@emnapi/wasi-threads@1.2.2': dependencies: - '@babel/helper-module-imports': 7.27.1(supports-color@10.2.2) + tslib: 2.8.1 + optional: true + + '@emotion/babel-plugin@11.13.5': + dependencies: + '@babel/helper-module-imports': 7.27.1 '@babel/runtime': 7.26.7 '@emotion/hash': 0.9.2 '@emotion/memoize': 0.9.0 @@ -30841,17 +28713,17 @@ snapshots: '@emotion/memoize@0.9.0': {} - '@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2)': + '@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 - '@emotion/babel-plugin': 11.13.5(supports-color@10.2.2) + '@emotion/babel-plugin': 11.13.5 '@emotion/cache': 11.14.0 '@emotion/serialize': 1.3.3 - '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.9) + '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.3) '@emotion/utils': 1.4.2 '@emotion/weak-memoize': 0.4.0 hoist-non-react-statics: 3.3.2 - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 transitivePeerDependencies: @@ -30867,16 +28739,16 @@ snapshots: '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2)': + '@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 - '@emotion/babel-plugin': 11.13.5(supports-color@10.2.2) + '@emotion/babel-plugin': 11.13.5 '@emotion/is-prop-valid': 1.3.1 - '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.3) '@emotion/serialize': 1.3.3 - '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.9) + '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.2.3) '@emotion/utils': 1.4.2 - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 transitivePeerDependencies: @@ -30884,9 +28756,9 @@ snapshots: '@emotion/unitless@0.10.0': {} - '@emotion/use-insertion-effect-with-fallbacks@1.2.0(react@19.2.9)': + '@emotion/use-insertion-effect-with-fallbacks@1.2.0(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 '@emotion/utils@1.4.2': {} @@ -30914,9 +28786,6 @@ snapshots: '@esbuild/aix-ppc64@0.27.4': optional: true - '@esbuild/aix-ppc64@0.28.1': - optional: true - '@esbuild/android-arm64@0.23.0': optional: true @@ -30932,9 +28801,6 @@ snapshots: '@esbuild/android-arm64@0.27.4': optional: true - '@esbuild/android-arm64@0.28.1': - optional: true - '@esbuild/android-arm@0.23.0': optional: true @@ -30950,9 +28816,6 @@ snapshots: '@esbuild/android-arm@0.27.4': optional: true - '@esbuild/android-arm@0.28.1': - optional: true - '@esbuild/android-x64@0.23.0': optional: true @@ -30968,9 +28831,6 @@ snapshots: '@esbuild/android-x64@0.27.4': optional: true - '@esbuild/android-x64@0.28.1': - optional: true - '@esbuild/darwin-arm64@0.23.0': optional: true @@ -30986,9 +28846,6 @@ snapshots: '@esbuild/darwin-arm64@0.27.4': optional: true - '@esbuild/darwin-arm64@0.28.1': - optional: true - '@esbuild/darwin-x64@0.23.0': optional: true @@ -31004,9 +28861,6 @@ snapshots: '@esbuild/darwin-x64@0.27.4': optional: true - '@esbuild/darwin-x64@0.28.1': - optional: true - '@esbuild/freebsd-arm64@0.23.0': optional: true @@ -31022,9 +28876,6 @@ snapshots: '@esbuild/freebsd-arm64@0.27.4': optional: true - '@esbuild/freebsd-arm64@0.28.1': - optional: true - '@esbuild/freebsd-x64@0.23.0': optional: true @@ -31040,9 +28891,6 @@ snapshots: '@esbuild/freebsd-x64@0.27.4': optional: true - '@esbuild/freebsd-x64@0.28.1': - optional: true - '@esbuild/linux-arm64@0.23.0': optional: true @@ -31058,9 +28906,6 @@ snapshots: '@esbuild/linux-arm64@0.27.4': optional: true - '@esbuild/linux-arm64@0.28.1': - optional: true - '@esbuild/linux-arm@0.23.0': optional: true @@ -31076,9 +28921,6 @@ snapshots: '@esbuild/linux-arm@0.27.4': optional: true - '@esbuild/linux-arm@0.28.1': - optional: true - '@esbuild/linux-ia32@0.23.0': optional: true @@ -31094,9 +28936,6 @@ snapshots: '@esbuild/linux-ia32@0.27.4': optional: true - '@esbuild/linux-ia32@0.28.1': - optional: true - '@esbuild/linux-loong64@0.23.0': optional: true @@ -31112,9 +28951,6 @@ snapshots: '@esbuild/linux-loong64@0.27.4': optional: true - '@esbuild/linux-loong64@0.28.1': - optional: true - '@esbuild/linux-mips64el@0.23.0': optional: true @@ -31130,9 +28966,6 @@ snapshots: '@esbuild/linux-mips64el@0.27.4': optional: true - '@esbuild/linux-mips64el@0.28.1': - optional: true - '@esbuild/linux-ppc64@0.23.0': optional: true @@ -31148,9 +28981,6 @@ snapshots: '@esbuild/linux-ppc64@0.27.4': optional: true - '@esbuild/linux-ppc64@0.28.1': - optional: true - '@esbuild/linux-riscv64@0.23.0': optional: true @@ -31166,9 +28996,6 @@ snapshots: '@esbuild/linux-riscv64@0.27.4': optional: true - '@esbuild/linux-riscv64@0.28.1': - optional: true - '@esbuild/linux-s390x@0.23.0': optional: true @@ -31184,9 +29011,6 @@ snapshots: '@esbuild/linux-s390x@0.27.4': optional: true - '@esbuild/linux-s390x@0.28.1': - optional: true - '@esbuild/linux-x64@0.23.0': optional: true @@ -31202,9 +29026,6 @@ snapshots: '@esbuild/linux-x64@0.27.4': optional: true - '@esbuild/linux-x64@0.28.1': - optional: true - '@esbuild/netbsd-arm64@0.25.10': optional: true @@ -31217,9 +29038,6 @@ snapshots: '@esbuild/netbsd-arm64@0.27.4': optional: true - '@esbuild/netbsd-arm64@0.28.1': - optional: true - '@esbuild/netbsd-x64@0.23.0': optional: true @@ -31235,9 +29053,6 @@ snapshots: '@esbuild/netbsd-x64@0.27.4': optional: true - '@esbuild/netbsd-x64@0.28.1': - optional: true - '@esbuild/openbsd-arm64@0.23.0': optional: true @@ -31253,9 +29068,6 @@ snapshots: '@esbuild/openbsd-arm64@0.27.4': optional: true - '@esbuild/openbsd-arm64@0.28.1': - optional: true - '@esbuild/openbsd-x64@0.23.0': optional: true @@ -31271,9 +29083,6 @@ snapshots: '@esbuild/openbsd-x64@0.27.4': optional: true - '@esbuild/openbsd-x64@0.28.1': - optional: true - '@esbuild/openharmony-arm64@0.25.10': optional: true @@ -31283,9 +29092,6 @@ snapshots: '@esbuild/openharmony-arm64@0.27.4': optional: true - '@esbuild/openharmony-arm64@0.28.1': - optional: true - '@esbuild/sunos-x64@0.23.0': optional: true @@ -31301,9 +29107,6 @@ snapshots: '@esbuild/sunos-x64@0.27.4': optional: true - '@esbuild/sunos-x64@0.28.1': - optional: true - '@esbuild/win32-arm64@0.23.0': optional: true @@ -31319,9 +29122,6 @@ snapshots: '@esbuild/win32-arm64@0.27.4': optional: true - '@esbuild/win32-arm64@0.28.1': - optional: true - '@esbuild/win32-ia32@0.23.0': optional: true @@ -31337,9 +29137,6 @@ snapshots: '@esbuild/win32-ia32@0.27.4': optional: true - '@esbuild/win32-ia32@0.28.1': - optional: true - '@esbuild/win32-x64@0.23.0': optional: true @@ -31355,34 +29152,31 @@ snapshots: '@esbuild/win32-x64@0.27.4': optional: true - '@esbuild/win32-x64@0.28.1': - optional: true - - '@eslint-community/eslint-utils@4.4.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.22.0(jiti@2.7.0))': dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@eslint-community/eslint-utils@4.9.0(eslint@9.22.0(jiti@2.7.0))': dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@eslint-community/eslint-utils@4.9.1(eslint@9.22.0(jiti@2.7.0))': dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} '@eslint-community/regexpp@4.12.2': {} - '@eslint-react/ast@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)': + '@eslint-react/ast@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@eslint-react/eff': 1.26.2 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/typescript-estree': 8.53.0(typescript@6.0.2) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) string-ts: 2.2.1 ts-pattern: 5.6.2 transitivePeerDependencies: @@ -31390,17 +29184,17 @@ snapshots: - supports-color - typescript - '@eslint-react/core@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)': + '@eslint-react/core@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint-react/ast': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) birecord: 0.1.1 ts-pattern: 5.6.2 transitivePeerDependencies: @@ -31410,59 +29204,59 @@ snapshots: '@eslint-react/eff@1.26.2': {} - '@eslint-react/eslint-plugin@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))': + '@eslint-react/eslint-plugin@1.26.2(eslint@9.22.0(jiti@2.7.0))(ts-api-utils@2.4.0(typescript@6.0.2))(typescript@6.0.2)': dependencies: '@eslint-react/eff': 1.26.2 - '@eslint-react/shared': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - eslint-plugin-react-debug: 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) - eslint-plugin-react-dom: 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) - eslint-plugin-react-hooks-extra: 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) - eslint-plugin-react-naming-convention: 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) - eslint-plugin-react-web-api: 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) - eslint-plugin-react-x: 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)) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.23.0 + '@typescript-eslint/type-utils': 8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.23.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + eslint-plugin-react-debug: 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint-plugin-react-dom: 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint-plugin-react-hooks-extra: 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint-plugin-react-naming-convention: 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint-plugin-react-web-api: 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint-plugin-react-x: 1.26.2(eslint@9.22.0(jiti@2.7.0))(ts-api-utils@2.4.0(typescript@6.0.2))(typescript@6.0.2) optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - ts-api-utils - '@eslint-react/jsx@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)': + '@eslint-react/jsx@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint-react/ast': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) ts-pattern: 5.6.2 transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-react/shared@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)': + '@eslint-react/shared@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@eslint-react/eff': 1.26.2 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - picomatch: 4.0.7 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + picomatch: 4.0.3 ts-pattern: 5.6.2 transitivePeerDependencies: - eslint - supports-color - typescript - '@eslint-react/var@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)': + '@eslint-react/var@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint-react/ast': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) string-ts: 2.2.1 ts-pattern: 5.6.2 transitivePeerDependencies: @@ -31470,10 +29264,10 @@ snapshots: - supports-color - typescript - '@eslint/config-array@0.19.2(supports-color@10.2.2)': + '@eslint/config-array@0.19.2': dependencies: '@eslint/object-schema': 2.1.6 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -31484,10 +29278,10 @@ snapshots: dependencies: '@types/json-schema': 7.0.15 - '@eslint/eslintrc@3.3.0(supports-color@10.2.2)': + '@eslint/eslintrc@3.3.0': dependencies: ajv: 6.12.6 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -31498,9 +29292,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@10.0.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@eslint/js@10.0.1(eslint@9.22.0(jiti@2.7.0))': optionalDependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) '@eslint/js@9.22.0': {} @@ -31522,7 +29316,7 @@ snapshots: '@fastify/ajv-compiler@4.0.5': dependencies: ajv: 8.17.1 - ajv-formats: 3.0.1 + ajv-formats: 3.0.1(ajv@8.17.1) fast-uri: 3.0.6 '@fastify/busboy@3.1.1': {} @@ -31871,11 +29665,11 @@ snapshots: '@floating-ui/core': 1.6.9 '@floating-ui/utils': 0.2.9 - '@floating-ui/react-dom@2.1.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@floating-ui/react-dom@2.1.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@floating-ui/dom': 1.6.13 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) '@floating-ui/utils@0.2.9': {} @@ -31897,11 +29691,6 @@ snapshots: dependencies: hono: 4.7.10 - '@hono/session@0.2.1(hono@4.13.9)': - dependencies: - hono: 4.13.9 - jose: 6.1.3 - '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -31917,21 +29706,23 @@ snapshots: '@humanwhocodes/retry@0.4.2': {} - '@img/colour@1.1.0': {} + '@iarna/toml@2.2.5': {} + + '@img/colour@1.0.0': {} + + '@img/sharp-darwin-arm64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.2.3 + optional: true '@img/sharp-darwin-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.2.4 optional: true - '@img/sharp-darwin-arm64@0.35.4': + '@img/sharp-darwin-x64@0.34.4': optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.3.3 - optional: true - - '@img/sharp-darwin-arm64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.3.4 + '@img/sharp-libvips-darwin-x64': 1.2.3 optional: true '@img/sharp-darwin-x64@0.34.5': @@ -31939,114 +29730,66 @@ snapshots: '@img/sharp-libvips-darwin-x64': 1.2.4 optional: true - '@img/sharp-darwin-x64@0.35.4': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.3.3 - optional: true - - '@img/sharp-darwin-x64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.3.4 - optional: true - - '@img/sharp-freebsd-wasm32@0.35.4': - dependencies: - '@img/sharp-wasm32': 0.35.4 - optional: true - - '@img/sharp-freebsd-wasm32@0.35.5': - dependencies: - '@img/sharp-wasm32': 0.35.5 + '@img/sharp-libvips-darwin-arm64@1.2.3': optional: true '@img/sharp-libvips-darwin-arm64@1.2.4': optional: true - '@img/sharp-libvips-darwin-arm64@1.3.3': - optional: true - - '@img/sharp-libvips-darwin-arm64@1.3.4': + '@img/sharp-libvips-darwin-x64@1.2.3': optional: true '@img/sharp-libvips-darwin-x64@1.2.4': optional: true - '@img/sharp-libvips-darwin-x64@1.3.3': - optional: true - - '@img/sharp-libvips-darwin-x64@1.3.4': + '@img/sharp-libvips-linux-arm64@1.2.3': optional: true '@img/sharp-libvips-linux-arm64@1.2.4': optional: true - '@img/sharp-libvips-linux-arm64@1.3.3': - optional: true - - '@img/sharp-libvips-linux-arm64@1.3.4': + '@img/sharp-libvips-linux-arm@1.2.3': optional: true '@img/sharp-libvips-linux-arm@1.2.4': optional: true - '@img/sharp-libvips-linux-arm@1.3.3': - optional: true - - '@img/sharp-libvips-linux-arm@1.3.4': + '@img/sharp-libvips-linux-ppc64@1.2.3': optional: true '@img/sharp-libvips-linux-ppc64@1.2.4': optional: true - '@img/sharp-libvips-linux-ppc64@1.3.3': - optional: true - - '@img/sharp-libvips-linux-ppc64@1.3.4': - optional: true - '@img/sharp-libvips-linux-riscv64@1.2.4': optional: true - '@img/sharp-libvips-linux-riscv64@1.3.3': - optional: true - - '@img/sharp-libvips-linux-riscv64@1.3.4': + '@img/sharp-libvips-linux-s390x@1.2.3': optional: true '@img/sharp-libvips-linux-s390x@1.2.4': optional: true - '@img/sharp-libvips-linux-s390x@1.3.3': - optional: true - - '@img/sharp-libvips-linux-s390x@1.3.4': + '@img/sharp-libvips-linux-x64@1.2.3': optional: true '@img/sharp-libvips-linux-x64@1.2.4': optional: true - '@img/sharp-libvips-linux-x64@1.3.3': - optional: true - - '@img/sharp-libvips-linux-x64@1.3.4': + '@img/sharp-libvips-linuxmusl-arm64@1.2.3': optional: true '@img/sharp-libvips-linuxmusl-arm64@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.3.3': - optional: true - - '@img/sharp-libvips-linuxmusl-arm64@1.3.4': + '@img/sharp-libvips-linuxmusl-x64@1.2.3': optional: true '@img/sharp-libvips-linuxmusl-x64@1.2.4': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.3.3': - optional: true - - '@img/sharp-libvips-linuxmusl-x64@1.3.4': + '@img/sharp-linux-arm64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.2.3 optional: true '@img/sharp-linux-arm64@0.34.5': @@ -32054,14 +29797,9 @@ snapshots: '@img/sharp-libvips-linux-arm64': 1.2.4 optional: true - '@img/sharp-linux-arm64@0.35.4': + '@img/sharp-linux-arm@0.34.4': optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.3.3 - optional: true - - '@img/sharp-linux-arm64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.3.4 + '@img/sharp-libvips-linux-arm': 1.2.3 optional: true '@img/sharp-linux-arm@0.34.5': @@ -32069,14 +29807,9 @@ snapshots: '@img/sharp-libvips-linux-arm': 1.2.4 optional: true - '@img/sharp-linux-arm@0.35.4': + '@img/sharp-linux-ppc64@0.34.4': optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.3.3 - optional: true - - '@img/sharp-linux-arm@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.3.4 + '@img/sharp-libvips-linux-ppc64': 1.2.3 optional: true '@img/sharp-linux-ppc64@0.34.5': @@ -32084,29 +29817,14 @@ snapshots: '@img/sharp-libvips-linux-ppc64': 1.2.4 optional: true - '@img/sharp-linux-ppc64@0.35.4': - optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.3.3 - optional: true - - '@img/sharp-linux-ppc64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.3.4 - optional: true - '@img/sharp-linux-riscv64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-riscv64': 1.2.4 optional: true - '@img/sharp-linux-riscv64@0.35.4': + '@img/sharp-linux-s390x@0.34.4': optionalDependencies: - '@img/sharp-libvips-linux-riscv64': 1.3.3 - optional: true - - '@img/sharp-linux-riscv64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-riscv64': 1.3.4 + '@img/sharp-libvips-linux-s390x': 1.2.3 optional: true '@img/sharp-linux-s390x@0.34.5': @@ -32114,14 +29832,9 @@ snapshots: '@img/sharp-libvips-linux-s390x': 1.2.4 optional: true - '@img/sharp-linux-s390x@0.35.4': + '@img/sharp-linux-x64@0.34.4': optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.3.3 - optional: true - - '@img/sharp-linux-s390x@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.3.4 + '@img/sharp-libvips-linux-x64': 1.2.3 optional: true '@img/sharp-linux-x64@0.34.5': @@ -32129,14 +29842,9 @@ snapshots: '@img/sharp-libvips-linux-x64': 1.2.4 optional: true - '@img/sharp-linux-x64@0.35.4': + '@img/sharp-linuxmusl-arm64@0.34.4': optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.3.3 - optional: true - - '@img/sharp-linux-x64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.3.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.2.3 optional: true '@img/sharp-linuxmusl-arm64@0.34.5': @@ -32144,14 +29852,9 @@ snapshots: '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 optional: true - '@img/sharp-linuxmusl-arm64@0.35.4': + '@img/sharp-linuxmusl-x64@0.34.4': optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.3.3 - optional: true - - '@img/sharp-linuxmusl-arm64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 + '@img/sharp-libvips-linuxmusl-x64': 1.2.3 optional: true '@img/sharp-linuxmusl-x64@0.34.5': @@ -32159,68 +29862,34 @@ snapshots: '@img/sharp-libvips-linuxmusl-x64': 1.2.4 optional: true - '@img/sharp-linuxmusl-x64@0.35.4': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.3.3 - optional: true - - '@img/sharp-linuxmusl-x64@0.35.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.3.4 + '@img/sharp-wasm32@0.34.4': + dependencies: + '@emnapi/runtime': 1.11.2 optional: true '@img/sharp-wasm32@0.34.5': dependencies: - '@emnapi/runtime': 1.11.3 + '@emnapi/runtime': 1.11.2 optional: true - '@img/sharp-wasm32@0.35.4': - dependencies: - '@emnapi/runtime': 1.11.3 - optional: true - - '@img/sharp-wasm32@0.35.5': - dependencies: - '@emnapi/runtime': 1.11.3 - optional: true - - '@img/sharp-webcontainers-wasm32@0.35.4': - dependencies: - '@img/sharp-wasm32': 0.35.4 - optional: true - - '@img/sharp-webcontainers-wasm32@0.35.5': - dependencies: - '@img/sharp-wasm32': 0.35.5 + '@img/sharp-win32-arm64@0.34.4': optional: true '@img/sharp-win32-arm64@0.34.5': optional: true - '@img/sharp-win32-arm64@0.35.4': - optional: true - - '@img/sharp-win32-arm64@0.35.5': + '@img/sharp-win32-ia32@0.34.4': optional: true '@img/sharp-win32-ia32@0.34.5': optional: true - '@img/sharp-win32-ia32@0.35.4': - optional: true - - '@img/sharp-win32-ia32@0.35.5': + '@img/sharp-win32-x64@0.34.4': optional: true '@img/sharp-win32-x64@0.34.5': optional: true - '@img/sharp-win32-x64@0.35.4': - optional: true - - '@img/sharp-win32-x64@0.35.5': - optional: true - '@import-maps/resolve@2.0.0': {} '@inlang/paraglide-js@2.4.0(babel-plugin-macros@3.1.0)': @@ -32249,21 +29918,12 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - '@inquirer/ansi@2.0.8': {} - '@inquirer/confirm@5.1.4(@types/node@25.0.9)': dependencies: '@inquirer/core': 10.1.5(@types/node@25.0.9) '@inquirer/type': 3.0.4(@types/node@25.0.9) '@types/node': 25.0.9 - '@inquirer/confirm@6.3.2(@types/node@25.0.9)': - dependencies: - '@inquirer/core': 12.0.3(@types/node@25.0.9) - '@inquirer/type': 4.1.1(@types/node@25.0.9) - optionalDependencies: - '@types/node': 25.0.9 - '@inquirer/core@10.1.5(@types/node@25.0.9)': dependencies: '@inquirer/figures': 1.0.10 @@ -32277,18 +29937,6 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@inquirer/core@12.0.3(@types/node@25.0.9)': - dependencies: - '@inquirer/ansi': 2.0.8 - '@inquirer/figures': 2.0.9 - '@inquirer/type': 4.1.1(@types/node@25.0.9) - cli-width: 4.1.0 - fast-wrap-ansi: 0.2.0 - mute-stream: 3.0.0 - signal-exit: 4.1.0 - optionalDependencies: - '@types/node': 25.0.9 - '@inquirer/external-editor@1.0.3(@types/node@25.0.9)': dependencies: chardet: 2.1.1 @@ -32298,18 +29946,11 @@ snapshots: '@inquirer/figures@1.0.10': {} - '@inquirer/figures@2.0.9': {} - '@inquirer/type@3.0.4(@types/node@25.0.9)': optionalDependencies: '@types/node': 25.0.9 - '@inquirer/type@4.1.1(@types/node@25.0.9)': - optionalDependencies: - '@types/node': 25.0.9 - - '@ioredis/commands@1.10.0': - optional: true + '@ioredis/commands@1.5.0': {} '@isaacs/cliui@8.0.2': dependencies: @@ -32345,8 +29986,6 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.5': {} - '@jridgewell/sourcemap-codec@1.6.0': {} - '@jridgewell/trace-mapping@0.3.31': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -32355,7 +29994,7 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/sourcemap-codec': 1.5.5 '@jsonjoy.com/base64@1.1.2(tslib@2.8.1)': dependencies: @@ -32519,14 +30158,14 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 - '@mapbox/node-pre-gyp@2.0.0(supports-color@10.2.2)': + '@mapbox/node-pre-gyp@2.0.0': dependencies: consola: 3.4.2 detect-libc: 2.1.2 - https-proxy-agent: 7.0.6(supports-color@10.2.2) + https-proxy-agent: 7.0.6 node-fetch: 2.7.0 nopt: 8.1.0 - semver: 7.8.5 + semver: 7.8.2 tar: 7.4.3 transitivePeerDependencies: - encoding @@ -32611,12 +30250,6 @@ snapshots: chevrotain: 10.5.0 lilconfig: 2.1.0 - '@msw/playwright@0.6.7(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))': - dependencies: - '@mswjs/interceptors': 0.41.9 - msw: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - outvariant: 1.4.3 - '@mswjs/interceptors@0.37.6': dependencies: '@open-draft/deferred-promise': 2.2.0 @@ -32626,48 +30259,39 @@ snapshots: outvariant: 1.4.3 strict-event-emitter: 0.5.1 - '@mswjs/interceptors@0.41.9': - dependencies: - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/logger': 0.3.0 - '@open-draft/until': 2.1.0 - is-node-process: 1.2.0 - outvariant: 1.4.3 - strict-event-emitter: 0.5.1 - '@mui/core-downloads-tracker@6.4.7': {} - '@mui/material@6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@mui/material@6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 '@mui/core-downloads-tracker': 6.4.7 - '@mui/system': 6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9) + '@mui/system': 6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3) '@mui/types': 7.2.21(@types/react@19.2.9) - '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.9) + '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.3) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.12(@types/react@19.2.9) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) react-is: 19.0.0 - react-transition-group: 4.4.5(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + react-transition-group: 4.4.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3) optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) - '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.3) + '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3) '@types/react': 19.2.9 - '@mui/private-theming@6.4.6(@types/react@19.2.9)(react@19.2.9)': + '@mui/private-theming@6.4.6(@types/react@19.2.9)(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 - '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.9) + '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.3) prop-types: 15.8.1 - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@mui/styled-engine@6.4.6(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(react@19.2.9)': + '@mui/styled-engine@6.4.6(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 '@emotion/cache': 11.14.0 @@ -32675,99 +30299,112 @@ snapshots: '@emotion/sheet': 1.4.0 csstype: 3.2.3 prop-types: 15.8.1 - react: 19.2.9 + react: 19.2.3 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) - '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.3) + '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3) - '@mui/system@6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)': + '@mui/system@6.4.7(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 - '@mui/private-theming': 6.4.6(@types/react@19.2.9)(react@19.2.9) - '@mui/styled-engine': 6.4.6(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(react@19.2.9) + '@mui/private-theming': 6.4.6(@types/react@19.2.9)(react@19.2.3) + '@mui/styled-engine': 6.4.6(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3))(react@19.2.3) '@mui/types': 7.2.21(@types/react@19.2.9) - '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.9) + '@mui/utils': 6.4.6(@types/react@19.2.9)(react@19.2.3) clsx: 2.1.1 csstype: 3.2.3 prop-types: 15.8.1 - react: 19.2.9 + react: 19.2.3 optionalDependencies: - '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) - '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2))(@types/react@19.2.9)(react@19.2.9)(supports-color@10.2.2) + '@emotion/react': 11.14.0(@types/react@19.2.9)(react@19.2.3) + '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.2.9)(react@19.2.3))(@types/react@19.2.9)(react@19.2.3) '@types/react': 19.2.9 '@mui/types@7.2.21(@types/react@19.2.9)': optionalDependencies: '@types/react': 19.2.9 - '@mui/utils@6.4.6(@types/react@19.2.9)(react@19.2.9)': + '@mui/utils@6.4.6(@types/react@19.2.9)(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 '@mui/types': 7.2.21(@types/react@19.2.9) '@types/prop-types': 15.7.14 clsx: 2.1.1 prop-types: 15.8.1 - react: 19.2.9 + react: 19.2.3 react-is: 19.0.0 optionalDependencies: '@types/react': 19.2.9 - '@napi-rs/lzma-linux-x64-gnu@1.5.1': - optional: true - '@napi-rs/wasm-runtime@0.2.12': dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 - '@tybys/wasm-util': 0.10.3 + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 + '@tybys/wasm-util': 0.10.2 optional: true '@napi-rs/wasm-runtime@0.2.4': dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 + '@emnapi/core': 1.4.5 + '@emnapi/runtime': 1.4.5 '@tybys/wasm-util': 0.9.0 - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': dependencies: - '@emnapi/core': 1.11.3 - '@emnapi/runtime': 1.11.3 + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.2 + optional: true + + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': + dependencies: + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 + '@tybys/wasm-util': 0.10.2 + optional: true + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': + dependencies: + '@emnapi/core': 1.11.2 + '@emnapi/runtime': 1.11.2 '@tybys/wasm-util': 0.10.3 optional: true '@neon-rs/load@0.0.4': {} - '@netlify/ai@1.0.1': + '@netlify/api@14.0.7': dependencies: - '@netlify/api': 15.1.2 - - '@netlify/api@15.1.2': - dependencies: - '@netlify/open-api': 2.57.1 + '@netlify/open-api': 2.40.0 node-fetch: 3.3.2 + p-wait-for: 5.0.2 picoquery: 2.5.0 '@netlify/binary-info@1.0.0': {} - '@netlify/blobs@11.0.3(supports-color@10.2.2)': + '@netlify/blobs@10.1.0': dependencies: - '@netlify/dev-utils': 6.0.1 - '@netlify/otel': 7.0.2(supports-color@10.2.2) - '@netlify/runtime-utils': 3.0.0 - transitivePeerDependencies: - - supports-color + '@netlify/dev-utils': 4.3.0 + '@netlify/runtime-utils': 2.2.0 - '@netlify/cache@4.0.0': + '@netlify/cache@3.3.0': dependencies: - '@netlify/runtime-utils': 3.0.0 + '@netlify/runtime-utils': 2.2.0 - '@netlify/config@25.2.5': + '@netlify/config@23.2.0': dependencies: - '@netlify/api': 15.1.2 - '@netlify/headers-parser': 10.1.1 - '@netlify/redirect-parser': 16.1.1 - chalk: 6.0.0 - cron-parser: 5.10.1 + '@iarna/toml': 2.2.5 + '@netlify/api': 14.0.7 + '@netlify/headers-parser': 9.0.2 + '@netlify/redirect-parser': 15.0.3 + chalk: 5.6.2 + cron-parser: 4.9.0 deepmerge: 4.3.1 dot-prop: 9.0.0 execa: 8.0.1 @@ -32778,50 +30415,45 @@ snapshots: indent-string: 5.0.0 is-plain-obj: 4.1.0 map-obj: 5.0.2 + omit.js: 2.0.2 p-locate: 6.0.0 path-type: 6.0.0 read-package-up: 11.0.0 - smol-toml: 1.6.1 tomlify-j0.4: 3.0.0 validate-npm-package-name: 5.0.1 yaml: 2.9.0 yargs: 17.7.2 - zod: 4.6.6 - '@netlify/database-dev@1.0.1': + '@netlify/dev-utils@4.3.0': dependencies: - '@electric-sql/pglite': 0.3.16 - pg-gateway: 0.3.0-beta.4 - - '@netlify/dev-utils@6.0.1': - dependencies: - '@whatwg-node/server': 0.11.0 - ansis: 4.3.1 - atomically: 2.1.1 - chokidar: 5.0.0 + '@whatwg-node/server': 0.10.13 + ansis: 4.1.0 + chokidar: 4.0.3 decache: 4.6.2 dettle: 1.0.5 dot-prop: 9.0.0 empathic: 2.0.0 env-paths: 3.0.0 + image-size: 2.0.2 + js-image-generator: 1.0.4 parse-gitignore: 2.0.0 - semver: 7.8.5 + semver: 7.8.2 + tmp-promise: 3.0.3 + uuid: 11.1.0 + write-file-atomic: 5.0.1 - '@netlify/dev@5.1.0(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2)': + '@netlify/dev@4.6.3(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.0)': dependencies: - '@netlify/ai': 1.0.1 - '@netlify/blobs': 11.0.3(supports-color@10.2.2) - '@netlify/config': 25.2.5 - '@netlify/database-dev': 1.0.1 - '@netlify/dev-utils': 6.0.1 - '@netlify/edge-functions-dev': 2.0.1 - '@netlify/functions-dev': 2.0.5(rollup@4.63.1)(supports-color@10.2.2) - '@netlify/headers': 3.0.1 - '@netlify/images': 2.0.1(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(srvx@1.0.5) - '@netlify/redirects': 4.0.2 - '@netlify/runtime': 5.0.3(supports-color@10.2.2) - '@netlify/server-dev': 0.1.1 - '@netlify/static': 4.0.0 + '@netlify/blobs': 10.1.0 + '@netlify/config': 23.2.0 + '@netlify/dev-utils': 4.3.0 + '@netlify/edge-functions-dev': 1.0.0 + '@netlify/functions-dev': 1.0.0(rollup@4.56.0) + '@netlify/headers': 2.1.0 + '@netlify/images': 1.3.0(@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.9.2) + '@netlify/redirects': 3.1.0 + '@netlify/runtime': 4.1.1 + '@netlify/static': 3.1.0 ulid: 3.0.1 transitivePeerDependencies: - '@azure/app-configuration' @@ -32832,7 +30464,6 @@ snapshots: - '@azure/storage-blob' - '@capacitor/preferences' - '@deno/kv' - - '@parcel/watcher' - '@planetscale/database' - '@upstash/redis' - '@vercel/blob' @@ -32846,60 +30477,62 @@ snapshots: - idb-keyval - ioredis - rollup - - srvx - supports-color - uploadthing - '@netlify/edge-bundler@16.0.4': + '@netlify/edge-bundler@14.7.0': dependencies: '@import-maps/resolve': 2.0.0 - '@sveltejs/acorn-typescript': 1.0.13(acorn@8.18.0) - acorn: 8.18.0 ajv: 8.18.0 ajv-errors: 3.0.0(ajv@8.18.0) better-ajv-errors: 1.2.0(ajv@8.18.0) common-path-prefix: 3.0.0 - esbuild: 0.28.1 + env-paths: 3.0.0 + esbuild: 0.25.10 execa: 8.0.1 find-up: 7.0.0 + get-port: 7.1.0 node-stream-zip: 1.15.0 p-retry: 6.2.1 + p-wait-for: 5.0.2 parse-imports: 2.2.1 - semver: 7.8.5 - tar: 7.5.22 + path-key: 4.0.0 + semver: 7.8.2 + tar: 7.4.3 tmp-promise: 3.0.3 urlpattern-polyfill: 8.0.2 + uuid: 11.1.0 '@netlify/edge-functions-bootstrap@2.16.0': {} - '@netlify/edge-functions-dev@2.0.1': + '@netlify/edge-functions-dev@1.0.0': dependencies: - '@netlify/dev-utils': 6.0.1 - '@netlify/edge-bundler': 16.0.4 - '@netlify/edge-functions': 4.0.0 + '@netlify/dev-utils': 4.3.0 + '@netlify/edge-bundler': 14.7.0 + '@netlify/edge-functions': 3.0.0 '@netlify/edge-functions-bootstrap': 2.16.0 - '@netlify/runtime-utils': 3.0.0 + '@netlify/runtime-utils': 2.2.0 get-port: 7.1.0 - '@netlify/edge-functions@4.0.0': + '@netlify/edge-functions@3.0.0': dependencies: - '@netlify/types': 3.0.0 + '@netlify/types': 2.1.0 - '@netlify/functions-dev@2.0.5(rollup@4.63.1)(supports-color@10.2.2)': + '@netlify/functions-dev@1.0.0(rollup@4.56.0)': dependencies: - '@netlify/blobs': 11.0.3(supports-color@10.2.2) - '@netlify/dev-utils': 6.0.1 - '@netlify/functions': 6.0.0 - '@netlify/zip-it-and-ship-it': 15.5.1(rollup@4.63.1)(supports-color@10.2.2) - cron-parser: 5.10.1 + '@netlify/blobs': 10.1.0 + '@netlify/dev-utils': 4.3.0 + '@netlify/functions': 5.0.0 + '@netlify/zip-it-and-ship-it': 14.1.11(rollup@4.56.0) + cron-parser: 4.9.0 decache: 4.6.2 + extract-zip: 2.0.1 is-stream: 4.0.1 jwt-decode: 4.0.0 lambda-local: 2.2.0 - read-package-up: 12.0.0 - semver: 7.8.5 + read-package-up: 11.0.0 + semver: 7.8.2 source-map-support: 0.5.21 - yauzl: 3.4.0 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -32907,22 +30540,26 @@ snapshots: - rollup - supports-color - '@netlify/functions@6.0.0': + '@netlify/functions@5.0.0': dependencies: - '@netlify/types': 3.0.0 + '@netlify/types': 2.1.0 - '@netlify/headers-parser@10.1.1': + '@netlify/headers-parser@9.0.2': dependencies: + '@iarna/toml': 2.2.5 escape-string-regexp: 5.0.0 - smol-toml: 1.6.1 + fast-safe-stringify: 2.1.1 + is-plain-obj: 4.1.0 + map-obj: 5.0.2 + path-exists: 5.0.0 - '@netlify/headers@3.0.1': + '@netlify/headers@2.1.0': dependencies: - '@netlify/headers-parser': 10.1.1 + '@netlify/headers-parser': 9.0.2 - '@netlify/images@2.0.1(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(srvx@1.0.5)': + '@netlify/images@1.3.0(@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.9.2)': dependencies: - ipx: 3.1.1(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(srvx@1.0.5) + ipx: 3.1.1(@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.9.2) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -32933,7 +30570,6 @@ snapshots: - '@capacitor/preferences' - '@deno/kv' - '@netlify/blobs' - - '@parcel/watcher' - '@planetscale/database' - '@upstash/redis' - '@vercel/blob' @@ -32943,71 +30579,46 @@ snapshots: - db0 - idb-keyval - ioredis - - srvx - uploadthing - '@netlify/open-api@2.57.1': {} + '@netlify/open-api@2.40.0': {} - '@netlify/otel@7.0.2(supports-color@10.2.2)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/instrumentation': 0.221.0(@opentelemetry/api@1.9.1)(supports-color@10.2.2) - '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-node': 2.10.0(@opentelemetry/api@1.9.1) - transitivePeerDependencies: - - supports-color - - '@netlify/redirect-parser@16.1.1': + '@netlify/redirect-parser@15.0.3': dependencies: + '@iarna/toml': 2.2.5 fast-safe-stringify: 2.1.1 - smol-toml: 1.6.1 + is-plain-obj: 4.1.0 + path-exists: 5.0.0 - '@netlify/redirects@4.0.2': + '@netlify/redirects@3.1.0': dependencies: - '@netlify/dev-utils': 6.0.1 - '@netlify/redirect-parser': 16.1.1 - cookie: 2.0.1 - jsonwebtoken: 9.0.3 + '@netlify/dev-utils': 4.3.0 + '@netlify/redirect-parser': 15.0.3 + cookie: 1.0.2 + jsonwebtoken: 9.0.2 netlify-redirector: 0.5.0 - '@netlify/runtime-utils@3.0.0': {} + '@netlify/runtime-utils@2.2.0': {} - '@netlify/runtime@5.0.3(supports-color@10.2.2)': + '@netlify/runtime@4.1.1': dependencies: - '@netlify/blobs': 11.0.3(supports-color@10.2.2) - '@netlify/cache': 4.0.0 - '@netlify/runtime-utils': 3.0.0 - '@netlify/types': 3.0.0 - transitivePeerDependencies: - - supports-color + '@netlify/blobs': 10.1.0 + '@netlify/cache': 3.3.0 + '@netlify/runtime-utils': 2.2.0 + '@netlify/types': 2.1.0 - '@netlify/server-dev@0.1.1': - dependencies: - '@netlify/dev-utils': 6.0.1 - '@netlify/serverless-functions-api': 2.21.2 - get-port: 7.1.0 + '@netlify/serverless-functions-api@2.7.1': {} - '@netlify/serverless-functions-api@2.18.0': - dependencies: - '@netlify/types': 2.8.0 - - '@netlify/serverless-functions-api@2.21.2': - dependencies: - '@netlify/types': 2.8.0 - - '@netlify/static@4.0.0': + '@netlify/static@3.1.0': dependencies: mime-types: 3.0.2 - '@netlify/types@2.8.0': {} + '@netlify/types@2.1.0': {} - '@netlify/types@3.0.0': {} - - '@netlify/vite-plugin-tanstack-start@1.3.19(@tanstack/solid-start@packages+solid-start)(babel-plugin-macros@3.1.0)(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@netlify/vite-plugin-tanstack-start@1.1.4(@tanstack/solid-start@packages+solid-start)(babel-plugin-macros@3.1.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.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))': dependencies: - '@netlify/vite-plugin': 3.0.1(babel-plugin-macros@3.1.0)(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + '@netlify/vite-plugin': 2.7.4(babel-plugin-macros@3.1.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.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)) + 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) optionalDependencies: '@tanstack/solid-start': link:packages/solid-start transitivePeerDependencies: @@ -33019,7 +30630,6 @@ snapshots: - '@azure/storage-blob' - '@capacitor/preferences' - '@deno/kv' - - '@parcel/watcher' - '@planetscale/database' - '@upstash/redis' - '@vercel/blob' @@ -33034,16 +30644,15 @@ snapshots: - idb-keyval - ioredis - rollup - - srvx - supports-color - uploadthing - '@netlify/vite-plugin@3.0.1(babel-plugin-macros@3.1.0)(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@netlify/vite-plugin@2.7.4(babel-plugin-macros@3.1.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.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))': dependencies: - '@netlify/dev': 5.1.0(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(rollup@4.63.1)(srvx@1.0.5)(supports-color@10.2.2) - '@netlify/dev-utils': 6.0.1 - dedent: 1.7.2(babel-plugin-macros@3.1.0) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + '@netlify/dev': 4.6.3(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(rollup@4.56.0) + '@netlify/dev-utils': 4.3.0 + dedent: 1.7.0(babel-plugin-macros@3.1.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) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -33053,7 +30662,6 @@ snapshots: - '@azure/storage-blob' - '@capacitor/preferences' - '@deno/kv' - - '@parcel/watcher' - '@planetscale/database' - '@upstash/redis' - '@vercel/blob' @@ -33068,23 +30676,21 @@ snapshots: - idb-keyval - ioredis - rollup - - srvx - supports-color - uploadthing - '@netlify/zip-it-and-ship-it@15.5.1(rollup@4.63.1)(supports-color@10.2.2)': + '@netlify/zip-it-and-ship-it@14.1.11(rollup@4.56.0)': dependencies: - '@babel/parser': 7.29.8 - '@babel/types': 7.29.8 + '@babel/parser': 7.29.2 + '@babel/types': 7.28.4 '@netlify/binary-info': 1.0.0 - '@netlify/serverless-functions-api': 2.18.0 - '@opentelemetry/api': 1.8.0 - '@vercel/nft': 1.3.1(rollup@4.63.1)(supports-color@10.2.2) - archiver: 8.0.0 + '@netlify/serverless-functions-api': 2.7.1 + '@vercel/nft': 0.29.4(rollup@4.56.0) + archiver: 7.0.1 common-path-prefix: 3.0.0 copy-file: 11.1.0 es-module-lexer: 1.7.0 - esbuild: 0.28.1 + esbuild: 0.25.10 execa: 8.0.1 fast-glob: 3.3.3 filter-obj: 6.1.0 @@ -33093,20 +30699,20 @@ snapshots: junk: 4.0.1 locate-path: 7.2.0 merge-options: 3.0.4 - minimatch: 10.2.5 + minimatch: 9.0.9 normalize-path: 3.0.0 p-map: 7.0.3 path-exists: 5.0.0 - precinct: 12.2.0(supports-color@10.2.2) + precinct: 12.2.0 require-package-name: 2.0.1 resolve: 2.0.0-next.5 - semver: 7.8.5 + semver: 7.8.2 tmp-promise: 3.0.3 - toml: 4.3.0 + toml: 3.0.0 unixify: 1.0.0 urlpattern-polyfill: 8.0.2 yargs: 17.7.2 - zod: 4.6.6 + zod: 3.25.76 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -33114,32 +30720,6 @@ snapshots: - rollup - supports-color - '@next/env@16.3.4': {} - - '@next/swc-darwin-arm64@16.3.4': - optional: true - - '@next/swc-darwin-x64@16.3.4': - optional: true - - '@next/swc-linux-arm64-gnu@16.3.4': - optional: true - - '@next/swc-linux-arm64-musl@16.3.4': - optional: true - - '@next/swc-linux-x64-gnu@16.3.4': - optional: true - - '@next/swc-linux-x64-musl@16.3.4': - optional: true - - '@next/swc-win32-arm64-msvc@16.3.4': - optional: true - - '@next/swc-win32-x64-msvc@16.3.4': - optional: true - '@noble/ciphers@2.2.0': {} '@noble/hashes@1.4.0': {} @@ -33158,43 +30738,47 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.0 - '@nx/devkit@24.0.0(nx@24.0.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@10.2.2))(@swc/core@1.15.33(@swc/helpers@0.5.23)))': + '@nothing-but/utils@0.17.0': {} + + '@nx/devkit@22.7.5(nx@22.7.5(@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))(debug@4.4.3))': dependencies: + '@zkochan/js-yaml': 0.0.7 ejs: 5.0.1 + enquirer: 2.3.6 minimatch: 10.2.5 - nx: 24.0.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@10.2.2))(@swc/core@1.15.33(@swc/helpers@0.5.23)) - semver: 7.8.5 + nx: 22.7.5(@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))(debug@4.4.3) + semver: 7.8.2 tslib: 2.8.1 yargs-parser: 21.1.1 - '@nx/nx-darwin-arm64@24.0.0': + '@nx/nx-darwin-arm64@22.7.5': optional: true - '@nx/nx-darwin-x64@24.0.0': + '@nx/nx-darwin-x64@22.7.5': optional: true - '@nx/nx-freebsd-x64@24.0.0': + '@nx/nx-freebsd-x64@22.7.5': optional: true - '@nx/nx-linux-arm-gnueabihf@24.0.0': + '@nx/nx-linux-arm-gnueabihf@22.7.5': optional: true - '@nx/nx-linux-arm64-gnu@24.0.0': + '@nx/nx-linux-arm64-gnu@22.7.5': optional: true - '@nx/nx-linux-arm64-musl@24.0.0': + '@nx/nx-linux-arm64-musl@22.7.5': optional: true - '@nx/nx-linux-x64-gnu@24.0.0': + '@nx/nx-linux-x64-gnu@22.7.5': optional: true - '@nx/nx-linux-x64-musl@24.0.0': + '@nx/nx-linux-x64-musl@22.7.5': optional: true - '@nx/nx-win32-arm64-msvc@24.0.0': + '@nx/nx-win32-arm64-msvc@22.7.5': optional: true - '@nx/nx-win32-x64-msvc@24.0.0': + '@nx/nx-win32-x64-msvc@22.7.5': optional: true '@one-ini/wasm@0.1.1': {} @@ -33218,8 +30802,6 @@ snapshots: '@open-draft/deferred-promise@2.2.0': {} - '@open-draft/deferred-promise@3.0.0': {} - '@open-draft/logger@0.3.0': dependencies: is-node-process: 1.2.0 @@ -33227,63 +30809,76 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.221.0': - dependencies: - '@opentelemetry/api': 1.9.1 - - '@opentelemetry/api@1.8.0': {} - - '@opentelemetry/api@1.9.1': {} - - '@opentelemetry/context-async-hooks@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - - '@opentelemetry/core@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/semantic-conventions': 1.41.1 - - '@opentelemetry/instrumentation@0.221.0(@opentelemetry/api@1.9.1)(supports-color@10.2.2)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/api-logs': 0.221.0 - import-in-the-middle: 3.5.1 - require-in-the-middle: 8.0.1(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color - - '@opentelemetry/resources@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 - - '@opentelemetry/sdk-trace-base@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 - - '@opentelemetry/sdk-trace-node@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/context-async-hooks': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/sdk-trace-base': 2.10.0(@opentelemetry/api@1.9.1) - - '@opentelemetry/sdk-trace@2.10.0(@opentelemetry/api@1.9.1)': - dependencies: - '@opentelemetry/api': 1.9.1 - '@opentelemetry/core': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/resources': 2.10.0(@opentelemetry/api@1.9.1) - '@opentelemetry/semantic-conventions': 1.41.1 - '@opentelemetry/semantic-conventions@1.41.1': {} - '@oxc-project/types@0.153.0': {} + '@oxc-minify/binding-android-arm-eabi@0.110.0': + optional: true + + '@oxc-minify/binding-android-arm64@0.110.0': + optional: true + + '@oxc-minify/binding-darwin-arm64@0.110.0': + optional: true + + '@oxc-minify/binding-darwin-x64@0.110.0': + optional: true + + '@oxc-minify/binding-freebsd-x64@0.110.0': + optional: true + + '@oxc-minify/binding-linux-arm-gnueabihf@0.110.0': + optional: true + + '@oxc-minify/binding-linux-arm-musleabihf@0.110.0': + optional: true + + '@oxc-minify/binding-linux-arm64-gnu@0.110.0': + optional: true + + '@oxc-minify/binding-linux-arm64-musl@0.110.0': + optional: true + + '@oxc-minify/binding-linux-ppc64-gnu@0.110.0': + optional: true + + '@oxc-minify/binding-linux-riscv64-gnu@0.110.0': + optional: true + + '@oxc-minify/binding-linux-riscv64-musl@0.110.0': + optional: true + + '@oxc-minify/binding-linux-s390x-gnu@0.110.0': + optional: true + + '@oxc-minify/binding-linux-x64-gnu@0.110.0': + optional: true + + '@oxc-minify/binding-linux-x64-musl@0.110.0': + optional: true + + '@oxc-minify/binding-openharmony-arm64@0.110.0': + optional: true + + '@oxc-minify/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + optional: true + + '@oxc-minify/binding-win32-arm64-msvc@0.110.0': + optional: true + + '@oxc-minify/binding-win32-ia32-msvc@0.110.0': + optional: true + + '@oxc-minify/binding-win32-x64-msvc@0.110.0': + optional: true + + '@oxc-project/types@0.115.0': {} + + '@oxc-project/types@0.132.0': {} '@oxc-resolver/binding-android-arm-eabi@11.19.1': optional: true @@ -33333,9 +30928,9 @@ snapshots: '@oxc-resolver/binding-openharmony-arm64@11.19.1': optional: true - '@oxc-resolver/binding-wasm32-wasi@11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + '@oxc-resolver/binding-wasm32-wasi@11.19.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': dependencies: - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -33350,6 +30945,71 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@11.19.1': optional: true + '@oxc-transform/binding-android-arm-eabi@0.110.0': + optional: true + + '@oxc-transform/binding-android-arm64@0.110.0': + optional: true + + '@oxc-transform/binding-darwin-arm64@0.110.0': + optional: true + + '@oxc-transform/binding-darwin-x64@0.110.0': + optional: true + + '@oxc-transform/binding-freebsd-x64@0.110.0': + optional: true + + '@oxc-transform/binding-linux-arm-gnueabihf@0.110.0': + optional: true + + '@oxc-transform/binding-linux-arm-musleabihf@0.110.0': + optional: true + + '@oxc-transform/binding-linux-arm64-gnu@0.110.0': + optional: true + + '@oxc-transform/binding-linux-arm64-musl@0.110.0': + optional: true + + '@oxc-transform/binding-linux-ppc64-gnu@0.110.0': + optional: true + + '@oxc-transform/binding-linux-riscv64-gnu@0.110.0': + optional: true + + '@oxc-transform/binding-linux-riscv64-musl@0.110.0': + optional: true + + '@oxc-transform/binding-linux-s390x-gnu@0.110.0': + optional: true + + '@oxc-transform/binding-linux-x64-gnu@0.110.0': + optional: true + + '@oxc-transform/binding-linux-x64-musl@0.110.0': + optional: true + + '@oxc-transform/binding-openharmony-arm64@0.110.0': + optional: true + + '@oxc-transform/binding-wasm32-wasi@0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': + dependencies: + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + optional: true + + '@oxc-transform/binding-win32-arm64-msvc@0.110.0': + optional: true + + '@oxc-transform/binding-win32-ia32-msvc@0.110.0': + optional: true + + '@oxc-transform/binding-win32-x64-msvc@0.110.0': + optional: true + '@panva/hkdf@1.2.1': {} '@parcel/watcher-android-arm64@2.5.1': @@ -33382,10 +31042,10 @@ snapshots: '@parcel/watcher-linux-x64-musl@2.5.1': optional: true - '@parcel/watcher-wasm@2.6.0': + '@parcel/watcher-wasm@2.5.1': dependencies: is-glob: 4.0.3 - picomatch: 4.0.7 + micromatch: 4.0.8 '@parcel/watcher-win32-arm64@2.5.1': optional: true @@ -33416,7 +31076,6 @@ snapshots: '@parcel/watcher-win32-arm64': 2.5.1 '@parcel/watcher-win32-ia32': 2.5.1 '@parcel/watcher-win32-x64': 2.5.1 - optional: true '@peculiar/asn1-cms@2.7.0': dependencies: @@ -33525,29 +31184,21 @@ snapshots: pprof-to-md: 0.1.0 react-pprof: 1.4.0 - '@platformatic/flame@1.7.0': + '@playwright/test@1.58.0': dependencies: - '@datadog/pprof': 5.15.1 - fastify: 5.7.1 - pprof-format: 2.2.1 - pprof-to-md: 0.2.0 - react-pprof: 1.4.0 - - '@playwright/test@1.63.0': - dependencies: - playwright: 1.63.0 + playwright: 1.58.0 '@polka/url@1.0.0-next.28': {} '@popperjs/core@2.11.8': {} - '@poppinss/colors@4.1.6': + '@poppinss/colors@4.1.5': dependencies: kleur: 4.1.5 '@poppinss/dumper@0.6.5': dependencies: - '@poppinss/colors': 4.1.6 + '@poppinss/colors': 4.1.5 '@sindresorhus/is': 7.1.0 supports-color: 10.2.2 @@ -33564,12 +31215,12 @@ snapshots: '@prisma/client-runtime-utils@7.0.0': {} - '@prisma/client@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.9(react@19.2.9))(react@19.2.9))': + '@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2)': dependencies: '@prisma/client-runtime-utils': 7.0.0 optionalDependencies: - prisma: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - typescript: '@typescript/typescript6@6.0.2' + prisma: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) + typescript: 6.0.2 '@prisma/config@7.0.0': dependencies: @@ -33584,7 +31235,7 @@ snapshots: '@prisma/debug@7.0.0': {} - '@prisma/dev@0.13.0(@typescript/typescript6@6.0.2)': + '@prisma/dev@0.13.0(typescript@6.0.2)': dependencies: '@electric-sql/pglite': 0.3.2 '@electric-sql/pglite-socket': 0.0.6(@electric-sql/pglite@0.3.2) @@ -33601,7 +31252,7 @@ snapshots: proper-lockfile: 4.1.2 remeda: 2.21.3 std-env: 3.9.0 - valibot: 1.1.0(@typescript/typescript6@6.0.2) + valibot: 1.1.0(typescript@6.0.2) zeptomatch: 2.0.2 transitivePeerDependencies: - typescript @@ -33635,11 +31286,11 @@ snapshots: '@prisma/query-plan-executor@6.18.0': {} - '@prisma/studio-core-licensed@0.8.0(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@prisma/studio-core-licensed@0.8.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@types/react': 19.2.9 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) '@protobufjs/aspromise@1.1.2': {} @@ -33672,1103 +31323,1264 @@ snapshots: '@radix-ui/primitive@1.1.2': {} - '@radix-ui/react-accessible-icon@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-accessible-icon@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-accordion@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-accordion@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-alert-dialog@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-alert-dialog@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-arrow@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-arrow@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-aspect-ratio@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-aspect-ratio@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-avatar@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-avatar@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-checkbox@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-checkbox@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-collapsible@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-collapsible@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-collection@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-collection@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-context-menu@2.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-context-menu@2.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-context@1.1.2(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-context@1.1.2(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-dialog@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-dialog@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) aria-hidden: 1.2.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-direction@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-direction@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-dismissable-layer@1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-dismissable-layer@1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-dropdown-menu@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-dropdown-menu@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-focus-guards@1.1.2(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-focus-guards@1.1.2(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-focus-scope@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-focus-scope@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-form@0.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-form@0.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-label': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-label': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-hover-card@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-hover-card@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-id@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-id@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-label@2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-label@2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-menu@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-menu@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) aria-hidden: 1.2.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-menubar@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-menubar@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-navigation-menu@1.2.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-navigation-menu@1.2.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-popover@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-popover@1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) aria-hidden: 1.2.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-popper@1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-popper@1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@floating-ui/react-dom': 2.1.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-arrow': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) + '@floating-ui/react-dom': 2.1.2(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-arrow': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) '@radix-ui/rect': 1.1.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-portal@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-portal@1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-presence@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-presence@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-primitive@2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-primitive@2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-progress@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-progress@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-radio-group@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-radio-group@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-roving-focus@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-roving-focus@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-scroll-area@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-scroll-area@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-select@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-select@2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) aria-hidden: 1.2.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll: 2.6.3(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-separator@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-separator@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-slider@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-slider@1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-slot@1.2.0(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-slot@1.2.0(@types/react@19.2.9)(react@19.2.3)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-switch@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-switch@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-tabs@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-tabs@1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-toast@1.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-toast@1.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-toggle-group@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-toggle-group@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toggle': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-toggle@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-toggle@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-toolbar@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-toolbar@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-separator': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toggle-group': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-separator': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle-group': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-tooltip@1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-tooltip@1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-controllable-state@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-controllable-state@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: '@radix-ui/rect': 1.1.1 - react: 19.2.9 + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-use-size@1.1.1(@types/react@19.2.9)(react@19.2.9)': + '@radix-ui/react-use-size@1.1.1(@types/react@19.2.9)(react@19.2.3)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - react: 19.2.9 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + react: 19.2.3 optionalDependencies: '@types/react': 19.2.9 - '@radix-ui/react-visually-hidden@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/react-visually-hidden@1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) '@radix-ui/rect@1.1.1': {} - '@radix-ui/themes@3.3.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@radix-ui/themes@3.3.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@radix-ui/colors': 3.0.0 classnames: 2.5.1 - radix-ui: 1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - react-remove-scroll-bar: 2.3.8(@types/react@19.2.9)(react@19.2.9) + radix-ui: 1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-remove-scroll-bar: 2.3.8(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@rolldown/binding-android-arm-eabi@1.2.13': + '@rolldown/binding-android-arm64@1.0.0-rc.9': optional: true - '@rolldown/binding-android-arm64@1.2.13': + '@rolldown/binding-android-arm64@1.0.2': optional: true - '@rolldown/binding-darwin-arm64@1.2.13': + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': optional: true - '@rolldown/binding-darwin-x64@1.2.13': + '@rolldown/binding-darwin-arm64@1.0.2': optional: true - '@rolldown/binding-freebsd-x64@1.2.13': + '@rolldown/binding-darwin-x64@1.0.0-rc.9': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.2.13': + '@rolldown/binding-darwin-x64@1.0.2': optional: true - '@rolldown/binding-linux-arm64-gnu@1.2.13': + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': optional: true - '@rolldown/binding-linux-arm64-musl@1.2.13': + '@rolldown/binding-freebsd-x64@1.0.2': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.2.13': + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': optional: true - '@rolldown/binding-linux-s390x-gnu@1.2.13': + '@rolldown/binding-linux-arm-gnueabihf@1.0.2': optional: true - '@rolldown/binding-linux-x64-gnu@1.2.13': + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': optional: true - '@rolldown/binding-linux-x64-musl@1.2.13': + '@rolldown/binding-linux-arm64-gnu@1.0.2': optional: true - '@rolldown/binding-openharmony-arm64@1.2.13': + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': optional: true - '@rolldown/binding-win32-arm64-msvc@1.2.13': + '@rolldown/binding-linux-arm64-musl@1.0.2': optional: true - '@rolldown/binding-win32-x64-msvc@1.2.13': + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': optional: true - '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.0(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@rolldown/binding-linux-ppc64-gnu@1.0.2': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.2': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.2': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.2': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.2': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)': dependencies: - '@babel/core': 7.29.0(supports-color@10.2.2) - picomatch: 4.0.7 - rolldown: 1.2.13 - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - picomatch: 4.0.7 - rolldown: 1.2.13 - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' optional: true - '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@rolldown/binding-wasm32-wasi@1.0.2': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - picomatch: 4.0.7 - rolldown: 1.2.13 - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.2': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.2': + optional: true + + '@rolldown/pluginutils@1.0.0': {} + + '@rolldown/pluginutils@1.0.0-beta.19': {} + + '@rolldown/pluginutils@1.0.0-beta.27': {} + '@rolldown/pluginutils@1.0.0-rc.2': {} + '@rolldown/pluginutils@1.0.0-rc.4': {} + '@rolldown/pluginutils@1.0.0-rc.7': {} '@rolldown/pluginutils@1.0.0-rc.9': {} '@rolldown/pluginutils@1.0.1': {} - '@rollup/pluginutils@5.1.4(rollup@4.63.1)': + '@rollup/plugin-alias@6.0.0(rollup@4.56.0)': + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-commonjs@29.0.0(rollup@4.56.0)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + commondir: 1.0.1 + estree-walker: 2.0.2 + fdir: 6.5.0(picomatch@4.0.3) + is-reference: 1.2.1 + magic-string: 0.30.21 + picomatch: 4.0.3 + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-inject@5.0.5(rollup@4.56.0)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + estree-walker: 2.0.2 + magic-string: 0.30.21 + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-json@6.1.0(rollup@4.56.0)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-node-resolve@16.0.3(rollup@4.56.0)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.11 + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-replace@6.0.3(rollup@4.56.0)': + dependencies: + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + magic-string: 0.30.21 + optionalDependencies: + rollup: 4.56.0 + + '@rollup/plugin-terser@0.4.4(rollup@4.56.0)': + dependencies: + serialize-javascript: 6.0.2 + smob: 1.5.0 + terser: 5.37.0 + optionalDependencies: + rollup: 4.56.0 + + '@rollup/pluginutils@5.1.4(rollup@4.56.0)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 - picomatch: 4.0.7 + picomatch: 4.0.3 optionalDependencies: - rollup: 4.63.1 + rollup: 4.56.0 - '@rollup/rollup-android-arm-eabi@4.63.1': + '@rollup/rollup-android-arm-eabi@4.56.0': optional: true - '@rollup/rollup-android-arm64@4.63.1': + '@rollup/rollup-android-arm64@4.56.0': optional: true - '@rollup/rollup-darwin-arm64@4.63.1': + '@rollup/rollup-darwin-arm64@4.56.0': optional: true - '@rollup/rollup-darwin-x64@4.63.1': + '@rollup/rollup-darwin-x64@4.56.0': optional: true - '@rollup/rollup-freebsd-arm64@4.63.1': + '@rollup/rollup-freebsd-arm64@4.56.0': optional: true - '@rollup/rollup-freebsd-x64@4.63.1': + '@rollup/rollup-freebsd-x64@4.56.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.63.1': + '@rollup/rollup-linux-arm-gnueabihf@4.56.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.63.1': + '@rollup/rollup-linux-arm-musleabihf@4.56.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.63.1': + '@rollup/rollup-linux-arm64-gnu@4.56.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.63.1': + '@rollup/rollup-linux-arm64-musl@4.56.0': optional: true - '@rollup/rollup-linux-loong64-gnu@4.63.1': + '@rollup/rollup-linux-loong64-gnu@4.56.0': optional: true - '@rollup/rollup-linux-loong64-musl@4.63.1': + '@rollup/rollup-linux-loong64-musl@4.56.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.63.1': + '@rollup/rollup-linux-ppc64-gnu@4.56.0': optional: true - '@rollup/rollup-linux-ppc64-musl@4.63.1': + '@rollup/rollup-linux-ppc64-musl@4.56.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.63.1': + '@rollup/rollup-linux-riscv64-gnu@4.56.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.63.1': + '@rollup/rollup-linux-riscv64-musl@4.56.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.63.1': + '@rollup/rollup-linux-s390x-gnu@4.56.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.63.1': + '@rollup/rollup-linux-x64-gnu@4.56.0': optional: true - '@rollup/rollup-linux-x64-musl@4.63.1': + '@rollup/rollup-linux-x64-musl@4.56.0': optional: true - '@rollup/rollup-openbsd-x64@4.63.1': + '@rollup/rollup-openbsd-x64@4.56.0': optional: true - '@rollup/rollup-openharmony-arm64@4.63.1': + '@rollup/rollup-openharmony-arm64@4.56.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.63.1': + '@rollup/rollup-win32-arm64-msvc@4.56.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.63.1': + '@rollup/rollup-win32-ia32-msvc@4.56.0': optional: true - '@rollup/rollup-win32-x64-gnu@4.63.1': + '@rollup/rollup-win32-x64-gnu@4.56.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.63.1': + '@rollup/rollup-win32-x64-msvc@4.56.0': optional: true - '@rsbuild/core@2.3.1': + '@rsbuild/core@2.0.1': dependencies: - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) + '@rspack/core': 2.0.0(@swc/helpers@0.5.21) + '@swc/helpers': 0.5.21 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + + '@rsbuild/core@2.0.14': + dependencies: + '@rspack/core': 2.0.8(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/plugin-babel@1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2)': + '@rsbuild/core@2.0.8': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-proposal-decorators': 7.29.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/plugin-transform-class-properties': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@babel/preset-typescript': 7.28.5(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@rspack/core': 2.0.5(@swc/helpers@0.5.23) + '@swc/helpers': 0.5.23 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + + '@rsbuild/plugin-babel@1.0.6(@rsbuild/core@2.0.14)': + dependencies: + '@babel/core': 7.28.5 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.5) + '@babel/plugin-transform-class-properties': 7.27.1(@babel/core@7.28.5) + '@babel/preset-typescript': 7.28.5(@babel/core@7.28.5) + '@rsbuild/core': 2.0.14 + '@types/babel__core': 7.20.5 + deepmerge: 4.3.1 + reduce-configs: 1.1.1 + upath: 2.0.1 + transitivePeerDependencies: + - supports-color + + '@rsbuild/plugin-babel@1.1.2(@rsbuild/core@2.0.14)': + dependencies: + '@babel/core': 7.29.0 + '@babel/plugin-proposal-decorators': 7.29.0(@babel/core@7.29.0) + '@babel/plugin-transform-class-properties': 7.28.6(@babel/core@7.29.0) + '@babel/preset-typescript': 7.28.5(@babel/core@7.29.0) '@types/babel__core': 7.20.5 reduce-configs: 1.1.1 optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.0.14 transitivePeerDependencies: - supports-color - '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))': + '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23))': dependencies: - '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.3.1(@swc/helpers@0.5.23))(react-refresh@0.18.0) + '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.0.8(@swc/helpers@0.5.23))(react-refresh@0.18.0) react-refresh: 0.18.0 optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.0.14 transitivePeerDependencies: - '@rspack/core' - '@rsbuild/plugin-sass@2.0.1(@rsbuild/core@2.3.1)': + '@rsbuild/plugin-react@2.0.0(@rsbuild/core@2.0.8)(@rspack/core@2.0.8(@swc/helpers@0.5.23))': dependencies: - deepmerge: 4.3.1 - loader-utils: 2.0.4 - postcss: 8.5.29 - reduce-configs: 2.0.1 - sass-embedded: 1.105.1 + '@rspack/plugin-react-refresh': 2.0.0(@rspack/core@2.0.8(@swc/helpers@0.5.23))(react-refresh@0.18.0) + react-refresh: 0.18.0 optionalDependencies: - '@rsbuild/core': 2.3.1 - - '@rsbuild/plugin-solid@1.1.1(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(solid-js@1.9.12)(supports-color@10.2.2)': - dependencies: - '@rsbuild/plugin-babel': 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) - solid-refresh: 0.7.8(solid-js@1.9.12) - optionalDependencies: - '@rsbuild/core': 2.3.1 - transitivePeerDependencies: - - '@babel/core' - - solid-js - - supports-color - - '@rsbuild/plugin-tailwindcss@2.0.3(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(webpack@5.110.3)': - dependencies: - '@tailwindcss/webpack': 4.3.1(@rspack/core@2.3.1(@swc/helpers@0.5.23))(webpack@5.110.3) - optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.0.8 transitivePeerDependencies: - '@rspack/core' - - webpack - '@rsbuild/plugin-vue-jsx@2.0.0(@babel/core@7.29.7(supports-color@10.2.2))(@rsbuild/core@2.3.1)(supports-color@10.2.2)': + '@rsbuild/plugin-solid@2.0.0-beta.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25)': dependencies: - '@rsbuild/plugin-babel': 1.1.2(@rsbuild/core@2.3.1)(supports-color@10.2.2) - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - babel-plugin-vue-jsx-hmr: 1.0.0(supports-color@10.2.2) + '@rsbuild/plugin-babel': 1.1.2(@rsbuild/core@2.0.14) + '@solidjs/web': 2.0.0-beta.25(solid-js@2.0.0-beta.25) + babel-preset-solid: 2.0.0-beta.25(@babel/core@7.29.0)(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + solid-refresh: 0.8.0-next.7(solid-js@2.0.0-beta.25) optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.0.14 transitivePeerDependencies: - '@babel/core' - supports-color - '@rsbuild/plugin-vue@1.2.7(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@rsbuild/plugin-vue-jsx@1.1.1(@babel/core@7.29.0)(@rsbuild/core@2.0.14)': dependencies: - rspack-vue-loader: 17.5.0(@rspack/core@2.3.1(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2)) + '@rsbuild/plugin-babel': 1.1.2(@rsbuild/core@2.0.14) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.0) + babel-plugin-vue-jsx-hmr: 1.0.0 optionalDependencies: - '@rsbuild/core': 2.3.1 + '@rsbuild/core': 2.0.14 + transitivePeerDependencies: + - '@babel/core' + - supports-color + + '@rsbuild/plugin-vue-jsx@2.0.0(@babel/core@7.29.0)(@rsbuild/core@2.0.14)': + dependencies: + '@rsbuild/plugin-babel': 1.1.2(@rsbuild/core@2.0.14) + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.0) + babel-plugin-vue-jsx-hmr: 1.0.0 + optionalDependencies: + '@rsbuild/core': 2.0.14 + transitivePeerDependencies: + - '@babel/core' + - supports-color + + '@rsbuild/plugin-vue@1.2.2(@rsbuild/core@2.0.14)(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(vue@3.5.25(typescript@6.0.2))': + dependencies: + '@rsbuild/core': 2.0.14 + rspack-vue-loader: 17.4.4(vue@3.5.25(typescript@6.0.2))(webpack@5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)) + webpack: 5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4) + transitivePeerDependencies: + - '@swc/core' + - '@vue/compiler-sfc' + - esbuild + - uglify-js + - vue + - webpack-cli + + '@rsbuild/plugin-vue@1.2.7(@rsbuild/core@2.0.14)(@rspack/core@2.0.8(@swc/helpers@0.5.23))(vue@3.5.25(typescript@6.0.2))': + dependencies: + rspack-vue-loader: 17.5.0(@rspack/core@2.0.8(@swc/helpers@0.5.23))(vue@3.5.25(typescript@6.0.2)) + optionalDependencies: + '@rsbuild/core': 2.0.14 transitivePeerDependencies: - '@rspack/core' - '@vue/compiler-sfc' - vue - '@rspack/binding-darwin-arm64@2.2.7': + '@rspack/binding-darwin-arm64@2.0.0': optional: true - '@rspack/binding-darwin-arm64@2.3.1': + '@rspack/binding-darwin-arm64@2.0.5': optional: true - '@rspack/binding-darwin-x64@2.2.7': + '@rspack/binding-darwin-arm64@2.0.8': optional: true - '@rspack/binding-darwin-x64@2.3.1': + '@rspack/binding-darwin-x64@2.0.0': optional: true - '@rspack/binding-linux-arm64-gnu@2.2.7': + '@rspack/binding-darwin-x64@2.0.5': optional: true - '@rspack/binding-linux-arm64-gnu@2.3.1': + '@rspack/binding-darwin-x64@2.0.8': optional: true - '@rspack/binding-linux-arm64-musl@2.2.7': + '@rspack/binding-linux-arm64-gnu@2.0.0': optional: true - '@rspack/binding-linux-arm64-musl@2.3.1': + '@rspack/binding-linux-arm64-gnu@2.0.5': optional: true - '@rspack/binding-linux-ppc64-gnu@2.2.7': + '@rspack/binding-linux-arm64-gnu@2.0.8': optional: true - '@rspack/binding-linux-ppc64-gnu@2.3.1': + '@rspack/binding-linux-arm64-musl@2.0.0': optional: true - '@rspack/binding-linux-riscv64-gnu@2.2.7': + '@rspack/binding-linux-arm64-musl@2.0.5': optional: true - '@rspack/binding-linux-riscv64-gnu@2.3.1': + '@rspack/binding-linux-arm64-musl@2.0.8': optional: true - '@rspack/binding-linux-riscv64-musl@2.2.7': + '@rspack/binding-linux-x64-gnu@2.0.0': optional: true - '@rspack/binding-linux-riscv64-musl@2.3.1': + '@rspack/binding-linux-x64-gnu@2.0.5': optional: true - '@rspack/binding-linux-s390x-gnu@2.2.7': + '@rspack/binding-linux-x64-gnu@2.0.8': optional: true - '@rspack/binding-linux-s390x-gnu@2.3.1': + '@rspack/binding-linux-x64-musl@2.0.0': optional: true - '@rspack/binding-linux-x64-gnu@2.2.7': + '@rspack/binding-linux-x64-musl@2.0.5': optional: true - '@rspack/binding-linux-x64-gnu@2.3.1': + '@rspack/binding-linux-x64-musl@2.0.8': optional: true - '@rspack/binding-linux-x64-musl@2.2.7': - optional: true - - '@rspack/binding-linux-x64-musl@2.3.1': - optional: true - - '@rspack/binding-wasm32-wasi@2.2.7': + '@rspack/binding-wasm32-wasi@2.0.0': 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) + '@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) optional: true - '@rspack/binding-wasm32-wasi@2.3.1': + '@rspack/binding-wasm32-wasi@2.0.5': 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) + '@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) optional: true - '@rspack/binding-win32-arm64-msvc@2.2.7': + '@rspack/binding-wasm32-wasi@2.0.8': + 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) optional: true - '@rspack/binding-win32-arm64-msvc@2.3.1': + '@rspack/binding-win32-arm64-msvc@2.0.0': optional: true - '@rspack/binding-win32-ia32-msvc@2.2.7': + '@rspack/binding-win32-arm64-msvc@2.0.5': optional: true - '@rspack/binding-win32-ia32-msvc@2.3.1': + '@rspack/binding-win32-arm64-msvc@2.0.8': optional: true - '@rspack/binding-win32-x64-msvc@2.2.7': + '@rspack/binding-win32-ia32-msvc@2.0.0': optional: true - '@rspack/binding-win32-x64-msvc@2.3.1': + '@rspack/binding-win32-ia32-msvc@2.0.5': optional: true - '@rspack/binding@2.2.7': + '@rspack/binding-win32-ia32-msvc@2.0.8': + optional: true + + '@rspack/binding-win32-x64-msvc@2.0.0': + optional: true + + '@rspack/binding-win32-x64-msvc@2.0.5': + optional: true + + '@rspack/binding-win32-x64-msvc@2.0.8': + optional: true + + '@rspack/binding@2.0.0': optionalDependencies: - '@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/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.3.1': + '@rspack/binding@2.0.5': optionalDependencies: - '@rspack/binding-darwin-arm64': 2.3.1 - '@rspack/binding-darwin-x64': 2.3.1 - '@rspack/binding-linux-arm64-gnu': 2.3.1 - '@rspack/binding-linux-arm64-musl': 2.3.1 - '@rspack/binding-linux-ppc64-gnu': 2.3.1 - '@rspack/binding-linux-riscv64-gnu': 2.3.1 - '@rspack/binding-linux-riscv64-musl': 2.3.1 - '@rspack/binding-linux-s390x-gnu': 2.3.1 - '@rspack/binding-linux-x64-gnu': 2.3.1 - '@rspack/binding-linux-x64-musl': 2.3.1 - '@rspack/binding-wasm32-wasi': 2.3.1 - '@rspack/binding-win32-arm64-msvc': 2.3.1 - '@rspack/binding-win32-ia32-msvc': 2.3.1 - '@rspack/binding-win32-x64-msvc': 2.3.1 + '@rspack/binding-darwin-arm64': 2.0.5 + '@rspack/binding-darwin-x64': 2.0.5 + '@rspack/binding-linux-arm64-gnu': 2.0.5 + '@rspack/binding-linux-arm64-musl': 2.0.5 + '@rspack/binding-linux-x64-gnu': 2.0.5 + '@rspack/binding-linux-x64-musl': 2.0.5 + '@rspack/binding-wasm32-wasi': 2.0.5 + '@rspack/binding-win32-arm64-msvc': 2.0.5 + '@rspack/binding-win32-ia32-msvc': 2.0.5 + '@rspack/binding-win32-x64-msvc': 2.0.5 - '@rspack/core@2.2.7(@swc/helpers@0.5.23)': + '@rspack/binding@2.0.8': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.0.8 + '@rspack/binding-darwin-x64': 2.0.8 + '@rspack/binding-linux-arm64-gnu': 2.0.8 + '@rspack/binding-linux-arm64-musl': 2.0.8 + '@rspack/binding-linux-x64-gnu': 2.0.8 + '@rspack/binding-linux-x64-musl': 2.0.8 + '@rspack/binding-wasm32-wasi': 2.0.8 + '@rspack/binding-win32-arm64-msvc': 2.0.8 + '@rspack/binding-win32-ia32-msvc': 2.0.8 + '@rspack/binding-win32-x64-msvc': 2.0.8 + + '@rspack/core@2.0.0(@swc/helpers@0.5.21)': dependencies: - '@rspack/binding': 2.2.7 + '@rspack/binding': 2.0.0 + optionalDependencies: + '@swc/helpers': 0.5.21 + + '@rspack/core@2.0.0(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.0.0 optionalDependencies: '@swc/helpers': 0.5.23 - '@rspack/core@2.3.1(@swc/helpers@0.5.23)': + '@rspack/core@2.0.5(@swc/helpers@0.5.23)': dependencies: - '@rspack/binding': 2.3.1 + '@rspack/binding': 2.0.5 + optionalDependencies: + '@swc/helpers': 0.5.23 + + '@rspack/core@2.0.8(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.0.8 optionalDependencies: '@swc/helpers': 0.5.23 '@rspack/lite-tapable@1.1.0': {} - '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.3.1(@swc/helpers@0.5.23))(react-refresh@0.18.0)': + '@rspack/plugin-react-refresh@2.0.0(@rspack/core@2.0.8(@swc/helpers@0.5.23))(react-refresh@0.18.0)': dependencies: react-refresh: 0.18.0 optionalDependencies: - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) + '@rspack/core': 2.0.8(@swc/helpers@0.5.23) '@rushstack/node-core-library@5.7.0(@types/node@25.0.9)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) - ajv-formats: 3.0.1 + ajv-formats: 3.0.1(ajv@8.13.0) fs-extra: 7.0.1 import-lazy: 4.0.0 jju: 1.4.0 @@ -34832,11 +32644,11 @@ snapshots: '@sentry-internal/replay-canvas': 10.32.0 '@sentry/core': 10.32.0 - '@sentry/bundler-plugin-core@4.6.1(supports-color@10.2.2)': + '@sentry/bundler-plugin-core@4.6.1': dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.29.0 '@sentry/babel-plugin-component-annotate': 4.6.1 - '@sentry/cli': 2.58.4(supports-color@10.2.2) + '@sentry/cli': 2.58.4 dotenv: 16.6.1 find-up: 5.0.0 glob: 10.5.0 @@ -34870,9 +32682,9 @@ snapshots: '@sentry/cli-win32-x64@2.58.4': optional: true - '@sentry/cli@2.58.4(supports-color@10.2.2)': + '@sentry/cli@2.58.4': dependencies: - https-proxy-agent: 5.0.1(supports-color@10.2.2) + https-proxy-agent: 5.0.1 node-fetch: 2.7.0 progress: 2.0.3 proxy-from-env: 1.1.0 @@ -34897,18 +32709,18 @@ snapshots: '@sentry/types': 7.120.4 '@sentry/utils': 7.120.4 - '@sentry/react@10.32.0(react@19.2.9)': + '@sentry/react@10.32.0(react@19.2.3)': dependencies: '@sentry/browser': 10.32.0 '@sentry/core': 10.32.0 hoist-non-react-statics: 3.3.2 - react: 19.2.9 + react: 19.2.3 - '@sentry/solid@10.32.0(@tanstack/solid-router@packages+solid-router)(solid-js@1.9.12)': + '@sentry/solid@10.32.0(@tanstack/solid-router@packages+solid-router)(solid-js@2.0.0-beta.25)': dependencies: '@sentry/browser': 10.32.0 '@sentry/core': 10.32.0 - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 optionalDependencies: '@tanstack/solid-router': link:packages/solid-router @@ -34922,9 +32734,9 @@ snapshots: dependencies: '@sentry/types': 7.120.4 - '@sentry/vite-plugin@4.6.1(supports-color@10.2.2)': + '@sentry/vite-plugin@4.6.1': dependencies: - '@sentry/bundler-plugin-core': 4.6.1(supports-color@10.2.2) + '@sentry/bundler-plugin-core': 4.6.1 unplugin: 1.0.1 transitivePeerDependencies: - encoding @@ -34944,92 +32756,191 @@ snapshots: '@sindresorhus/is@7.1.0': {} + '@sindresorhus/merge-streams@4.0.0': {} + '@so-ric/colorspace@1.1.6': dependencies: color: 5.0.2 text-hex: 1.0.0 - '@solid-primitives/context@0.3.2(solid-js@1.9.12)': + '@solid-devtools/debugger@0.26.0(solid-js@2.0.0-beta.25)': dependencies: - solid-js: 1.9.12 + '@nothing-but/utils': 0.17.0 + '@solid-devtools/shared': 0.19.0(solid-js@2.0.0-beta.25) + '@solid-primitives/bounds': 0.0.122(solid-js@2.0.0-beta.25) + '@solid-primitives/cursor': 0.0.115(solid-js@2.0.0-beta.25) + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/keyboard': 1.3.0(solid-js@2.0.0-beta.25) + '@solid-primitives/platform': 0.1.2(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/scheduled': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.0.8(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/event-listener@2.4.0(solid-js@1.9.12)': + '@solid-devtools/logger@0.9.7(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.0(solid-js@1.9.12) - solid-js: 1.9.12 + '@nothing-but/utils': 0.17.0 + '@solid-devtools/debugger': 0.26.0(solid-js@2.0.0-beta.25) + '@solid-devtools/shared': 0.19.0(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/event-listener@2.4.3(solid-js@1.9.12)': + '@solid-devtools/shared@0.19.0(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + '@nothing-but/utils': 0.17.0 + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/media': 2.3.0(solid-js@2.0.0-beta.25) + '@solid-primitives/refs': 1.1.0(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/scheduled': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.0.8(solid-js@2.0.0-beta.25) + '@solid-primitives/styles': 0.0.114(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/keyboard@1.3.0(solid-js@1.9.12)': + '@solid-primitives/bounds@0.0.122(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/event-listener': 2.4.0(solid-js@1.9.12) - '@solid-primitives/rootless': 1.5.0(solid-js@1.9.12) - '@solid-primitives/utils': 6.3.0(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/resize-observer': 2.1.0(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.0.8(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/keyboard@1.3.3(solid-js@1.9.12)': + '@solid-primitives/context@0.3.2(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/event-listener': 2.4.3(solid-js@1.9.12) - '@solid-primitives/rootless': 1.5.2(solid-js@1.9.12) - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 - '@solid-primitives/props@3.2.2(solid-js@1.9.12)': + '@solid-primitives/cursor@0.0.115(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/refs@1.1.0(solid-js@1.9.12)': + '@solid-primitives/event-listener@2.4.0(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.0(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/resize-observer@2.1.3(solid-js@1.9.12)': + '@solid-primitives/event-listener@2.4.3(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/event-listener': 2.4.3(solid-js@1.9.12) - '@solid-primitives/rootless': 1.5.2(solid-js@1.9.12) - '@solid-primitives/static-store': 0.1.2(solid-js@1.9.12) - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/rootless@1.5.0(solid-js@1.9.12)': + '@solid-primitives/keyboard@1.3.0(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.0(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/rootless@1.5.2(solid-js@1.9.12)': + '@solid-primitives/keyboard@1.3.3(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/event-listener': 2.4.3(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.2(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/static-store@0.1.2(solid-js@1.9.12)': + '@solid-primitives/media@2.3.0(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/utils': 6.3.2(solid-js@1.9.12) - solid-js: 1.9.12 + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.1.0(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/transition-group@1.1.2(solid-js@1.9.12)': + '@solid-primitives/platform@0.1.2(solid-js@2.0.0-beta.25)': dependencies: - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 - '@solid-primitives/utils@6.3.0(solid-js@1.9.12)': + '@solid-primitives/props@3.2.2(solid-js@2.0.0-beta.25)': dependencies: - solid-js: 1.9.12 + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solid-primitives/utils@6.3.2(solid-js@1.9.12)': + '@solid-primitives/refs@1.1.0(solid-js@2.0.0-beta.25)': dependencies: - solid-js: 1.9.12 + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solidjs/meta@0.29.4(solid-js@1.9.12)': + '@solid-primitives/resize-observer@2.1.0(solid-js@2.0.0-beta.25)': dependencies: - solid-js: 1.9.12 + '@solid-primitives/event-listener': 2.4.0(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.1.0(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@solidjs/testing-library@0.8.10(solid-js@1.9.12)': + '@solid-primitives/resize-observer@2.1.3(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/event-listener': 2.4.3(solid-js@2.0.0-beta.25) + '@solid-primitives/rootless': 1.5.2(solid-js@2.0.0-beta.25) + '@solid-primitives/static-store': 0.1.2(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/rootless@1.5.0(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/rootless@1.5.2(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/scheduled@1.5.0(solid-js@2.0.0-beta.25)': + dependencies: + solid-js: 2.0.0-beta.25 + + '@solid-primitives/static-store@0.0.8(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/static-store@0.1.0(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/static-store@0.1.2(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/utils': 6.3.2(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/styles@0.0.114(solid-js@2.0.0-beta.25)': + dependencies: + '@solid-primitives/rootless': 1.5.0(solid-js@2.0.0-beta.25) + '@solid-primitives/utils': 6.3.0(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 + + '@solid-primitives/transition-group@1.1.2(solid-js@2.0.0-beta.25)': + dependencies: + solid-js: 2.0.0-beta.25 + + '@solid-primitives/utils@6.3.0(solid-js@2.0.0-beta.25)': + dependencies: + solid-js: 2.0.0-beta.25 + + '@solid-primitives/utils@6.3.2(solid-js@2.0.0-beta.25)': + dependencies: + solid-js: 2.0.0-beta.25 + + '@solidjs/meta@0.29.4(solid-js@2.0.0-beta.25)': + dependencies: + solid-js: 2.0.0-beta.25 + + '@solidjs/signals@2.0.0-beta.25': {} + + '@solidjs/testing-library@0.8.10(solid-js@2.0.0-beta.25)': dependencies: '@testing-library/dom': 10.4.1 - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 + + '@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25)': + dependencies: + seroval: 1.5.4 + seroval-plugins: 1.5.4(seroval@1.5.4) + solid-js: 2.0.0-beta.25 '@speed-highlight/core@1.2.14': {} @@ -35041,25 +32952,25 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@stylistic/eslint-plugin@5.10.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@stylistic/eslint-plugin@5.10.0(eslint@9.22.0(jiti@2.7.0))': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/types': 8.57.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.7 + picomatch: 4.0.3 - '@stylistic/eslint-plugin@5.4.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))': + '@stylistic/eslint-plugin@5.4.0(eslint@9.22.0(jiti@2.7.0))': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/types': 8.53.0 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.7 + picomatch: 4.0.3 '@supabase/auth-js@2.67.3': dependencies: @@ -35082,7 +32993,7 @@ snapshots: '@supabase/node-fetch': 2.6.15 '@types/phoenix': 1.6.6 '@types/ws': 8.5.14 - ws: 8.20.0 + ws: 8.18.3 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -35109,26 +33020,22 @@ snapshots: - bufferutil - utf-8-validate - '@sveltejs/acorn-typescript@1.0.13(acorn@8.18.0)': - dependencies: - acorn: 8.18.0 - '@swc-node/core@1.14.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)': dependencies: '@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.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@10.2.2)': + '@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2)': 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@10.2.2) - oxc-resolver: 11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + debug: 4.4.3 + oxc-resolver: 11.19.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) pirates: 4.0.7 tslib: 2.8.1 - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -35201,6 +33108,10 @@ snapshots: dependencies: tslib: 2.8.1 + '@swc/helpers@0.5.21': + dependencies: + tslib: 2.8.1 + '@swc/helpers@0.5.23': dependencies: tslib: 2.8.1 @@ -35212,95 +33123,49 @@ snapshots: '@tailwindcss/node@4.2.2': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.21.6 + enhanced-resolve: 5.20.1 jiti: 2.7.0 lightningcss: 1.32.0 magic-string: 0.30.21 source-map-js: 1.2.1 tailwindcss: 4.2.2 - '@tailwindcss/node@4.3.1': - dependencies: - '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.21.6 - jiti: 2.7.0 - lightningcss: 1.32.0 - magic-string: 0.30.21 - source-map-js: 1.2.1 - tailwindcss: 4.3.1 - '@tailwindcss/oxide-android-arm64@4.2.2': optional: true - '@tailwindcss/oxide-android-arm64@4.3.1': - optional: true - '@tailwindcss/oxide-darwin-arm64@4.2.2': optional: true - '@tailwindcss/oxide-darwin-arm64@4.3.1': - optional: true - '@tailwindcss/oxide-darwin-x64@4.2.2': optional: true - '@tailwindcss/oxide-darwin-x64@4.3.1': - optional: true - '@tailwindcss/oxide-freebsd-x64@4.2.2': optional: true - '@tailwindcss/oxide-freebsd-x64@4.3.1': - optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.2.2': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.1': - optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.2.2': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.3.1': - optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.2.2': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.3.1': - optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.2.2': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.3.1': - optional: true - '@tailwindcss/oxide-linux-x64-musl@4.2.2': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.3.1': - optional: true - '@tailwindcss/oxide-wasm32-wasi@4.2.2': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.3.1': - optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.2.2': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.3.1': - optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.2.2': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.3.1': - optional: true - '@tailwindcss/oxide@4.2.2': optionalDependencies: '@tailwindcss/oxide-android-arm64': 4.2.2 @@ -35316,21 +33181,6 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.2.2 '@tailwindcss/oxide-win32-x64-msvc': 4.2.2 - '@tailwindcss/oxide@4.3.1': - optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.3.1 - '@tailwindcss/oxide-darwin-arm64': 4.3.1 - '@tailwindcss/oxide-darwin-x64': 4.3.1 - '@tailwindcss/oxide-freebsd-x64': 4.3.1 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.1 - '@tailwindcss/oxide-linux-arm64-gnu': 4.3.1 - '@tailwindcss/oxide-linux-arm64-musl': 4.3.1 - '@tailwindcss/oxide-linux-x64-gnu': 4.3.1 - '@tailwindcss/oxide-linux-x64-musl': 4.3.1 - '@tailwindcss/oxide-wasm32-wasi': 4.3.1 - '@tailwindcss/oxide-win32-arm64-msvc': 4.3.1 - '@tailwindcss/oxide-win32-x64-msvc': 4.3.1 - '@tailwindcss/postcss@4.2.2': dependencies: '@alloc/quick-lru': 5.2.0 @@ -35339,29 +33189,12 @@ snapshots: postcss: 8.5.8 tailwindcss: 4.2.2 - '@tailwindcss/vite@4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@tailwindcss/vite@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))': dependencies: '@tailwindcss/node': 4.2.2 '@tailwindcss/oxide': 4.2.2 tailwindcss: 4.2.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@tailwindcss/vite@4.2.2(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@tailwindcss/node': 4.2.2 - '@tailwindcss/oxide': 4.2.2 - tailwindcss: 4.2.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@tailwindcss/webpack@4.3.1(@rspack/core@2.3.1(@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.3.1(@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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) + 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/devtools-client@0.0.4': dependencies: @@ -35383,60 +33216,60 @@ snapshots: '@tanstack/devtools-event-client@0.3.4': {} - '@tanstack/devtools-ui@0.3.5(csstype@3.2.3)(solid-js@1.9.12)': + '@tanstack/devtools-ui@0.3.5(csstype@3.2.3)(solid-js@2.0.0-beta.25)': dependencies: clsx: 2.1.1 goober: 2.1.16(csstype@3.2.3) - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - csstype - '@tanstack/devtools-ui@0.4.4(csstype@3.2.3)(solid-js@1.9.12)': + '@tanstack/devtools-ui@0.4.4(csstype@3.2.3)(solid-js@2.0.0-beta.25)': dependencies: clsx: 2.1.1 goober: 2.1.16(csstype@3.2.3) - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - csstype - '@tanstack/devtools@0.6.14(csstype@3.2.3)(solid-js@1.9.12)': + '@tanstack/devtools@0.6.14(csstype@3.2.3)(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/keyboard': 1.3.0(solid-js@1.9.12) + '@solid-primitives/keyboard': 1.3.0(solid-js@2.0.0-beta.25) '@tanstack/devtools-event-bus': 0.3.2 - '@tanstack/devtools-ui': 0.3.5(csstype@3.2.3)(solid-js@1.9.12) + '@tanstack/devtools-ui': 0.3.5(csstype@3.2.3)(solid-js@2.0.0-beta.25) clsx: 2.1.1 goober: 2.1.16(csstype@3.2.3) - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - bufferutil - csstype - utf-8-validate - '@tanstack/devtools@0.8.1(csstype@3.2.3)(solid-js@1.9.12)': + '@tanstack/devtools@0.8.1(csstype@3.2.3)(solid-js@2.0.0-beta.25)': dependencies: - '@solid-primitives/event-listener': 2.4.3(solid-js@1.9.12) - '@solid-primitives/keyboard': 1.3.3(solid-js@1.9.12) - '@solid-primitives/resize-observer': 2.1.3(solid-js@1.9.12) + '@solid-primitives/event-listener': 2.4.3(solid-js@2.0.0-beta.25) + '@solid-primitives/keyboard': 1.3.3(solid-js@2.0.0-beta.25) + '@solid-primitives/resize-observer': 2.1.3(solid-js@2.0.0-beta.25) '@tanstack/devtools-client': 0.0.4 '@tanstack/devtools-event-bus': 0.3.3 - '@tanstack/devtools-ui': 0.4.4(csstype@3.2.3)(solid-js@1.9.12) + '@tanstack/devtools-ui': 0.4.4(csstype@3.2.3)(solid-js@2.0.0-beta.25) clsx: 2.1.1 goober: 2.1.16(csstype@3.2.3) - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - bufferutil - csstype - utf-8-validate - '@tanstack/eslint-config@0.3.2(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@tanstack/eslint-config@0.3.2(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@eslint/js': 9.36.0 - '@stylistic/eslint-plugin': 5.4.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - eslint-plugin-import-x: 4.16.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint-plugin-n: 17.23.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@stylistic/eslint-plugin': 5.4.0(eslint@9.22.0(jiti@2.7.0)) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0)) + eslint-plugin-n: 17.23.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) globals: 16.4.0 - typescript-eslint: 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - vue-eslint-parser: 10.2.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + typescript-eslint: 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + vue-eslint-parser: 10.2.0(eslint@9.22.0(jiti@2.7.0)) transitivePeerDependencies: - '@typescript-eslint/utils' - eslint @@ -35444,16 +33277,16 @@ snapshots: - supports-color - typescript - '@tanstack/eslint-config@0.4.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@tanstack/eslint-config@0.4.0(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint/js': 10.0.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - '@stylistic/eslint-plugin': 5.10.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - eslint-plugin-import-x: 4.16.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint-plugin-n: 17.24.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint/js': 10.0.1(eslint@9.22.0(jiti@2.7.0)) + '@stylistic/eslint-plugin': 5.10.0(eslint@9.22.0(jiti@2.7.0)) + eslint: 9.22.0(jiti@2.7.0) + eslint-plugin-import-x: 4.16.1(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0)) + eslint-plugin-n: 17.24.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) globals: 17.4.0 - typescript-eslint: 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - vue-eslint-parser: 10.4.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + typescript-eslint: 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + vue-eslint-parser: 10.4.0(eslint@9.22.0(jiti@2.7.0)) transitivePeerDependencies: - '@typescript-eslint/utils' - eslint-import-resolver-node @@ -35464,7 +33297,9 @@ snapshots: dependencies: remove-accents: 0.5.0 - '@tanstack/query-core@5.102.0': {} + '@tanstack/query-core@5.99.0': {} + + '@tanstack/query-devtools@5.101.0': {} '@tanstack/query-devtools@5.67.2': {} @@ -35472,75 +33307,75 @@ snapshots: '@tanstack/query-devtools@5.91.1': {} - '@tanstack/react-devtools@0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)': + '@tanstack/react-devtools@0.7.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(csstype@3.2.3)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)': dependencies: - '@tanstack/devtools': 0.6.14(csstype@3.2.3)(solid-js@1.9.12) + '@tanstack/devtools': 0.6.14(csstype@3.2.3)(solid-js@2.0.0-beta.25) '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) transitivePeerDependencies: - bufferutil - csstype - solid-js - utf-8-validate - '@tanstack/react-query-devtools@5.67.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9)': + '@tanstack/react-query-devtools@5.67.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/query-devtools': 5.67.2 - '@tanstack/react-query': 5.102.0(react@19.2.9) - react: 19.2.9 + '@tanstack/react-query': 5.99.0(react@19.2.3) + react: 19.2.3 - '@tanstack/react-query-devtools@5.90.2(@tanstack/react-query@5.102.0(react@19.2.9))(react@19.2.9)': + '@tanstack/react-query-devtools@5.90.2(@tanstack/react-query@5.99.0(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/query-devtools': 5.90.1 - '@tanstack/react-query': 5.102.0(react@19.2.9) - react: 19.2.9 + '@tanstack/react-query': 5.99.0(react@19.2.3) + react: 19.2.3 - '@tanstack/react-query@5.102.0(react@19.2.9)': + '@tanstack/react-query@5.99.0(react@19.2.3)': dependencies: - '@tanstack/query-core': 5.102.0 - react: 19.2.9 + '@tanstack/query-core': 5.99.0 + react: 19.2.3 - '@tanstack/react-store@0.11.2(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@tanstack/react-store@0.9.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@tanstack/store': 0.11.2 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - use-sync-external-store: 1.6.0(react@19.2.9) + '@tanstack/store': 0.9.3 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + use-sync-external-store: 1.6.0(react@19.2.3) - '@tanstack/react-virtual@3.13.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@tanstack/react-virtual@3.13.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/virtual-core': 3.13.0 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - '@tanstack/solid-devtools@0.7.14(csstype@3.2.3)(solid-js@1.9.12)': + '@tanstack/solid-devtools@0.7.14(csstype@3.2.3)(solid-js@2.0.0-beta.25)': dependencies: - '@tanstack/devtools': 0.8.1(csstype@3.2.3)(solid-js@1.9.12) - solid-js: 1.9.12 + '@tanstack/devtools': 0.8.1(csstype@3.2.3)(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - bufferutil - csstype - utf-8-validate - '@tanstack/solid-query-devtools@5.90.4(@tanstack/solid-query@5.102.0(solid-js@1.9.12))(solid-js@1.9.12)': + '@tanstack/solid-query-devtools@6.0.0-beta.5(@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25))(solid-js@2.0.0-beta.25)': dependencies: - '@tanstack/query-devtools': 5.90.1 - '@tanstack/solid-query': 5.102.0(solid-js@1.9.12) - solid-js: 1.9.12 + '@tanstack/query-devtools': 5.101.0 + '@tanstack/solid-query': 6.0.0-beta.5(solid-js@2.0.0-beta.25) + solid-js: 2.0.0-beta.25 - '@tanstack/solid-query@5.102.0(solid-js@1.9.12)': + '@tanstack/solid-query@6.0.0-beta.5(solid-js@2.0.0-beta.25)': dependencies: - '@tanstack/query-core': 5.102.0 - solid-js: 1.9.12 + '@tanstack/query-core': 5.99.0 + solid-js: 2.0.0-beta.25 - '@tanstack/solid-virtual@3.13.12(solid-js@1.9.12)': + '@tanstack/solid-virtual@3.13.12(solid-js@2.0.0-beta.25)': dependencies: '@tanstack/virtual-core': 3.13.12 - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 - '@tanstack/store@0.11.2': {} + '@tanstack/store@0.9.3': {} '@tanstack/virtual-core@3.13.0': {} @@ -35548,107 +33383,57 @@ snapshots: '@tanstack/virtual-core@3.13.13': {} - '@tanstack/vite-config@0.5.2(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@tanstack/vite-config@0.5.2(@types/node@25.0.9)(typescript@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))': dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-dts: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-plugin-externalize-deps: 0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-tsconfig-paths: 6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) + vite-plugin-dts: 4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)) + vite-plugin-externalize-deps: 0.10.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)) + vite-tsconfig-paths: 6.1.1(typescript@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)) transitivePeerDependencies: - '@types/node' - rollup - supports-color - typescript - '@tanstack/vite-config@0.5.2(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-dts: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-plugin-externalize-deps: 0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-tsconfig-paths: 6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - typescript - - '@tanstack/vite-config@0.5.2(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-dts: 4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-plugin-externalize-deps: 0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-tsconfig-paths: 6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - typescript - - '@tanstack/vite-config@0.5.2(@types/node@25.0.9)(rollup@4.63.1)(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vite-plugin-dts: 4.2.3(@types/node@25.0.9)(rollup@4.63.1)(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-plugin-externalize-deps: 0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vite-tsconfig-paths: 6.1.1(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - typescript - - '@tanstack/vue-query-devtools@5.91.0(@tanstack/vue-query@5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)))(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@tanstack/vue-query-devtools@5.91.0(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2))': dependencies: '@tanstack/query-devtools': 5.90.1 - '@tanstack/vue-query': 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) - vue: 3.5.25(@typescript/typescript6@6.0.2) - - '@tanstack/vue-query-devtools@6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)))(vue@3.5.25(@typescript/typescript6@6.0.2))': - dependencies: - '@tanstack/query-devtools': 5.91.1 - '@tanstack/vue-query': 5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2)) - vue: 3.5.25(@typescript/typescript6@6.0.2) - - '@tanstack/vue-query-devtools@6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3))': - dependencies: - '@tanstack/query-devtools': 5.91.1 - '@tanstack/vue-query': 5.102.0(vue@3.5.25(typescript@5.8.3)) - vue: 3.5.25(typescript@5.8.3) - - '@tanstack/vue-query-devtools@6.1.2(@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2))': - dependencies: - '@tanstack/query-devtools': 5.91.1 - '@tanstack/vue-query': 5.102.0(vue@3.5.25(typescript@6.0.2)) + '@tanstack/vue-query': 5.99.0(vue@3.5.25(typescript@6.0.2)) vue: 3.5.25(typescript@6.0.2) - '@tanstack/vue-query@5.102.0(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@tanstack/vue-query-devtools@6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3)))(vue@3.5.25(typescript@5.8.3))': dependencies: - '@tanstack/match-sorter-utils': 8.19.4 - '@tanstack/query-core': 5.102.0 - '@vue/devtools-api': 6.6.4 - vue: 3.5.25(@typescript/typescript6@6.0.2) - vue-demi: 0.14.10(vue@3.5.25(@typescript/typescript6@6.0.2)) + '@tanstack/query-devtools': 5.91.1 + '@tanstack/vue-query': 5.99.0(vue@3.5.25(typescript@5.8.3)) + vue: 3.5.25(typescript@5.8.3) - '@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@5.8.3))': + '@tanstack/vue-query-devtools@6.1.2(@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2)))(vue@3.5.25(typescript@6.0.2))': + dependencies: + '@tanstack/query-devtools': 5.91.1 + '@tanstack/vue-query': 5.99.0(vue@3.5.25(typescript@6.0.2)) + vue: 3.5.25(typescript@6.0.2) + + '@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@5.8.3))': dependencies: '@tanstack/match-sorter-utils': 8.19.4 - '@tanstack/query-core': 5.102.0 + '@tanstack/query-core': 5.99.0 '@vue/devtools-api': 6.6.4 vue: 3.5.25(typescript@5.8.3) vue-demi: 0.14.10(vue@3.5.25(typescript@5.8.3)) - '@tanstack/vue-query@5.102.0(vue@3.5.25(typescript@6.0.2))': + '@tanstack/vue-query@5.99.0(vue@3.5.25(typescript@6.0.2))': dependencies: '@tanstack/match-sorter-utils': 8.19.4 - '@tanstack/query-core': 5.102.0 + '@tanstack/query-core': 5.99.0 '@vue/devtools-api': 6.6.4 vue: 3.5.25(typescript@6.0.2) vue-demi: 0.14.10(vue@3.5.25(typescript@6.0.2)) - '@tanstack/vue-store@0.11.2(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@tanstack/vue-store@0.9.3(vue@3.5.25(typescript@6.0.2))': dependencies: - '@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)) + '@tanstack/store': 0.9.3 + vue: 3.5.25(typescript@6.0.2) + vue-demi: 0.14.10(vue@3.5.25(typescript@6.0.2)) '@tanstack/vue-virtual@3.13.13(vue@3.5.25(typescript@5.9.3))': dependencies: @@ -35657,7 +33442,7 @@ snapshots: '@testing-library/dom@10.4.1': dependencies: - '@babel/code-frame': 7.29.7 + '@babel/code-frame': 7.27.1 '@babel/runtime': 7.26.7 '@types/aria-query': 5.0.4 aria-query: 5.3.0 @@ -35668,7 +33453,7 @@ snapshots: '@testing-library/dom@9.3.4': dependencies: - '@babel/code-frame': 7.29.7 + '@babel/code-frame': 7.27.1 '@babel/runtime': 7.26.7 '@types/aria-query': 5.0.4 aria-query: 5.1.3 @@ -35686,66 +33471,58 @@ snapshots: dom-accessibility-api: 0.6.3 lodash: 4.17.21 redent: 3.0.0 - optional: true - '@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4)': - dependencies: - '@adobe/css-tools': 4.4.1 - '@testing-library/dom': 10.4.1 - aria-query: 5.3.2 - css.escape: 1.5.1 - dom-accessibility-api: 0.6.3 - picocolors: 1.1.1 - redent: 3.0.0 - optionalDependencies: - vitest: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - - '@testing-library/react@16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@testing-library/react@16.2.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 '@testing-library/dom': 10.4.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@testing-library/react@16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@testing-library/react@16.3.0(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.26.7 '@testing-library/dom': 10.4.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) - '@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.25)(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@testing-library/vue@8.1.0(@vue/compiler-sfc@3.5.25)(vue@3.5.25(typescript@6.0.2))': dependencies: '@babel/runtime': 7.26.7 '@testing-library/dom': 9.3.4 '@vue/test-utils': 2.4.6 - vue: 3.5.25(@typescript/typescript6@6.0.2) + vue: 3.5.25(typescript@6.0.2) optionalDependencies: '@vue/compiler-sfc': 3.5.25 - '@trpc/client@11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2)': + '@trpc/client@11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2)': dependencies: - '@trpc/server': 11.4.3(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + '@trpc/server': 11.4.3(typescript@6.0.2) + typescript: 6.0.2 - '@trpc/server@11.4.3(@typescript/typescript6@6.0.2)': + '@trpc/server@11.4.3(typescript@6.0.2)': dependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 - '@trpc/tanstack-react-query@11.4.3(@tanstack/react-query@5.102.0(react@19.2.9))(@trpc/client@11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2))(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@trpc/tanstack-react-query@11.4.3(@tanstack/react-query@5.99.0(react@19.2.3))(@trpc/client@11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2))(@trpc/server@11.4.3(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2)': dependencies: - '@tanstack/react-query': 5.102.0(react@19.2.9) - '@trpc/client': 11.4.3(@trpc/server@11.4.3(@typescript/typescript6@6.0.2))(@typescript/typescript6@6.0.2) - '@trpc/server': 11.4.3(@typescript/typescript6@6.0.2) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - typescript: '@typescript/typescript6@6.0.2' + '@tanstack/react-query': 5.99.0(react@19.2.3) + '@trpc/client': 11.4.3(@trpc/server@11.4.3(typescript@6.0.2))(typescript@6.0.2) + '@trpc/server': 11.4.3(typescript@6.0.2) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + typescript: 6.0.2 + + '@tybys/wasm-util@0.10.2': + dependencies: + tslib: 2.8.1 + optional: true '@tybys/wasm-util@0.10.3': dependencies: @@ -35765,23 +33542,23 @@ snapshots: '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.28.5 - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@types/babel__generator': 7.27.0 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.28.0 '@types/babel__generator@7.27.0': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@types/babel__template@7.4.4': dependencies: '@babel/parser': 7.28.5 - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@types/babel__traverse@7.28.0': dependencies: - '@babel/types': 7.29.8 + '@babel/types': 7.29.0 '@types/body-parser@1.19.5': dependencies: @@ -35822,15 +33599,13 @@ snapshots: '@types/eslint@9.6.1': dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.8 '@types/json-schema': 7.0.15 '@types/estree@1.0.7': {} '@types/estree@1.0.8': {} - '@types/estree@1.0.9': {} - '@types/express-serve-static-core@4.19.6': dependencies: '@types/node': 25.0.9 @@ -35913,6 +33688,8 @@ snapshots: dependencies: csstype: 3.2.3 + '@types/resolve@1.20.2': {} + '@types/retry@0.12.2': {} '@types/send@0.17.4': @@ -35935,18 +33712,12 @@ snapshots: '@types/http-errors': 2.0.4 '@types/node': 25.0.9 - '@types/set-cookie-parser@2.4.10': - dependencies: - '@types/node': 25.0.9 - '@types/sockjs@0.3.36': dependencies: '@types/node': 25.0.9 '@types/statuses@2.0.5': {} - '@types/statuses@2.0.6': {} - '@types/tough-cookie@4.0.5': {} '@types/triple-beam@1.3.5': {} @@ -35955,32 +33726,26 @@ snapshots: dependencies: '@types/node': 25.0.9 - '@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/scope-manager': 8.44.1 - '@typescript-eslint/type-utils': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/utils': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/visitor-keys': 8.44.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - graphemer: 1.4.0 - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.1.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color + '@types/yargs-parser@21.0.3': {} - '@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3)': + '@types/yargs@17.0.33': + dependencies: + '@types/yargs-parser': 21.0.3 + + '@types/yauzl@2.10.3': + dependencies: + '@types/node': 25.0.9 + optional: true + + '@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3))(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + '@typescript-eslint/parser': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@typescript-eslint/scope-manager': 8.44.1 - '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) - '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.44.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 @@ -35989,142 +33754,168 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/eslint-plugin@8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.44.1 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.44.1 + eslint: 9.22.0(jiti@2.7.0) + graphemer: 1.4.0 + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@typescript-eslint/parser': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@typescript-eslint/type-utils': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@typescript-eslint/visitor-keys': 8.57.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - ignore: 7.0.12 + eslint: 9.22.0(jiti@2.7.0) + ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3)': dependencies: '@typescript-eslint/scope-manager': 8.44.1 '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.8.3) '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.44.1 - '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(supports-color@10.2.2)(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2)': dependencies: '@typescript-eslint/scope-manager': 8.44.1 '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(supports-color@10.2.2)(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.9.2) '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.44.1 + '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/typescript-estree': 8.44.1(typescript@6.0.2) + '@typescript-eslint/visitor-keys': 8.44.1 + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2)': dependencies: '@typescript-eslint/scope-manager': 8.53.0 '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/typescript-estree': 8.53.0(supports-color@10.2.2)(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.2) '@typescript-eslint/visitor-keys': 8.53.0 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@typescript-eslint/scope-manager': 8.57.1 '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.57.1(typescript@6.0.2) '@typescript-eslint/visitor-keys': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.53.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.44.1(supports-color@10.2.2)(typescript@5.8.3)': + '@typescript-eslint/project-service@8.44.1(typescript@5.8.3)': dependencies: '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.8.3) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.44.1(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/project-service@8.44.1(typescript@5.9.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.2) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.53.0(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/project-service@8.44.1(typescript@6.0.2)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.53.0(typescript@5.9.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.2) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)': + '@typescript-eslint/project-service@8.53.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.57.1(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/project-service@8.57.1(supports-color@10.2.2)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3) - '@typescript-eslint/types': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/rule-tester@8.23.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/project-service@8.53.0(typescript@6.0.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.23.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.23.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + debug: 4.4.3 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.57.1(typescript@6.0.2)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@6.0.2) + '@typescript-eslint/types': 8.57.1 + debug: 4.4.3 + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/rule-tester@8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.23.0(typescript@6.0.2) + '@typescript-eslint/utils': 8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) ajv: 6.12.6 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 semver: 7.7.2 @@ -36132,13 +33923,13 @@ snapshots: - supports-color - typescript - '@typescript-eslint/rule-tester@8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/rule-tester@8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2)': dependencies: - '@typescript-eslint/parser': 8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.53.0(supports-color@10.2.2)(typescript@5.9.2) - '@typescript-eslint/utils': 8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2) + '@typescript-eslint/parser': 8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.2) + '@typescript-eslint/utils': 8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2) ajv: 6.12.6 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 semver: 7.7.3 @@ -36166,10 +33957,6 @@ snapshots: '@typescript-eslint/types': 8.57.1 '@typescript-eslint/visitor-keys': 8.57.1 - '@typescript-eslint/tsconfig-utils@8.44.1(@typescript/typescript6@6.0.2)': - dependencies: - typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/tsconfig-utils@8.44.1(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -36178,9 +33965,9 @@ snapshots: dependencies: typescript: 5.9.2 - '@typescript-eslint/tsconfig-utils@8.53.0(@typescript/typescript6@6.0.2)': + '@typescript-eslint/tsconfig-utils@8.44.1(typescript@6.0.2)': dependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 '@typescript-eslint/tsconfig-utils@8.53.0(typescript@5.8.3)': dependencies: @@ -36190,47 +33977,62 @@ snapshots: dependencies: typescript: 5.9.2 - '@typescript-eslint/tsconfig-utils@8.57.1(@typescript/typescript6@6.0.2)': - dependencies: - typescript: '@typescript/typescript6@6.0.2' - - '@typescript-eslint/tsconfig-utils@8.57.1(typescript@5.9.3)': + '@typescript-eslint/tsconfig-utils@8.53.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/tsconfig-utils@8.53.0(typescript@6.0.2)': dependencies: - '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - ts-api-utils: 2.1.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 + + '@typescript-eslint/tsconfig-utils@8.57.1(typescript@6.0.2)': + dependencies: + typescript: 6.0.2 + + '@typescript-eslint/type-utils@8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.23.0(typescript@6.0.2) + '@typescript-eslint/utils': 8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3)': dependencies: '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(supports-color@10.2.2)(typescript@5.8.3) - '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3) - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.8.3) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/type-utils@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/typescript-estree': 8.44.1(typescript@6.0.2) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) + ts-api-utils: 2.1.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/type-utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/typescript-estree': 8.57.1(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -36242,176 +34044,191 @@ snapshots: '@typescript-eslint/types@8.57.1': {} - '@typescript-eslint/typescript-estree@8.23.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2)': + '@typescript-eslint/typescript-estree@8.23.0(typescript@6.0.2)': dependencies: '@typescript-eslint/types': 8.23.0 '@typescript-eslint/visitor-keys': 8.23.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.9 - semver: 7.8.5 - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + semver: 7.8.2 + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)': + '@typescript-eslint/typescript-estree@8.44.1(typescript@5.8.3)': dependencies: - '@typescript-eslint/project-service': 8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/tsconfig-utils': 8.44.1(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.9 - semver: 7.8.5 - ts-api-utils: 2.1.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.44.1(supports-color@10.2.2)(typescript@5.8.3)': - dependencies: - '@typescript-eslint/project-service': 8.44.1(supports-color@10.2.2)(typescript@5.8.3) + '@typescript-eslint/project-service': 8.44.1(typescript@5.8.3) '@typescript-eslint/tsconfig-utils': 8.44.1(typescript@5.8.3) '@typescript-eslint/types': 8.44.1 '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.9 - semver: 7.8.5 + semver: 7.8.2 ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.44.1(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.44.1(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.44.1(supports-color@10.2.2)(typescript@5.9.2) + '@typescript-eslint/project-service': 8.44.1(typescript@5.9.2) '@typescript-eslint/tsconfig-utils': 8.44.1(typescript@5.9.2) '@typescript-eslint/types': 8.44.1 '@typescript-eslint/visitor-keys': 8.44.1 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.9 - semver: 7.8.5 + semver: 7.8.2 ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.53.0(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.44.1(typescript@6.0.2)': dependencies: - '@typescript-eslint/project-service': 8.53.0(supports-color@10.2.2)(typescript@5.9.2) + '@typescript-eslint/project-service': 8.44.1(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.44.1(typescript@6.0.2) + '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/visitor-keys': 8.44.1 + debug: 4.4.3 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.9 + semver: 7.8.2 + ts-api-utils: 2.1.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.53.0(typescript@5.9.2)': + dependencies: + '@typescript-eslint/project-service': 8.53.0(typescript@5.9.2) '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.2) '@typescript-eslint/types': 8.53.0 '@typescript-eslint/visitor-keys': 8.53.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 minimatch: 9.0.9 - semver: 7.8.5 - tinyglobby: 0.2.17 + semver: 7.7.3 + tinyglobby: 0.2.15 ts-api-utils: 2.4.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)': + '@typescript-eslint/typescript-estree@8.53.0(typescript@5.9.3)': dependencies: - '@typescript-eslint/project-service': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/tsconfig-utils': 8.57.1(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/visitor-keys': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) - minimatch: 10.2.5 - semver: 7.8.5 - tinyglobby: 0.2.17 - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.57.1(supports-color@10.2.2)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/project-service': 8.57.1(supports-color@10.2.2)(typescript@5.9.3) - '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@5.9.3) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/visitor-keys': 8.57.1 - debug: 4.4.3(supports-color@10.2.2) - minimatch: 10.2.5 - semver: 7.8.5 - tinyglobby: 0.2.17 + '@typescript-eslint/project-service': 8.53.0(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@5.9.3) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/visitor-keys': 8.53.0 + debug: 4.4.3 + minimatch: 9.0.9 + semver: 7.7.3 + tinyglobby: 0.2.15 ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.23.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/typescript-estree@8.53.0(typescript@6.0.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@typescript-eslint/project-service': 8.53.0(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.53.0(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/visitor-keys': 8.53.0 + debug: 4.4.3 + minimatch: 9.0.9 + semver: 7.7.3 + tinyglobby: 0.2.15 + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.57.1(typescript@6.0.2)': + dependencies: + '@typescript-eslint/project-service': 8.57.1(typescript@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.57.1(typescript@6.0.2) + '@typescript-eslint/types': 8.57.1 + '@typescript-eslint/visitor-keys': 8.57.1 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.8.2 + tinyglobby: 0.2.16 + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.23.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.23.0 '@typescript-eslint/types': 8.23.0 - '@typescript-eslint/typescript-estree': 8.23.0(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/typescript-estree': 8.23.0(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/utils@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.44.1 '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.8.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - '@typescript-eslint/scope-manager': 8.44.1 - '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(supports-color@10.2.2)(typescript@5.8.3) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.8.3) + eslint: 9.22.0(jiti@2.7.0) typescript: 5.8.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.44.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/utils@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2)': dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.44.1 '@typescript-eslint/types': 8.44.1 - '@typescript-eslint/typescript-estree': 8.44.1(supports-color@10.2.2)(typescript@5.9.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@5.9.2) + eslint: 9.22.0(jiti@2.7.0) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.53.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.2)': + '@typescript-eslint/utils@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) + '@typescript-eslint/scope-manager': 8.44.1 + '@typescript-eslint/types': 8.44.1 + '@typescript-eslint/typescript-estree': 8.44.1(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.53.0(eslint@9.22.0(jiti@2.7.0))(typescript@5.9.2)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.53.0 '@typescript-eslint/types': 8.53.0 - '@typescript-eslint/typescript-estree': 8.53.0(supports-color@10.2.2)(typescript@5.9.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.2) + eslint: 9.22.0(jiti@2.7.0) typescript: 5.9.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)': + '@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2)': dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.57.1 '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/typescript-estree': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/typescript-estree': 8.57.1(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -36435,70 +34252,6 @@ snapshots: '@typescript-eslint/types': 8.57.1 eslint-visitor-keys: 5.0.1 - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - '@typescript/typescript6@6.0.2': - dependencies: - '@typescript/old': typescript@6.0.2 - '@unrs/resolver-binding-android-arm-eabi@1.11.1': optional: true @@ -36558,236 +34311,216 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vercel/nft@1.3.1(rollup@4.63.1)(supports-color@10.2.2)': + '@vercel/nft@0.29.4(rollup@4.56.0)': dependencies: - '@mapbox/node-pre-gyp': 2.0.0(supports-color@10.2.2) - '@rollup/pluginutils': 5.1.4(rollup@4.63.1) - acorn: 8.18.0 - acorn-import-attributes: 1.9.5(acorn@8.18.0) + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 - glob: 13.0.0 + glob: 10.5.0 graceful-fs: 4.2.11 node-gyp-build: 4.8.4 - picomatch: 4.0.7 + picomatch: 4.0.3 resolve-from: 5.0.0 transitivePeerDependencies: - encoding - rollup - supports-color - '@vitejs/plugin-react@6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.0(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@vercel/nft@1.3.0(rollup@4.56.0)': + dependencies: + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 13.0.0 + graceful-fs: 4.2.11 + node-gyp-build: 4.8.4 + picomatch: 4.0.3 + resolve-from: 5.0.0 + transitivePeerDependencies: + - encoding + - rollup + - supports-color + + '@vitejs/plugin-react@4.3.4(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: + '@babel/core': 7.28.5 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.28.5) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.28.5) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.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) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-react@4.6.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))': + dependencies: + '@babel/core': 7.28.5 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.5) + '@rolldown/pluginutils': 1.0.0-beta.19 + '@types/babel__core': 7.20.5 + react-refresh: 0.17.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) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-react@4.7.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))': + dependencies: + '@babel/core': 7.29.0 + '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.29.0) + '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.29.0) + '@rolldown/pluginutils': 1.0.0-beta.27 + '@types/babel__core': 7.20.5 + react-refresh: 0.17.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) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-react@6.0.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: '@rolldown/pluginutils': 1.0.0-rc.7 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - optionalDependencies: - '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.0(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - babel-plugin-react-compiler: 1.0.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) - '@vitejs/plugin-react@6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@vitejs/plugin-rsc@0.5.20(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(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: - '@rolldown/pluginutils': 1.0.0-rc.7 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - optionalDependencies: - '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - babel-plugin-react-compiler: 1.0.0 - - '@vitejs/plugin-react@6.0.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@rolldown/pluginutils': 1.0.0-rc.7 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - optionalDependencies: - '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7(supports-color@10.2.2))(rolldown@1.2.13)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - babel-plugin-react-compiler: 1.0.0 - - '@vitejs/plugin-rsc@0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@rolldown/pluginutils': 1.0.1 - es-module-lexer: 3.0.4 + '@rolldown/pluginutils': 1.0.0-rc.4 + es-module-lexer: 2.0.0 estree-walker: 3.0.3 - magic-string: 1.4.5 - obug: 3.0.0 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - srvx: 1.0.8 - strip-literal: 4.0.0 - turbo-stream: 3.2.1 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + magic-string: 0.30.21 + periscopic: 4.0.2 + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + srvx: 0.11.15 + strip-literal: 3.1.0 + turbo-stream: 3.1.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) + vitefu: 1.1.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)) - '@vitejs/plugin-rsc@0.5.39(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@vitejs/plugin-vue-jsx@4.2.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))(vue@3.5.25(typescript@6.0.2))': dependencies: - '@rolldown/pluginutils': 1.0.1 - es-module-lexer: 3.0.4 - estree-walker: 3.0.3 - magic-string: 1.4.5 - obug: 3.0.0 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - srvx: 1.0.8 - strip-literal: 4.0.0 - turbo-stream: 3.2.1 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - - '@vitejs/plugin-vue-jsx@4.2.0(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@rolldown/pluginutils': 1.0.1 - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vue: 3.5.25(@typescript/typescript6@6.0.2) - transitivePeerDependencies: - - supports-color - - '@vitejs/plugin-vue-jsx@5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@rolldown/pluginutils': 1.0.0-rc.9 - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vue: 3.5.25(@typescript/typescript6@6.0.2) - transitivePeerDependencies: - - supports-color - - '@vitejs/plugin-vue-jsx@5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@rolldown/pluginutils': 1.0.0-rc.9 - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vue: 3.5.25(typescript@5.8.3) - transitivePeerDependencies: - - supports-color - - '@vitejs/plugin-vue-jsx@5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.9.3))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@rolldown/pluginutils': 1.0.0-rc.9 - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vue: 3.5.25(typescript@5.9.3) - transitivePeerDependencies: - - supports-color - - '@vitejs/plugin-vue-jsx@5.1.5(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@6.0.2))': - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@rolldown/pluginutils': 1.0.0-rc.9 - '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + '@babel/core': 7.28.5 + '@babel/plugin-transform-typescript': 7.28.5(@babel/core@7.28.5) + '@rolldown/pluginutils': 1.0.0 + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.5) + 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) vue: 3.5.25(typescript@6.0.2) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(@typescript/typescript6@6.0.2))': + '@vitejs/plugin-vue-jsx@5.1.5(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))(vue@3.5.25(typescript@5.8.3))': dependencies: - '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vue: 3.5.25(@typescript/typescript6@6.0.2) + '@babel/core': 7.29.0 + '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) + '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.0) + '@rolldown/pluginutils': 1.0.0-rc.9 + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.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) + vue: 3.5.25(typescript@5.8.3) + transitivePeerDependencies: + - supports-color - '@vitejs/plugin-vue@6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.8.3))': + '@vitejs/plugin-vue-jsx@5.1.5(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))(vue@3.5.25(typescript@5.9.3))': + dependencies: + '@babel/core': 7.29.0 + '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) + '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.0) + '@rolldown/pluginutils': 1.0.0-rc.9 + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.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) + vue: 3.5.25(typescript@5.9.3) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-vue-jsx@5.1.5(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))(vue@3.5.25(typescript@6.0.2))': + dependencies: + '@babel/core': 7.29.0 + '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) + '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.0) + '@rolldown/pluginutils': 1.0.0-rc.9 + '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.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) + vue: 3.5.25(typescript@6.0.2) + transitivePeerDependencies: + - supports-color + + '@vitejs/plugin-vue@6.0.5(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))(vue@3.5.25(typescript@5.8.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) vue: 3.5.25(typescript@5.8.3) - '@vitejs/plugin-vue@6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.5(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))(vue@3.5.25(typescript@5.9.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) vue: 3.5.25(typescript@5.9.3) - '@vitejs/plugin-vue@6.0.5(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(vue@3.5.25(typescript@6.0.2))': + '@vitejs/plugin-vue@6.0.5(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))(vue@3.5.25(typescript@6.0.2))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) vue: 3.5.25(typescript@6.0.2) + '@vitest/browser@4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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))(vitest@4.1.4)': + dependencies: + '@blazediff/core': 1.9.1 + '@vitest/mocker': 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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)) + '@vitest/utils': 4.1.4 + magic-string: 0.30.21 + pngjs: 7.0.0 + sirv: 3.0.2 + tinyrainbow: 3.1.0 + vitest: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@25.0.1)(msw@2.7.0(@types/node@25.0.9)(typescript@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)) + ws: 8.20.0 + transitivePeerDependencies: + - bufferutil + - msw + - utf-8-validate + - vite + '@vitest/expect@4.1.4': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.2 '@vitest/spy': 4.1.4 '@vitest/utils': 4.1.4 - chai: 6.3.0 - tinyrainbow: 3.2.0 - optional: true + chai: 6.2.2 + tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@vitest/mocker@4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@5.9.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))': dependencies: '@vitest/spy': 4.1.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - msw: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - optional: true + msw: 2.7.0(@types/node@25.0.9)(typescript@5.9.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) - '@vitest/mocker@5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': + '@vitest/mocker@4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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))': dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.4 + '@vitest/spy': 4.1.4 estree-walker: 3.0.3 - magic-string: 1.4.3 + magic-string: 0.30.21 optionalDependencies: - msw: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@vitest/mocker@5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.4 - estree-walker: 3.0.3 - magic-string: 1.4.3 - optionalDependencies: - msw: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@vitest/mocker@5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.4 - estree-walker: 3.0.3 - magic-string: 1.4.3 - optionalDependencies: - msw: 2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - '@vitest/mocker@5.0.4(msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))': - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.0.4 - estree-walker: 3.0.3 - magic-string: 1.4.3 - optionalDependencies: - msw: 2.15.0(@types/node@25.0.9)(typescript@5.9.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + msw: 2.7.0(@types/node@25.0.9)(typescript@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) '@vitest/pretty-format@4.1.4': dependencies: - tinyrainbow: 3.2.0 - optional: true - - '@vitest/pretty-format@5.0.4': - dependencies: - tinyrainbow: 3.2.0 + tinyrainbow: 3.1.0 '@vitest/runner@4.1.4': dependencies: '@vitest/utils': 4.1.4 pathe: 2.0.3 - optional: true '@vitest/snapshot@4.1.4': dependencies: @@ -36795,165 +34528,142 @@ snapshots: '@vitest/utils': 4.1.4 magic-string: 0.30.21 pathe: 2.0.3 - optional: true - '@vitest/spy@4.1.4': - optional: true - - '@vitest/spy@5.0.4': {} + '@vitest/spy@4.1.4': {} '@vitest/ui@4.1.4(vitest@4.1.4)': dependencies: '@vitest/utils': 4.1.4 - fflate: 0.8.3 - flatted: 3.4.4 + fflate: 0.8.2 + flatted: 3.4.2 pathe: 2.0.3 sirv: 3.0.2 - tinyglobby: 0.2.17 - tinyrainbow: 3.2.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - optional: true - - '@vitest/ui@5.0.4(vitest@5.0.4)': - dependencies: - '@vitest/utils': 5.0.4 - fflate: 0.8.3 - flatted: 3.4.4 - pathe: 2.0.3 - sirv: 3.0.2 - tinyrainbow: 3.2.0 - vitest: 5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + tinyglobby: 0.2.15 + tinyrainbow: 3.1.0 + vitest: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@25.0.1)(msw@2.7.0(@types/node@25.0.9)(typescript@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)) '@vitest/utils@4.1.4': dependencies: '@vitest/pretty-format': 4.1.4 convert-source-map: 2.0.0 - tinyrainbow: 3.2.0 - optional: true + tinyrainbow: 3.1.0 - '@vitest/utils@5.0.4': + '@volar/language-core@2.4.23': dependencies: - '@vitest/pretty-format': 5.0.4 - convert-source-map: 2.0.0 - tinyrainbow: 3.2.0 + '@volar/source-map': 2.4.23 '@volar/language-core@2.4.26': dependencies: '@volar/source-map': 2.4.26 - '@volar/language-core@2.4.28': - dependencies: - '@volar/source-map': 2.4.28 + '@volar/source-map@2.4.23': {} '@volar/source-map@2.4.26': {} - '@volar/source-map@2.4.28': {} + '@volar/typescript@2.4.23': + dependencies: + '@volar/language-core': 2.4.23 + path-browserify: 1.0.1 + vscode-uri: 3.0.8 - '@volar/typescript@2.4.26(@typescript/typescript6@6.0.2)': + '@volar/typescript@2.4.26': dependencies: '@volar/language-core': 2.4.26 path-browserify: 1.0.1 vscode-uri: 3.0.8 - optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' - - '@volar/typescript@2.4.26(typescript@5.9.2)': - dependencies: - '@volar/language-core': 2.4.26 - path-browserify: 1.0.1 - vscode-uri: 3.0.8 - optionalDependencies: - typescript: 5.9.2 - - '@volar/typescript@2.4.28(@typescript/typescript6@6.0.2)': - dependencies: - '@volar/language-core': 2.4.28 - path-browserify: 1.0.1 - vscode-uri: 3.0.8 - optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' - - '@volar/typescript@2.4.28(typescript@5.8.3)': - dependencies: - '@volar/language-core': 2.4.28 - path-browserify: 1.0.1 - vscode-uri: 3.0.8 - optionalDependencies: - typescript: 5.8.3 - - '@volar/typescript@2.4.28(typescript@5.9.3)': - dependencies: - '@volar/language-core': 2.4.28 - path-browserify: 1.0.1 - vscode-uri: 3.0.8 - optionalDependencies: - typescript: 5.9.3 '@vue/babel-helper-vue-transform-on@1.5.0': {} '@vue/babel-helper-vue-transform-on@2.0.1': {} - '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.28.5)': dependencies: - '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) - '@babel/helper-plugin-utils': 7.28.6 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/template': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 - '@vue/babel-helper-vue-transform-on': 1.5.0 - '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - '@vue/shared': 3.5.25 - optionalDependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color - - '@vue/babel-plugin-jsx@2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': - dependencies: - '@babel/helper-module-imports': 7.27.1(supports-color@10.2.2) + '@babel/helper-module-imports': 7.27.1 '@babel/helper-plugin-utils': 7.27.1 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/template': 7.29.7 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 - '@vue/babel-helper-vue-transform-on': 2.0.1 - '@vue/babel-plugin-resolve-type': 2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 + '@vue/babel-helper-vue-transform-on': 1.5.0 + '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.28.5) '@vue/shared': 3.5.25 optionalDependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.28.5 transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@1.5.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.0)': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-module-imports': 7.29.7(supports-color@10.2.2) + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.0) + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 + '@vue/babel-helper-vue-transform-on': 1.5.0 + '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.29.0) + '@vue/shared': 3.5.25 + optionalDependencies: + '@babel/core': 7.29.0 + transitivePeerDependencies: + - supports-color + + '@vue/babel-plugin-jsx@2.0.1(@babel/core@7.29.0)': + dependencies: + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-plugin-utils': 7.27.1 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.0) + '@babel/template': 7.27.2 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 + '@vue/babel-helper-vue-transform-on': 2.0.1 + '@vue/babel-plugin-resolve-type': 2.0.1(@babel/core@7.29.0) + '@vue/shared': 3.5.25 + optionalDependencies: + '@babel/core': 7.29.0 + transitivePeerDependencies: + - supports-color + + '@vue/babel-plugin-resolve-type@1.5.0(@babel/core@7.28.5)': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/core': 7.28.5 + '@babel/helper-module-imports': 7.27.1 '@babel/helper-plugin-utils': 7.28.6 - '@babel/parser': 7.29.8 + '@babel/parser': 7.28.5 '@vue/compiler-sfc': 3.5.25 transitivePeerDependencies: - supports-color - '@vue/babel-plugin-resolve-type@2.0.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2)': + '@vue/babel-plugin-resolve-type@1.5.0(@babel/core@7.29.0)': dependencies: - '@babel/code-frame': 7.29.7 - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/helper-module-imports': 7.27.1(supports-color@10.2.2) + '@babel/code-frame': 7.27.1 + '@babel/core': 7.29.0 + '@babel/helper-module-imports': 7.27.1 '@babel/helper-plugin-utils': 7.28.6 - '@babel/parser': 7.29.8 + '@babel/parser': 7.28.5 + '@vue/compiler-sfc': 3.5.25 + transitivePeerDependencies: + - supports-color + + '@vue/babel-plugin-resolve-type@2.0.1(@babel/core@7.29.0)': + dependencies: + '@babel/code-frame': 7.27.1 + '@babel/core': 7.29.0 + '@babel/helper-module-imports': 7.27.1 + '@babel/helper-plugin-utils': 7.28.6 + '@babel/parser': 7.28.5 '@vue/compiler-sfc': 3.5.25 transitivePeerDependencies: - supports-color '@vue/compiler-core@3.5.25': dependencies: - '@babel/parser': 7.29.8 + '@babel/parser': 7.29.2 '@vue/shared': 3.5.25 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.2 + source-map-js: 1.2.1 '@vue/compiler-dom@3.5.25': dependencies: @@ -36962,15 +34672,15 @@ snapshots: '@vue/compiler-sfc@3.5.25': dependencies: - '@babel/parser': 7.29.8 + '@babel/parser': 7.29.2 '@vue/compiler-core': 3.5.25 '@vue/compiler-dom': 3.5.25 '@vue/compiler-ssr': 3.5.25 '@vue/shared': 3.5.25 estree-walker: 2.0.2 magic-string: 0.30.21 - postcss: 8.5.29 - source-map-js: 1.2.2 + postcss: 8.5.15 + source-map-js: 1.2.1 '@vue/compiler-ssr@3.5.25': dependencies: @@ -36984,7 +34694,7 @@ snapshots: '@vue/devtools-api@6.6.4': {} - '@vue/language-core@2.1.6(@typescript/typescript6@6.0.2)': + '@vue/language-core@2.1.6(typescript@6.0.2)': dependencies: '@volar/language-core': 2.4.26 '@vue/compiler-dom': 3.5.25 @@ -36995,30 +34705,55 @@ snapshots: muggle-string: 0.4.1 path-browserify: 1.0.1 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 - '@vue/language-core@2.1.6(typescript@5.9.2)': + '@vue/language-core@3.1.5(typescript@5.8.3)': + dependencies: + '@volar/language-core': 2.4.23 + '@vue/compiler-dom': 3.5.25 + '@vue/shared': 3.5.25 + alien-signals: 3.1.1 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.3 + optionalDependencies: + typescript: 5.8.3 + + '@vue/language-core@3.1.5(typescript@5.9.3)': + dependencies: + '@volar/language-core': 2.4.23 + '@vue/compiler-dom': 3.5.25 + '@vue/shared': 3.5.25 + alien-signals: 3.1.1 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.3 + optionalDependencies: + typescript: 5.9.3 + + '@vue/language-core@3.1.5(typescript@6.0.2)': + dependencies: + '@volar/language-core': 2.4.23 + '@vue/compiler-dom': 3.5.25 + '@vue/shared': 3.5.25 + alien-signals: 3.1.1 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.3 + optionalDependencies: + typescript: 6.0.2 + + '@vue/language-core@3.1.8(typescript@6.0.2)': dependencies: '@volar/language-core': 2.4.26 '@vue/compiler-dom': 3.5.25 - '@vue/compiler-vue2': 2.7.16 '@vue/shared': 3.5.25 - computeds: 0.0.1 - minimatch: 9.0.9 + alien-signals: 3.1.1 muggle-string: 0.4.1 path-browserify: 1.0.1 + picomatch: 4.0.3 optionalDependencies: - typescript: 5.9.2 - - '@vue/language-core@3.3.8': - dependencies: - '@volar/language-core': 2.4.28 - '@vue/compiler-dom': 3.5.25 - '@vue/shared': 3.5.25 - alien-signals: 3.2.1 - muggle-string: 0.4.1 - path-browserify: 1.0.1 - picomatch: 4.0.7 + typescript: 6.0.2 '@vue/reactivity@3.5.25': dependencies: @@ -37036,12 +34771,6 @@ snapshots: '@vue/shared': 3.5.25 csstype: 3.1.3 - '@vue/server-renderer@3.5.25(vue@3.5.25(@typescript/typescript6@6.0.2))': - dependencies: - '@vue/compiler-ssr': 3.5.25 - '@vue/shared': 3.5.25 - vue: 3.5.25(@typescript/typescript6@6.0.2) - '@vue/server-renderer@3.5.25(vue@3.5.25(typescript@5.8.3))': dependencies: '@vue/compiler-ssr': 3.5.25 @@ -37143,54 +34872,34 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.110.3)': - dependencies: - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3) - optional: true - '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.97.1)': dependencies: webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.110.3)': - dependencies: - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3) - optional: true - '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.97.1)': dependencies: webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.2.4)(webpack@5.110.3)': - dependencies: - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3) - optionalDependencies: - webpack-dev-server: 5.2.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.110.3) - optional: true - '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.2.4)(webpack@5.97.1)': dependencies: webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) optionalDependencies: - webpack-dev-server: 5.2.4(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1) + webpack-dev-server: 5.2.4(webpack-cli@5.1.4)(webpack@5.97.1) '@whatwg-node/disposablestack@0.0.6': dependencies: '@whatwg-node/promise-helpers': 1.3.2 tslib: 2.8.1 - '@whatwg-node/fetch@0.10.13': + '@whatwg-node/fetch@0.10.11': dependencies: - '@whatwg-node/node-fetch': 0.8.6 + '@whatwg-node/node-fetch': 0.8.1 urlpattern-polyfill: 10.1.0 - '@whatwg-node/node-fetch@0.8.6': + '@whatwg-node/node-fetch@0.8.1': dependencies: '@fastify/busboy': 3.1.1 '@whatwg-node/disposablestack': 0.0.6 @@ -37201,11 +34910,11 @@ snapshots: dependencies: tslib: 2.8.1 - '@whatwg-node/server@0.11.0': + '@whatwg-node/server@0.10.13': dependencies: '@envelop/instrumentation': 1.0.0 '@whatwg-node/disposablestack': 0.0.6 - '@whatwg-node/fetch': 0.10.13 + '@whatwg-node/fetch': 0.10.11 '@whatwg-node/promise-helpers': 1.3.2 tslib: 2.8.1 @@ -37220,13 +34929,13 @@ snapshots: iron-webcrypto: 2.0.0 jose: 6.1.3 - '@workos/authkit-tanstack-react-start@0.5.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)': + '@workos/authkit-tanstack-react-start@0.5.0(@tanstack/react-router@packages+react-router)(@tanstack/react-start@packages+react-start)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@tanstack/react-router': link:packages/react-router '@tanstack/react-start': link:packages/react-start '@workos/authkit-session': 0.3.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) '@xtuc/ieee754@1.2.0': {} @@ -37258,9 +34967,13 @@ snapshots: mime-types: 3.0.1 negotiator: 1.0.0 - acorn-import-attributes@1.9.5(acorn@8.18.0): + acorn-import-attributes@1.9.5(acorn@8.15.0): dependencies: - acorn: 8.18.0 + acorn: 8.15.0 + + acorn-import-phases@1.0.4(acorn@8.15.0): + dependencies: + acorn: 8.15.0 acorn-jsx@5.3.2(acorn@8.15.0): dependencies: @@ -37270,11 +34983,9 @@ snapshots: acorn@8.15.0: {} - acorn@8.18.0: {} - - agent-base@6.0.2(supports-color@10.2.2): + agent-base@6.0.2: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -37288,21 +34999,25 @@ snapshots: dependencies: ajv: 8.18.0 - ajv-formats@2.1.1: - dependencies: - ajv: 8.18.0 + ajv-formats@2.1.1(ajv@8.17.1): + optionalDependencies: + ajv: 8.17.1 - ajv-formats@3.0.1: - dependencies: + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv-formats@3.0.1(ajv@8.17.1): + optionalDependencies: ajv: 8.17.1 ajv-keywords@3.5.2(ajv@6.12.6): dependencies: ajv: 6.12.6 - ajv-keywords@5.1.0(ajv@8.18.0): + ajv-keywords@5.1.0(ajv@8.17.1): dependencies: - ajv: 8.18.0 + ajv: 8.17.1 fast-deep-equal: 3.1.3 ajv@6.12.6: @@ -37340,7 +35055,7 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - alien-signals@3.2.1: {} + alien-signals@3.1.1: {} ansi-colors@4.1.3: {} @@ -37366,7 +35081,7 @@ snapshots: ansi-styles@6.2.3: {} - ansis@4.3.1: {} + ansis@4.1.0: {} any-promise@1.3.0: {} @@ -37375,17 +35090,25 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 - archiver@8.0.0: + archiver-utils@5.0.2: dependencies: - async: 3.2.6 - buffer-crc32: 1.0.0 - is-stream: 4.0.1 + glob: 10.5.0 + graceful-fs: 4.2.11 + is-stream: 2.0.1 lazystream: 1.0.1 + lodash: 4.17.21 normalize-path: 3.0.0 readable-stream: 4.7.0 - readdir-glob: 3.0.0 + + archiver@7.0.1: + dependencies: + archiver-utils: 5.0.2 + async: 3.2.6 + buffer-crc32: 1.0.0 + readable-stream: 4.7.0 + readdir-glob: 1.1.3 tar-stream: 3.2.0 - zip-stream: 7.0.5 + zip-stream: 6.0.1 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -37446,11 +35169,6 @@ snapshots: atomic-sleep@1.0.0: {} - atomically@2.1.1: - dependencies: - stubborn-fs: 2.0.0 - when-exit: 2.1.5 - autocannon@8.0.0: dependencies: '@minimistjs/subarg': 1.0.0 @@ -37488,11 +35206,19 @@ snapshots: aws-ssl-profiles@1.1.2: {} - axios@1.18.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2): + axios@1.16.0(debug@4.4.3): dependencies: - follow-redirects: 1.16.0(debug@4.4.3(supports-color@10.2.2)) - form-data: 4.0.6 - https-proxy-agent: 5.0.1(supports-color@10.2.2) + follow-redirects: 1.16.0(debug@4.4.3) + form-data: 4.0.5 + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + + axios@1.17.0(debug@4.4.3): + dependencies: + follow-redirects: 1.16.0(debug@4.4.3) + form-data: 4.0.5 + https-proxy-agent: 5.0.1 proxy-from-env: 2.1.0 transitivePeerDependencies: - debug @@ -37500,36 +35226,36 @@ snapshots: b4a@1.6.7: {} - babel-dead-code-elimination@1.0.12(supports-color@10.2.2): + babel-dead-code-elimination@1.0.12: dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/parser': 7.29.8 - '@babel/traverse': 7.29.8(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 + '@babel/traverse': 7.28.5 + '@babel/types': 7.29.0 transitivePeerDependencies: - supports-color - babel-loader@10.0.0(@babel/core@7.28.5(supports-color@10.2.2))(webpack@5.97.1): + babel-loader@10.0.0(@babel/core@7.28.5)(webpack@5.97.1): dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.28.5 find-up: 5.0.0 - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) - babel-plugin-jsx-dom-expressions@0.40.3(@babel/core@7.28.5(supports-color@10.2.2)): + babel-plugin-jsx-dom-expressions@0.40.3(@babel/core@7.28.5): dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) + '@babel/core': 7.28.5 '@babel/helper-module-imports': 7.18.6 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5(supports-color@10.2.2)) - '@babel/types': 7.29.8 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.5) + '@babel/types': 7.29.0 html-entities: 2.3.3 parse5: 7.3.0 - babel-plugin-jsx-dom-expressions@0.40.3(@babel/core@7.29.7(supports-color@10.2.2)): + babel-plugin-jsx-dom-expressions@0.40.3(@babel/core@7.29.0): dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.29.0 '@babel/helper-module-imports': 7.18.6 - '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2)) - '@babel/types': 7.29.8 + '@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.29.0) + '@babel/types': 7.29.0 html-entities: 2.3.3 parse5: 7.3.0 @@ -37539,36 +35265,54 @@ snapshots: cosmiconfig: 7.1.0 resolve: 1.22.11 - babel-plugin-react-compiler@1.0.0: + babel-plugin-vue-jsx-hmr@1.0.0: dependencies: - '@babel/types': 7.29.8 - - babel-plugin-vue-jsx-hmr@1.0.0(supports-color@10.2.2): - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) + '@babel/core': 7.29.0 + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.29.0) transitivePeerDependencies: - supports-color - babel-preset-solid@1.9.10(@babel/core@7.28.5(supports-color@10.2.2))(solid-js@1.9.12): + babel-preset-solid@1.9.10(@babel/core@7.28.5)(solid-js@1.9.12): dependencies: - '@babel/core': 7.28.5(supports-color@10.2.2) - babel-plugin-jsx-dom-expressions: 0.40.3(@babel/core@7.28.5(supports-color@10.2.2)) + '@babel/core': 7.28.5 + babel-plugin-jsx-dom-expressions: 0.40.3(@babel/core@7.28.5) optionalDependencies: solid-js: 1.9.12 - babel-preset-solid@1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12): + babel-preset-solid@1.9.10(@babel/core@7.28.5)(solid-js@2.0.0-beta.25): dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - babel-plugin-jsx-dom-expressions: 0.40.3(@babel/core@7.29.7(supports-color@10.2.2)) + '@babel/core': 7.28.5 + babel-plugin-jsx-dom-expressions: 0.40.3(@babel/core@7.28.5) optionalDependencies: - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 + + babel-preset-solid@1.9.10(@babel/core@7.29.0)(solid-js@2.0.0-beta.25): + dependencies: + '@babel/core': 7.29.0 + babel-plugin-jsx-dom-expressions: 0.40.3(@babel/core@7.29.0) + optionalDependencies: + solid-js: 2.0.0-beta.25 + + babel-preset-solid@2.0.0-beta.25(@babel/core@7.28.5)(solid-js@2.0.0-beta.25): + dependencies: + '@babel/core': 7.28.5 + '@dom-expressions/babel-plugin-jsx': 0.50.0-next.25(@babel/core@7.28.5) + optionalDependencies: + solid-js: 2.0.0-beta.25 + + babel-preset-solid@2.0.0-beta.25(@babel/core@7.29.0)(solid-js@2.0.0-beta.25): + dependencies: + '@babel/core': 7.29.0 + '@dom-expressions/babel-plugin-jsx': 0.50.0-next.25(@babel/core@7.29.0) + optionalDependencies: + solid-js: 2.0.0-beta.25 balanced-match@1.0.2: {} balanced-match@4.0.3: {} - balanced-match@4.0.4: {} + bare-events@2.5.4: + optional: true bare-events@2.9.1: {} @@ -37601,61 +35345,60 @@ snapshots: base64-js@1.5.1: {} - baseline-browser-mapping@2.11.23: {} + baseline-browser-mapping@2.9.8: {} batch@0.6.1: {} better-ajv-errors@1.2.0(ajv@8.18.0): dependencies: - '@babel/code-frame': 7.29.7 + '@babel/code-frame': 7.27.1 '@humanwhocodes/momoa': 2.0.4 ajv: 8.18.0 chalk: 4.1.2 jsonpointer: 5.0.1 leven: 3.1.0 - better-auth@1.6.19(@opentelemetry/api@1.9.1)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(solid-js@1.9.12)(vitest@4.1.4)(vue@3.5.25(@typescript/typescript6@6.0.2)): + better-auth@1.6.19(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(@tanstack/solid-start@packages+solid-start)(mysql2@3.15.3)(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25)(vitest@4.1.4)(vue@3.5.25(typescript@6.0.2)): dependencies: - '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) - '@better-auth/drizzle-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) - '@better-auth/kysely-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(kysely@0.29.2) - '@better-auth/memory-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) - '@better-auth/mongo-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) - '@better-auth/prisma-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@prisma/client@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.9(react@19.2.9))(react@19.2.9)))(prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)) - '@better-auth/telemetry': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(@opentelemetry/api@1.9.1)(better-call@1.3.6(zod@4.5.4))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1) + '@better-auth/core': 1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0) + '@better-auth/drizzle-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) + '@better-auth/kysely-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(kysely@0.29.2) + '@better-auth/memory-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) + '@better-auth/mongo-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2) + '@better-auth/prisma-adapter': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@prisma/client@7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2))(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2)) + '@better-auth/telemetry': 1.6.19(@better-auth/core@1.6.19(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1)(better-call@1.3.6(zod@4.4.3))(jose@6.1.3)(kysely@0.29.2)(nanostores@1.3.0))(@better-auth/utils@0.4.2)(@better-fetch/fetch@1.3.1) '@better-auth/utils': 0.4.2 '@better-fetch/fetch': 1.3.1 '@noble/ciphers': 2.2.0 '@noble/hashes': 2.0.1 - better-call: 1.3.6(zod@4.5.4) + better-call: 1.3.6(zod@4.4.3) defu: 6.1.4 jose: 6.1.3 kysely: 0.29.2 nanostores: 1.3.0 - zod: 4.5.4 + zod: 4.4.3 optionalDependencies: - '@prisma/client': 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.9(react@19.2.9))(react@19.2.9)) + '@prisma/client': 7.0.0(prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2))(typescript@6.0.2) '@tanstack/solid-start': link:packages/solid-start mysql2: 3.15.3 - next: 16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1) - prisma: 7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - solid-js: 1.9.12 - 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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - vue: 3.5.25(@typescript/typescript6@6.0.2) + prisma: 7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + solid-js: 2.0.0-beta.25 + vitest: 4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)) + vue: 3.5.25(typescript@6.0.2) transitivePeerDependencies: - '@cloudflare/workers-types' - '@opentelemetry/api' - better-call@1.3.6(zod@4.5.4): + better-call@1.3.6(zod@4.4.3): dependencies: '@better-auth/utils': 0.4.2 '@better-fetch/fetch': 1.3.1 rou3: 0.7.12 set-cookie-parser: 3.1.0 optionalDependencies: - zod: 4.5.4 + zod: 4.4.3 better-path-resolve@1.0.0: dependencies: @@ -37665,8 +35408,6 @@ snapshots: dependencies: require-from-string: 2.0.2 - big.js@5.2.2: {} - binary-extensions@2.3.0: {} bindings@1.5.0: @@ -37683,11 +35424,11 @@ snapshots: blake3-wasm@2.1.5: {} - body-parser@1.20.5(supports-color@10.2.2): + body-parser@1.20.5: dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 http-errors: 2.0.1 @@ -37700,11 +35441,11 @@ snapshots: transitivePeerDependencies: - supports-color - body-parser@2.2.2(supports-color@10.2.2): + body-parser@2.2.2: dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 http-errors: 2.0.0 iconv-lite: 0.7.0 on-finished: 2.4.1 @@ -37730,13 +35471,9 @@ snapshots: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.12: + brace-expansion@5.0.6: dependencies: - balanced-match: 4.0.4 - - brace-expansion@5.0.9: - dependencies: - balanced-match: 4.0.4 + balanced-match: 4.0.3 braces@3.0.3: dependencies: @@ -37751,12 +35488,14 @@ snapshots: browserslist@4.28.1: dependencies: - baseline-browser-mapping: 2.11.23 + baseline-browser-mapping: 2.9.8 caniuse-lite: 1.0.30001760 electron-to-chromium: 1.5.267 node-releases: 2.0.27 update-browserslist-db: 1.2.3(browserslist@4.28.1) + buffer-crc32@0.2.13: {} + buffer-crc32@1.0.0: {} buffer-equal-constant-time@1.0.1: {} @@ -37780,7 +35519,7 @@ snapshots: bundle-name@4.1.0: dependencies: - run-applescript: 7.1.0 + run-applescript: 7.0.0 bytes@3.1.2: {} @@ -37792,7 +35531,7 @@ snapshots: confbox: 0.2.2 defu: 6.1.4 dotenv: 16.6.1 - exsolve: 1.1.1 + exsolve: 1.1.0 giget: 2.0.0 jiti: 2.7.0 ohash: 2.0.11 @@ -37801,7 +35540,22 @@ snapshots: pkg-types: 2.3.0 rc9: 2.1.2 - cac@7.1.0: {} + c12@3.3.3(magicast@0.5.1): + dependencies: + chokidar: 5.0.0 + confbox: 0.2.2 + defu: 6.1.4 + dotenv: 17.4.2 + exsolve: 1.0.8 + giget: 2.0.0 + jiti: 2.7.0 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 2.0.0 + pkg-types: 2.3.0 + rc9: 2.1.2 + optionalDependencies: + magicast: 0.5.1 call-bind-apply-helpers@1.0.2: dependencies: @@ -37833,25 +35587,12 @@ snapshots: caniuse-lite@1.0.30001760: {} - cf@1.0.0-beta.28(@types/node@25.0.9): - dependencies: - '@cloudflare/build-output-utils': 0.9.10 - '@cloudflare/config': 0.30.2 - '@cloudflare/runtime-types': 0.1.23(@types/node@25.0.9) - blake3-wasm: 2.1.5 - miniflare: 5.20261104.0-beta(@types/node@25.0.9) - transitivePeerDependencies: - - '@types/node' - - bufferutil - - utf-8-validate - - chai@6.3.0: {} + chai@6.2.2: {} chalk@3.0.0: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - optional: true chalk@4.1.2: dependencies: @@ -37860,8 +35601,6 @@ snapshots: chalk@5.6.2: {} - chalk@6.0.0: {} - char-regex@1.0.2: {} char-spinner@1.0.1: {} @@ -37928,12 +35667,8 @@ snapshots: dependencies: consola: 3.4.2 - citty@0.2.2: {} - cjs-module-lexer@1.4.3: {} - cjs-module-lexer@2.2.1: {} - classnames@2.5.1: {} clean-css@5.3.3: @@ -37955,8 +35690,6 @@ snapshots: cli-spinners@2.6.1: {} - cli-spinners@2.9.2: {} - cli-table3@0.6.5: dependencies: string-width: 4.2.3 @@ -37965,7 +35698,11 @@ snapshots: cli-width@4.1.0: {} - client-only@0.0.1: {} + clipboardy@4.0.0: + dependencies: + execa: 8.0.1 + is-wsl: 3.1.1 + is64bit: 2.0.0 cliui@7.0.4: dependencies: @@ -37989,8 +35726,7 @@ snapshots: clsx@2.1.1: {} - cluster-key-slot@1.1.1: - optional: true + cluster-key-slot@1.1.2: {} color-convert@2.0.1: dependencies: @@ -38017,8 +35753,6 @@ snapshots: colorette@2.0.20: {} - colorjs.io@0.7.1: {} - combinate@1.1.11: {} combined-stream@1.0.8: @@ -38049,13 +35783,17 @@ snapshots: common-tags@1.8.2: {} + commondir@1.0.1: {} + compare-versions@6.1.1: {} - compress-commons@7.0.1: + compatx@0.2.0: {} + + compress-commons@6.0.2: dependencies: crc-32: 1.2.2 - crc32-stream: 7.0.1 - is-stream: 4.0.1 + crc32-stream: 6.0.0 + is-stream: 2.0.1 normalize-path: 3.0.0 readable-stream: 4.7.0 @@ -38063,11 +35801,11 @@ snapshots: dependencies: mime-db: 1.54.0 - compression@1.8.0(supports-color@10.2.2): + compression@1.8.0: dependencies: bytes: 3.1.2 compressible: 2.0.18 - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 negotiator: 0.6.4 on-headers: 1.0.2 safe-buffer: 5.2.1 @@ -38075,11 +35813,11 @@ snapshots: transitivePeerDependencies: - supports-color - compression@1.8.1(supports-color@10.2.2): + compression@1.8.1: dependencies: bytes: 3.1.2 compressible: 2.0.18 - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 negotiator: 0.6.4 on-headers: 1.1.0 safe-buffer: 5.2.1 @@ -38141,45 +35879,47 @@ snapshots: convert-source-map@2.0.0: {} - convex-helpers@0.1.104(@standard-schema/spec@1.1.0)(@typescript/typescript6@6.0.2)(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9))(hono@4.13.9)(react@19.2.9)(zod@3.25.76): + convex-helpers@0.1.104(@standard-schema/spec@1.1.0)(convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(hono@4.7.10)(react@19.2.3)(typescript@6.0.2)(zod@3.25.76): dependencies: - convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9) + convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) optionalDependencies: '@standard-schema/spec': 1.1.0 - hono: 4.13.9 - react: 19.2.9 - typescript: '@typescript/typescript6@6.0.2' + hono: 4.7.10 + react: 19.2.3 + typescript: 6.0.2 zod: 3.25.76 - convex-solidjs@0.0.3(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9)(solid-js@1.9.12): + convex-solidjs@0.0.3(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3)(solid-js@2.0.0-beta.25): dependencies: - '@solid-primitives/context': 0.3.2(solid-js@1.9.12) - convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9) - solid-js: 1.9.12 + '@solid-primitives/context': 0.3.2(solid-js@2.0.0-beta.25) + convex: 1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - '@auth0/auth0-react' - '@clerk/clerk-react' - react - convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + convex@1.19.0(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: esbuild: 0.23.0 jwt-decode: 3.1.2 prettier: 3.4.2 optionalDependencies: - '@clerk/clerk-react': 5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@clerk/clerk-react': 5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9))(react@19.2.9): + convex@1.28.2(@clerk/clerk-react@5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3): dependencies: esbuild: 0.25.4 - prettier: 3.8.1 + prettier: 3.6.2 optionalDependencies: - '@clerk/clerk-react': 5.59.3(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 + '@clerk/clerk-react': 5.59.3(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 - cookie-es@1.2.3: {} + cookie-es@1.2.2: {} + + cookie-es@2.0.0: {} cookie-es@3.1.1: {} @@ -38191,10 +35931,6 @@ snapshots: cookie@1.0.2: {} - cookie@1.1.1: {} - - cookie@2.0.1: {} - copy-file@11.1.0: dependencies: graceful-fs: 4.2.11 @@ -38210,26 +35946,28 @@ snapshots: path-type: 4.0.0 yaml: 1.10.3 - cosmiconfig@9.0.0(@typescript/typescript6@6.0.2): + cosmiconfig@9.0.0(typescript@6.0.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 crc-32@1.2.2: {} - crc32-stream@7.0.1: + crc32-stream@6.0.0: dependencies: crc-32: 1.2.2 readable-stream: 4.7.0 - cron-parser@5.10.1: + cron-parser@4.9.0: dependencies: luxon: 3.7.2 + croner@9.1.0: {} + cross-argv@2.0.0: {} cross-env@10.0.0: @@ -38247,9 +35985,22 @@ snapshots: dependencies: uncrypto: 0.1.3 - crossws@0.4.12(srvx@1.0.5): + crossws@0.4.3(srvx@0.10.1): optionalDependencies: - srvx: 1.0.5 + srvx: 0.10.1 + + crossws@0.4.4(srvx@0.11.15): + optionalDependencies: + srvx: 0.11.15 + + crossws@0.4.9(srvx@0.11.15): + optionalDependencies: + srvx: 0.11.15 + + crossws@0.4.9(srvx@0.11.20): + optionalDependencies: + srvx: 0.11.20 + optional: true css-loader@7.1.2(webpack@5.97.1): dependencies: @@ -38262,7 +36013,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.7.3 optionalDependencies: - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) css-select@4.3.0: dependencies: @@ -38283,7 +36034,12 @@ snapshots: css-tree@2.2.1: dependencies: mdn-data: 2.0.28 - source-map-js: 1.2.2 + source-map-js: 1.2.1 + + css-tree@3.1.0: + dependencies: + mdn-data: 2.12.2 + source-map-js: 1.2.1 css-tree@3.2.1: dependencies: @@ -38307,11 +36063,13 @@ snapshots: '@asamuzakjp/css-color': 2.8.3 rrweb-cssom: 0.8.0 - cssstyle@5.3.1: + cssstyle@5.3.1(postcss@8.5.15): dependencies: '@asamuzakjp/css-color': 4.0.5 - '@csstools/css-syntax-patches-for-csstree': 1.1.5(css-tree@3.2.1) - css-tree: 3.2.1 + '@csstools/css-syntax-patches-for-csstree': 1.0.14(postcss@8.5.15) + css-tree: 3.1.0 + transitivePeerDependencies: + - postcss csstype@3.1.3: {} @@ -38342,33 +36100,35 @@ snapshots: dependencies: '@babel/runtime': 7.26.7 - db0@0.4.1: {} + db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3): + optionalDependencies: + '@electric-sql/pglite': 0.3.2 + '@libsql/client': 0.15.15 + mysql2: 3.15.3 de-indent@1.0.2: {} - debug@2.6.9(supports-color@10.2.2): + debug@2.6.9: dependencies: ms: 2.0.0 - optionalDependencies: - supports-color: 10.2.2 - debug@4.4.3(supports-color@10.2.2): + debug@4.4.3: dependencies: ms: 2.1.3 - optionalDependencies: - supports-color: 10.2.2 decache@4.6.2: dependencies: callsite: 1.0.0 + decimal.js@10.5.0: {} + decimal.js@10.6.0: {} dedent@1.5.1(babel-plugin-macros@3.1.0): optionalDependencies: babel-plugin-macros: 3.1.0 - dedent@1.7.2(babel-plugin-macros@3.1.0): + dedent@1.7.0(babel-plugin-macros@3.1.0): optionalDependencies: babel-plugin-macros: 3.1.0 @@ -38399,12 +36159,12 @@ snapshots: deepmerge@4.3.1: {} - default-browser-id@5.0.1: {} + default-browser-id@5.0.0: {} default-browser@5.2.1: dependencies: bundle-name: 4.1.0 - default-browser-id: 5.0.1 + default-browser-id: 5.0.0 defaults@1.0.4: dependencies: @@ -38416,6 +36176,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + define-lazy-prop@2.0.0: {} + define-lazy-prop@3.0.0: {} define-properties@1.2.1: @@ -38426,8 +36188,6 @@ snapshots: defu@6.1.4: {} - defu@6.1.7: {} - delay@5.0.0: {} delayed-stream@1.0.0: {} @@ -38446,8 +36206,7 @@ snapshots: detect-indent@6.1.0: {} - detect-libc@1.0.3: - optional: true + detect-libc@1.0.3: {} detect-libc@2.0.2: {} @@ -38473,11 +36232,11 @@ snapshots: dependencies: node-source-walk: 7.0.1 - detective-postcss@7.0.1(postcss@8.5.29): + detective-postcss@7.0.1(postcss@8.5.8): dependencies: is-url: 1.2.4 - postcss: 8.5.29 - postcss-values-parser: 6.0.2(postcss@8.5.29) + postcss: 8.5.8 + postcss-values-parser: 6.0.2(postcss@8.5.8) detective-sass@6.0.1: dependencies: @@ -38491,16 +36250,16 @@ snapshots: detective-stylus@5.0.1: {} - detective-typescript@14.0.0(supports-color@10.2.2)(typescript@5.9.3): + detective-typescript@14.0.0(typescript@5.9.3): dependencies: - '@typescript-eslint/typescript-estree': 8.57.1(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.53.0(typescript@5.9.3) ast-module-types: 6.0.1 node-source-walk: 7.0.1 typescript: 5.9.3 transitivePeerDependencies: - supports-color - detective-vue2@2.2.0(supports-color@10.2.2)(typescript@5.9.3): + detective-vue2@2.2.0(typescript@5.9.3): dependencies: '@dependents/detective-less': 5.0.1 '@vue/compiler-sfc': 3.5.25 @@ -38508,7 +36267,7 @@ snapshots: detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(supports-color@10.2.2)(typescript@5.9.3) + detective-typescript: 14.0.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -38517,7 +36276,7 @@ snapshots: dexie@4.2.1: {} - diff@9.0.0: {} + diff@8.0.2: {} dir-glob@3.0.1: dependencies: @@ -38579,13 +36338,17 @@ snapshots: no-case: 3.0.4 tslib: 2.8.1 + dot-prop@10.1.0: + dependencies: + type-fest: 5.4.1 + dot-prop@9.0.0: dependencies: type-fest: 4.41.0 dotenv-expand@12.0.3: dependencies: - dotenv: 16.6.1 + dotenv: 16.4.7 dotenv@16.4.7: {} @@ -38593,6 +36356,8 @@ snapshots: dotenv@17.2.3: {} + dotenv@17.4.2: {} + dotenv@8.6.0: {} dunder-proto@1.0.1: @@ -38601,6 +36366,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + duplexer@0.1.2: {} + eastasianwidth@0.2.0: {} ecdsa-sig-formatter@1.0.11: @@ -38612,7 +36379,7 @@ snapshots: '@one-ini/wasm': 0.1.1 commander: 10.0.1 minimatch: 9.0.1 - semver: 7.8.5 + semver: 7.8.2 ee-first@1.1.1: {} @@ -38633,8 +36400,6 @@ snapshots: emojilib@2.4.0: {} - emojis-list@3.0.0: {} - empathic@2.0.0: {} enabled@2.0.0: {} @@ -38655,22 +36420,21 @@ snapshots: enhanced-resolve@5.18.1: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.3 + tapable: 2.2.1 enhanced-resolve@5.18.3: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.3 + tapable: 2.3.0 - enhanced-resolve@5.21.6: + enhanced-resolve@5.20.1: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.3 + tapable: 2.3.0 - enhanced-resolve@5.24.5: + enquirer@2.3.6: dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.3 + ansi-colors: 4.1.3 enquirer@2.4.1: dependencies: @@ -38689,12 +36453,13 @@ snapshots: env-paths@3.0.0: {} - env-runner@0.2.3: + env-runner@0.1.6(miniflare@4.20260317.0): dependencies: - crossws: 0.4.12(srvx@1.0.5) - exsolve: 1.1.1 - httpxy: 0.5.5 - srvx: 1.0.5 + crossws: 0.4.9(srvx@0.11.15) + httpxy: 0.3.1 + srvx: 0.11.15 + optionalDependencies: + miniflare: 4.20260317.0 envinfo@7.14.0: {} @@ -38726,11 +36491,11 @@ snapshots: es-module-lexer@1.7.0: {} - es-module-lexer@2.3.2: {} + es-module-lexer@2.0.0: {} - es-module-lexer@3.0.3: {} - - es-module-lexer@3.0.4: {} + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 es-object-atoms@1.1.2: dependencies: @@ -38741,22 +36506,22 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 - hasown: 2.0.4 + hasown: 2.0.2 - esbuild-plugin-solid@0.6.0(esbuild@0.27.4)(solid-js@1.9.12)(supports-color@10.2.2): + esbuild-plugin-solid@0.6.0(esbuild@0.27.4)(solid-js@2.0.0-beta.25): dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@babel/preset-typescript': 7.27.1(@babel/core@7.29.7(supports-color@10.2.2))(supports-color@10.2.2) - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) + '@babel/core': 7.28.5 + '@babel/preset-typescript': 7.27.1(@babel/core@7.28.5) + babel-preset-solid: 1.9.10(@babel/core@7.28.5)(solid-js@2.0.0-beta.25) esbuild: 0.27.4 - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 transitivePeerDependencies: - supports-color - esbuild-plugin-vue3@0.5.1(cheerio@1.0.0)(sass@1.97.2)(vue@3.5.25(@typescript/typescript6@6.0.2)): + esbuild-plugin-vue3@0.5.1(cheerio@1.0.0)(sass@1.97.2)(vue@3.5.25(typescript@6.0.2)): dependencies: typescript: 4.9.5 - vue: 3.5.25(@typescript/typescript6@6.0.2) + vue: 3.5.25(typescript@6.0.2) optionalDependencies: cheerio: 1.0.0 sass: 1.97.2 @@ -38903,35 +36668,6 @@ snapshots: '@esbuild/win32-ia32': 0.27.4 '@esbuild/win32-x64': 0.27.4 - esbuild@0.28.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.28.1 - '@esbuild/android-arm': 0.28.1 - '@esbuild/android-arm64': 0.28.1 - '@esbuild/android-x64': 0.28.1 - '@esbuild/darwin-arm64': 0.28.1 - '@esbuild/darwin-x64': 0.28.1 - '@esbuild/freebsd-arm64': 0.28.1 - '@esbuild/freebsd-x64': 0.28.1 - '@esbuild/linux-arm': 0.28.1 - '@esbuild/linux-arm64': 0.28.1 - '@esbuild/linux-ia32': 0.28.1 - '@esbuild/linux-loong64': 0.28.1 - '@esbuild/linux-mips64el': 0.28.1 - '@esbuild/linux-ppc64': 0.28.1 - '@esbuild/linux-riscv64': 0.28.1 - '@esbuild/linux-s390x': 0.28.1 - '@esbuild/linux-x64': 0.28.1 - '@esbuild/netbsd-arm64': 0.28.1 - '@esbuild/netbsd-x64': 0.28.1 - '@esbuild/openbsd-arm64': 0.28.1 - '@esbuild/openbsd-x64': 0.28.1 - '@esbuild/openharmony-arm64': 0.28.1 - '@esbuild/sunos-x64': 0.28.1 - '@esbuild/win32-arm64': 0.28.1 - '@esbuild/win32-ia32': 0.28.1 - '@esbuild/win32-x64': 0.28.1 - escalade@3.2.0: {} escape-html@1.0.3: {} @@ -38950,10 +36686,10 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): + eslint-compat-utils@0.5.1(eslint@9.22.0(jiti@2.7.0)): dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - semver: 7.8.5 + eslint: 9.22.0(jiti@2.7.0) + semver: 7.8.2 eslint-import-context@0.1.9(unrs-resolver@1.11.1): dependencies: @@ -38962,210 +36698,214 @@ snapshots: optionalDependencies: unrs-resolver: 1.11.1 - eslint-plugin-es-x@7.8.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): + eslint-plugin-es-x@7.8.0(eslint@9.22.0(jiti@2.7.0)): dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) '@eslint-community/regexpp': 4.12.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - eslint-compat-utils: 0.5.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + eslint: 9.22.0(jiti@2.7.0) + eslint-compat-utils: 0.5.1(eslint@9.22.0(jiti@2.7.0)) - eslint-plugin-import-x@4.16.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + eslint-plugin-import-x@4.16.1(@typescript-eslint/utils@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0)): dependencies: '@typescript-eslint/types': 8.53.0 comment-parser: 1.4.1 - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) eslint-import-context: 0.1.9(unrs-resolver@1.11.1) is-glob: 4.0.3 minimatch: 10.2.5 - semver: 7.8.5 + semver: 7.8.2 stable-hash-x: 0.2.0 unrs-resolver: 1.11.1 + optionalDependencies: + '@typescript-eslint/utils': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) transitivePeerDependencies: - supports-color - eslint-plugin-n@17.23.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): + eslint-plugin-n@17.23.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - enhanced-resolve: 5.21.6 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - eslint-plugin-es-x: 7.8.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - get-tsconfig: 4.10.1 - globals: 15.14.0 - globrex: 0.1.2 - ignore: 5.3.2 - semver: 7.8.5 - ts-declaration-location: 1.0.7(@typescript/typescript6@6.0.2) - transitivePeerDependencies: - - typescript - - eslint-plugin-n@17.24.0(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) enhanced-resolve: 5.18.3 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - eslint-plugin-es-x: 7.8.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + eslint: 9.22.0(jiti@2.7.0) + eslint-plugin-es-x: 7.8.0(eslint@9.22.0(jiti@2.7.0)) get-tsconfig: 4.10.1 globals: 15.14.0 globrex: 0.1.2 ignore: 5.3.2 - semver: 7.8.5 - ts-declaration-location: 1.0.7(@typescript/typescript6@6.0.2) + semver: 7.8.2 + ts-declaration-location: 1.0.7(typescript@6.0.2) transitivePeerDependencies: - typescript - eslint-plugin-react-debug@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): + eslint-plugin-n@17.24.0(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-community/eslint-utils': 4.9.1(eslint@9.22.0(jiti@2.7.0)) + enhanced-resolve: 5.18.3 + eslint: 9.22.0(jiti@2.7.0) + eslint-plugin-es-x: 7.8.0(eslint@9.22.0(jiti@2.7.0)) + get-tsconfig: 4.10.1 + globals: 15.14.0 + globrex: 0.1.2 + ignore: 5.3.2 + semver: 7.8.2 + ts-declaration-location: 1.0.7(typescript@6.0.2) + transitivePeerDependencies: + - typescript + + eslint-plugin-react-debug@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): + dependencies: + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-react-dom@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): + eslint-plugin-react-dom@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) compare-versions: 6.1.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks-extra@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): + eslint-plugin-react-hooks-extra@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks@5.1.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): + eslint-plugin-react-hooks@5.1.0(eslint@9.22.0(jiti@2.7.0)): dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) - eslint-plugin-react-naming-convention@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): + eslint-plugin-react-naming-convention@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-react-web-api@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): + eslint-plugin-react-web-api@1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-react-x@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)): + eslint-plugin-react-x@1.26.2(eslint@9.22.0(jiti@2.7.0))(ts-api-utils@2.4.0(typescript@6.0.2))(typescript@6.0.2): dependencies: - '@eslint-react/ast': 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) - '@eslint-react/core': 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) + '@eslint-react/ast': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/core': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) '@eslint-react/eff': 1.26.2 - '@eslint-react/jsx': 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) - '@eslint-react/shared': 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) - '@eslint-react/var': 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) - '@typescript-eslint/scope-manager': 8.57.1 - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/types': 8.57.1 - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + '@eslint-react/jsx': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/shared': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@eslint-react/var': 1.26.2(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/scope-manager': 8.53.0 + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/types': 8.53.0 + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) compare-versions: 6.1.1 - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - is-immutable-type: 5.0.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) + is-immutable-type: 5.0.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) string-ts: 2.2.1 ts-pattern: 5.6.2 optionalDependencies: - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + ts-api-utils: 2.4.0(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-solid@0.14.5(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + eslint-plugin-solid@0.14.5(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@typescript-eslint/utils': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) estraverse: 5.3.0 is-html: 2.0.0 kebab-case: 1.0.2 known-css-properties: 0.30.0 style-to-object: 1.0.8 - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - supports-color - eslint-plugin-unused-imports@4.1.4(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)): + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0)): dependencies: - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + eslint: 9.22.0(jiti@2.7.0) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) - eslint-plugin-vue@9.33.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + eslint-plugin-vue@9.33.0(eslint@9.22.0(jiti@2.7.0)): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) + eslint: 9.22.0(jiti@2.7.0) globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.7.3 - vue-eslint-parser: 9.4.3(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + vue-eslint-parser: 9.4.3(eslint@9.22.0(jiti@2.7.0)) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -39191,14 +36931,14 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2): + eslint@9.22.0(jiti@2.7.0): dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/eslint-utils': 4.9.0(eslint@9.22.0(jiti@2.7.0)) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.2(supports-color@10.2.2) + '@eslint/config-array': 0.19.2 '@eslint/config-helpers': 0.1.0 '@eslint/core': 0.12.0 - '@eslint/eslintrc': 3.3.0(supports-color@10.2.2) + '@eslint/eslintrc': 3.3.0 '@eslint/js': 9.22.0 '@eslint/plugin-kit': 0.2.7 '@humanfs/node': 0.16.6 @@ -39209,7 +36949,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.1 @@ -39263,7 +37003,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.8 esutils@2.0.3: {} @@ -39293,25 +37033,25 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - expect-type@1.4.0: {} + expect-type@1.3.0: {} - express@4.22.2(supports-color@10.2.2): + express@4.22.2: dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.5(supports-color@10.2.2) + body-parser: 1.20.5 content-disposition: 0.5.4 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.0.6 - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.1(supports-color@10.2.2) + finalhandler: 1.3.1 fresh: 0.5.2 - http-errors: 2.0.1 + http-errors: 2.0.0 merge-descriptors: 1.0.3 methods: 1.1.2 on-finished: 2.4.1 @@ -39321,30 +37061,30 @@ snapshots: qs: 6.15.2 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.19.0(supports-color@10.2.2) - serve-static: 1.16.2(supports-color@10.2.2) + send: 0.19.0 + serve-static: 1.16.2 setprototypeof: 1.2.0 - statuses: 2.0.2 + statuses: 2.0.1 type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 transitivePeerDependencies: - supports-color - express@5.2.1(supports-color@10.2.2): + express@5.2.1: dependencies: accepts: 2.0.0 - body-parser: 2.2.2(supports-color@10.2.2) + body-parser: 2.2.2 content-disposition: 1.0.0 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 2.1.0(supports-color@10.2.2) + finalhandler: 2.1.0 fresh: 2.0.0 http-errors: 2.0.0 merge-descriptors: 2.0.0 @@ -39355,21 +37095,33 @@ snapshots: proxy-addr: 2.0.7 qs: 6.14.0 range-parser: 1.2.1 - router: 2.2.0(supports-color@10.2.2) - send: 1.2.0(supports-color@10.2.2) - serve-static: 2.2.1(supports-color@10.2.2) + router: 2.2.0 + send: 1.2.0 + serve-static: 2.2.1 statuses: 2.0.1 type-is: 2.0.1 vary: 1.1.2 transitivePeerDependencies: - supports-color - exsolve@1.1.1: {} + exsolve@1.0.7: {} - exsolve@1.2.0: {} + exsolve@1.0.8: {} + + exsolve@1.1.0: {} extendable-error@0.1.7: {} + extract-zip@2.0.1: + dependencies: + debug: 4.4.3 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + fast-check@3.23.2: dependencies: pure-rand: 6.1.0 @@ -39394,7 +37146,7 @@ snapshots: dependencies: '@fastify/merge-json-schemas': 0.2.1 ajv: 8.17.1 - ajv-formats: 3.0.1 + ajv-formats: 3.0.1(ajv@8.17.1) fast-uri: 3.0.6 json-schema-ref-resolver: 3.0.0 rfdc: 1.4.1 @@ -39409,18 +37161,8 @@ snapshots: fast-sha256@1.3.0: {} - fast-string-truncated-width@3.0.3: {} - - fast-string-width@3.0.2: - dependencies: - fast-string-truncated-width: 3.0.3 - fast-uri@3.0.6: {} - fast-wrap-ansi@0.2.0: - dependencies: - fast-string-width: 3.0.2 - fastest-levenshtein@1.0.16: {} fastify@5.7.1: @@ -39438,7 +37180,7 @@ snapshots: process-warning: 5.0.0 rfdc: 1.4.1 secure-json-parse: 4.1.0 - semver: 7.8.5 + semver: 7.8.2 toad-cache: 3.7.0 fastq@1.19.0: @@ -39449,13 +37191,17 @@ snapshots: dependencies: websocket-driver: 0.7.4 + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + fdir@6.5.0(picomatch@4.0.3): optionalDependencies: picomatch: 4.0.3 - fdir@6.5.0(picomatch@4.0.7): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.7 + picomatch: 4.0.4 fecha@4.2.3: {} @@ -39464,7 +37210,9 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 - fetchdts@0.2.0: {} + fetchdts@0.1.7: {} + + fflate@0.8.2: {} fflate@0.8.3: {} @@ -39488,9 +37236,9 @@ snapshots: filter-obj@6.1.0: {} - finalhandler@1.3.1(supports-color@10.2.2): + finalhandler@1.3.1: dependencies: - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -39500,9 +37248,9 @@ snapshots: transitivePeerDependencies: - supports-color - finalhandler@2.1.0(supports-color@10.2.2): + finalhandler@2.1.0: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -39531,6 +37279,11 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 + find-up@6.3.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + find-up@7.0.0: dependencies: locate-path: 7.2.0 @@ -39572,20 +37325,20 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.4.2 + flatted: 3.3.3 keyv: 4.5.4 flat@5.0.2: {} - flatted@3.4.2: {} + flatted@3.3.3: {} - flatted@3.4.4: {} + flatted@3.4.2: {} fn.name@1.1.0: {} - follow-redirects@1.16.0(debug@4.4.3(supports-color@10.2.2)): + follow-redirects@1.16.0(debug@4.4.3): optionalDependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 for-each@0.3.5: dependencies: @@ -39596,6 +37349,12 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + form-data@4.0.1: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + form-data@4.0.5: dependencies: asynckit: 0.4.0 @@ -39604,29 +37363,21 @@ snapshots: hasown: 2.0.2 mime-types: 2.1.35 - form-data@4.0.6: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - hasown: 2.0.4 - mime-types: 2.1.35 - formdata-polyfill@4.0.10: dependencies: fetch-blob: 3.2.0 forwarded@0.2.0: {} - framer-motion@11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + framer-motion@11.18.2(@emotion/is-prop-valid@1.3.1)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: motion-dom: 11.18.1 motion-utils: 11.18.1 tslib: 2.8.1 optionalDependencies: '@emotion/is-prop-valid': 1.3.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) fresh@0.5.2: {} @@ -39646,6 +37397,9 @@ snapshots: jsonfile: 4.0.0 universalify: 0.1.2 + fsevents@2.3.2: + optional: true + fsevents@2.3.3: optional: true @@ -39671,12 +37425,12 @@ snapshots: call-bind-apply-helpers: 1.0.2 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.1.2 + es-object-atoms: 1.1.1 function-bind: 1.1.2 get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 - hasown: 2.0.4 + hasown: 2.0.2 math-intrinsics: 1.1.0 get-nonce@1.0.1: {} @@ -39690,7 +37444,11 @@ snapshots: get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 - es-object-atoms: 1.1.2 + es-object-atoms: 1.1.1 + + get-stream@5.2.0: + dependencies: + pump: 3.0.3 get-stream@8.0.1: {} @@ -39755,6 +37513,15 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + globby@16.1.0: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + fast-glob: 3.3.3 + ignore: 7.0.5 + is-path-inside: 4.0.0 + slash: 5.1.0 + unicorn-magic: 0.4.0 + globrex@0.1.2: {} gonzales-pe@4.3.0: @@ -39779,27 +37546,42 @@ snapshots: graphql@16.10.0: {} - graphql@16.14.2: {} - - h3@1.15.11: + gzip-size@7.0.0: dependencies: - cookie-es: 1.2.3 + duplexer: 0.1.2 + + h3@1.15.5: + dependencies: + cookie-es: 1.2.2 crossws: 0.3.5 - defu: 6.1.7 + defu: 6.1.4 destr: 2.0.5 iron-webcrypto: 1.2.1 node-mock-http: 1.0.4 radix3: 1.1.2 - ufo: 1.6.4 + ufo: 1.6.3 uncrypto: 0.1.3 - h3@2.0.1-rc.32(crossws@0.4.12(srvx@1.0.5))(ocache@0.3.0): + h3@2.0.1-rc.14(crossws@0.4.3(srvx@0.10.1)): dependencies: - rou3: 0.9.2 - srvx: 1.0.5 + rou3: 0.7.12 + srvx: 0.11.15 optionalDependencies: - crossws: 0.4.12(srvx@1.0.5) - ocache: 0.3.0 + crossws: 0.4.3(srvx@0.10.1) + + h3@2.0.1-rc.16(crossws@0.4.4(srvx@0.11.15)): + dependencies: + rou3: 0.8.1 + srvx: 0.11.15 + optionalDependencies: + crossws: 0.4.4(srvx@0.11.15) + + h3@2.0.1-rc.20(crossws@0.4.9(srvx@0.11.20)): + dependencies: + rou3: 0.8.1 + srvx: 0.11.15 + optionalDependencies: + crossws: 0.4.9(srvx@0.11.20) handle-thing@2.0.1: {} @@ -39841,11 +37623,6 @@ snapshots: headers-polyfill@4.0.3: {} - headers-polyfill@5.0.1: - dependencies: - '@types/set-cookie-parser': 2.4.10 - set-cookie-parser: 3.1.0 - hey-listen@1.0.8: {} highlight.js@10.7.3: {} @@ -39854,26 +37631,16 @@ snapshots: dependencies: react-is: 16.13.1 - hono-sessions@0.8.1(hono@4.13.9): - dependencies: - hono: 4.13.9 - iron-webcrypto: 1.2.1 - ohash: 2.0.11 - - hono@4.13.9: {} - hono@4.7.10: {} - hookable@6.1.2: {} + hookable@5.5.3: {} + + hookable@6.1.0: {} hosted-git-info@7.0.2: dependencies: lru-cache: 10.4.3 - hosted-git-info@9.0.3: - dependencies: - lru-cache: 11.5.1 - hpack.js@2.1.6: dependencies: inherits: 2.0.4 @@ -39905,7 +37672,7 @@ snapshots: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.51.2 + terser: 5.37.0 html-tags@3.3.1: {} @@ -39960,17 +37727,17 @@ snapshots: http-parser-js@0.5.9: {} - http-proxy-agent@7.0.2(supports-color@10.2.2): + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 transitivePeerDependencies: - supports-color - http-proxy-middleware@2.0.9(@types/express@4.17.25)(debug@4.4.3(supports-color@10.2.2)): + http-proxy-middleware@2.0.9(@types/express@4.17.25): dependencies: '@types/http-proxy': 1.17.15 - http-proxy: 1.18.1(debug@4.4.3(supports-color@10.2.2)) + http-proxy: 1.18.1(debug@4.4.3) is-glob: 4.0.3 is-plain-obj: 3.0.0 micromatch: 4.0.8 @@ -39979,21 +37746,21 @@ snapshots: transitivePeerDependencies: - debug - http-proxy-middleware@3.0.5(supports-color@10.2.2): + http-proxy-middleware@3.0.5: dependencies: '@types/http-proxy': 1.17.15 - debug: 4.4.3(supports-color@10.2.2) - http-proxy: 1.18.1(debug@4.4.3(supports-color@10.2.2)) + debug: 4.4.3 + http-proxy: 1.18.1(debug@4.4.3) is-glob: 4.0.3 is-plain-object: 5.0.0 micromatch: 4.0.8 transitivePeerDependencies: - supports-color - http-proxy@1.18.1(debug@4.4.3(supports-color@10.2.2)): + http-proxy@1.18.1(debug@4.4.3): dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.16.0(debug@4.4.3(supports-color@10.2.2)) + follow-redirects: 1.16.0(debug@4.4.3) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -40002,21 +37769,23 @@ snapshots: http-status-codes@2.3.0: {} - https-proxy-agent@5.0.1(supports-color@10.2.2): + https-proxy-agent@5.0.1: dependencies: - agent-base: 6.0.2(supports-color@10.2.2) - debug: 4.4.3(supports-color@10.2.2) + agent-base: 6.0.2 + debug: 4.4.3 transitivePeerDependencies: - supports-color - https-proxy-agent@7.0.6(supports-color@10.2.2): + https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 transitivePeerDependencies: - supports-color - httpxy@0.5.5: {} + httpxy@0.1.7: {} + + httpxy@0.3.1: {} human-id@4.1.1: {} @@ -40052,29 +37821,21 @@ snapshots: ignore@5.3.2: {} - ignore@7.0.12: {} - ignore@7.0.5: {} image-meta@0.2.2: {} + image-size@2.0.2: {} + immer@10.1.1: {} immutable@5.1.4: {} - immutable@5.1.9: {} - import-fresh@3.3.0: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - import-in-the-middle@3.5.1: - dependencies: - cjs-module-lexer: 2.2.1 - es-module-lexer: 3.0.3 - module-details-from-path: 1.0.4 - import-lazy@4.0.0: {} import-local@3.2.0: @@ -40106,40 +37867,41 @@ snapshots: interpret@3.1.1: {} - ioredis@5.11.1(supports-color@10.2.2): + ioredis@5.9.2: dependencies: - '@ioredis/commands': 1.10.0 - cluster-key-slot: 1.1.1 - debug: 4.4.3(supports-color@10.2.2) + '@ioredis/commands': 1.5.0 + cluster-key-slot: 1.1.2 + debug: 4.4.3 denque: 2.1.0 + lodash.defaults: 4.2.0 + lodash.isarguments: 3.1.0 redis-errors: 1.2.0 redis-parser: 3.0.0 standard-as-callback: 2.1.0 transitivePeerDependencies: - supports-color - optional: true ipaddr.js@1.9.1: {} ipaddr.js@2.2.0: {} - ipx@3.1.1(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2))(srvx@1.0.5): + ipx@3.1.1(@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.9.2): dependencies: '@fastify/accept-negotiator': 2.0.1 citty: 0.1.6 consola: 3.4.2 - defu: 6.1.7 + defu: 6.1.4 destr: 2.0.5 etag: 1.8.1 - h3: 1.15.11 + h3: 1.15.5 image-meta: 0.2.2 - listhen: 1.10.1(srvx@1.0.5) + listhen: 1.9.0 ofetch: 1.5.1 pathe: 2.0.3 - sharp: 0.34.5 + sharp: 0.34.4 svgo: 4.0.0 - ufo: 1.6.4 - unstorage: 1.17.5(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2)) + ufo: 1.6.3 + unstorage: 1.17.4(@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.9.2) xss: 1.0.15 transitivePeerDependencies: - '@azure/app-configuration' @@ -40151,7 +37913,6 @@ snapshots: - '@capacitor/preferences' - '@deno/kv' - '@netlify/blobs' - - '@parcel/watcher' - '@planetscale/database' - '@upstash/redis' - '@vercel/blob' @@ -40161,14 +37922,8 @@ snapshots: - db0 - idb-keyval - ioredis - - srvx - uploadthing - iron-session@9.0.1: - dependencies: - cookie: 2.0.1 - iron-webcrypto: 2.0.0 - iron-webcrypto@1.2.1: {} iron-webcrypto@2.0.0: @@ -40212,6 +37967,8 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 + is-docker@2.2.1: {} + is-docker@3.0.0: {} is-extglob@2.1.1: {} @@ -40226,13 +37983,13 @@ snapshots: dependencies: html-tags: 3.3.1 - is-immutable-type@5.0.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + is-immutable-type@5.0.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@typescript-eslint/type-utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - ts-api-utils: 2.4.0(@typescript/typescript6@6.0.2) - ts-declaration-location: 1.0.7(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/type-utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + ts-api-utils: 2.4.0(typescript@6.0.2) + ts-declaration-location: 1.0.5(typescript@6.0.2) + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -40244,6 +38001,8 @@ snapshots: is-map@2.0.3: {} + is-module@1.0.0: {} + is-network-error@1.1.0: {} is-node-process@1.2.0: {} @@ -40275,6 +38034,14 @@ snapshots: is-property@1.0.2: {} + is-reference@1.2.1: + dependencies: + '@types/estree': 1.0.8 + + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.8 + is-regex@1.2.1: dependencies: call-bound: 1.0.4 @@ -40328,10 +38095,18 @@ snapshots: is-windows@1.0.2: {} - is-wsl@3.1.0: + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + + is-wsl@3.1.1: dependencies: is-inside-container: 1.0.0 + is64bit@2.0.0: + dependencies: + system-architecture: 0.1.0 + isarray@1.0.0: {} isarray@2.0.5: {} @@ -40364,6 +38139,8 @@ snapshots: jose@6.1.3: {} + jpeg-js@0.4.4: {} + js-base64@3.7.8: {} js-beautify@1.15.4: @@ -40376,12 +38153,16 @@ snapshots: js-cookie@3.0.5: {} + js-image-generator@1.0.4: + dependencies: + jpeg-js: 0.4.4 + js-sha256@0.11.1: {} - js-tokens@10.0.0: {} - js-tokens@4.0.0: {} + js-tokens@9.0.1: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -40395,15 +38176,15 @@ snapshots: dependencies: argparse: 2.0.1 - jsdom@25.0.1(supports-color@10.2.2): + jsdom@25.0.1: dependencies: cssstyle: 4.2.1 data-urls: 5.0.0 - decimal.js: 10.6.0 - form-data: 4.0.5 + decimal.js: 10.5.0 + form-data: 4.0.1 html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2(supports-color@10.2.2) - https-proxy-agent: 7.0.6(supports-color@10.2.2) + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.16 parse5: 7.3.0 @@ -40416,37 +38197,38 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.1.0 - ws: 8.20.0 + ws: 8.18.0 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsdom@27.0.0(supports-color@10.2.2): + jsdom@27.0.0(postcss@8.5.15): dependencies: '@asamuzakjp/dom-selector': 6.5.6 - cssstyle: 5.3.1 + cssstyle: 5.3.1(postcss@8.5.15) data-urls: 6.0.0 - decimal.js: 10.6.0 + decimal.js: 10.5.0 html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2(supports-color@10.2.2) - https-proxy-agent: 7.0.6(supports-color@10.2.2) + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 parse5: 7.3.0 rrweb-cssom: 0.8.0 saxes: 6.0.0 symbol-tree: 3.2.4 - tough-cookie: 6.0.1 + tough-cookie: 6.0.0 w3c-xmlserializer: 5.0.0 - webidl-conversions: 8.0.1 + webidl-conversions: 8.0.0 whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 15.1.0 - ws: 8.20.0 + ws: 8.18.3 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil + - postcss - supports-color - utf-8-validate @@ -40494,7 +38276,7 @@ snapshots: json5@2.2.3: {} - jsonc-parser@3.3.1: {} + jsonc-parser@3.2.0: {} jsonfile@4.0.0: optionalDependencies: @@ -40502,9 +38284,9 @@ snapshots: jsonpointer@5.0.1: {} - jsonwebtoken@9.0.3: + jsonwebtoken@9.0.2: dependencies: - jws: 4.0.1 + jws: 3.2.2 lodash.includes: 4.3.0 lodash.isboolean: 3.0.3 lodash.isinteger: 4.0.4 @@ -40513,19 +38295,19 @@ snapshots: lodash.isstring: 4.0.1 lodash.once: 4.1.1 ms: 2.1.3 - semver: 7.8.5 + semver: 7.8.2 junk@4.0.1: {} - jwa@2.0.1: + jwa@1.4.2: dependencies: buffer-equal-constant-time: 1.0.1 ecdsa-sig-formatter: 1.0.11 safe-buffer: 5.2.1 - jws@4.0.1: + jws@3.2.2: dependencies: - jwa: 2.0.1 + jwa: 1.4.2 safe-buffer: 5.2.1 jwt-decode@3.1.2: {} @@ -40542,6 +38324,10 @@ snapshots: kleur@4.1.5: {} + klona@2.0.6: {} + + knitwork@1.3.0: {} + known-css-properties@0.30.0: {} kolorist@1.8.0: {} @@ -40606,76 +38392,43 @@ snapshots: light-my-request@6.6.0: dependencies: - cookie: 1.1.1 + cookie: 1.0.2 process-warning: 4.0.1 set-cookie-parser: 2.7.2 lightningcss-android-arm64@1.32.0: optional: true - lightningcss-android-arm64@1.33.0: - optional: true - lightningcss-darwin-arm64@1.32.0: optional: true - lightningcss-darwin-arm64@1.33.0: - optional: true - lightningcss-darwin-x64@1.32.0: optional: true - lightningcss-darwin-x64@1.33.0: - optional: true - lightningcss-freebsd-x64@1.32.0: optional: true - lightningcss-freebsd-x64@1.33.0: - optional: true - lightningcss-linux-arm-gnueabihf@1.32.0: optional: true - lightningcss-linux-arm-gnueabihf@1.33.0: - optional: true - lightningcss-linux-arm64-gnu@1.32.0: optional: true - lightningcss-linux-arm64-gnu@1.33.0: - optional: true - lightningcss-linux-arm64-musl@1.32.0: optional: true - lightningcss-linux-arm64-musl@1.33.0: - optional: true - lightningcss-linux-x64-gnu@1.32.0: optional: true - lightningcss-linux-x64-gnu@1.33.0: - optional: true - lightningcss-linux-x64-musl@1.32.0: optional: true - lightningcss-linux-x64-musl@1.33.0: - optional: true - lightningcss-win32-arm64-msvc@1.32.0: optional: true - lightningcss-win32-arm64-msvc@1.33.0: - optional: true - lightningcss-win32-x64-msvc@1.32.0: optional: true - lightningcss-win32-x64-msvc@1.33.0: - optional: true - lightningcss@1.32.0: dependencies: detect-libc: 2.1.2 @@ -40692,62 +38445,48 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 - lightningcss@1.33.0: - dependencies: - detect-libc: 2.1.2 - optionalDependencies: - lightningcss-android-arm64: 1.33.0 - lightningcss-darwin-arm64: 1.33.0 - lightningcss-darwin-x64: 1.33.0 - lightningcss-freebsd-x64: 1.33.0 - lightningcss-linux-arm-gnueabihf: 1.33.0 - lightningcss-linux-arm64-gnu: 1.33.0 - lightningcss-linux-arm64-musl: 1.33.0 - lightningcss-linux-x64-gnu: 1.33.0 - lightningcss-linux-x64-musl: 1.33.0 - lightningcss-win32-arm64-msvc: 1.33.0 - lightningcss-win32-x64-msvc: 1.33.0 - lilconfig@2.1.0: {} lines-and-columns@1.2.4: {} lines-and-columns@2.0.3: {} - listhen@1.10.1(srvx@1.0.5): + listhen@1.9.0: dependencies: - '@parcel/watcher-wasm': 2.6.0 - citty: 0.2.2 + '@parcel/watcher': 2.5.1 + '@parcel/watcher-wasm': 2.5.1 + citty: 0.1.6 + clipboardy: 4.0.0 consola: 3.4.2 - crossws: 0.4.12(srvx@1.0.5) - defu: 6.1.7 + crossws: 0.3.5 + defu: 6.1.4 get-port-please: 3.2.0 - h3: 1.15.11 + h3: 1.15.5 http-shutdown: 1.2.2 jiti: 2.7.0 - node-forge: 1.4.0 - pathe: 2.0.3 - std-env: 4.2.0 - tinyclip: 0.1.15 - ufo: 1.6.4 - untun: 0.2.2 - uqr: 0.1.3 - transitivePeerDependencies: - - srvx + mlly: 1.8.0 + node-forge: 1.3.1 + pathe: 1.1.2 + std-env: 3.10.0 + ufo: 1.6.3 + untun: 0.1.3 + uqr: 0.1.2 loader-runner@4.3.0: {} - loader-utils@2.0.4: - dependencies: - big.js: 5.2.2 - emojis-list: 3.0.0 - json5: 2.2.3 + loader-runner@4.3.1: {} local-pkg@0.5.1: dependencies: mlly: 1.8.0 pkg-types: 1.3.1 + local-pkg@1.1.2: + dependencies: + mlly: 1.8.0 + pkg-types: 2.3.0 + quansync: 0.2.11 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -40766,10 +38505,14 @@ snapshots: lodash.clonedeep@4.5.0: {} + lodash.defaults@4.2.0: {} + lodash.flatten@4.4.0: {} lodash.includes@4.3.0: {} + lodash.isarguments@3.1.0: {} + lodash.isboolean@3.0.3: {} lodash.isinteger@4.0.4: {} @@ -40814,6 +38557,8 @@ snapshots: lru-cache@10.4.3: {} + lru-cache@11.2.2: {} + lru-cache@11.5.1: {} lru-cache@5.1.1: @@ -40838,15 +38583,13 @@ snapshots: magic-string@0.30.8: dependencies: - '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/sourcemap-codec': 1.5.5 - magic-string@1.4.3: + magicast@0.5.1: dependencies: - '@jridgewell/sourcemap-codec': 1.6.0 - - magic-string@1.4.5: - dependencies: - '@jridgewell/sourcemap-codec': 1.6.0 + '@babel/parser': 7.28.5 + '@babel/types': 7.29.0 + source-map-js: 1.2.1 manage-path@2.0.0: {} @@ -40876,6 +38619,8 @@ snapshots: mdn-data@2.0.28: {} + mdn-data@2.12.2: {} + mdn-data@2.27.1: {} media-typer@0.3.0: {} @@ -40930,6 +38675,8 @@ snapshots: mime@1.6.0: {} + mime@4.1.0: {} + mimic-fn@2.1.0: {} mimic-fn@4.0.0: {} @@ -40948,24 +38695,11 @@ snapshots: - bufferutil - utf-8-validate - miniflare@5.20261104.0-beta(@types/node@25.0.9): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - sharp: 0.35.5(@types/node@25.0.9) - undici: 7.30.1 - workerd: 1.20261104.1 - ws: 8.21.0 - youch: 4.1.0-beta.10 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - utf-8-validate - minimalistic-assert@1.0.1: {} minimatch@10.2.5: dependencies: - brace-expansion: 5.0.9 + brace-expansion: 5.0.6 minimatch@3.0.8: dependencies: @@ -40975,6 +38709,10 @@ snapshots: dependencies: brace-expansion: 1.1.15 + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.1 + minimatch@9.0.1: dependencies: brace-expansion: 2.1.1 @@ -40985,24 +38723,6 @@ snapshots: minimist@1.2.8: {} - minimizer-webpack-plugin@5.10.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack@5.110.3): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - terser: 5.51.2 - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - optionalDependencies: - '@swc/core': 1.15.33(@swc/helpers@0.5.23) - clean-css: 5.3.3 - csso: 5.0.5 - esbuild: 0.28.1 - html-minifier-terser: 6.1.0 - lightningcss: 1.33.0 - postcss: 8.5.29 - sharp: 0.35.5(@types/node@25.0.9) - svgo: 4.0.0 - minipass@7.1.2: {} minizlib@3.0.1: @@ -41010,10 +38730,6 @@ snapshots: minipass: 7.1.2 rimraf: 5.0.10 - minizlib@3.1.0: - dependencies: - minipass: 7.1.2 - mkdirp@3.0.1: {} mlly@1.8.0: @@ -41021,15 +38737,13 @@ snapshots: acorn: 8.15.0 pathe: 2.0.3 pkg-types: 1.3.1 - ufo: 1.6.4 + ufo: 1.6.3 module-definition@6.0.1: dependencies: ast-module-types: 6.0.1 node-source-walk: 7.0.1 - module-details-from-path@1.0.4: {} - motion-dom@11.18.1: dependencies: motion-utils: 11.18.1 @@ -41044,58 +38758,7 @@ snapshots: ms@2.1.3: {} - msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2): - dependencies: - '@inquirer/confirm': 6.3.2(@types/node@25.0.9) - '@mswjs/interceptors': 0.41.9 - '@open-draft/deferred-promise': 3.0.0 - '@types/statuses': 2.0.6 - cookie: 1.1.1 - graphql: 16.14.2 - headers-polyfill: 5.0.1 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - picocolors: 1.1.1 - rettime: 0.11.11 - statuses: 2.0.2 - strict-event-emitter: 0.5.1 - tough-cookie: 6.0.1 - type-fest: 5.9.0 - until-async: 3.0.2 - yargs: 17.7.2 - optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - '@types/node' - - msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2): - dependencies: - '@inquirer/confirm': 6.3.2(@types/node@25.0.9) - '@mswjs/interceptors': 0.41.9 - '@open-draft/deferred-promise': 3.0.0 - '@types/statuses': 2.0.6 - cookie: 1.1.1 - graphql: 16.14.2 - headers-polyfill: 5.0.1 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - picocolors: 1.1.1 - rettime: 0.11.11 - statuses: 2.0.2 - strict-event-emitter: 0.5.1 - tough-cookie: 6.0.1 - type-fest: 5.9.0 - until-async: 3.0.2 - yargs: 17.7.2 - optionalDependencies: - typescript: 5.9.2 - transitivePeerDependencies: - - '@types/node' - optional: true - - msw@2.7.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2): + msw@2.7.0(@types/node@25.0.9)(typescript@5.9.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 @@ -41116,7 +38779,33 @@ snapshots: type-fest: 4.41.0 yargs: 17.7.2 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 5.9.2 + transitivePeerDependencies: + - '@types/node' + optional: true + + msw@2.7.0(@types/node@25.0.9)(typescript@6.0.2): + dependencies: + '@bundled-es-modules/cookie': 2.0.1 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 5.1.4(@types/node@25.0.9) + '@mswjs/interceptors': 0.37.6 + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + graphql: 16.10.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.3.0 + picocolors: 1.1.1 + strict-event-emitter: 0.5.1 + type-fest: 4.41.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 6.0.2 transitivePeerDependencies: - '@types/node' @@ -41129,8 +38818,6 @@ snapshots: mute-stream@2.0.0: {} - mute-stream@3.0.0: {} - mysql2@3.15.3: dependencies: aws-ssl-profiles: 1.1.2 @@ -41155,9 +38842,7 @@ snapshots: nanoid@3.3.11: {} - nanoid@3.3.18: {} - - nanoid@3.3.19: {} + nanoid@3.3.12: {} nanostores@1.3.0: {} @@ -41175,90 +38860,222 @@ snapshots: netlify-redirector@0.5.0: {} - next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.105.1): - dependencies: - '@next/env': 16.3.4 - '@swc/helpers': 0.5.23 - baseline-browser-mapping: 2.11.23 - caniuse-lite: 1.0.30001760 - postcss: 8.5.23 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - styled-jsx: 5.1.6(@babel/core@7.29.7(supports-color@10.2.2))(babel-plugin-macros@3.1.0)(react@19.2.9) - optionalDependencies: - '@next/swc-darwin-arm64': 16.3.4 - '@next/swc-darwin-x64': 16.3.4 - '@next/swc-linux-arm64-gnu': 16.3.4 - '@next/swc-linux-arm64-musl': 16.3.4 - '@next/swc-linux-x64-gnu': 16.3.4 - '@next/swc-linux-x64-musl': 16.3.4 - '@next/swc-win32-arm64-msvc': 16.3.4 - '@next/swc-win32-x64-msvc': 16.3.4 - '@opentelemetry/api': 1.9.1 - '@playwright/test': 1.63.0 - babel-plugin-react-compiler: 1.0.0 - sass: 1.105.1 - sharp: 0.35.4(@types/node@25.0.9) - transitivePeerDependencies: - - '@babel/core' - - '@types/node' - - babel-plugin-macros - optional: true + nf3@0.3.11: {} - next@16.3.4(@babel/core@7.29.7(supports-color@10.2.2))(@opentelemetry/api@1.9.1)(@playwright/test@1.63.0)(@types/node@25.0.9)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@1.0.0)(react-dom@19.2.9(react@19.2.9))(react@19.2.9)(sass@1.97.2): - dependencies: - '@next/env': 16.3.4 - '@swc/helpers': 0.5.23 - baseline-browser-mapping: 2.11.23 - caniuse-lite: 1.0.30001760 - postcss: 8.5.23 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - styled-jsx: 5.1.6(@babel/core@7.29.7(supports-color@10.2.2))(babel-plugin-macros@3.1.0)(react@19.2.9) - optionalDependencies: - '@next/swc-darwin-arm64': 16.3.4 - '@next/swc-darwin-x64': 16.3.4 - '@next/swc-linux-arm64-gnu': 16.3.4 - '@next/swc-linux-arm64-musl': 16.3.4 - '@next/swc-linux-x64-gnu': 16.3.4 - '@next/swc-linux-x64-musl': 16.3.4 - '@next/swc-win32-arm64-msvc': 16.3.4 - '@next/swc-win32-x64-msvc': 16.3.4 - '@opentelemetry/api': 1.9.1 - '@playwright/test': 1.63.0 - babel-plugin-react-compiler: 1.0.0 - sass: 1.97.2 - sharp: 0.35.4(@types/node@25.0.9) - transitivePeerDependencies: - - '@babel/core' - - '@types/node' - - babel-plugin-macros + nf3@0.3.6: {} - nf3@0.3.24: {} - - nitro@3.0.260903-beta: + nitro@3.0.1-alpha.2(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(ioredis@5.9.2)(lru-cache@11.5.1)(mysql2@3.15.3)(rolldown@1.0.2)(rollup@4.56.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)): dependencies: consola: 3.4.2 - crossws: 0.4.12(srvx@1.0.5) - db0: 0.4.1 - env-runner: 0.2.3 - h3: 2.0.1-rc.32(crossws@0.4.12(srvx@1.0.5))(ocache@0.3.0) - hookable: 6.1.2 - nf3: 0.3.24 - ocache: 0.3.0 - rolldown: 1.2.13 - rou3: 0.9.2 - srvx: 1.0.5 + crossws: 0.4.3(srvx@0.10.1) + db0: 0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3) + h3: 2.0.1-rc.14(crossws@0.4.3(srvx@0.10.1)) + jiti: 2.6.1 + nf3: 0.3.6 + ofetch: 2.0.0-alpha.3 + ohash: 2.0.11 + oxc-minify: 0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + oxc-transform: 0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + srvx: 0.10.1 + undici: 7.24.4 unenv: 2.0.0-rc.24 - unstorage: 2.0.0-alpha.10 + unstorage: 2.0.0-alpha.5(@netlify/blobs@10.1.0)(chokidar@5.0.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3) + optionalDependencies: + rolldown: 1.0.2 + rollup: 4.56.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) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@electric-sql/pglite' + - '@emnapi/core' + - '@emnapi/runtime' + - '@libsql/client' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - better-sqlite3 + - chokidar + - drizzle-orm + - idb-keyval + - ioredis + - lru-cache + - mongodb + - mysql2 + - sqlite3 + - uploadthing + + nitro@3.0.260311-beta(@electric-sql/pglite@0.3.2)(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(chokidar@5.0.0)(dotenv@17.4.2)(giget@2.0.0)(jiti@2.7.0)(lru-cache@11.5.1)(miniflare@4.20260317.0)(mysql2@3.15.3)(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.4(srvx@0.11.15) + db0: 0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3) + env-runner: 0.1.6(miniflare@4.20260317.0) + h3: 2.0.1-rc.16(crossws@0.4.4(srvx@0.11.15)) + hookable: 6.1.0 + nf3: 0.3.11 + ocache: 0.1.2 + ofetch: 2.0.0-alpha.3 + ohash: 2.0.11 + rolldown: 1.0.0-rc.9(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + srvx: 0.11.15 + unenv: 2.0.0-rc.24 + unstorage: 2.0.0-alpha.6(@netlify/blobs@10.1.0)(chokidar@5.0.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3) + optionalDependencies: + dotenv: 17.4.2 + giget: 2.0.0 + jiti: 2.7.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) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@electric-sql/pglite' + - '@emnapi/core' + - '@emnapi/runtime' + - '@libsql/client' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - better-sqlite3 + - chokidar + - drizzle-orm + - idb-keyval + - ioredis + - lru-cache + - miniflare + - mongodb + - mysql2 + - sqlite3 + - uploadthing + + nitropack@2.13.1(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(@netlify/blobs@10.1.0)(mysql2@3.15.3)(rolldown@1.0.2): + dependencies: + '@cloudflare/kv-asset-handler': 0.4.2 + '@rollup/plugin-alias': 6.0.0(rollup@4.56.0) + '@rollup/plugin-commonjs': 29.0.0(rollup@4.56.0) + '@rollup/plugin-inject': 5.0.5(rollup@4.56.0) + '@rollup/plugin-json': 6.1.0(rollup@4.56.0) + '@rollup/plugin-node-resolve': 16.0.3(rollup@4.56.0) + '@rollup/plugin-replace': 6.0.3(rollup@4.56.0) + '@rollup/plugin-terser': 0.4.4(rollup@4.56.0) + '@vercel/nft': 1.3.0(rollup@4.56.0) + archiver: 7.0.1 + c12: 3.3.3(magicast@0.5.1) + chokidar: 5.0.0 + citty: 0.1.6 + compatx: 0.2.0 + confbox: 0.2.2 + consola: 3.4.2 + cookie-es: 2.0.0 + croner: 9.1.0 + crossws: 0.3.5 + db0: 0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3) + defu: 6.1.4 + destr: 2.0.5 + dot-prop: 10.1.0 + esbuild: 0.27.4 + escape-string-regexp: 5.0.0 + etag: 1.8.1 + exsolve: 1.0.8 + globby: 16.1.0 + gzip-size: 7.0.0 + h3: 1.15.5 + hookable: 5.5.3 + httpxy: 0.1.7 + ioredis: 5.9.2 + jiti: 2.6.1 + klona: 2.0.6 + knitwork: 1.3.0 + listhen: 1.9.0 + magic-string: 0.30.21 + magicast: 0.5.1 + mime: 4.1.0 + mlly: 1.8.0 + node-fetch-native: 1.6.7 + node-mock-http: 1.0.4 + ofetch: 1.5.1 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 2.0.0 + pkg-types: 2.3.0 + pretty-bytes: 7.1.0 + radix3: 1.1.2 + rollup: 4.56.0 + rollup-plugin-visualizer: 6.0.5(rolldown@1.0.2)(rollup@4.56.0) + scule: 1.3.0 + semver: 7.7.3 + serve-placeholder: 2.0.2 + serve-static: 2.2.1 + source-map: 0.7.6 + std-env: 3.10.0 + ufo: 1.6.3 + ultrahtml: 1.6.0 + uncrypto: 0.1.3 + unctx: 2.5.0 + unenv: 2.0.0-rc.24 + unimport: 5.6.0 + unplugin-utils: 0.3.1 + unstorage: 1.17.4(@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.9.2) + untyped: 2.0.0 + unwasm: 0.5.3 + youch: 4.1.0-beta.13 + youch-core: 0.3.3 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@electric-sql/pglite' + - '@libsql/client' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - bare-abort-controller + - bare-buffer + - better-sqlite3 + - drizzle-orm + - encoding + - idb-keyval + - mysql2 + - rolldown + - sqlite3 + - supports-color + - uploadthing no-case@3.0.4: dependencies: lower-case: 2.0.2 tslib: 2.8.1 - node-addon-api@7.1.1: - optional: true + node-addon-api@7.1.1: {} node-domexception@1.0.0: {} @@ -41283,8 +39100,6 @@ snapshots: node-forge@1.3.1: {} - node-forge@1.4.0: {} - node-gyp-build@3.9.0: {} node-gyp-build@4.8.4: {} @@ -41297,7 +39112,7 @@ snapshots: node-source-walk@7.0.1: dependencies: - '@babel/parser': 7.29.8 + '@babel/parser': 7.29.2 node-stream-zip@1.15.0: {} @@ -41312,13 +39127,7 @@ snapshots: normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 - semver: 7.8.5 - validate-npm-package-license: 3.0.4 - - normalize-package-data@8.0.0: - dependencies: - hosted-git-info: 9.0.3 - semver: 7.8.5 + semver: 7.8.2 validate-npm-package-license: 3.0.4 normalize-path@2.1.1: @@ -41341,10 +39150,8 @@ snapshots: nwsapi@2.2.16: {} - nx@24.0.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@10.2.2))(@swc/core@1.15.33(@swc/helpers@0.5.23)): + nx@22.7.5(@swc-node/register@1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2))(@swc/core@1.15.33(@swc/helpers@0.5.23))(debug@4.4.3): dependencies: - '@clack/core': 1.4.3 - '@clack/prompts': 1.7.0 '@emnapi/core': 1.4.5 '@emnapi/runtime': 1.4.5 '@emnapi/wasi-threads': 1.0.4 @@ -41353,14 +39160,18 @@ snapshots: '@tybys/wasm-util': 0.9.0 '@yarnpkg/lockfile': 1.1.0 '@zkochan/js-yaml': 0.0.7 + ansi-colors: 4.1.3 ansi-regex: 5.0.1 ansi-styles: 4.3.0 argparse: 2.0.1 + asynckit: 0.4.0 + axios: 1.16.0(debug@4.4.3) balanced-match: 4.0.3 base64-js: 1.5.1 bl: 4.1.0 - brace-expansion: 5.0.12 + brace-expansion: 5.0.6 buffer: 5.7.1 + call-bind-apply-helpers: 1.0.2 chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -41368,63 +39179,83 @@ snapshots: clone: 1.0.4 color-convert: 2.0.1 color-name: 1.1.4 + combined-stream: 1.0.8 defaults: 1.0.4 + define-lazy-prop: 2.0.0 + delayed-stream: 1.0.0 dotenv: 16.4.7 dotenv-expand: 12.0.3 + dunder-proto: 1.0.1 ejs: 5.0.1 emoji-regex: 8.0.0 end-of-stream: 1.4.5 + enquirer: 2.3.6 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + es-set-tostringtag: 2.1.0 escalade: 3.2.0 escape-string-regexp: 1.0.5 - fast-string-truncated-width: 3.0.3 - fast-string-width: 3.0.2 - fast-wrap-ansi: 0.2.0 figures: 3.2.0 + flat: 5.0.2 + follow-redirects: 1.16.0(debug@4.4.3) + form-data: 4.0.5 fs-constants: 1.0.0 + function-bind: 1.1.2 get-caller-file: 2.0.5 + get-intrinsic: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 has-flag: 4.0.0 + has-symbols: 1.1.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 ieee754: 1.2.1 - ignore: 7.0.12 + ignore: 7.0.5 inherits: 2.0.4 + is-docker: 2.2.1 is-fullwidth-code-point: 3.0.0 is-interactive: 1.0.0 is-unicode-supported: 0.1.0 - isexe: 2.0.0 + is-wsl: 2.2.0 json5: 2.2.3 - jsonc-parser: 3.3.1 + jsonc-parser: 3.2.0 lines-and-columns: 2.0.3 log-symbols: 4.1.0 + math-intrinsics: 1.1.0 + mime-db: 1.52.0 + mime-types: 2.1.35 mimic-fn: 2.1.0 minimatch: 10.2.5 minimist: 1.2.8 npm-run-path: 4.0.1 once: 1.4.0 onetime: 5.1.2 - ora: 5.4.1 + open: 8.4.2 + ora: 5.3.0 path-key: 3.1.1 picocolors: 1.1.1 + proxy-from-env: 2.1.0 readable-stream: 3.6.2 require-directory: 2.1.1 resolve.exports: 2.0.3 restore-cursor: 3.1.0 safe-buffer: 5.2.1 - semver: 7.8.5 + semver: 7.7.4 signal-exit: 3.0.7 - sisteransi: 1.0.5 - smol-toml: 1.9.0 + smol-toml: 1.6.1 string-width: 4.2.3 string_decoder: 1.3.0 strip-ansi: 6.0.1 strip-bom: 3.0.0 supports-color: 7.2.0 tar-stream: 2.2.0 - tmp: 0.2.7 + tmp: 0.2.6 + tree-kill: 1.2.2 tsconfig-paths: 4.2.0 tslib: 2.8.1 - undici: 7.29.0 util-deprecate: 1.0.2 wcwidth: 1.0.1 - which: 3.0.1 wrap-ansi: 7.0.0 wrappy: 1.0.2 y18n: 5.0.8 @@ -41432,18 +39263,20 @@ snapshots: yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@nx/nx-darwin-arm64': 24.0.0 - '@nx/nx-darwin-x64': 24.0.0 - '@nx/nx-freebsd-x64': 24.0.0 - '@nx/nx-linux-arm-gnueabihf': 24.0.0 - '@nx/nx-linux-arm64-gnu': 24.0.0 - '@nx/nx-linux-arm64-musl': 24.0.0 - '@nx/nx-linux-x64-gnu': 24.0.0 - '@nx/nx-linux-x64-musl': 24.0.0 - '@nx/nx-win32-arm64-msvc': 24.0.0 - '@nx/nx-win32-x64-msvc': 24.0.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@10.2.2) + '@nx/nx-darwin-arm64': 22.7.5 + '@nx/nx-darwin-x64': 22.7.5 + '@nx/nx-freebsd-x64': 22.7.5 + '@nx/nx-linux-arm-gnueabihf': 22.7.5 + '@nx/nx-linux-arm64-gnu': 22.7.5 + '@nx/nx-linux-arm64-musl': 22.7.5 + '@nx/nx-linux-x64-gnu': 22.7.5 + '@nx/nx-linux-x64-musl': 22.7.5 + '@nx/nx-win32-arm64-msvc': 22.7.5 + '@nx/nx-win32-x64-msvc': 22.7.5 + '@swc-node/register': 1.11.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@swc/core@1.15.33(@swc/helpers@0.5.23))(@swc/types@0.1.26)(typescript@6.0.2) '@swc/core': 1.15.33(@swc/helpers@0.5.23) + transitivePeerDependencies: + - debug nypm@0.6.0: dependencies: @@ -41477,21 +39310,24 @@ snapshots: obuf@1.1.2: {} - obug@2.1.1: - optional: true + obug@2.1.1: {} - obug@3.0.0: {} - - ocache@0.3.0: {} + ocache@0.1.2: + dependencies: + ohash: 2.0.11 ofetch@1.5.1: dependencies: destr: 2.0.5 node-fetch-native: 1.6.7 - ufo: 1.6.4 + ufo: 1.6.3 + + ofetch@2.0.0-alpha.3: {} ohash@2.0.11: {} + omit.js@2.0.2: {} + on-exit-leak-free@2.1.2: {} on-finished@2.4.1: @@ -41525,7 +39361,13 @@ snapshots: default-browser: 5.2.1 define-lazy-prop: 3.0.0 is-inside-container: 1.0.0 - is-wsl: 3.1.0 + is-wsl: 3.1.1 + + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 optionator@0.9.4: dependencies: @@ -41536,14 +39378,13 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@5.4.1: + ora@5.3.0: dependencies: bl: 4.1.0 chalk: 4.1.2 cli-cursor: 3.1.0 - cli-spinners: 2.9.2 + cli-spinners: 2.6.1 is-interactive: 1.0.0 - is-unicode-supported: 0.1.0 log-symbols: 4.1.0 strip-ansi: 6.0.1 wcwidth: 1.0.1 @@ -41552,7 +39393,33 @@ snapshots: outvariant@1.4.3: {} - oxc-resolver@11.19.1(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3): + oxc-minify@0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2): + optionalDependencies: + '@oxc-minify/binding-android-arm-eabi': 0.110.0 + '@oxc-minify/binding-android-arm64': 0.110.0 + '@oxc-minify/binding-darwin-arm64': 0.110.0 + '@oxc-minify/binding-darwin-x64': 0.110.0 + '@oxc-minify/binding-freebsd-x64': 0.110.0 + '@oxc-minify/binding-linux-arm-gnueabihf': 0.110.0 + '@oxc-minify/binding-linux-arm-musleabihf': 0.110.0 + '@oxc-minify/binding-linux-arm64-gnu': 0.110.0 + '@oxc-minify/binding-linux-arm64-musl': 0.110.0 + '@oxc-minify/binding-linux-ppc64-gnu': 0.110.0 + '@oxc-minify/binding-linux-riscv64-gnu': 0.110.0 + '@oxc-minify/binding-linux-riscv64-musl': 0.110.0 + '@oxc-minify/binding-linux-s390x-gnu': 0.110.0 + '@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.2)(@emnapi/runtime@1.11.2) + '@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 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + + oxc-resolver@11.19.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2): optionalDependencies: '@oxc-resolver/binding-android-arm-eabi': 11.19.1 '@oxc-resolver/binding-android-arm64': 11.19.1 @@ -41570,7 +39437,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.3)(@emnapi/runtime@1.11.3) + '@oxc-resolver/binding-wasm32-wasi': 11.19.1(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) '@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 @@ -41578,6 +39445,32 @@ snapshots: - '@emnapi/core' - '@emnapi/runtime' + oxc-transform@0.110.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2): + optionalDependencies: + '@oxc-transform/binding-android-arm-eabi': 0.110.0 + '@oxc-transform/binding-android-arm64': 0.110.0 + '@oxc-transform/binding-darwin-arm64': 0.110.0 + '@oxc-transform/binding-darwin-x64': 0.110.0 + '@oxc-transform/binding-freebsd-x64': 0.110.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.110.0 + '@oxc-transform/binding-linux-arm-musleabihf': 0.110.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.110.0 + '@oxc-transform/binding-linux-arm64-musl': 0.110.0 + '@oxc-transform/binding-linux-ppc64-gnu': 0.110.0 + '@oxc-transform/binding-linux-riscv64-gnu': 0.110.0 + '@oxc-transform/binding-linux-riscv64-musl': 0.110.0 + '@oxc-transform/binding-linux-s390x-gnu': 0.110.0 + '@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.2)(@emnapi/runtime@1.11.2) + '@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 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + p-event@6.0.1: dependencies: p-timeout: 6.1.4 @@ -41624,6 +39517,10 @@ snapshots: p-try@2.2.0: {} + p-wait-for@5.0.2: + dependencies: + p-timeout: 6.1.4 + package-json-from-dist@1.0.1: {} package-manager-detector@0.2.11: @@ -41652,14 +39549,14 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.29.7 + '@babel/code-frame': 7.27.1 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 parse-json@8.3.0: dependencies: - '@babel/code-frame': 7.29.7 + '@babel/code-frame': 7.27.1 index-to-position: 1.2.0 type-fest: 4.41.0 @@ -41714,7 +39611,7 @@ snapshots: path-scurry@2.0.0: dependencies: - lru-cache: 11.5.1 + lru-cache: 11.2.2 minipass: 7.1.2 path-to-regexp@0.1.12: {} @@ -41727,13 +39624,21 @@ snapshots: path-type@6.0.0: {} + pathe@1.1.2: {} + pathe@2.0.3: {} pend@1.2.0: {} perfect-debounce@1.0.0: {} - pg-gateway@0.3.0-beta.4: {} + perfect-debounce@2.0.0: {} + + periscopic@4.0.2: + dependencies: + '@types/estree': 1.0.8 + is-reference: 3.0.3 + zimmerframe: 1.1.4 picocolors@1.1.1: {} @@ -41741,7 +39646,7 @@ snapshots: picomatch@4.0.3: {} - picomatch@4.0.7: {} + picomatch@4.0.4: {} picoquery@2.5.0: {} @@ -41782,7 +39687,7 @@ snapshots: pkg-types@2.3.0: dependencies: confbox: 0.2.2 - exsolve: 1.1.1 + exsolve: 1.0.8 pathe: 2.0.3 pkijs@3.4.0: @@ -41794,22 +39699,26 @@ snapshots: pvutils: 1.1.3 tslib: 2.8.1 - playwright-core@1.63.0: {} + playwright-core@1.58.0: {} - playwright@1.63.0: + playwright@1.58.0: dependencies: - playwright-core: 1.63.0 + playwright-core: 1.58.0 + optionalDependencies: + fsevents: 2.3.2 + + pngjs@7.0.0: {} possible-typed-array-names@1.1.0: {} - postcss-loader@8.2.0(@typescript/typescript6@6.0.2)(postcss@8.5.6)(webpack@5.97.1): + postcss-loader@8.2.0(postcss@8.5.6)(typescript@6.0.2)(webpack@5.97.1): dependencies: - cosmiconfig: 9.0.0(@typescript/typescript6@6.0.2) + cosmiconfig: 9.0.0(typescript@6.0.2) jiti: 2.6.1 postcss: 8.5.6 semver: 7.7.3 optionalDependencies: - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) transitivePeerDependencies: - typescript @@ -41846,25 +39755,19 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss-values-parser@6.0.2(postcss@8.5.29): + postcss-values-parser@6.0.2(postcss@8.5.8): dependencies: color-name: 1.1.4 is-url-superb: 4.0.0 - postcss: 8.5.29 + postcss: 8.5.8 quote-unquote: 1.0.0 - postcss@8.5.23: + postcss@8.5.15: dependencies: - nanoid: 3.3.18 + nanoid: 3.3.12 picocolors: 1.1.1 source-map-js: 1.2.1 - postcss@8.5.29: - dependencies: - nanoid: 3.3.19 - picocolors: 1.1.1 - source-map-js: 1.2.2 - postcss@8.5.3: dependencies: nanoid: 3.3.11 @@ -41891,32 +39794,28 @@ snapshots: dependencies: pprof-format: 2.2.1 - pprof-to-md@0.2.0: - dependencies: - pprof-format: 2.2.1 - preact-render-to-string@6.5.11(preact@10.24.3): dependencies: preact: 10.24.3 preact@10.24.3: {} - precinct@12.2.0(supports-color@10.2.2): + precinct@12.2.0: dependencies: '@dependents/detective-less': 5.0.1 commander: 12.1.0 detective-amd: 6.0.1 detective-cjs: 6.0.1 detective-es6: 5.0.1 - detective-postcss: 7.0.1(postcss@8.5.29) + detective-postcss: 7.0.1(postcss@8.5.8) detective-sass: 6.0.1 detective-scss: 5.0.1 detective-stylus: 5.0.1 - detective-typescript: 14.0.0(supports-color@10.2.2)(typescript@5.9.3) - detective-vue2: 2.2.0(supports-color@10.2.2)(typescript@5.9.3) + detective-typescript: 14.0.0(typescript@5.9.3) + detective-vue2: 2.2.0(typescript@5.9.3) module-definition: 6.0.1 node-source-walk: 7.0.1 - postcss: 8.5.29 + postcss: 8.5.8 typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -41927,14 +39826,16 @@ snapshots: prettier@3.4.2: {} + prettier@3.5.0: {} + prettier@3.6.2: {} prettier@3.8.1: {} - prettier@3.9.6: {} - pretty-bytes@5.6.0: {} + pretty-bytes@7.1.0: {} + pretty-error@4.0.0: dependencies: lodash: 4.17.21 @@ -41946,16 +39847,16 @@ snapshots: ansi-styles: 5.2.0 react-is: 17.0.2 - prisma@7.0.0(@types/react@19.2.9)(@typescript/typescript6@6.0.2)(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + prisma@7.0.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)(typescript@6.0.2): dependencies: '@prisma/config': 7.0.0 - '@prisma/dev': 0.13.0(@typescript/typescript6@6.0.2) + '@prisma/dev': 0.13.0(typescript@6.0.2) '@prisma/engines': 7.0.0 - '@prisma/studio-core-licensed': 0.8.0(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) + '@prisma/studio-core-licensed': 0.8.0(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) mysql2: 3.15.3 postgres: 3.4.7 optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 transitivePeerDependencies: - '@types/react' - magicast @@ -42038,6 +39939,11 @@ snapshots: picocolors: 1.1.1 sade: 1.8.1 + pump@3.0.3: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + punycode@2.3.1: {} pure-rand@6.1.0: {} @@ -42066,60 +39972,60 @@ snapshots: quote-unquote@1.0.0: {} - radix-ui@1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + radix-ui@1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@radix-ui/primitive': 1.1.2 - '@radix-ui/react-accessible-icon': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-accordion': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-alert-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-aspect-ratio': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-avatar': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-checkbox': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-context-menu': 2.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-dropdown-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-form': 0.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-hover-card': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-label': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-menubar': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-navigation-menu': 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-popover': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-progress': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-radio-group': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-scroll-area': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-select': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-separator': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slider': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-switch': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-tabs': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toast': 1.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toggle': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toggle-group': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-toolbar': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-tooltip': 1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.9) - '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.9(react@19.2.9))(react@19.2.9) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@radix-ui/react-accessible-icon': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-accordion': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-alert-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-aspect-ratio': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-avatar': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-checkbox': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collapsible': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-collection': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-context-menu': 2.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dialog': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-dismissable-layer': 1.1.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-dropdown-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-focus-guards': 1.1.2(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-focus-scope': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-form': 0.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-hover-card': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-label': 2.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-menu': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-menubar': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-navigation-menu': 1.2.6(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popover': 1.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-popper': 1.2.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-portal': 1.1.5(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-presence': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-primitive': 2.0.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-progress': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-radio-group': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-roving-focus': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-scroll-area': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-select': 2.1.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-separator': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slider': 1.2.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-slot': 1.2.0(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-switch': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-tabs': 1.1.4(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toast': 1.2.7(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toggle-group': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-toolbar': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-tooltip': 1.2.0(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-controllable-state': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.9)(react@19.2.3) + '@radix-ui/react-visually-hidden': 1.1.3(@types/react-dom@19.2.3(@types/react@19.2.9))(@types/react@19.2.9)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 '@types/react-dom': 19.2.3(@types/react@19.2.9) @@ -42151,17 +40057,17 @@ snapshots: defu: 6.1.4 destr: 2.0.5 - react-dom@19.2.9(react@19.2.9): + react-dom@19.2.3(react@19.2.3): dependencies: - react: 19.2.9 + react: 19.2.3 scheduler: 0.27.0 - react-hot-toast@2.5.1(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + react-hot-toast@2.5.1(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: csstype: 3.1.3 goober: 2.1.16(csstype@3.1.3) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) react-is@16.13.1: {} @@ -42174,62 +40080,66 @@ snapshots: gl-matrix: 3.4.4 pprof-format: 2.2.1 protobufjs: 7.5.4 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + + react-refresh@0.14.2: {} + + react-refresh@0.17.0: {} react-refresh@0.18.0: {} - react-remove-scroll-bar@2.3.8(@types/react@19.2.9)(react@19.2.9): + react-remove-scroll-bar@2.3.8(@types/react@19.2.9)(react@19.2.3): dependencies: - react: 19.2.9 - react-style-singleton: 2.2.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-style-singleton: 2.2.3(@types/react@19.2.9)(react@19.2.3) tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.9 - react-remove-scroll@2.6.3(@types/react@19.2.9)(react@19.2.9): + react-remove-scroll@2.6.3(@types/react@19.2.9)(react@19.2.3): dependencies: - react: 19.2.9 - react-remove-scroll-bar: 2.3.8(@types/react@19.2.9)(react@19.2.9) - react-style-singleton: 2.2.3(@types/react@19.2.9)(react@19.2.9) + react: 19.2.3 + react-remove-scroll-bar: 2.3.8(@types/react@19.2.9)(react@19.2.3) + react-style-singleton: 2.2.3(@types/react@19.2.9)(react@19.2.3) tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.2.9)(react@19.2.9) - use-sidecar: 1.1.3(@types/react@19.2.9)(react@19.2.9) + use-callback-ref: 1.3.3(@types/react@19.2.9)(react@19.2.3) + use-sidecar: 1.1.3(@types/react@19.2.9)(react@19.2.3) optionalDependencies: '@types/react': 19.2.9 - react-server-dom-rspack@0.1.1(@rspack/core@2.2.7(@swc/helpers@0.5.23))(react-dom@19.2.9(react@19.2.9))(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): dependencies: - '@rspack/core': 2.2.7(@swc/helpers@0.5.23) - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + '@rspack/core': 2.0.0(@swc/helpers@0.5.23) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - react-style-singleton@2.2.3(@types/react@19.2.9)(react@19.2.9): + react-style-singleton@2.2.3(@types/react@19.2.9)(react@19.2.3): dependencies: get-nonce: 1.0.1 - react: 19.2.9 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.9 - react-transition-group@4.4.5(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + react-transition-group@4.4.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@babel/runtime': 7.26.7 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - react-tweet@3.3.0(react-dom@19.2.9(react@19.2.9))(react@19.2.9): + react-tweet@3.3.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@swc/helpers': 0.5.15 clsx: 2.1.1 - react: 19.2.9 - react-dom: 19.2.9(react@19.2.9) - swr: 2.3.4(react@19.2.9) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + swr: 2.3.4(react@19.2.3) - react@19.2.9: {} + react@19.2.3: {} read-package-up@11.0.0: dependencies: @@ -42237,20 +40147,6 @@ snapshots: read-pkg: 9.0.1 type-fest: 4.41.0 - read-package-up@12.0.0: - dependencies: - find-up-simple: 1.0.1 - read-pkg: 10.1.0 - type-fest: 5.9.0 - - read-pkg@10.1.0: - dependencies: - '@types/normalize-package-data': 2.4.4 - normalize-package-data: 8.0.0 - parse-json: 8.3.0 - type-fest: 5.9.0 - unicorn-magic: 0.4.0 - read-pkg@9.0.1: dependencies: '@types/normalize-package-data': 2.4.4 @@ -42290,9 +40186,9 @@ snapshots: process: 0.11.10 string_decoder: 1.3.0 - readdir-glob@3.0.0: + readdir-glob@1.1.3: dependencies: - minimatch: 10.2.5 + minimatch: 5.1.9 readdirp@3.6.0: dependencies: @@ -42306,7 +40202,7 @@ snapshots: rechoir@0.8.0: dependencies: - resolve: 1.22.11 + resolve: 1.22.10 redaxios@0.5.1: {} @@ -42315,18 +40211,14 @@ snapshots: indent-string: 4.0.0 strip-indent: 3.0.0 - redis-errors@1.2.0: - optional: true + redis-errors@1.2.0: {} redis-parser@3.0.0: dependencies: redis-errors: 1.2.0 - optional: true reduce-configs@1.1.1: {} - reduce-configs@2.0.1: {} - reflect-metadata@0.2.2: {} regenerator-runtime@0.14.1: {} @@ -42372,13 +40264,6 @@ snapshots: require-from-string@2.0.2: {} - require-in-the-middle@8.0.1(supports-color@10.2.2): - dependencies: - debug: 4.4.3(supports-color@10.2.2) - module-details-from-path: 1.0.4 - transitivePeerDependencies: - - supports-color - require-package-name@2.0.1: {} requires-port@1.0.0: {} @@ -42395,6 +40280,12 @@ snapshots: resolve.exports@2.0.3: {} + resolve@1.22.10: + dependencies: + is-core-module: 2.16.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + resolve@1.22.11: dependencies: is-core-module: 2.16.1 @@ -42420,8 +40311,6 @@ snapshots: retry@0.13.1: {} - rettime@0.11.11: {} - reusify@1.0.4: {} rfdc@1.4.1: {} @@ -42435,67 +40324,99 @@ snapshots: glob: 13.0.0 package-json-from-dist: 1.0.1 - rolldown@1.2.13: + rolldown@1.0.0-rc.9(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2): dependencies: - '@oxc-project/types': 0.153.0 + '@oxc-project/types': 0.115.0 + '@rolldown/pluginutils': 1.0.0-rc.9 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-x64': 1.0.0-rc.9 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.9 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.9 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.9 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.9 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.9(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.9 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.9 + transitivePeerDependencies: + - '@emnapi/core' + - '@emnapi/runtime' + + rolldown@1.0.2: + dependencies: + '@oxc-project/types': 0.132.0 '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rolldown/binding-android-arm-eabi': 1.2.13 - '@rolldown/binding-android-arm64': 1.2.13 - '@rolldown/binding-darwin-arm64': 1.2.13 - '@rolldown/binding-darwin-x64': 1.2.13 - '@rolldown/binding-freebsd-x64': 1.2.13 - '@rolldown/binding-linux-arm-gnueabihf': 1.2.13 - '@rolldown/binding-linux-arm64-gnu': 1.2.13 - '@rolldown/binding-linux-arm64-musl': 1.2.13 - '@rolldown/binding-linux-ppc64-gnu': 1.2.13 - '@rolldown/binding-linux-s390x-gnu': 1.2.13 - '@rolldown/binding-linux-x64-gnu': 1.2.13 - '@rolldown/binding-linux-x64-musl': 1.2.13 - '@rolldown/binding-openharmony-arm64': 1.2.13 - '@rolldown/binding-win32-arm64-msvc': 1.2.13 - '@rolldown/binding-win32-x64-msvc': 1.2.13 + '@rolldown/binding-android-arm64': 1.0.2 + '@rolldown/binding-darwin-arm64': 1.0.2 + '@rolldown/binding-darwin-x64': 1.0.2 + '@rolldown/binding-freebsd-x64': 1.0.2 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.2 + '@rolldown/binding-linux-arm64-gnu': 1.0.2 + '@rolldown/binding-linux-arm64-musl': 1.0.2 + '@rolldown/binding-linux-ppc64-gnu': 1.0.2 + '@rolldown/binding-linux-s390x-gnu': 1.0.2 + '@rolldown/binding-linux-x64-gnu': 1.0.2 + '@rolldown/binding-linux-x64-musl': 1.0.2 + '@rolldown/binding-openharmony-arm64': 1.0.2 + '@rolldown/binding-wasm32-wasi': 1.0.2 + '@rolldown/binding-win32-arm64-msvc': 1.0.2 + '@rolldown/binding-win32-x64-msvc': 1.0.2 - rollup@4.63.1: + rollup-plugin-visualizer@6.0.5(rolldown@1.0.2)(rollup@4.56.0): dependencies: - '@types/estree': 1.0.9 + open: 8.4.2 + picomatch: 4.0.3 + source-map: 0.7.6 + yargs: 17.7.2 optionalDependencies: - '@napi-rs/lzma-linux-x64-gnu': 1.5.1 - '@rollup/rollup-android-arm-eabi': 4.63.1 - '@rollup/rollup-android-arm64': 4.63.1 - '@rollup/rollup-darwin-arm64': 4.63.1 - '@rollup/rollup-darwin-x64': 4.63.1 - '@rollup/rollup-freebsd-arm64': 4.63.1 - '@rollup/rollup-freebsd-x64': 4.63.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.63.1 - '@rollup/rollup-linux-arm-musleabihf': 4.63.1 - '@rollup/rollup-linux-arm64-gnu': 4.63.1 - '@rollup/rollup-linux-arm64-musl': 4.63.1 - '@rollup/rollup-linux-loong64-gnu': 4.63.1 - '@rollup/rollup-linux-loong64-musl': 4.63.1 - '@rollup/rollup-linux-ppc64-gnu': 4.63.1 - '@rollup/rollup-linux-ppc64-musl': 4.63.1 - '@rollup/rollup-linux-riscv64-gnu': 4.63.1 - '@rollup/rollup-linux-riscv64-musl': 4.63.1 - '@rollup/rollup-linux-s390x-gnu': 4.63.1 - '@rollup/rollup-linux-x64-gnu': 4.63.1 - '@rollup/rollup-linux-x64-musl': 4.63.1 - '@rollup/rollup-openbsd-x64': 4.63.1 - '@rollup/rollup-openharmony-arm64': 4.63.1 - '@rollup/rollup-win32-arm64-msvc': 4.63.1 - '@rollup/rollup-win32-ia32-msvc': 4.63.1 - '@rollup/rollup-win32-x64-gnu': 4.63.1 - '@rollup/rollup-win32-x64-msvc': 4.63.1 + rolldown: 1.0.2 + rollup: 4.56.0 + + rollup@4.56.0: + dependencies: + '@types/estree': 1.0.8 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.56.0 + '@rollup/rollup-android-arm64': 4.56.0 + '@rollup/rollup-darwin-arm64': 4.56.0 + '@rollup/rollup-darwin-x64': 4.56.0 + '@rollup/rollup-freebsd-arm64': 4.56.0 + '@rollup/rollup-freebsd-x64': 4.56.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.56.0 + '@rollup/rollup-linux-arm-musleabihf': 4.56.0 + '@rollup/rollup-linux-arm64-gnu': 4.56.0 + '@rollup/rollup-linux-arm64-musl': 4.56.0 + '@rollup/rollup-linux-loong64-gnu': 4.56.0 + '@rollup/rollup-linux-loong64-musl': 4.56.0 + '@rollup/rollup-linux-ppc64-gnu': 4.56.0 + '@rollup/rollup-linux-ppc64-musl': 4.56.0 + '@rollup/rollup-linux-riscv64-gnu': 4.56.0 + '@rollup/rollup-linux-riscv64-musl': 4.56.0 + '@rollup/rollup-linux-s390x-gnu': 4.56.0 + '@rollup/rollup-linux-x64-gnu': 4.56.0 + '@rollup/rollup-linux-x64-musl': 4.56.0 + '@rollup/rollup-openbsd-x64': 4.56.0 + '@rollup/rollup-openharmony-arm64': 4.56.0 + '@rollup/rollup-win32-arm64-msvc': 4.56.0 + '@rollup/rollup-win32-ia32-msvc': 4.56.0 + '@rollup/rollup-win32-x64-gnu': 4.56.0 + '@rollup/rollup-win32-x64-msvc': 4.56.0 fsevents: 2.3.3 - optional: true rou3@0.7.12: {} - rou3@0.9.2: {} + rou3@0.8.1: {} - router@2.2.0(supports-color@10.2.2): + router@2.2.0: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -42507,32 +40428,23 @@ snapshots: rrweb-cssom@0.8.0: {} - rsbuild-plugin-cloudflare@0.0.4(@rsbuild/core@2.3.1)(@types/node@25.0.9)(workerd@1.20261104.1): + rspack-vue-loader@17.4.4(vue@3.5.25(typescript@6.0.2))(webpack@5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)): dependencies: - '@cloudflare/build-output-utils': 0.9.10 - '@cloudflare/config': 0.30.2 - '@cloudflare/runtime-types': 0.1.23(@types/node@25.0.9) - '@cloudflare/unenv-preset': 2.16.2(unenv@2.0.0-rc.24)(workerd@1.20261104.1) - '@rsbuild/core': 2.3.1 - miniflare: 5.20261104.0-beta(@types/node@25.0.9) - unenv: 2.0.0-rc.24 - ws: 8.21.0 - transitivePeerDependencies: - - '@types/node' - - bufferutil - - utf-8-validate - - workerd + chalk: 4.1.2 + watchpack: 2.4.2 + webpack: 5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4) + optionalDependencies: + vue: 3.5.25(typescript@6.0.2) - rspack-vue-loader@17.5.0(@rspack/core@2.3.1(@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.0.8(@swc/helpers@0.5.23))(vue@3.5.25(typescript@6.0.2)): dependencies: '@rspack/lite-tapable': 1.1.0 chalk: 4.1.2 optionalDependencies: - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) - '@vue/compiler-sfc': 3.5.25 - vue: 3.5.25(@typescript/typescript6@6.0.2) + '@rspack/core': 2.0.8(@swc/helpers@0.5.23) + vue: 3.5.25(typescript@6.0.2) - run-applescript@7.1.0: {} + run-applescript@7.0.0: {} run-parallel@1.2.0: dependencies: @@ -42568,107 +40480,11 @@ snapshots: safer-buffer@2.1.2: {} - sass-embedded-all-unknown@1.105.1: - dependencies: - sass: 1.105.1 - optional: true - - sass-embedded-android-arm64@1.105.1: - optional: true - - sass-embedded-android-arm@1.105.1: - optional: true - - sass-embedded-android-riscv64@1.105.1: - optional: true - - sass-embedded-android-x64@1.105.1: - optional: true - - sass-embedded-darwin-arm64@1.105.1: - optional: true - - sass-embedded-darwin-x64@1.105.1: - optional: true - - sass-embedded-linux-arm64@1.105.1: - optional: true - - sass-embedded-linux-arm@1.105.1: - optional: true - - sass-embedded-linux-musl-arm64@1.105.1: - optional: true - - sass-embedded-linux-musl-arm@1.105.1: - optional: true - - sass-embedded-linux-musl-riscv64@1.105.1: - optional: true - - sass-embedded-linux-musl-x64@1.105.1: - optional: true - - sass-embedded-linux-riscv64@1.105.1: - optional: true - - sass-embedded-linux-x64@1.105.1: - optional: true - - sass-embedded-unknown-all@1.105.1: - dependencies: - sass: 1.105.1 - optional: true - - sass-embedded-win32-arm64@1.105.1: - optional: true - - sass-embedded-win32-x64@1.105.1: - optional: true - - sass-embedded@1.105.1: - dependencies: - '@bufbuild/protobuf': 2.16.0 - colorjs.io: 0.7.1 - immutable: 5.1.9 - rxjs: 7.8.2 - supports-color: 8.1.1 - sync-child-process: 1.0.2 - varint: 6.0.0 - optionalDependencies: - sass-embedded-all-unknown: 1.105.1 - sass-embedded-android-arm: 1.105.1 - sass-embedded-android-arm64: 1.105.1 - sass-embedded-android-riscv64: 1.105.1 - sass-embedded-android-x64: 1.105.1 - sass-embedded-darwin-arm64: 1.105.1 - sass-embedded-darwin-x64: 1.105.1 - sass-embedded-linux-arm: 1.105.1 - sass-embedded-linux-arm64: 1.105.1 - sass-embedded-linux-musl-arm: 1.105.1 - sass-embedded-linux-musl-arm64: 1.105.1 - sass-embedded-linux-musl-riscv64: 1.105.1 - sass-embedded-linux-musl-x64: 1.105.1 - sass-embedded-linux-riscv64: 1.105.1 - sass-embedded-linux-x64: 1.105.1 - sass-embedded-unknown-all: 1.105.1 - sass-embedded-win32-arm64: 1.105.1 - sass-embedded-win32-x64: 1.105.1 - - sass@1.105.1: - dependencies: - chokidar: 5.0.0 - immutable: 5.1.9 - source-map-js: 1.2.2 - optionalDependencies: - '@parcel/watcher': 2.5.1 - optional: true - sass@1.97.2: dependencies: chokidar: 4.0.3 immutable: 5.1.4 - source-map-js: 1.2.2 + source-map-js: 1.2.1 optionalDependencies: '@parcel/watcher': 2.5.1 @@ -42686,12 +40502,21 @@ snapshots: ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + schema-utils@4.3.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.17.1 + ajv-formats: 2.1.1(ajv@8.17.1) + ajv-keywords: 5.1.0(ajv@8.17.1) + schema-utils@4.3.3: dependencies: '@types/json-schema': 7.0.15 - ajv: 8.18.0 - ajv-formats: 2.1.1 - ajv-keywords: 5.1.0(ajv@8.18.0) + ajv: 8.17.1 + ajv-formats: 2.1.1(ajv@8.17.1) + ajv-keywords: 5.1.0(ajv@8.17.1) + + scule@1.3.0: {} secure-json-parse@4.1.0: {} @@ -42712,13 +40537,13 @@ snapshots: semver@7.7.3: {} + semver@7.7.4: {} + semver@7.8.2: {} - semver@7.8.5: {} - - send@0.19.0(supports-color@10.2.2): + send@0.19.0: dependencies: - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 encodeurl: 1.0.2 @@ -42734,9 +40559,9 @@ snapshots: transitivePeerDependencies: - supports-color - send@1.2.0(supports-color@10.2.2): + send@1.2.0: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -42760,19 +40585,13 @@ snapshots: dependencies: seroval: 1.5.4 - seroval-plugins@1.6.7(seroval@1.6.7): - dependencies: - seroval: 1.6.7 - seroval@1.5.4: {} - seroval@1.6.7: {} - - serve-index@1.9.1(supports-color@10.2.2): + serve-index@1.9.1: dependencies: accepts: 1.3.8 batch: 0.6.1 - debug: 2.6.9(supports-color@10.2.2) + debug: 2.6.9 escape-html: 1.0.3 http-errors: 1.6.3 mime-types: 2.1.35 @@ -42780,21 +40599,25 @@ snapshots: transitivePeerDependencies: - supports-color - serve-static@1.16.2(supports-color@10.2.2): + serve-placeholder@2.0.2: + dependencies: + defu: 6.1.4 + + serve-static@1.16.2: dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.0(supports-color@10.2.2) + send: 0.19.0 transitivePeerDependencies: - supports-color - serve-static@2.2.1(supports-color@10.2.2): + serve-static@2.2.1: dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 1.2.0(supports-color@10.2.2) + send: 1.2.0 transitivePeerDependencies: - supports-color @@ -42826,11 +40649,40 @@ snapshots: dependencies: kind-of: 6.0.3 + sharp@0.34.4: + dependencies: + '@img/colour': 1.0.0 + detect-libc: 2.1.2 + semver: 7.8.2 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.34.4 + '@img/sharp-darwin-x64': 0.34.4 + '@img/sharp-libvips-darwin-arm64': 1.2.3 + '@img/sharp-libvips-darwin-x64': 1.2.3 + '@img/sharp-libvips-linux-arm': 1.2.3 + '@img/sharp-libvips-linux-arm64': 1.2.3 + '@img/sharp-libvips-linux-ppc64': 1.2.3 + '@img/sharp-libvips-linux-s390x': 1.2.3 + '@img/sharp-libvips-linux-x64': 1.2.3 + '@img/sharp-libvips-linuxmusl-arm64': 1.2.3 + '@img/sharp-libvips-linuxmusl-x64': 1.2.3 + '@img/sharp-linux-arm': 0.34.4 + '@img/sharp-linux-arm64': 0.34.4 + '@img/sharp-linux-ppc64': 0.34.4 + '@img/sharp-linux-s390x': 0.34.4 + '@img/sharp-linux-x64': 0.34.4 + '@img/sharp-linuxmusl-arm64': 0.34.4 + '@img/sharp-linuxmusl-x64': 0.34.4 + '@img/sharp-wasm32': 0.34.4 + '@img/sharp-win32-arm64': 0.34.4 + '@img/sharp-win32-ia32': 0.34.4 + '@img/sharp-win32-x64': 0.34.4 + sharp@0.34.5: dependencies: - '@img/colour': 1.1.0 + '@img/colour': 1.0.0 detect-libc: 2.1.2 - semver: 7.8.5 + semver: 7.8.2 optionalDependencies: '@img/sharp-darwin-arm64': 0.34.5 '@img/sharp-darwin-x64': 0.34.5 @@ -42857,73 +40709,6 @@ snapshots: '@img/sharp-win32-ia32': 0.34.5 '@img/sharp-win32-x64': 0.34.5 - sharp@0.35.4(@types/node@25.0.9): - dependencies: - '@img/colour': 1.1.0 - detect-libc: 2.1.2 - semver: 7.8.5 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.35.4 - '@img/sharp-darwin-x64': 0.35.4 - '@img/sharp-freebsd-wasm32': 0.35.4 - '@img/sharp-libvips-darwin-arm64': 1.3.3 - '@img/sharp-libvips-darwin-x64': 1.3.3 - '@img/sharp-libvips-linux-arm': 1.3.3 - '@img/sharp-libvips-linux-arm64': 1.3.3 - '@img/sharp-libvips-linux-ppc64': 1.3.3 - '@img/sharp-libvips-linux-riscv64': 1.3.3 - '@img/sharp-libvips-linux-s390x': 1.3.3 - '@img/sharp-libvips-linux-x64': 1.3.3 - '@img/sharp-libvips-linuxmusl-arm64': 1.3.3 - '@img/sharp-libvips-linuxmusl-x64': 1.3.3 - '@img/sharp-linux-arm': 0.35.4 - '@img/sharp-linux-arm64': 0.35.4 - '@img/sharp-linux-ppc64': 0.35.4 - '@img/sharp-linux-riscv64': 0.35.4 - '@img/sharp-linux-s390x': 0.35.4 - '@img/sharp-linux-x64': 0.35.4 - '@img/sharp-linuxmusl-arm64': 0.35.4 - '@img/sharp-linuxmusl-x64': 0.35.4 - '@img/sharp-webcontainers-wasm32': 0.35.4 - '@img/sharp-win32-arm64': 0.35.4 - '@img/sharp-win32-ia32': 0.35.4 - '@img/sharp-win32-x64': 0.35.4 - '@types/node': 25.0.9 - optional: true - - sharp@0.35.5(@types/node@25.0.9): - dependencies: - '@img/colour': 1.1.0 - detect-libc: 2.1.2 - semver: 7.8.5 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.35.5 - '@img/sharp-darwin-x64': 0.35.5 - '@img/sharp-freebsd-wasm32': 0.35.5 - '@img/sharp-libvips-darwin-arm64': 1.3.4 - '@img/sharp-libvips-darwin-x64': 1.3.4 - '@img/sharp-libvips-linux-arm': 1.3.4 - '@img/sharp-libvips-linux-arm64': 1.3.4 - '@img/sharp-libvips-linux-ppc64': 1.3.4 - '@img/sharp-libvips-linux-riscv64': 1.3.4 - '@img/sharp-libvips-linux-s390x': 1.3.4 - '@img/sharp-libvips-linux-x64': 1.3.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 - '@img/sharp-libvips-linuxmusl-x64': 1.3.4 - '@img/sharp-linux-arm': 0.35.5 - '@img/sharp-linux-arm64': 0.35.5 - '@img/sharp-linux-ppc64': 0.35.5 - '@img/sharp-linux-riscv64': 0.35.5 - '@img/sharp-linux-s390x': 0.35.5 - '@img/sharp-linux-x64': 0.35.5 - '@img/sharp-linuxmusl-arm64': 0.35.5 - '@img/sharp-linuxmusl-x64': 0.35.5 - '@img/sharp-webcontainers-wasm32': 0.35.5 - '@img/sharp-win32-arm64': 0.35.5 - '@img/sharp-win32-ia32': 0.35.5 - '@img/sharp-win32-x64': 0.35.5 - '@types/node': 25.0.9 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 @@ -42962,8 +40747,7 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 - siginfo@2.0.0: - optional: true + siginfo@2.0.0: {} signal-exit@3.0.7: {} @@ -42977,19 +40761,19 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 - sisteransi@1.0.5: {} - skin-tone@2.0.0: dependencies: unicode-emoji-modifier-base: 1.0.0 slash@3.0.0: {} + slash@5.1.0: {} + slashes@3.0.12: {} - smol-toml@1.6.1: {} + smob@1.5.0: {} - smol-toml@1.9.0: {} + smol-toml@1.6.1: {} sockjs@0.3.24: dependencies: @@ -43003,30 +40787,46 @@ snapshots: seroval: 1.5.4 seroval-plugins: 1.5.4(seroval@1.5.4) - solid-motionone@1.0.4(solid-js@1.9.12): + solid-js@2.0.0-beta.25: + dependencies: + '@solidjs/signals': 2.0.0-beta.25 + csstype: 3.2.3 + seroval: 1.5.4 + seroval-plugins: 1.5.4(seroval@1.5.4) + + solid-motionone@1.0.4(solid-js@2.0.0-beta.25): dependencies: '@motionone/dom': 10.18.0 '@motionone/utils': 10.18.0 - '@solid-primitives/props': 3.2.2(solid-js@1.9.12) - '@solid-primitives/refs': 1.1.0(solid-js@1.9.12) - '@solid-primitives/transition-group': 1.1.2(solid-js@1.9.12) + '@solid-primitives/props': 3.2.2(solid-js@2.0.0-beta.25) + '@solid-primitives/refs': 1.1.0(solid-js@2.0.0-beta.25) + '@solid-primitives/transition-group': 1.1.2(solid-js@2.0.0-beta.25) csstype: 3.1.3 - solid-js: 1.9.12 + solid-js: 2.0.0-beta.25 - solid-refresh@0.6.3(solid-js@1.9.12)(supports-color@10.2.2): + solid-refresh@0.6.3(solid-js@1.9.12): dependencies: - '@babel/generator': 7.29.8 - '@babel/helper-module-imports': 7.27.1(supports-color@10.2.2) - '@babel/types': 7.29.8 + '@babel/generator': 7.29.1 + '@babel/helper-module-imports': 7.28.6 + '@babel/types': 7.29.0 solid-js: 1.9.12 transitivePeerDependencies: - supports-color - solid-refresh@0.7.8(solid-js@1.9.12): + solid-refresh@0.6.3(solid-js@2.0.0-beta.25): dependencies: - '@babel/generator': 7.29.8 - '@babel/types': 7.29.8 - solid-js: 1.9.12 + '@babel/generator': 7.29.1 + '@babel/helper-module-imports': 7.28.6 + '@babel/types': 7.29.0 + solid-js: 2.0.0-beta.25 + transitivePeerDependencies: + - supports-color + + solid-refresh@0.8.0-next.7(solid-js@2.0.0-beta.25): + dependencies: + '@babel/generator': 7.29.1 + '@babel/types': 7.29.0 + solid-js: 2.0.0-beta.25 sonic-boom@4.2.0: dependencies: @@ -43034,8 +40834,6 @@ snapshots: source-map-js@1.2.1: {} - source-map-js@1.2.2: {} - source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 @@ -43068,9 +40866,9 @@ snapshots: spdx-license-ids@3.0.22: {} - spdy-transport@3.0.0(supports-color@10.2.2): + spdy-transport@3.0.0: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -43079,13 +40877,13 @@ snapshots: transitivePeerDependencies: - supports-color - spdy@4.0.2(supports-color@10.2.2): + spdy@4.0.2: dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 - spdy-transport: 3.0.0(supports-color@10.2.2) + spdy-transport: 3.0.0 transitivePeerDependencies: - supports-color @@ -43100,9 +40898,16 @@ snapshots: sqlstring@2.3.3: {} - srvx@1.0.5: {} + srvx@0.10.0: {} - srvx@1.0.8: {} + srvx@0.10.1: {} + + srvx@0.11.12: {} + + srvx@0.11.15: {} + + srvx@0.11.20: + optional: true stable-hash-x@0.2.0: {} @@ -43110,11 +40915,9 @@ snapshots: stack-trace@1.0.0-pre2: {} - stackback@0.0.2: - optional: true + stackback@0.0.2: {} - standard-as-callback@2.1.0: - optional: true + standard-as-callback@2.1.0: {} standardwebhooks@1.0.0: dependencies: @@ -43136,15 +40939,20 @@ snapshots: std-env@3.9.0: {} - std-env@4.2.0: {} - - std-env@4.3.0: {} + std-env@4.1.0: {} stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 internal-slot: 1.1.0 + streamx@2.22.0: + dependencies: + fast-fifo: 1.3.2 + text-decoder: 1.2.3 + optionalDependencies: + bare-events: 2.5.4 + streamx@2.27.0: dependencies: events-universal: 1.0.1 @@ -43197,32 +41005,18 @@ snapshots: strip-json-comments@3.1.1: {} - strip-literal@4.0.0: + strip-literal@3.1.0: dependencies: - js-tokens: 10.0.0 - - stubborn-fs@2.0.0: - dependencies: - stubborn-utils: 1.0.2 - - stubborn-utils@1.0.2: {} + js-tokens: 9.0.1 style-loader@4.0.0(webpack@5.97.1): dependencies: - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) style-to-object@1.0.8: dependencies: inline-style-parser: 0.2.4 - styled-jsx@5.1.6(@babel/core@7.29.7(supports-color@10.2.2))(babel-plugin-macros@3.1.0)(react@19.2.9): - dependencies: - client-only: 0.0.1 - react: 19.2.9 - optionalDependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - babel-plugin-macros: 3.1.0 - stylis@4.2.0: {} supports-color@10.2.2: {} @@ -43246,7 +41040,7 @@ snapshots: dependencies: commander: 11.1.0 css-select: 5.1.0 - css-tree: 3.2.1 + css-tree: 3.1.0 css-what: 6.1.0 csso: 5.0.5 picocolors: 1.1.1 @@ -43258,19 +41052,15 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) - swr@2.3.4(react@19.2.9): + swr@2.3.4(react@19.2.3): dependencies: dequal: 2.0.3 - react: 19.2.9 - use-sync-external-store: 1.6.0(react@19.2.9) + react: 19.2.3 + use-sync-external-store: 1.6.0(react@19.2.3) symbol-tree@3.2.4: {} - sync-child-process@1.0.2: - dependencies: - sync-message-port: 1.2.0 - - sync-message-port@1.2.0: {} + system-architecture@0.1.0: {} tagged-tag@1.0.0: {} @@ -43280,11 +41070,9 @@ snapshots: tailwindcss@4.2.2: {} - tailwindcss@4.3.1: {} - tapable@2.2.1: {} - tapable@2.3.3: {} + tapable@2.3.0: {} tar-stream@2.2.0: dependencies: @@ -43299,7 +41087,7 @@ snapshots: b4a: 1.6.7 bare-fs: 4.7.2 fast-fifo: 1.3.2 - streamx: 2.27.0 + streamx: 2.22.0 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -43313,14 +41101,6 @@ snapshots: mkdirp: 3.0.1 yallist: 5.0.0 - tar@7.5.22: - dependencies: - '@isaacs/fs-minipass': 4.0.1 - chownr: 3.0.0 - minipass: 7.1.2 - minizlib: 3.1.0 - yallist: 5.0.0 - teex@1.0.1: dependencies: streamx: 2.27.0 @@ -43329,11 +41109,23 @@ snapshots: term-size@2.2.1: {} + terser-webpack-plugin@5.3.11(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack@5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.3.0 + serialize-javascript: 6.0.2 + terser: 5.37.0 + webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4) + optionalDependencies: + '@swc/core': 1.15.33(@swc/helpers@0.5.23) + esbuild: 0.27.4 + terser-webpack-plugin@5.3.11(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack@5.97.1): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 - schema-utils: 4.3.3 + schema-utils: 4.3.0 serialize-javascript: 6.0.2 terser: 5.37.0 webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) @@ -43341,17 +41133,17 @@ snapshots: '@swc/core': 1.15.33(@swc/helpers@0.5.23) esbuild: 0.27.4 - terser-webpack-plugin@5.3.11(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack@5.97.1): + terser-webpack-plugin@5.3.16(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack@5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 serialize-javascript: 6.0.2 terser: 5.37.0 - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) + webpack: 5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4) optionalDependencies: '@swc/core': 1.15.33(@swc/helpers@0.5.23) - esbuild: 0.28.1 + esbuild: 0.27.4 terser@5.37.0: dependencies: @@ -43360,12 +41152,9 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - terser@5.51.2: + text-decoder@1.2.3: dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.18.0 - commander: 2.20.3 - source-map-support: 0.5.21 + b4a: 1.6.7 text-decoder@1.2.7: dependencies: @@ -43393,28 +41182,23 @@ snapshots: timestring@6.0.0: {} - tinybench@2.9.0: - optional: true - - tinybench@6.2.2: {} - - tinyclip@0.1.15: {} + tinybench@2.9.0: {} tinyexec@0.3.2: {} - tinyexec@1.3.1: {} + tinyexec@1.0.2: {} tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinyglobby@0.2.17: + tinyglobby@0.2.16: dependencies: - fdir: 6.5.0(picomatch@4.0.7) - picomatch: 4.0.7 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 - tinyrainbow@3.2.0: {} + tinyrainbow@3.1.0: {} tldts-core@6.1.76: {} @@ -43432,6 +41216,8 @@ snapshots: dependencies: tmp: 0.2.7 + tmp@0.2.6: {} + tmp@0.2.7: {} to-regex-range@5.0.1: @@ -43442,7 +41228,7 @@ snapshots: toidentifier@1.0.1: {} - toml@4.3.0: {} + toml@3.0.0: {} tomlify-j0.4@3.0.0: {} @@ -43459,6 +41245,10 @@ snapshots: dependencies: tldts: 6.1.76 + tough-cookie@6.0.0: + dependencies: + tldts: 7.0.16 + tough-cookie@6.0.1: dependencies: tldts: 7.0.16 @@ -43481,10 +41271,6 @@ snapshots: triple-beam@1.4.1: {} - ts-api-utils@2.1.0(@typescript/typescript6@6.0.2): - dependencies: - typescript: '@typescript/typescript6@6.0.2' - ts-api-utils@2.1.0(typescript@5.8.3): dependencies: typescript: 5.8.3 @@ -43493,9 +41279,9 @@ snapshots: dependencies: typescript: 5.9.2 - ts-api-utils@2.4.0(@typescript/typescript6@6.0.2): + ts-api-utils@2.1.0(typescript@6.0.2): dependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 ts-api-utils@2.4.0(typescript@5.9.2): dependencies: @@ -43505,20 +41291,25 @@ snapshots: dependencies: typescript: 5.9.3 - ts-declaration-location@1.0.7(@typescript/typescript6@6.0.2): + ts-api-utils@2.4.0(typescript@6.0.2): dependencies: - picomatch: 4.0.7 - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 + + ts-declaration-location@1.0.5(typescript@6.0.2): + dependencies: + minimatch: 10.2.5 + typescript: 6.0.2 + + ts-declaration-location@1.0.7(typescript@6.0.2): + dependencies: + picomatch: 4.0.3 + typescript: 6.0.2 ts-pattern@5.6.2: {} - tsconfck@3.1.4(@typescript/typescript6@6.0.2): + tsconfck@3.1.4(typescript@6.0.2): optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' - - tsconfck@3.1.4(typescript@5.9.2): - optionalDependencies: - typescript: 5.9.2 + typescript: 6.0.2 tsconfig-paths@4.2.0: dependencies: @@ -43541,7 +41332,7 @@ snapshots: dependencies: tslib: 1.14.1 - turbo-stream@3.2.1: {} + turbo-stream@3.1.0: {} type-check@0.4.0: dependencies: @@ -43553,7 +41344,7 @@ snapshots: type-fest@4.41.0: {} - type-fest@5.9.0: + type-fest@5.4.1: dependencies: tagged-tag: 1.0.0 @@ -43568,25 +41359,25 @@ snapshots: media-typer: 1.1.0 mime-types: 3.0.1 - typescript-eslint@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + typescript-eslint@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.44.1(@typescript-eslint/parser@8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/parser': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/typescript-estree': 8.44.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.44.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/eslint-plugin': 8.44.1(@typescript-eslint/parser@8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/parser': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.44.1(typescript@6.0.2) + '@typescript-eslint/utils': 8.44.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 transitivePeerDependencies: - supports-color - typescript-eslint@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + typescript-eslint@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2))(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/parser': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - '@typescript-eslint/typescript-estree': 8.57.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2) - '@typescript-eslint/utils': 8.57.1(@typescript/typescript6@6.0.2)(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) - typescript: '@typescript/typescript6@6.0.2' + '@typescript-eslint/eslint-plugin': 8.57.1(@typescript-eslint/parser@8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2))(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/parser': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + '@typescript-eslint/typescript-estree': 8.57.1(typescript@6.0.2) + '@typescript-eslint/utils': 8.57.1(eslint@9.22.0(jiti@2.7.0))(typescript@6.0.2) + eslint: 9.22.0(jiti@2.7.0) + typescript: 6.0.2 transitivePeerDependencies: - supports-color @@ -43594,6 +41385,8 @@ snapshots: typescript@5.4.2: {} + typescript@5.5.4: {} + typescript@5.6.1-rc: {} typescript@5.6.3: {} @@ -43608,37 +41401,25 @@ snapshots: typescript@6.0.2: {} - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 + ufo@1.6.1: {} - ufo@1.6.4: {} + ufo@1.6.3: {} uint8array-extras@1.5.0: {} ulid@3.0.1: {} + ultrahtml@1.6.0: {} + uncrypto@0.1.3: {} + unctx@2.5.0: + dependencies: + acorn: 8.15.0 + estree-walker: 3.0.3 + magic-string: 0.30.21 + unplugin: 2.3.11 + undici-types@7.16.0: {} undici-types@7.24.4: {} @@ -43649,10 +41430,6 @@ snapshots: undici@7.27.2: {} - undici@7.29.0: {} - - undici@7.30.1: {} - unenv@2.0.0-rc.24: dependencies: pathe: 2.0.3 @@ -43663,6 +41440,23 @@ snapshots: unicorn-magic@0.4.0: {} + unimport@5.6.0: + dependencies: + acorn: 8.15.0 + escape-string-regexp: 5.0.0 + estree-walker: 3.0.3 + local-pkg: 1.1.2 + magic-string: 0.30.21 + mlly: 1.8.0 + pathe: 2.0.3 + picomatch: 4.0.3 + pkg-types: 2.3.0 + scule: 1.3.0 + strip-literal: 3.1.0 + tinyglobby: 0.2.15 + unplugin: 2.3.11 + unplugin-utils: 0.3.1 + universalify@0.1.2: {} universalify@0.2.0: {} @@ -43673,34 +41467,30 @@ snapshots: unpipe@1.0.0: {} + unplugin-utils@0.3.1: + dependencies: + pathe: 2.0.3 + picomatch: 4.0.3 + unplugin@1.0.1: dependencies: - acorn: 8.15.0 + acorn: 8.14.1 chokidar: 3.6.0 - webpack-sources: 3.3.3 + webpack-sources: 3.2.3 webpack-virtual-modules: 0.5.0 unplugin@2.3.11: dependencies: '@jridgewell/remapping': 2.3.5 acorn: 8.15.0 - picomatch: 4.0.7 + picomatch: 4.0.3 webpack-virtual-modules: 0.6.2 - unplugin@3.7.0(@rsbuild/core@2.3.1)(@rspack/core@2.3.1(@swc/helpers@0.5.23))(esbuild@0.28.1)(rolldown@1.2.13)(rollup@4.63.1)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0))(webpack@5.110.3): + unplugin@3.0.0: dependencies: '@jridgewell/remapping': 2.3.5 - '@rolldown/pluginutils': 1.0.1 - picomatch: 4.0.7 + picomatch: 4.0.3 webpack-virtual-modules: 0.6.2 - optionalDependencies: - '@rsbuild/core': 2.3.1 - '@rspack/core': 2.3.1(@swc/helpers@0.5.23) - esbuild: 0.28.1 - rolldown: 1.2.13 - rollup: 4.63.1 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) unrs-resolver@1.11.1: dependencies: @@ -43726,26 +41516,62 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 - unstorage@1.17.5(@netlify/blobs@11.0.3(supports-color@10.2.2))(db0@0.4.1)(ioredis@5.11.1(supports-color@10.2.2)): + unstorage@1.17.4(@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.9.2): dependencies: anymatch: 3.1.3 chokidar: 5.0.0 destr: 2.0.5 - h3: 1.15.11 - lru-cache: 11.5.1 + h3: 1.15.5 + lru-cache: 11.2.2 node-fetch-native: 1.6.7 ofetch: 1.5.1 - ufo: 1.6.4 + ufo: 1.6.3 optionalDependencies: - '@netlify/blobs': 11.0.3(supports-color@10.2.2) - db0: 0.4.1 - ioredis: 5.11.1(supports-color@10.2.2) + '@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.9.2 - unstorage@2.0.0-alpha.10: {} + unstorage@2.0.0-alpha.5(@netlify/blobs@10.1.0)(chokidar@5.0.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(ioredis@5.9.2)(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3): + optionalDependencies: + '@netlify/blobs': 10.1.0 + chokidar: 5.0.0 + db0: 0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3) + ioredis: 5.9.2 + lru-cache: 11.5.1 + ofetch: 2.0.0-alpha.3 - until-async@3.0.2: {} + unstorage@2.0.0-alpha.6(@netlify/blobs@10.1.0)(chokidar@5.0.0)(db0@0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3))(lru-cache@11.5.1)(ofetch@2.0.0-alpha.3): + optionalDependencies: + '@netlify/blobs': 10.1.0 + chokidar: 5.0.0 + db0: 0.3.4(@electric-sql/pglite@0.3.2)(@libsql/client@0.15.15)(mysql2@3.15.3) + lru-cache: 11.5.1 + ofetch: 2.0.0-alpha.3 - untun@0.2.2: {} + untun@0.1.3: + dependencies: + citty: 0.1.6 + consola: 3.4.2 + pathe: 1.1.2 + + untyped@2.0.0: + dependencies: + citty: 0.1.6 + defu: 6.1.4 + jiti: 2.7.0 + knitwork: 1.3.0 + scule: 1.3.0 + + unwasm@0.5.3: + dependencies: + exsolve: 1.0.8 + knitwork: 1.3.0 + magic-string: 0.30.21 + mlly: 1.8.0 + pathe: 2.0.3 + pkg-types: 2.3.0 + + upath@2.0.1: {} update-browserslist-db@1.1.2(browserslist@4.24.4): dependencies: @@ -43759,7 +41585,7 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - uqr@0.1.3: {} + uqr@0.1.2: {} uri-js@4.4.1: dependencies: @@ -43774,24 +41600,24 @@ snapshots: urlpattern-polyfill@8.0.2: {} - use-callback-ref@1.3.3(@types/react@19.2.9)(react@19.2.9): + use-callback-ref@1.3.3(@types/react@19.2.9)(react@19.2.3): dependencies: - react: 19.2.9 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.9 - use-sidecar@1.1.3(@types/react@19.2.9)(react@19.2.9): + use-sidecar@1.1.3(@types/react@19.2.9)(react@19.2.3): dependencies: detect-node-es: 1.1.0 - react: 19.2.9 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.9 - use-sync-external-store@1.6.0(react@19.2.9): + use-sync-external-store@1.6.0(react@19.2.3): dependencies: - react: 19.2.9 + react: 19.2.3 util-deprecate@1.0.2: {} @@ -43803,15 +41629,19 @@ snapshots: uuid@10.0.0: {} + uuid@11.1.0: {} + uuid@8.3.2: {} - valibot@1.0.0-beta.15(@typescript/typescript6@6.0.2): + valibot@1.0.0-beta.15(typescript@6.0.2): optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 - valibot@1.1.0(@typescript/typescript6@6.0.2): + valibot@1.1.0(typescript@6.0.2): optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 + + validate-html-nesting@1.2.4: {} validate-npm-package-license@3.0.4: dependencies: @@ -43820,454 +41650,232 @@ snapshots: validate-npm-package-name@5.0.1: {} - varint@6.0.0: {} - vary@1.1.2: {} - vite-plugin-dts@4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-plugin-dts@4.2.3(@types/node@25.0.9)(rollup@4.56.0)(typescript@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)): dependencies: '@microsoft/api-extractor': 7.47.7(@types/node@25.0.9) - '@rollup/pluginutils': 5.1.4(rollup@4.63.1) - '@volar/typescript': 2.4.26(@typescript/typescript6@6.0.2) - '@vue/language-core': 2.1.6(@typescript/typescript6@6.0.2) + '@rollup/pluginutils': 5.1.4(rollup@4.56.0) + '@volar/typescript': 2.4.26 + '@vue/language-core': 2.1.6(typescript@6.0.2) compare-versions: 6.1.1 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 kolorist: 1.8.0 local-pkg: 0.5.1 magic-string: 0.30.21 - typescript: '@typescript/typescript6@6.0.2' + typescript: 6.0.2 optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-dts@4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-plugin-externalize-deps@0.10.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)): dependencies: - '@microsoft/api-extractor': 7.47.7(@types/node@25.0.9) - '@rollup/pluginutils': 5.1.4(rollup@4.63.1) - '@volar/typescript': 2.4.26(@typescript/typescript6@6.0.2) - '@vue/language-core': 2.1.6(@typescript/typescript6@6.0.2) - compare-versions: 6.1.1 - debug: 4.4.3(supports-color@10.2.2) - kolorist: 1.8.0 - local-pkg: 0.5.1 - magic-string: 0.30.21 - typescript: '@typescript/typescript6@6.0.2' - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color + 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) - vite-plugin-dts@4.2.3(@types/node@25.0.9)(@typescript/typescript6@6.0.2)(rollup@4.63.1)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-plugin-solid@2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(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: - '@microsoft/api-extractor': 7.47.7(@types/node@25.0.9) - '@rollup/pluginutils': 5.1.4(rollup@4.63.1) - '@volar/typescript': 2.4.26(@typescript/typescript6@6.0.2) - '@vue/language-core': 2.1.6(@typescript/typescript6@6.0.2) - compare-versions: 6.1.1 - debug: 4.4.3(supports-color@10.2.2) - kolorist: 1.8.0 - local-pkg: 0.5.1 - magic-string: 0.30.21 - typescript: '@typescript/typescript6@6.0.2' - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-plugin-dts@4.2.3(@types/node@25.0.9)(rollup@4.63.1)(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@microsoft/api-extractor': 7.47.7(@types/node@25.0.9) - '@rollup/pluginutils': 5.1.4(rollup@4.63.1) - '@volar/typescript': 2.4.26(typescript@5.9.2) - '@vue/language-core': 2.1.6(typescript@5.9.2) - compare-versions: 6.1.1 - debug: 4.4.3(supports-color@10.2.2) - kolorist: 1.8.0 - local-pkg: 0.5.1 - magic-string: 0.30.21 - typescript: 5.9.2 - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-plugin-externalize-deps@0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vite-plugin-externalize-deps@0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vite-plugin-externalize-deps@0.10.0(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vite-plugin-solid@2.11.10(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.28.5 '@types/babel__core': 7.20.5 - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) + babel-preset-solid: 1.9.10(@babel/core@7.28.5)(solid-js@1.9.12) merge-anything: 5.1.7 solid-js: 1.9.12 - solid-refresh: 0.6.3(solid-js@1.9.12)(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + solid-refresh: 0.6.3(solid-js@1.9.12) + 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) + vitefu: 1.1.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)) optionalDependencies: '@testing-library/jest-dom': 6.6.3 transitivePeerDependencies: - supports-color - vite-plugin-solid@2.11.10(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-plugin-solid@2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@babel/core': 7.29.0 '@types/babel__core': 7.20.5 - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) + babel-preset-solid: 1.9.10(@babel/core@7.29.0)(solid-js@2.0.0-beta.25) merge-anything: 5.1.7 - solid-js: 1.9.12 - solid-refresh: 0.6.3(solid-js@1.9.12)(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - optionalDependencies: - '@testing-library/jest-dom': 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) - transitivePeerDependencies: - - supports-color - - vite-plugin-solid@2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@types/babel__core': 7.20.5 - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) - merge-anything: 5.1.7 - solid-js: 1.9.12 - solid-refresh: 0.6.3(solid-js@1.9.12)(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + solid-js: 2.0.0-beta.25 + solid-refresh: 0.6.3(solid-js@2.0.0-beta.25) + 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) + vitefu: 1.1.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)) optionalDependencies: '@testing-library/jest-dom': 6.6.3 transitivePeerDependencies: - supports-color - vite-plugin-solid@2.11.11(@testing-library/jest-dom@6.6.3)(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-plugin-solid@3.0.0-next.16(@solidjs/web@2.0.0-beta.25(solid-js@2.0.0-beta.25))(@testing-library/jest-dom@6.6.3)(solid-js@2.0.0-beta.25)(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: - '@babel/core': 7.29.7(supports-color@10.2.2) + '@ampproject/remapping': 2.3.0 + '@babel/core': 7.29.0 + '@dom-expressions/compiler': 0.50.0-next.29 + '@solidjs/web': 2.0.0-beta.25(solid-js@2.0.0-beta.25) '@types/babel__core': 7.20.5 - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) + babel-preset-solid: 2.0.0-beta.25(@babel/core@7.29.0)(solid-js@2.0.0-beta.25) merge-anything: 5.1.7 - solid-js: 1.9.12 - solid-refresh: 0.6.3(solid-js@1.9.12)(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + solid-js: 2.0.0-beta.25 + 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) + vitefu: 1.1.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)) optionalDependencies: '@testing-library/jest-dom': 6.6.3 transitivePeerDependencies: - supports-color - vite-plugin-solid@2.11.11(@testing-library/jest-dom@7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4))(solid-js@1.9.12)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-tsconfig-paths@5.1.4(typescript@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)): dependencies: - '@babel/core': 7.29.7(supports-color@10.2.2) - '@types/babel__core': 7.20.5 - babel-preset-solid: 1.9.10(@babel/core@7.29.7(supports-color@10.2.2))(solid-js@1.9.12) - merge-anything: 5.1.7 - solid-js: 1.9.12 - solid-refresh: 0.6.3(solid-js@1.9.12)(supports-color@10.2.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - vitefu: 1.1.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + debug: 4.4.3 + globrex: 0.1.2 + tsconfck: 3.1.4(typescript@6.0.2) optionalDependencies: - '@testing-library/jest-dom': 7.0.1(@testing-library/dom@10.4.1)(vitest@5.0.4) - transitivePeerDependencies: - - supports-color - - vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - debug: 4.4.3(supports-color@10.2.2) - globrex: 0.1.2 - tsconfck: 3.1.4(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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) transitivePeerDependencies: - supports-color - typescript - vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vite-tsconfig-paths@6.1.1(typescript@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)): dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 globrex: 0.1.2 - tsconfck: 3.1.4(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + tsconfck: 3.1.4(typescript@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) transitivePeerDependencies: - supports-color - typescript - vite-tsconfig-paths@6.1.1(@typescript/typescript6@6.0.2)(supports-color@10.2.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@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): dependencies: - debug: 4.4.3(supports-color@10.2.2) - globrex: 0.1.2 - tsconfck: 3.1.4(@typescript/typescript6@6.0.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - transitivePeerDependencies: - - supports-color - - typescript - - vite-tsconfig-paths@6.1.1(supports-color@10.2.2)(typescript@5.9.2)(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - debug: 4.4.3(supports-color@10.2.2) - globrex: 0.1.2 - tsconfck: 3.1.4(typescript@5.9.2) - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - transitivePeerDependencies: - - supports-color - - typescript - - vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0): - dependencies: - lightningcss: 1.33.0 - picomatch: 4.0.7 - postcss: 8.5.29 - rolldown: 1.2.13 - tinyglobby: 0.2.17 + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.15 + rolldown: 1.0.2 + tinyglobby: 0.2.16 optionalDependencies: '@types/node': 25.0.9 esbuild: 0.27.4 fsevents: 2.3.3 jiti: 2.7.0 sass: 1.97.2 - sass-embedded: 1.105.1 - terser: 5.51.2 + terser: 5.37.0 tsx: 4.20.3 yaml: 2.9.0 - vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0): - dependencies: - lightningcss: 1.33.0 - picomatch: 4.0.7 - postcss: 8.5.29 - rolldown: 1.2.13 - tinyglobby: 0.2.17 + vitefu@1.1.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)): optionalDependencies: - '@types/node': 25.0.9 - esbuild: 0.28.1 - fsevents: 2.3.3 - jiti: 2.7.0 - sass: 1.105.1 - sass-embedded: 1.105.1 - terser: 5.51.2 - tsx: 4.20.3 - yaml: 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) - vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0): - dependencies: - lightningcss: 1.33.0 - picomatch: 4.0.7 - postcss: 8.5.29 - rolldown: 1.2.13 - tinyglobby: 0.2.17 - optionalDependencies: - '@types/node': 25.0.9 - esbuild: 0.28.1 - fsevents: 2.3.3 - jiti: 2.7.0 - sass: 1.97.2 - sass-embedded: 1.105.1 - terser: 5.51.2 - tsx: 4.20.3 - yaml: 2.9.0 - - vitefu@1.1.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vitefu@1.1.1(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vitefu@1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - - vitefu@1.1.3(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - optionalDependencies: - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vitest@4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@25.0.1)(msw@2.7.0(@types/node@25.0.9)(typescript@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)): dependencies: '@vitest/expect': 4.1.4 - '@vitest/mocker': 4.1.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) + '@vitest/mocker': 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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)) '@vitest/pretty-format': 4.1.4 '@vitest/runner': 4.1.4 '@vitest/snapshot': 4.1.4 '@vitest/spy': 4.1.4 '@vitest/utils': 4.1.4 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 - picomatch: 4.0.7 - std-env: 4.3.0 + picomatch: 4.0.3 + std-env: 4.1.0 tinybench: 2.9.0 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - tinyrainbow: 3.2.0 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.1.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) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 25.0.9 + '@vitest/ui': 4.1.4(vitest@4.1.4) + jsdom: 25.0.1 + transitivePeerDependencies: + - msw + + vitest@4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@27.0.0(postcss@8.5.15))(msw@2.7.0(@types/node@25.0.9)(typescript@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)): + dependencies: + '@vitest/expect': 4.1.4 + '@vitest/mocker': 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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)) + '@vitest/pretty-format': 4.1.4 + '@vitest/runner': 4.1.4 + '@vitest/snapshot': 4.1.4 + '@vitest/spy': 4.1.4 + '@vitest/utils': 4.1.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 4.1.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.1.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) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 25.0.9 + '@vitest/ui': 4.1.4(vitest@4.1.4) + jsdom: 27.0.0(postcss@8.5.15) + transitivePeerDependencies: + - msw + + vitest@4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@5.9.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)): + dependencies: + '@vitest/expect': 4.1.4 + '@vitest/mocker': 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@5.9.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)) + '@vitest/pretty-format': 4.1.4 + '@vitest/runner': 4.1.4 + '@vitest/snapshot': 4.1.4 + '@vitest/spy': 4.1.4 + '@vitest/utils': 4.1.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 4.1.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.1.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) why-is-node-running: 2.3.0 optionalDependencies: - '@opentelemetry/api': 1.9.1 '@types/node': 25.0.9 '@vitest/ui': 4.1.4(vitest@4.1.4) jsdom: 29.1.1(@noble/hashes@2.0.1) transitivePeerDependencies: - msw - optional: true - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): + vitest@4.1.4(@types/node@25.0.9)(@vitest/ui@4.1.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.7.0(@types/node@25.0.9)(typescript@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)): dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.27.4)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 + '@vitest/expect': 4.1.4 + '@vitest/mocker': 4.1.4(msw@2.7.0(@types/node@25.0.9)(typescript@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)) + '@vitest/pretty-format': 4.1.4 + '@vitest/runner': 4.1.4 + '@vitest/snapshot': 4.1.4 + '@vitest/spy': 4.1.4 + '@vitest/utils': 4.1.4 + es-module-lexer: 2.0.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.1 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 4.1.0 + tinybench: 2.9.0 + tinyexec: 1.0.2 + tinyglobby: 0.2.15 + tinyrainbow: 3.1.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) + why-is-node-running: 2.3.0 optionalDependencies: - '@opentelemetry/api': 1.9.1 '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) - jsdom: 25.0.1(supports-color@10.2.2) - transitivePeerDependencies: - - msw - - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) - jsdom: 25.0.1(supports-color@10.2.2) - transitivePeerDependencies: - - msw - - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@25.0.1(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) - jsdom: 25.0.1(supports-color@10.2.2) - transitivePeerDependencies: - - msw - - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@27.0.0(supports-color@10.2.2))(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) - jsdom: 27.0.0(supports-color@10.2.2) - transitivePeerDependencies: - - msw - - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.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.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(@typescript/typescript6@6.0.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.97.2)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) - jsdom: 29.1.1(@noble/hashes@2.0.1) - transitivePeerDependencies: - - msw - - vitest@5.0.4(@opentelemetry/api@1.9.1)(@types/node@25.0.9)(@vitest/ui@5.0.4)(jsdom@29.1.1(@noble/hashes@2.0.1))(msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)): - dependencies: - '@types/chai': 5.2.2 - '@vitest/mocker': 5.0.4(msw@2.15.0(@types/node@25.0.9)(typescript@5.9.2))(vite@8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.3 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.2 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.4(@types/node@25.0.9)(esbuild@0.28.1)(jiti@2.7.0)(sass-embedded@1.105.1)(sass@1.105.1)(terser@5.51.2)(tsx@4.20.3)(yaml@2.9.0) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.9.1 - '@types/node': 25.0.9 - '@vitest/ui': 5.0.4(vitest@5.0.4) + '@vitest/ui': 4.1.4(vitest@4.1.4) jsdom: 29.1.1(@noble/hashes@2.0.1) transitivePeerDependencies: - msw @@ -44276,10 +41884,6 @@ snapshots: vue-component-type-helpers@2.2.12: {} - vue-demi@0.14.10(vue@3.5.25(@typescript/typescript6@6.0.2)): - dependencies: - vue: 3.5.25(@typescript/typescript6@6.0.2) - vue-demi@0.14.10(vue@3.5.25(typescript@5.8.3)): dependencies: vue: 3.5.25(typescript@5.8.3) @@ -44288,34 +41892,34 @@ snapshots: dependencies: vue: 3.5.25(typescript@6.0.2) - vue-eslint-parser@10.2.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + vue-eslint-parser@10.2.0(eslint@9.22.0(jiti@2.7.0)): dependencies: - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 esquery: 1.6.0 - semver: 7.8.5 + semver: 7.8.2 transitivePeerDependencies: - supports-color - vue-eslint-parser@10.4.0(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + vue-eslint-parser@10.4.0(eslint@9.22.0(jiti@2.7.0)): dependencies: - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.1 espree: 10.4.0 esquery: 1.6.0 - semver: 7.8.5 + semver: 7.8.2 transitivePeerDependencies: - supports-color - vue-eslint-parser@9.4.3(eslint@9.22.0(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + vue-eslint-parser@9.4.3(eslint@9.22.0(jiti@2.7.0)): dependencies: - debug: 4.4.3(supports-color@10.2.2) - eslint: 9.22.0(jiti@2.7.0)(supports-color@10.2.2) + debug: 4.4.3 + eslint: 9.22.0(jiti@2.7.0) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -44325,33 +41929,29 @@ snapshots: transitivePeerDependencies: - supports-color - vue-tsc@3.3.8(@typescript/typescript6@6.0.2): + vue-tsc@3.1.5(typescript@5.8.3): dependencies: - '@volar/typescript': 2.4.28(@typescript/typescript6@6.0.2) - '@vue/language-core': 3.3.8 - typescript: '@typescript/typescript6@6.0.2' - - vue-tsc@3.3.8(typescript@5.8.3): - dependencies: - '@volar/typescript': 2.4.28(typescript@5.8.3) - '@vue/language-core': 3.3.8 + '@volar/typescript': 2.4.23 + '@vue/language-core': 3.1.5(typescript@5.8.3) typescript: 5.8.3 - vue-tsc@3.3.8(typescript@5.9.3): + vue-tsc@3.1.5(typescript@5.9.3): dependencies: - '@volar/typescript': 2.4.28(typescript@5.9.3) - '@vue/language-core': 3.3.8 + '@volar/typescript': 2.4.23 + '@vue/language-core': 3.1.5(typescript@5.9.3) typescript: 5.9.3 - vue@3.5.25(@typescript/typescript6@6.0.2): + vue-tsc@3.1.5(typescript@6.0.2): dependencies: - '@vue/compiler-dom': 3.5.25 - '@vue/compiler-sfc': 3.5.25 - '@vue/runtime-dom': 3.5.25 - '@vue/server-renderer': 3.5.25(vue@3.5.25(@typescript/typescript6@6.0.2)) - '@vue/shared': 3.5.25 - optionalDependencies: - typescript: '@typescript/typescript6@6.0.2' + '@volar/typescript': 2.4.23 + '@vue/language-core': 3.1.5(typescript@6.0.2) + typescript: 6.0.2 + + vue-tsc@3.1.8(typescript@6.0.2): + dependencies: + '@volar/typescript': 2.4.26 + '@vue/language-core': 3.1.8(typescript@6.0.2) + typescript: 6.0.2 vue@3.5.25(typescript@5.8.3): dependencies: @@ -44392,8 +41992,9 @@ snapshots: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - watchpack@2.5.2: + watchpack@2.4.4: dependencies: + glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 wbuf@1.7.3: @@ -44414,27 +42015,9 @@ snapshots: webidl-conversions@7.0.0: {} - webidl-conversions@8.0.1: {} + webidl-conversions@8.0.0: {} - webpack-cli@5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3): - dependencies: - '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.110.3) - '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.110.3) - '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack-dev-server@5.2.4)(webpack@5.110.3) - colorette: 2.0.20 - commander: 10.0.1 - cross-spawn: 7.0.6 - envinfo: 7.14.0 - fastest-levenshtein: 1.0.16 - import-local: 3.2.0 - interpret: 3.1.1 - rechoir: 0.8.0 - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - webpack-merge: 5.10.0 - optionalDependencies: - webpack-dev-server: 5.2.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.110.3) - optional: true + webidl-conversions@8.0.1: {} webpack-cli@5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1): dependencies: @@ -44453,19 +42036,7 @@ snapshots: webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) webpack-merge: 5.10.0 optionalDependencies: - webpack-dev-server: 5.2.4(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1) - - webpack-dev-middleware@7.4.2(webpack@5.110.3): - dependencies: - colorette: 2.0.20 - memfs: 4.17.0 - mime-types: 2.1.35 - on-finished: 2.4.1 - range-parser: 1.2.1 - schema-utils: 4.3.3 - optionalDependencies: - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - optional: true + webpack-dev-server: 5.2.4(webpack-cli@5.1.4)(webpack@5.97.1) webpack-dev-middleware@7.4.2(webpack@5.97.1): dependencies: @@ -44478,7 +42049,7 @@ snapshots: optionalDependencies: webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4) - webpack-dev-server@5.2.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.110.3): + webpack-dev-server@5.2.4(webpack-cli@5.1.4)(webpack@5.97.1): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -44492,99 +42063,20 @@ snapshots: bonjour-service: 1.3.0 chokidar: 3.6.0 colorette: 2.0.20 - compression: 1.8.1(supports-color@10.2.2) + compression: 1.8.1 connect-history-api-fallback: 2.0.0 - express: 4.22.2(supports-color@10.2.2) + express: 4.22.2 graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.9(@types/express@4.17.25)(debug@4.4.3(supports-color@10.2.2)) + http-proxy-middleware: 2.0.9(@types/express@4.17.25) ipaddr.js: 2.2.0 launch-editor: 2.9.1 open: 10.1.0 p-retry: 6.2.1 schema-utils: 4.3.3 selfsigned: 5.5.0 - serve-index: 1.9.1(supports-color@10.2.2) + serve-index: 1.9.1 sockjs: 0.3.24 - spdy: 4.0.2(supports-color@10.2.2) - webpack-dev-middleware: 7.4.2(webpack@5.110.3) - ws: 8.20.0 - optionalDependencies: - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3) - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - optional: true - - webpack-dev-server@5.2.4(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1): - dependencies: - '@types/bonjour': 3.5.13 - '@types/connect-history-api-fallback': 1.5.4 - '@types/express': 4.17.25 - '@types/express-serve-static-core': 4.19.6 - '@types/serve-index': 1.9.4 - '@types/serve-static': 1.15.7 - '@types/sockjs': 0.3.36 - '@types/ws': 8.5.14 - ansi-html-community: 0.0.8 - bonjour-service: 1.3.0 - chokidar: 3.6.0 - colorette: 2.0.20 - compression: 1.8.1(supports-color@10.2.2) - connect-history-api-fallback: 2.0.0 - express: 4.22.2(supports-color@10.2.2) - graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.9(@types/express@4.17.25)(debug@4.4.3(supports-color@10.2.2)) - ipaddr.js: 2.2.0 - launch-editor: 2.9.1 - open: 10.1.0 - p-retry: 6.2.1 - schema-utils: 4.3.3 - selfsigned: 5.5.0 - serve-index: 1.9.1(supports-color@10.2.2) - sockjs: 0.3.24 - spdy: 4.0.2(supports-color@10.2.2) - webpack-dev-middleware: 7.4.2(webpack@5.97.1) - ws: 8.20.0 - optionalDependencies: - webpack: 5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4) - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - - webpack-dev-server@5.2.4(supports-color@10.2.2)(webpack-cli@5.1.4)(webpack@5.97.1): - dependencies: - '@types/bonjour': 3.5.13 - '@types/connect-history-api-fallback': 1.5.4 - '@types/express': 4.17.25 - '@types/express-serve-static-core': 4.19.6 - '@types/serve-index': 1.9.4 - '@types/serve-static': 1.15.7 - '@types/sockjs': 0.3.36 - '@types/ws': 8.5.14 - ansi-html-community: 0.0.8 - bonjour-service: 1.3.0 - chokidar: 3.6.0 - colorette: 2.0.20 - compression: 1.8.1(supports-color@10.2.2) - connect-history-api-fallback: 2.0.0 - express: 4.22.2(supports-color@10.2.2) - graceful-fs: 4.2.11 - http-proxy-middleware: 2.0.9(@types/express@4.17.25)(debug@4.4.3(supports-color@10.2.2)) - ipaddr.js: 2.2.0 - launch-editor: 2.9.1 - open: 10.1.0 - p-retry: 6.2.1 - schema-utils: 4.3.3 - selfsigned: 5.5.0 - serve-index: 1.9.1(supports-color@10.2.2) - sockjs: 0.3.24 - spdy: 4.0.2(supports-color@10.2.2) + spdy: 4.0.2 webpack-dev-middleware: 7.4.2(webpack@5.97.1) ws: 8.20.0 optionalDependencies: @@ -44606,51 +42098,70 @@ snapshots: webpack-sources@3.3.3: {} - webpack-sources@3.5.1: {} - webpack-virtual-modules@0.5.0: {} webpack-virtual-modules@0.6.2: {} - 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.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack-cli@5.1.4): + webpack@5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4): dependencies: - '@types/estree': 1.0.9 + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.8 '@types/json-schema': 7.0.15 '@webassemblyjs/ast': 1.14.1 '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.18.0 + acorn: 8.15.0 + acorn-import-phases: 1.0.4(acorn@8.15.0) browserslist: 4.28.1 chrome-trace-event: 1.0.4 - enhanced-resolve: 5.24.5 - es-module-lexer: 2.3.2 + enhanced-resolve: 5.18.3 + es-module-lexer: 2.0.0 + eslint-scope: 5.1.1 events: 3.3.0 + glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - mime-db: 1.54.0 - minimizer-webpack-plugin: 5.10.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(clean-css@5.3.3)(csso@5.0.5)(esbuild@0.28.1)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.29)(sharp@0.35.5(@types/node@25.0.9))(svgo@4.0.0)(webpack@5.110.3) + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.1 + mime-types: 2.1.35 neo-async: 2.6.2 schema-utils: 4.3.3 - tapable: 2.3.3 - watchpack: 2.5.2 - webpack-sources: 3.5.1 - optionalDependencies: - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.110.3) + tapable: 2.3.0 + terser-webpack-plugin: 5.3.16(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack@5.104.0(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)) + watchpack: 2.4.4 + webpack-sources: 3.3.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + + webpack@5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4): + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.7 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + acorn: 8.14.1 + browserslist: 4.24.4 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.18.1 + es-module-lexer: 1.6.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.11(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack@5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)) + watchpack: 2.4.2 + webpack-sources: 3.2.3 transitivePeerDependencies: - - '@minify-html/node' - - '@napi-rs/image' - '@swc/core' - - '@swc/css' - - '@swc/html' - - clean-css - - cssnano - - csso - esbuild - - html-minifier-terser - - imagemin - - lightningcss - - postcss - - sharp - - svgo - uglify-js webpack@5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.27.4)(webpack-cli@5.1.4): @@ -44685,38 +42196,6 @@ snapshots: - esbuild - uglify-js - webpack@5.97.1(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack-cli@5.1.4): - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.7 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.14.1 - browserslist: 4.24.4 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.1 - es-module-lexer: 1.6.0 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.11(@swc/core@1.15.33(@swc/helpers@0.5.23))(esbuild@0.28.1)(webpack@5.97.1) - watchpack: 2.4.2 - webpack-sources: 3.2.3 - optionalDependencies: - webpack-cli: 5.1.4(webpack-dev-server@5.2.4)(webpack@5.97.1) - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - websocket-driver@0.7.4: dependencies: http-parser-js: 0.5.9 @@ -44741,7 +42220,7 @@ snapshots: whatwg-url@15.1.0: dependencies: tr46: 6.0.0 - webidl-conversions: 8.0.1 + webidl-conversions: 8.0.0 whatwg-url@16.0.1(@noble/hashes@2.0.1): dependencies: @@ -44756,8 +42235,6 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 - when-exit@2.1.5: {} - which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 @@ -44787,17 +42264,10 @@ snapshots: dependencies: isexe: 2.0.0 - which@3.0.1: - dependencies: - isexe: 2.0.0 - why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 - optional: true - - why-is-node-running@3.2.1: {} wildcard@2.0.1: {} @@ -44831,14 +42301,6 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20260317.1 '@cloudflare/workerd-windows-64': 1.20260317.1 - workerd@1.20261104.1: - optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20261104.1 - '@cloudflare/workerd-darwin-arm64': 1.20261104.1 - '@cloudflare/workerd-linux-64': 1.20261104.1 - '@cloudflare/workerd-linux-arm64': 1.20261104.1 - '@cloudflare/workerd-windows-64': 1.20261104.1 - wrangler@4.75.0: dependencies: '@cloudflare/kv-asset-handler': 0.4.2 @@ -44875,11 +42337,16 @@ snapshots: wrappy@1.0.2: {} + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + ws@8.18.0: {} - ws@8.20.0: {} + ws@8.18.3: {} - ws@8.21.0: {} + ws@8.20.0: {} xml-name-validator@4.0.0: {} @@ -44935,9 +42402,10 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yauzl@3.4.0: + yauzl@2.10.0: dependencies: - pend: 1.2.0 + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 yocto-queue@0.1.0: {} @@ -44952,20 +42420,30 @@ snapshots: youch@4.1.0-beta.10: dependencies: - '@poppinss/colors': 4.1.6 + '@poppinss/colors': 4.1.5 '@poppinss/dumper': 0.6.5 '@speed-highlight/core': 1.2.14 - cookie: 1.1.1 + cookie: 1.0.2 + youch-core: 0.3.3 + + youch@4.1.0-beta.13: + dependencies: + '@poppinss/colors': 4.1.5 + '@poppinss/dumper': 0.6.5 + '@speed-highlight/core': 1.2.14 + cookie-es: 2.0.0 youch-core: 0.3.3 zeptomatch@2.0.2: dependencies: grammex: 3.1.11 - zip-stream@7.0.5: + zimmerframe@1.1.4: {} + + zip-stream@6.0.1: dependencies: - compress-commons: 7.0.1 - normalize-path: 3.0.0 + archiver-utils: 5.0.2 + compress-commons: 6.0.2 readable-stream: 4.7.0 zod@3.25.57: {} @@ -44974,13 +42452,9 @@ snapshots: zod@4.4.3: {} - zod@4.5.4: {} - - zod@4.6.6: {} - - zustand@5.0.12(@types/react@19.2.9)(immer@10.1.1)(react@19.2.9)(use-sync-external-store@1.6.0(react@19.2.9)): + zustand@5.0.12(@types/react@19.2.9)(immer@10.1.1)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3)): optionalDependencies: '@types/react': 19.2.9 immer: 10.1.1 - react: 19.2.9 - use-sync-external-store: 1.6.0(react@19.2.9) + react: 19.2.3 + use-sync-external-store: 1.6.0(react@19.2.3) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c5c9bae1df..8acd26aaaf 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,12 @@ cleanupUnusedCatalogs: true minimumReleaseAge: 1440 +minimumReleaseAgeExclude: + - solid-js + - '@solidjs/*' + - babel-preset-solid + - babel-plugin-jsx-dom-expressions + - '@dom-expressions/*' + - vite-plugin-solid linkWorkspacePackages: true preferWorkspacePackages: true blockExoticSubdeps: true @@ -9,8 +16,9 @@ trustPolicyExclude: - 'chokidar@4.0.3' # known to be safe, installed by sass, prisma, netlify... no planned releases in v4, packages is on v5 now - 'semver@6.3.1' # installed by babel, ecosystem has been on v7 for 7 years now, but babel is horribly out of date, 6.3.1 is the latest v6 and was released 3 years ago - 'undici@6.21.2' # installed by cheerio@1.0.0 -> html-link-extractor@1.0.5 -> markdown-link-extractor@4.0.3, is only 1 year old, v6, v7 and v8 are maintained in parallel - - '@platformatic/flame@1.7.0' # trusted publishing failed due to a missing sigstore module in npm, then an established maintainer published it manually - - '@netlify/serverless-functions-api@2.21.2 || 2.18.0' # Netlify's repo went private Aug 2023, provenance never returned for any version since. Two versions: @netlify/server-dev wants ^2.21.2, @netlify/zip-it-and-ship-it pins an exact 2.18.0 + - '@netlify/edge-bundler@14.7.0' # existing Netlify dev transitive flagged by pnpm 11.9 trust downgrade checks + - '@netlify/serverless-functions-api@2.7.1' # existing Netlify dev transitive flagged by pnpm 11.9 trust downgrade checks + - '@netlify/zip-it-and-ship-it@14.1.11' # existing Netlify dev transitive flagged by pnpm 11.9 trust downgrade checks packages: - 'packages/*' @@ -32,49 +40,22 @@ packages: - 'e2e/eslint-plugin-start' catalog: - '@babel/core': ^7.29.7 - '@babel/types': ^7.29.8 - '@arethetypeswrong/cli': ^0.18.4 - '@eslint-react/eslint-plugin': ^1.26.2 - '@rsbuild/core': ^2.3.1 - '@tanstack/vite-config': 0.5.2 - '@testing-library/jest-dom': ^7.0.1 - '@testing-library/react': ^16.2.0 - '@vitejs/plugin-react': ^6.0.1 - '@vitejs/plugin-vue-jsx': ^4.1.2 - '@vitest/ui': ^5.0.4 - react: ~19.2.9 - react-dom: ~19.2.9 + react: ^19.2.3 + react-dom: ^19.2.3 '@types/react': ^19.2.8 '@types/react-dom': ^19.2.3 eslint: ^9.22.0 - eslint-plugin-react-hooks: ^5.1.0 - chokidar: ^5.0.0 - combinate: ^1.1.11 - isbot: ^5.1.22 - jsdom: ^25.0.1 - pathe: ^2.0.3 - publint: ^0.3.16 - redaxios: ^0.5.1 - rimraf: ^6.1.2 - solid-js: 1.9.12 - tinyglobby: ^0.2.17 - vite: ^8.3.4 - vite-plugin-solid: 2.11.10 - vitest: ^5.0.4 - vue: ^3.5.25 - zod: ^4.5.4 + vite: ^8.0.14 '@types/node': 25.0.9 - '@playwright/test': ^1.63.0 - '@tanstack/query-core': ^5.102.0 - '@tanstack/react-query': ^5.102.0 - '@tanstack/solid-query': ^5.102.0 - '@tanstack/vue-query': ^5.102.0 + '@playwright/test': ^1.57.0 + '@tanstack/query-core': ^5.99.0 + '@tanstack/react-query': ^5.99.0 + '@tanstack/solid-query': ^6.0.0-beta.5 + '@tanstack/vue-query': ^5.99.0 overrides: '@types/babel__traverse': '^7.28.0' vite-plugin-dts: 4.2.3 - solid-js: 'catalog:' react: 'catalog:' react-dom: 'catalog:' '@types/react': 'catalog:' @@ -125,6 +106,7 @@ overrides: '@tanstack/eslint-plugin-router': 'workspace:*' '@tanstack/router-utils': 'workspace:*' '@tanstack/start-static-server-functions': 'workspace:*' + '@tanstack/nitro-v2-vite-plugin': 'workspace:*' allowBuilds: # root dependency diff --git a/scripts/benchmarks/bundle-size/build.mjs b/scripts/benchmarks/bundle-size/build.mjs deleted file mode 100644 index dfb32c923a..0000000000 --- a/scripts/benchmarks/bundle-size/build.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import { spawnSync } from 'node:child_process' -import path from 'node:path' -import { fileURLToPath, pathToFileURL } from 'node:url' - -const repoRoot = fileURLToPath(new URL('../../../', import.meta.url)) - -/** - * Run report generation outside Nx so it also runs after a cache hit. - * @param {string[]} args - * @param {import('./run.mjs').Execute} [execute] - */ -export function build(args, execute = spawnSync) { - /** @type {import('./run.mjs').CommandOptions} */ - const options = { cwd: repoRoot, env: process.env, stdio: 'inherit' } - const result = execute( - process.env.npm_execpath || 'pnpm', - ['exec', 'nx', 'run', '@benchmarks/bundle-size:measure', ...args], - options, - ) - if (result.status !== 0) { - return result.status || 1 - } - const report = execute( - process.execPath, - [fileURLToPath(new URL('./report.mjs', import.meta.url))], - options, - ) - return report.status ?? 1 -} - -if ( - process.argv[1] && - import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href -) { - process.exitCode = build(process.argv.slice(2)) -} diff --git a/scripts/benchmarks/bundle-size/build.test.mjs b/scripts/benchmarks/bundle-size/build.test.mjs deleted file mode 100644 index 779824c35a..0000000000 --- a/scripts/benchmarks/bundle-size/build.test.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import assert from 'node:assert/strict' -import path from 'node:path' -import test from 'node:test' -import { build } from './build.mjs' - -test('generates a fresh report after a successful Nx run, including cache hits', () => { - /** @type {string[][]} */ - const calls = [] - const status = build( - ['--outputStyle=stream', '--skipRemoteCache'], - (_command, args, options) => { - calls.push(args) - assert.equal(options.stdio, 'inherit') - assert.ok(!('shell' in options)) - return { status: 0 } - }, - ) - assert.equal(status, 0) - assert.equal(calls.length, 2) - assert.deepEqual(calls[0], [ - 'exec', - 'nx', - 'run', - '@benchmarks/bundle-size:measure', - '--outputStyle=stream', - '--skipRemoteCache', - ]) - assert.equal(path.basename(calls[1]?.[0] || ''), 'report.mjs') -}) - -test('does not report stale measurements after a failed or interrupted build', () => { - for (const exitCode of [2, null]) { - let calls = 0 - assert.equal( - build([], () => { - calls++ - return { status: exitCode } - }), - exitCode || 1, - ) - assert.equal(calls, 1) - } -}) - -test('propagates report failures', () => { - let calls = 0 - assert.equal( - build([], () => ({ status: ++calls === 1 ? 0 : 3 })), - 3, - ) -}) diff --git a/scripts/benchmarks/bundle-size/compress.mjs b/scripts/benchmarks/bundle-size/compress.mjs deleted file mode 100644 index f30d8794ca..0000000000 --- a/scripts/benchmarks/bundle-size/compress.mjs +++ /dev/null @@ -1,64 +0,0 @@ -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 deleted file mode 100644 index a73b93b77c..0000000000 --- a/scripts/benchmarks/bundle-size/compress.test.mjs +++ /dev/null @@ -1,179 +0,0 @@ -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/diff.mjs b/scripts/benchmarks/bundle-size/diff.mjs index 154c43ccd5..bd698bb9eb 100644 --- a/scripts/benchmarks/bundle-size/diff.mjs +++ b/scripts/benchmarks/bundle-size/diff.mjs @@ -13,7 +13,6 @@ const { values } = parseArgs({ default: 'benchmarks/bundle-size/results/current.json', }, id: { type: 'string' }, - 'current-only': { type: 'boolean' }, json: { type: 'boolean' }, }, }) @@ -34,9 +33,7 @@ const baselineById = byId(readCurrent(values.baseline)) const currentById = byId(readCurrent(values.current)) const ids = values.id ? [values.id] - : values['current-only'] - ? [...currentById.keys()].sort() - : [...new Set([...baselineById.keys(), ...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/measure.mjs b/scripts/benchmarks/bundle-size/measure.mjs index 4a990feaf9..94d12b39b7 100644 --- a/scripts/benchmarks/bundle-size/measure.mjs +++ b/scripts/benchmarks/bundle-size/measure.mjs @@ -7,12 +7,10 @@ import path from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' import { parseArgs as parseNodeArgs } from 'node:util' import vm from 'node:vm' -import { execFileSync } from 'node:child_process' +import { brotliCompressSync, gzipSync } from 'node:zlib' +import { execFileSync, execSync } 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)' @@ -66,14 +64,6 @@ const SCENARIOS = [ packageName: '@tanstack/react-start', case: 'minimal', }, - { - id: 'react-start.query-integration', - dir: 'react-start-query-integration', - framework: 'react', - packageName: '@tanstack/react-start', - buildProjects: ['@tanstack/react-router-ssr-query'], - case: 'query-integration', - }, { id: 'react-start.deferred-hydration', dir: 'react-start-deferred-hydration', @@ -168,8 +158,6 @@ function parseArgs(argv) { analysis: { type: 'boolean' }, sourcemap: { type: 'boolean' }, 'skip-package-builds': { type: 'boolean' }, - 'measurements-only': { type: 'boolean' }, - timings: { type: 'boolean' }, }, }) @@ -183,8 +171,6 @@ function parseArgs(argv) { analysis: values.analysis === true, 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', } } @@ -316,6 +302,38 @@ 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 = [] @@ -449,16 +467,30 @@ async function importFromRoot(root, specifier) { return import(pathToFileURL(requireFromRoot.resolve(specifier)).href) } +function getGitStatus() { + try { + return { + branch: execSync('git branch --show-current', { + encoding: 'utf8', + }).trim(), + dirty: + execSync('git status --porcelain', { encoding: 'utf8' }).trim().length > + 0, + } + } catch { + return { + branch: '', + dirty: undefined, + } + } +} + function getPackageBuildProjects(scenarios) { const projects = new Set() for (const scenario of scenarios) { projects.add(scenario.packageName) - for (const project of scenario.buildProjects || []) { - projects.add(project) - } - if (scenario.packageName.endsWith('-router')) { projects.add('@tanstack/router-plugin') } @@ -479,7 +511,6 @@ function buildRequiredPackages({ repoRoot, scenarios, skipPackageBuilds }) { ) const args = [ - 'exec', 'nx', 'run-many', '--target=build', @@ -495,7 +526,7 @@ function buildRequiredPackages({ repoRoot, scenarios, skipPackageBuilds }) { args.push('--skipNxCache') } - execFileSync(process.env.npm_execpath || 'pnpm', args, { + execFileSync(process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm', args, { cwd: repoRoot, stdio: 'inherit', env: process.env, @@ -517,6 +548,8 @@ async function buildViteScenario({ root, outDir, sourcemap }) { build: { outDir, emptyOutDir: true, + target: 'es2022', + minify: 'esbuild', sourcemap: sourcemap ? 'hidden' : false, reportCompressedSize: false, manifest: true, @@ -799,6 +832,18 @@ async function resolveBundleFiles({ outDir, scenario }) { } } +function getCurrentSha(providedSha) { + if (providedSha) { + return providedSha + } + + if (process.env.GITHUB_SHA) { + return process.env.GITHUB_SHA + } + + return execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim() +} + function buildCommitUrl(sha) { const repo = process.env.GITHUB_REPOSITORY @@ -852,24 +897,6 @@ 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) - ) { - throw new Error( - '--measurements-only cannot be combined with report metadata or history options', - ) - } const scriptDir = path.dirname(fileURLToPath(import.meta.url)) const repoRoot = path.resolve(scriptDir, '../../../') @@ -884,21 +911,14 @@ async function measure(args, timings) { const measuredAtIso = args.measuredAt ? toIsoDate(args.measuredAt) : new Date().toISOString() + const sha = getCurrentSha(args.sha) const startedAt = Date.now() const scenarios = filterScenarios(args.scenario) - const finishPackageBuilds = args.skipPackageBuilds - ? undefined - : timings?.start('package-builds') - let packageBuildProjects - try { - packageBuildProjects = buildRequiredPackages({ - repoRoot, - scenarios, - skipPackageBuilds: args.skipPackageBuilds, - }) - } finally { - finishPackageBuilds?.() - } + const packageBuildProjects = buildRequiredPackages({ + repoRoot, + scenarios, + skipPackageBuilds: args.skipPackageBuilds, + }) await fsp.mkdir(resultsDir, { recursive: true }) await fsp.mkdir(distDir, { recursive: true }) @@ -909,32 +929,18 @@ async function measure(args, timings) { const root = path.join(scenariosRoot, scenario.dir) const outDir = path.join(distDir, scenario.outDir || scenario.dir) - const finishBuild = timings?.start('scenario-build', scenario.id) - try { - await buildScenario({ - root, - outDir, - scenario, - sourcemap: args.sourcemap || args.analysis, - }) - } finally { - finishBuild?.() - } + await buildScenario({ + root, + outDir, + scenario, + sourcemap: args.sourcemap || args.analysis, + }) - const finishManifest = timings?.start('manifest-resolution', scenario.id) - let bundleInfo - try { - bundleInfo = await resolveBundleFiles({ outDir, scenario }) - } finally { - finishManifest?.() - } - const { sizes, initialSizes } = measureFileSizes( + const bundleInfo = await resolveBundleFiles({ outDir, scenario }) + const sizes = sizesForFiles(bundleInfo.manifestOutDir, bundleInfo.jsFiles) + const initialSizes = sizesForFiles( 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) => ({ @@ -964,33 +970,34 @@ async function measure(args, timings) { } if (args.analysis) { - const finishAnalysis = timings?.start('analysis', scenario.id) - try { - metric.sources = sourceAttributionForFiles( - bundleInfo.manifestOutDir, - bundleInfo.jsFiles, - ) - } finally { - finishAnalysis?.() - } + metric.sources = sourceAttributionForFiles( + bundleInfo.manifestOutDir, + bundleInfo.jsFiles, + ) } metrics.push(metric) } const completedAt = Date.now() - const measurements = { + const current = { schemaVersion: 1, benchmarkName: BENCHMARK_NAME, measuredAt: measuredAtIso, + generatedAt: new Date().toISOString(), + sha, status: { state: 'success', - 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' : ''}`, + 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' : ''}`, scenarioFilter: args.scenario || null, measuredScenarios: scenarios.map((scenario) => scenario.id), packageBuildProjects, skipPackageBuilds: args.skipPackageBuilds, durationMs: completedAt - startedAt, + git: { + sha, + ...getGitStatus(), + }, }, metrics, } @@ -1002,12 +1009,12 @@ async function measure(args, timings) { extra: `raw=${metric.rawBytes}; brotli=${metric.brotliBytes}; initial_gzip=${metric.initialGzipBytes}`, })) - const measurementsPath = path.join(resultsDir, 'measurements.json') + const currentPath = path.join(resultsDir, 'current.json') const benchmarkActionPath = path.join(resultsDir, 'benchmark-action.json') await fsp.writeFile( - measurementsPath, - JSON.stringify(measurements, null, 2) + '\n', + currentPath, + JSON.stringify(current, null, 2) + '\n', 'utf8', ) await fsp.writeFile( @@ -1016,20 +1023,17 @@ async function measure(args, timings) { 'utf8', ) - if (!args.measurementsOnly) { - const report = writeReport(resultsDir, { sha: args.sha }) - if (args.appendHistory) { - await appendHistoryFile({ - historyPath: path.resolve(args.appendHistory), - measuredAtIso, - sha: report.sha, - benches: benchmarkActionRows, - }) - } + if (args.appendHistory) { + await appendHistoryFile({ + historyPath: path.resolve(args.appendHistory), + measuredAtIso, + sha, + benches: benchmarkActionRows, + }) } process.stdout.write( - `Measured ${metrics.length} scenarios. Wrote ${path.relative(repoRoot, measurementsPath)} and ${path.relative(repoRoot, benchmarkActionPath)}\n`, + `Measured ${metrics.length} scenarios. Wrote ${path.relative(repoRoot, currentPath)} and ${path.relative(repoRoot, benchmarkActionPath)}\n`, ) } diff --git a/scripts/benchmarks/bundle-size/pr-report.mjs b/scripts/benchmarks/bundle-size/pr-report.mjs index eda88d22f0..5118d877ec 100644 --- a/scripts/benchmarks/bundle-size/pr-report.mjs +++ b/scripts/benchmarks/bundle-size/pr-report.mjs @@ -10,11 +10,15 @@ const DEFAULT_MARKER = '' const INT_FORMAT = new Intl.NumberFormat('en-US', { maximumFractionDigits: 0, }) -const FIXED_1_FORMAT = new Intl.NumberFormat('en-US', { - minimumFractionDigits: 1, - maximumFractionDigits: 1, +const FIXED_2_FORMAT = new Intl.NumberFormat('en-US', { + minimumFractionDigits: 2, + maximumFractionDigits: 2, +}) +const PERCENT_FORMAT = new Intl.NumberFormat('en-US', { + style: 'percent', + minimumFractionDigits: 2, + maximumFractionDigits: 2, }) -const METRIC_KEYS = ['gzipBytes', 'initialGzipBytes', 'rawBytes', 'brotliBytes'] function parseArgs(argv) { const { values } = parseNodeArgs({ @@ -102,14 +106,14 @@ function formatBytes(bytes, opts = {}) { let value if (absBytes < 1024) { - value = `${INT_FORMAT.format(absBytes)} B` + value = `${INT_FORMAT.format(absBytes)} B` } else { const kib = absBytes / 1024 if (kib < 1024) { - value = `${FIXED_1_FORMAT.format(kib)} KiB` + value = `${FIXED_2_FORMAT.format(kib)} KiB` } else { const mib = kib / 1024 - value = `${FIXED_1_FORMAT.format(mib)} MiB` + value = `${FIXED_2_FORMAT.format(mib)} MiB` } } @@ -122,11 +126,9 @@ function formatDelta(current, baseline) { } const delta = current - baseline - return formatBytes(delta, { signed: true }) -} - -function formatMetricCell(current, baseline) { - return `${formatBytes(current)}
${formatDelta(current, baseline)}` + const ratio = baseline === 0 ? 0 : Math.abs(delta / baseline) + const sign = delta > 0 ? '+' : delta < 0 ? '-' : '' + return `${formatBytes(delta, { signed: true })} (${sign}${PERCENT_FORMAT.format(ratio)})` } function sparkline(values) { @@ -190,27 +192,6 @@ function buildSeriesByScenario(historyEntries) { return map } -function parseBenchmarkExtra(extra) { - if (typeof extra !== 'string') { - return {} - } - - const values = {} - for (const part of extra.split(';')) { - const [key, rawValue] = part.trim().split('=') - const value = Number(rawValue) - if (key && Number.isFinite(value)) { - values[key] = value - } - } - - return { - rawBytes: values.raw, - brotliBytes: values.brotli, - initialGzipBytes: values.initial_gzip, - } -} - function resolveBaselineFromHistory(historyEntries, baseSha) { if (!historyEntries.length) { return { @@ -231,10 +212,7 @@ function resolveBaselineFromHistory(historyEntries, baseSha) { const benchesByName = new Map() for (const bench of baseEntry?.benches || []) { if (typeof bench?.name === 'string' && Number.isFinite(bench?.value)) { - benchesByName.set(bench.name, { - gzipBytes: Number(bench.value), - ...parseBenchmarkExtra(bench.extra), - }) + benchesByName.set(bench.name, Number(bench.value)) } } @@ -250,7 +228,7 @@ function resolveBaselineFromCurrentJson(currentJson) { const benchesByName = new Map() for (const metric of currentJson?.metrics || []) { if (typeof metric?.id === 'string' && Number.isFinite(metric?.gzipBytes)) { - benchesByName.set(metric.id, metric) + benchesByName.set(metric.id, Number(metric.gzipBytes)) } } @@ -290,22 +268,10 @@ async function main() { ? resolveBaselineFromCurrentJson(baselineCurrent) : resolveBaselineFromHistory(historyEntries, args.baseSha) - const metrics = current.metrics || [] const rows = [] - for (const metric of metrics) { - const baselineMetric = baseline.benchesByName.get(metric.id) - const hasBaseline = METRIC_KEYS.every((key) => - Number.isFinite(baselineMetric?.[key]), - ) - - if ( - hasBaseline && - METRIC_KEYS.every((key) => metric[key] === baselineMetric[key]) - ) { - continue - } - + for (const metric of current.metrics || []) { + const baselineValue = baseline.benchesByName.get(metric.id) const historySeries = (seriesByScenario.get(metric.id) || []).slice( // Reserve one slot for the current metric so the sparkline stays at trendPoints. -args.trendPoints + 1, @@ -320,20 +286,11 @@ async function main() { rows.push({ id: metric.id, - currentCell: formatMetricCell( - metric.gzipBytes, - baselineMetric?.gzipBytes, - ), - initialCell: formatMetricCell( - metric.initialGzipBytes, - baselineMetric?.initialGzipBytes, - ), - rawCell: formatMetricCell(metric.rawBytes, baselineMetric?.rawBytes), - brotliCell: formatMetricCell( - metric.brotliBytes, - baselineMetric?.brotliBytes, - ), - hasBaseline, + current: metric.gzipBytes, + raw: metric.rawBytes, + brotli: metric.brotliBytes, + initial: metric.initialGzipBytes, + deltaCell: formatDelta(metric.gzipBytes, baselineValue), trendCell: sparkline(historySeries.slice(-args.trendPoints)), }) } @@ -342,46 +299,31 @@ async function main() { lines.push(args.marker) lines.push('## Bundle Size Benchmarks') lines.push('') + lines.push(`- Commit: \`${formatShortSha(current.sha)}\``) + lines.push( + `- Measured at: \`${current.measuredAt || current.generatedAt || 'unknown'}\``, + ) + lines.push(`- Baseline source: \`${baseline.source}\``) + if (args.dashboardUrl) { + lines.push(`- Dashboard: [bundle-size history](${args.dashboardUrl})`) + } + lines.push('') + lines.push( + '| Scenario | Current (gzip) | Delta vs baseline | Initial gzip | Raw | Brotli | Trend |', + ) + lines.push('| --- | ---: | ---: | ---: | ---: | ---: | --- |') - if (metrics.length > 0 && rows.length === 0) { + for (const row of rows) { lines.push( - 'This pull request does not affect bundle size in any measured scenario.', - ) - } else if (metrics.length === 0) { - lines.push('No bundle-size scenarios were measured.') - } else { - lines.push(`- Commit: \`${formatShortSha(current.sha)}\``) - lines.push( - `- Measured at: \`${current.measuredAt || current.generatedAt || 'unknown'}\``, - ) - lines.push(`- Baseline source: \`${baseline.source}\``) - if (args.dashboardUrl) { - lines.push(`- Dashboard: [bundle-size history](${args.dashboardUrl})`) - } - lines.push('') - lines.push( - rows.some((row) => !row.hasBaseline) - ? 'The following scenarios have bundle-size changes or lack baseline data for comparison:' - : 'The following scenarios have bundle-size changes compared with the baseline:', - ) - lines.push('') - lines.push( - '| Scenario | Current (gzip) | Initial (gzip) | Raw | Brotli | Trend |', - ) - lines.push('| --- | ---: | ---: | ---: | ---: | --- |') - - for (const row of rows) { - lines.push( - `| \`${row.id}\` | ${row.currentCell} | ${row.initialCell} | ${row.rawCell} | ${row.brotliCell} |
${row.trendCell}
|`, - ) - } - - lines.push('') - lines.push( - '_Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better._', + `| \`${row.id}\` | ${formatBytes(row.current)} | ${row.deltaCell} | ${formatBytes(row.initial)} | ${formatBytes(row.raw)} | ${formatBytes(row.brotli)} | ${row.trendCell} |`, ) } + lines.push('') + lines.push( + '_Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better._', + ) + const markdown = lines.join('\n') + '\n' await fsp.mkdir(path.dirname(outputPath), { recursive: true }) await fsp.writeFile(outputPath, markdown, 'utf8') diff --git a/scripts/benchmarks/bundle-size/pr-report.test.mjs b/scripts/benchmarks/bundle-size/pr-report.test.mjs deleted file mode 100644 index e7e397ec3e..0000000000 --- a/scripts/benchmarks/bundle-size/pr-report.test.mjs +++ /dev/null @@ -1,164 +0,0 @@ -import assert from 'node:assert/strict' -import { execFile } from 'node:child_process' -import { promises as fs } from 'node:fs' -import os from 'node:os' -import path from 'node:path' -import { promisify } from 'node:util' -import test from 'node:test' - -const execFileAsync = promisify(execFile) -const reportScript = new URL('./pr-report.mjs', import.meta.url) - -function metric(id, gzipBytes, overrides = {}) { - return { - id, - gzipBytes, - rawBytes: gzipBytes * 3, - brotliBytes: gzipBytes - 100, - initialGzipBytes: gzipBytes - 10, - ...overrides, - } -} - -function historyBench(value) { - return { - name: value.id, - value: value.gzipBytes, - extra: `raw=${value.rawBytes}; brotli=${value.brotliBytes}; initial_gzip=${value.initialGzipBytes}`, - } -} - -async function generateReport({ current, baseline, history, baseSha }) { - const fixtureDir = await fs.mkdtemp( - path.join(os.tmpdir(), 'bundle-size-pr-report-'), - ) - - try { - const currentPath = path.join(fixtureDir, 'current.json') - const outputPath = path.join(fixtureDir, 'report.md') - const args = [ - reportScript.pathname, - '--current', - currentPath, - '--output', - outputPath, - ] - - await fs.writeFile(currentPath, JSON.stringify(current)) - - if (baseline) { - const baselinePath = path.join(fixtureDir, 'baseline.json') - await fs.writeFile(baselinePath, JSON.stringify(baseline)) - args.push('--baseline', baselinePath) - } - - if (history) { - const historyPath = path.join(fixtureDir, 'history.json') - await fs.writeFile(historyPath, JSON.stringify(history)) - args.push('--history', historyPath) - } - - if (baseSha) { - args.push('--base-sha', baseSha) - } - - await execFileAsync(process.execPath, args) - return await fs.readFile(outputPath, 'utf8') - } finally { - await fs.rm(fixtureDir, { recursive: true, force: true }) - } -} - -function currentJson(metrics) { - return { - benchmarkName: 'Bundle Size (gzip)', - measuredAt: '2026-07-19T09:45:56.787Z', - sha: '126aa13f296b1234', - metrics, - } -} - -test('renders a concise message when no measured scenario changed', async () => { - const current = currentJson([metric('react-router.minimal', 1_000)]) - const report = await generateReport({ current, baseline: current }) - - assert.equal( - report, - '\n## Bundle Size Benchmarks\n\nThis pull request does not affect bundle size in any measured scenario.\n', - ) -}) - -test('renders only scenarios that changed against the historical baseline', async () => { - const unchangedMetric = metric('react-router.minimal', 1_000) - const baselineMetric = metric('react-router.full', 1_100) - const current = currentJson([ - unchangedMetric, - metric('react-router.full', 1_200), - ]) - const history = { - entries: { - [current.benchmarkName]: [ - { - commit: { id: 'baseline-sha' }, - benches: [ - historyBench(unchangedMetric), - historyBench(baselineMetric), - ], - }, - ], - }, - } - const report = await generateReport({ - current, - history, - baseSha: 'baseline-sha', - }) - - assert.match( - report, - /The following scenarios have bundle-size changes compared with the baseline:/, - ) - assert.doesNotMatch(report, /`react-router\.minimal`/) - assert.match( - report, - /\| Scenario \| Current \(gzip\) \| Initial \(gzip\) \| Raw \| Brotli \| Trend \|/, - ) - assert.doesNotMatch(report, /Delta vs baseline|%/) - assert.match( - report, - /\| `react-router\.full` \| 1\.2 KiB
\+100 B \| 1\.2 KiB
\+100 B \| 3\.5 KiB
\+300 B \| 1\.1 KiB
\+100 B \|
▁█<\/pre> \|/,
-  )
-})
-
-test('keeps scenarios that do not have baseline data visible', async () => {
-  const current = currentJson([
-    metric('react-router.minimal', 1_000),
-    metric('new-scenario', 900),
-  ])
-  const baseline = currentJson([metric('react-router.minimal', 1_000)])
-  const report = await generateReport({ current, baseline })
-
-  assert.match(
-    report,
-    /The following scenarios have bundle-size changes or lack baseline data for comparison:/,
-  )
-  assert.doesNotMatch(report, /`react-router\.minimal`/)
-  assert.match(
-    report,
-    /\| `new-scenario` \| 900 B
n\/a \| 890 B
n\/a \| 2\.6 KiB
n\/a \| 800 B
n\/a \|/, - ) -}) - -test('renders scenarios when only a secondary metric changed', async () => { - const baselineMetric = metric('react-router.minimal', 1_000) - const current = currentJson([ - metric('react-router.minimal', 1_000, { rawBytes: 3_002 }), - ]) - const baseline = currentJson([baselineMetric]) - const report = await generateReport({ current, baseline }) - - assert.match( - report, - /\| `react-router\.minimal` \| 1,000 B
0 B \| 990 B
0 B \| 2\.9 KiB
\+2 B \| 900 B
0 B \|/, - ) -}) diff --git a/scripts/benchmarks/bundle-size/report.mjs b/scripts/benchmarks/bundle-size/report.mjs deleted file mode 100644 index d5e8e5c029..0000000000 --- a/scripts/benchmarks/bundle-size/report.mjs +++ /dev/null @@ -1,82 +0,0 @@ -import { execFileSync } from 'node:child_process' -import fs from 'node:fs' -import path from 'node:path' -import { fileURLToPath, pathToFileURL } from 'node:url' -import { parseArgs } from 'node:util' - -const repoRoot = fileURLToPath(new URL('../../../', import.meta.url)) - -function getGitStatus() { - try { - return { - branch: execFileSync('git', ['branch', '--show-current'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim(), - dirty: - execFileSync('git', ['status', '--porcelain'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim().length > 0, - } - } catch { - return { branch: '', dirty: undefined } - } -} - -/** - * Attach the current checkout's metadata after Nx has restored measurements. - * The measurement time and duration still describe the original build. - * @param {string} resultsDir - * @param {{ sha?: string }} [options] - */ -export function writeReport(resultsDir, { sha: providedSha } = {}) { - const measurements = JSON.parse( - fs.readFileSync(path.join(resultsDir, 'measurements.json'), 'utf8'), - ) - const sha = - providedSha || - process.env.GITHUB_SHA || - execFileSync('git', ['rev-parse', 'HEAD'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim() - const report = { - ...measurements, - generatedAt: new Date().toISOString(), - sha, - status: { - ...measurements.status, - git: { sha, ...getGitStatus() }, - }, - } - fs.writeFileSync( - path.join(resultsDir, 'current.json'), - JSON.stringify(report, null, 2) + '\n', - ) - return report -} - -if ( - process.argv[1] && - import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href -) { - try { - const { values } = parseArgs({ - options: { - 'results-dir': { type: 'string' }, - sha: { type: 'string' }, - }, - }) - const resultsDir = values['results-dir'] - ? path.resolve(values['results-dir']) - : path.join(repoRoot, 'benchmarks/bundle-size/results') - writeReport(resultsDir, { sha: values.sha }) - console.log( - `Wrote ${path.relative(repoRoot, path.join(resultsDir, 'current.json'))}`, - ) - } catch (error) { - console.error(error instanceof Error ? error.message : error) - process.exitCode = 1 - } -} diff --git a/scripts/benchmarks/bundle-size/report.test.mjs b/scripts/benchmarks/bundle-size/report.test.mjs deleted file mode 100644 index 5b58fae39c..0000000000 --- a/scripts/benchmarks/bundle-size/report.test.mjs +++ /dev/null @@ -1,111 +0,0 @@ -import assert from 'node:assert/strict' -import { execFileSync, spawnSync } from 'node:child_process' -import fs from 'node:fs' -import os from 'node:os' -import path from 'node:path' -import test from 'node:test' -import { fileURLToPath } from 'node:url' -import { writeReport } from './report.mjs' - -const repoRoot = fileURLToPath(new URL('../../../', import.meta.url)) -const scriptPath = fileURLToPath(new URL('./report.mjs', import.meta.url)) - -/** @param {import('node:test').TestContext} t */ -function fixture(t) { - const root = fs.mkdtempSync(path.join(os.tmpdir(), 'bundle-report-')) - t.after(() => fs.rmSync(root, { recursive: true, force: true })) - const measurements = { - schemaVersion: 1, - benchmarkName: 'Bundle Size (gzip)', - measuredAt: '2026-01-01T00:00:00.000Z', - status: { - state: 'success', - durationMs: 123, - measuredScenarios: ['react-router.minimal'], - }, - metrics: [{ id: 'react-router.minimal', gzipBytes: 100 }], - } - const serialized = JSON.stringify(measurements) - fs.writeFileSync(path.join(root, 'measurements.json'), serialized) - fs.writeFileSync(path.join(root, 'benchmark-action.json'), '[]\n') - return { root, measurements, serialized } -} - -test('refreshes commit metadata without modifying cached measurements or their timestamps', (t) => { - const { root, measurements, serialized } = fixture(t) - writeReport(root, { sha: 'old-commit' }) - const startedAt = Date.now() - const report = writeReport(root, { sha: 'new-commit' }) - assert.equal(report.sha, 'new-commit') - assert.deepEqual(report.status.git, { - sha: 'new-commit', - branch: execFileSync('git', ['branch', '--show-current'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim(), - dirty: - execFileSync('git', ['status', '--porcelain'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim().length > 0, - }) - assert.equal(report.measuredAt, measurements.measuredAt) - assert.equal(report.status.durationMs, measurements.status.durationMs) - assert.deepEqual(report.metrics, measurements.metrics) - assert.ok(Date.parse(report.generatedAt) >= startedAt) - assert.deepEqual( - JSON.parse(fs.readFileSync(path.join(root, 'current.json'), 'utf8')), - report, - ) - assert.equal( - fs.readFileSync(path.join(root, 'measurements.json'), 'utf8'), - serialized, - ) - assert.equal( - fs.readFileSync(path.join(root, 'benchmark-action.json'), 'utf8'), - '[]\n', - ) -}) - -test('CLI uses the current CI SHA, an explicit override, or the checkout SHA', (t) => { - const { root } = fixture(t) - const checkoutSha = execFileSync('git', ['rev-parse', 'HEAD'], { - cwd: repoRoot, - encoding: 'utf8', - }).trim() - /** @type {Array<[string, string[], string]>} */ - const cases = [ - ['ci-commit', [], 'ci-commit'], - ['ci-commit', ['--sha', 'explicit-commit'], 'explicit-commit'], - ['', [], checkoutSha], - ] - for (const [githubSha, args, expected] of cases) { - const result = spawnSync( - process.execPath, - [scriptPath, '--results-dir', root, ...args], - { - env: { ...process.env, GITHUB_SHA: githubSha }, - encoding: 'utf8', - }, - ) - assert.equal(result.status, 0, result.stderr) - const report = JSON.parse( - fs.readFileSync(path.join(root, 'current.json'), 'utf8'), - ) - assert.equal(report.sha, expected) - assert.equal(report.status.git.sha, expected) - } -}) - -test('fails when cached measurements are missing instead of reusing an old report', (t) => { - const { root } = fixture(t) - fs.rmSync(path.join(root, 'measurements.json')) - fs.writeFileSync(path.join(root, 'current.json'), '{"sha":"old-commit"}') - const result = spawnSync( - process.execPath, - [scriptPath, '--results-dir', root], - { encoding: 'utf8' }, - ) - assert.notEqual(result.status, 0) - assert.match(result.stderr, /measurements\.json/) -}) diff --git a/scripts/benchmarks/bundle-size/run.mjs b/scripts/benchmarks/bundle-size/run.mjs deleted file mode 100644 index a4a0cc73d2..0000000000 --- a/scripts/benchmarks/bundle-size/run.mjs +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env node - -import { spawnSync } from 'node:child_process' -import fs from 'node:fs' -import path from 'node:path' -import { fileURLToPath, pathToFileURL } from 'node:url' -import { parseArgs } from 'node:util' - -const scriptDir = path.dirname(fileURLToPath(import.meta.url)) -const repoRoot = path.resolve(scriptDir, '../../..') - -/** - * @typedef {object} CommandOptions - * @property {string} cwd - * @property {NodeJS.ProcessEnv} env - * @property {'inherit' | ['ignore', number, number]} stdio - * @typedef {(command: string, args: string[], options: CommandOptions) => {status: number | null, error?: Error, signal?: string | null}} Execute - */ - -/** - * @param {string} resultsRoot - * @param {string} name - */ -function namedRunDir(resultsRoot, name) { - if (!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(name)) { - throw new Error( - 'Run names must start with a letter or digit and contain only letters, digits, hyphens, or underscores.', - ) - } - return path.join(resultsRoot, 'runs', name) -} - -/** - * @param {string[]} argv - * @param {Execute} [execute] - */ -export function run(argv, execute = spawnSync) { - const separator = argv.indexOf('--') - const testArgs = separator === -1 ? [] : argv.slice(separator + 1) - const { values } = parseArgs({ - args: separator === -1 ? argv : argv.slice(0, separator), - allowPositionals: false, - options: { - name: { type: 'string' }, - baseline: { type: 'string' }, - 'test-projects': { type: 'string' }, - scenario: { type: 'string' }, - 'results-dir': { type: 'string' }, - 'dist-dir': { type: 'string' }, - analysis: { type: 'boolean' }, - sourcemap: { type: 'boolean' }, - timings: { type: 'boolean' }, - 'skip-package-builds': { type: 'boolean' }, - help: { type: 'boolean', short: 'h' }, - }, - }) - - if (values.help) { - console.log(`Usage: pnpm benchmark:bundle-size:run [options] [-- test arguments] - - --scenario Comma-separated scenarios; omit for all scenarios - --name Save a named run; existing results are not overwritten - --baseline Compare against a named run or a current.json file - --test-projects Run Nx unit tests before measurement - --results-dir Results root (default: benchmarks/bundle-size/results) - --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. -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 - } - - if (testArgs.length > 0 && !values['test-projects']) { - throw new Error('Test arguments after -- require --test-projects.') - } - if ( - values['test-projects'] !== undefined && - !values['test-projects'].split(',').some((name) => name.trim()) - ) { - throw new Error('--test-projects requires at least one project.') - } - if ( - values.scenario !== undefined && - !values.scenario.split(',').some((name) => name.trim()) - ) { - throw new Error('--scenario requires at least one scenario.') - } - - const resultsRoot = values['results-dir'] - ? path.resolve(values['results-dir']) - : path.join(repoRoot, 'benchmarks/bundle-size/results') - const resultsDir = - values.name === undefined - ? resultsRoot - : namedRunDir(resultsRoot, values.name) - const currentPath = path.join(resultsDir, 'current.json') - let baselinePath - - if (values.name !== undefined && fs.existsSync(currentPath)) { - throw new Error(`Named run already exists: ${values.name}`) - } - if (values.baseline !== undefined) { - baselinePath = fs.realpathSync( - /[/\\]|\.json$/i.test(values.baseline) - ? path.resolve(values.baseline) - : path.join(namedRunDir(resultsRoot, values.baseline), 'current.json'), - ) - const baseline = JSON.parse(fs.readFileSync(baselinePath, 'utf8')) - if (!Array.isArray(baseline.metrics) || baseline.metrics.length === 0) { - throw new Error(`Baseline contains no metrics: ${baselinePath}`) - } - if ( - fs.existsSync(currentPath) && - fs.realpathSync(currentPath) === baselinePath - ) { - throw new Error( - 'The baseline cannot be the current output. Use --name to save it first.', - ) - } - } - - fs.mkdirSync(resultsDir, { recursive: true }) - const env = { - ...process.env, - CI: '1', - NX_DAEMON: 'false', - FORCE_COLOR: '0', - } - - /** - * @param {string} label - * @param {string} command - * @param {string[]} args - */ - function step(label, command, args, logged = true) { - const logPath = path.join(resultsDir, `${label}.log`) - const fd = logged ? fs.openSync(logPath, 'w') : undefined - let result - try { - if (logged) { - console.error(`${label}: ${path.relative(repoRoot, logPath)}`) - } - result = execute(command, args, { - cwd: repoRoot, - env, - stdio: fd === undefined ? 'inherit' : ['ignore', fd, fd], - }) - } finally { - if (fd !== undefined) { - fs.closeSync(fd) - } - } - - if (result.error || result.status !== 0) { - console.error( - `${label} failed: ${result.error?.message || result.signal || `exit ${result.status}`}`, - ) - if (logged) { - const tail = fs - .readFileSync(logPath, 'utf8') - .slice(-8000) - .trimEnd() - .split(/\r?\n/) - .slice(-40) - .join('\n') - if (tail) { - console.error(tail) - } - } - return result.status || 1 - } - return 0 - } - - if (values['test-projects']) { - const status = step('tests', process.env.npm_execpath || 'pnpm', [ - 'exec', - 'nx', - 'run-many', - '--target=test:unit', - `--projects=${values['test-projects']}`, - '--parallel=1', - '--outputStyle=stream', - '--skipRemoteCache', - ...(testArgs.length > 0 ? ['--', ...testArgs] : []), - ]) - if (status !== 0) { - return status - } - } - - const measureArgs = [ - path.join(scriptDir, 'measure.mjs'), - '--results-dir', - resultsDir, - ] - for (const [option, value] of Object.entries({ - scenario: values.scenario, - 'dist-dir': - values['dist-dir'] === undefined - ? undefined - : path.resolve(values['dist-dir']), - })) { - if (value !== undefined) { - measureArgs.push(`--${option}`, value) - } - } - 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) { - measureArgs.push(`--${option}`) - } - } - - const status = step('measure', process.execPath, measureArgs) - if (status !== 0) { - return status - } - - return step( - 'report', - process.execPath, - [ - path.join(scriptDir, baselinePath ? 'diff.mjs' : 'query.mjs'), - '--current', - currentPath, - ...(baselinePath ? ['--baseline', baselinePath] : []), - ...(baselinePath && values.scenario ? ['--current-only'] : []), - ], - false, - ) -} - -if ( - process.argv[1] && - import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href -) { - try { - process.exitCode = run(process.argv.slice(2)) - } catch (error) { - console.error(error instanceof Error ? error.message : error) - process.exitCode = 1 - } -} diff --git a/scripts/benchmarks/bundle-size/run.test.mjs b/scripts/benchmarks/bundle-size/run.test.mjs deleted file mode 100644 index 335455cb5a..0000000000 --- a/scripts/benchmarks/bundle-size/run.test.mjs +++ /dev/null @@ -1,434 +0,0 @@ -import assert from 'node:assert/strict' -import { spawnSync } from 'node:child_process' -import fs from 'node:fs' -import os from 'node:os' -import path from 'node:path' -import test from 'node:test' -import { fileURLToPath } from 'node:url' -import { run } from './run.mjs' - -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, - ids = ['react-router.minimal'], -) { - fs.mkdirSync(path.dirname(filePath), { recursive: true }) - fs.writeFileSync( - filePath, - JSON.stringify({ - metrics: ids.map((id) => ({ - id, - gzipBytes, - initialGzipBytes: gzipBytes, - rawBytes: gzipBytes * 3, - brotliBytes: gzipBytes - 10, - })), - }), - ) -} - -/** @param {import('node:test').TestContext} 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}>} */ - const calls = [] - /** @type {string[]} */ - const messages = [] - /** @type {string[]} */ - const reports = [] - t.mock.method( - console, - 'error', - /** @param {string} message */ - (message) => messages.push(message), - ) - - /** @type {import('./run.mjs').Execute} */ - const execute = (command, args, options) => { - calls.push({ command, args, options }) - if (args[0] === measurePath) { - const outputDir = args[args.indexOf('--results-dir') + 1] - assert.ok(outputDir) - writeCurrent(path.join(outputDir, 'current.json'), 90, measuredIds) - } - if (options.stdio !== 'inherit') { - fs.writeSync(options.stdio[1], 'noisy stdout\n') - fs.writeSync(options.stdio[2], 'noisy stderr\n') - return { status: 0 } - } - const result = spawnSync(command, args, { - ...options, - stdio: 'pipe', - encoding: 'utf8', - }) - reports.push(result.stdout) - return result - } - - return { root, calls, messages, reports, execute } -} - -test('runs targeted tests before measurement and saves named results and logs', (t) => { - const { root, calls, messages, reports, execute } = fixture(t) - const status = run( - [ - '--results-dir', - root, - '--name', - 'baseline', - '--scenario', - 'react-router.minimal,react-router.full', - '--test-projects', - '@tanstack/router-core,@tanstack/react-router', - '--', - 'tests/path.test.ts', - 'tests/link.test.tsx', - '-t', - 'links with spaces', - ], - execute, - ) - - assert.equal(status, 0) - assert.equal(calls.length, 3) - const [tests, measure] = calls - assert.ok(tests && measure) - assert.ok(tests.args.includes('--target=test:unit')) - assert.ok(tests.args.includes('--parallel=1')) - assert.ok(tests.args.includes('--skipRemoteCache')) - assert.ok( - tests.args.includes( - '--projects=@tanstack/router-core,@tanstack/react-router', - ), - ) - assert.deepEqual(tests.args.slice(-5), [ - '--', - 'tests/path.test.ts', - 'tests/link.test.tsx', - '-t', - 'links with spaces', - ]) - 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') - assert.equal(options.env.NX_DAEMON, 'false') - assert.ok(!('shell' in options)) - } - const runDir = path.join(root, 'runs/baseline') - assert.ok(fs.existsSync(path.join(runDir, 'current.json'))) - for (const step of ['tests', 'measure']) { - assert.equal( - fs.readFileSync(path.join(runDir, `${step}.log`), 'utf8'), - 'noisy stdout\nnoisy stderr\n', - ) - } - assert.ok(messages.every((message) => !message.includes('noisy'))) - assert.match(reports.join(''), /react-router\.minimal gzip=90/) -}) - -test('compares a named baseline against current results without changing the baseline', (t) => { - const { root, reports, execute } = fixture(t) - const baseline = path.join(root, 'runs/baseline/current.json') - writeCurrent(baseline) - - assert.equal( - run(['--results-dir', root, '--baseline', 'baseline'], execute), - 0, - ) - assert.match( - reports.join(''), - /react-router\.minimal 100 -> 90 \(-10\) initial=-10 raw=-30 brotli=-10/, - ) - assert.equal( - JSON.parse(fs.readFileSync(baseline, 'utf8')).metrics[0].gzipBytes, - 100, - ) -}) - -test('accepts an external baseline and forwards measurement options', (t) => { - const { root, calls, reports, execute } = fixture(t) - const baseline = path.join(root, 'external baseline.json') - writeCurrent(baseline) - - assert.equal( - run( - [ - '--results-dir', - root, - '--baseline', - baseline, - '--dist-dir', - path.join(root, 'dist with spaces'), - '--analysis', - '--sourcemap', - '--timings', - '--skip-package-builds', - ], - execute, - ), - 0, - ) - assert.deepEqual(calls[0]?.args.slice(3), [ - '--dist-dir', - 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\)/) -}) - -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 - const log = `early output\n${'x'.repeat(10_000)}\n${'later output\n'.repeat(60)}last error\n` - const status = run( - ['--results-dir', root, '--test-projects', '@tanstack/react-router'], - (command, args, options) => { - callCount++ - assert.ok(options.stdio !== 'inherit') - fs.writeSync(options.stdio[1], log) - return { status: 42 } - }, - ) - - assert.equal(status, 42) - assert.equal(callCount, 1) - assert.equal(fs.readFileSync(path.join(root, 'tests.log'), 'utf8'), log) - assert.ok(!fs.existsSync(path.join(root, 'measure.log'))) - assert.match(messages.join('\n'), /tests failed: exit 42/) - assert.match(messages.join('\n'), /last error/) - assert.doesNotMatch(messages.join('\n'), /early output|xxx/) - const tail = messages.at(-1) - assert.ok(tail) - assert.ok(tail.split('\n').length <= 40) - assert.ok(tail.length <= 8000) -}) - -test('bounds failure output even when a log contains one very long line', (t) => { - const { root, messages } = fixture(t) - assert.equal( - run(['--results-dir', root], (command, args, options) => { - assert.ok(options.stdio !== 'inherit') - fs.writeSync(options.stdio[1], 'x'.repeat(20_000)) - return { status: 1 } - }), - 1, - ) - assert.equal(messages.at(-1), 'x'.repeat(8000)) -}) - -test('does not report stale results after a failed or interrupted measurement', async (t) => { - for (const result of [ - { status: 17 }, - { status: null, signal: 'SIGTERM' }, - { status: null, error: new Error('spawn failed') }, - ]) { - await t.test( - result.error?.message || result.signal || `exit ${result.status}`, - (t) => { - const { root, messages } = fixture(t) - let callCount = 0 - writeCurrent(path.join(root, 'current.json')) - assert.equal( - run(['--results-dir', root], () => { - callCount++ - return result - }), - result.status || 1, - ) - assert.equal(callCount, 1) - assert.match(messages.join('\n'), /measure failed:/) - }, - ) - } -}) - -test('rejects invalid inputs and protects saved results before running commands', (t) => { - const { root, calls, execute } = fixture(t) - const current = path.join(root, 'current.json') - writeCurrent(current) - writeCurrent(path.join(root, 'runs/baseline/current.json')) - fs.writeFileSync(path.join(root, 'empty.json'), '{"metrics":[]}') - fs.writeFileSync(path.join(root, 'invalid.json'), '{') - /** @type {Array<[string[], RegExp]>} */ - const cases = [ - [['--unknown'], /Unknown option/], - [['--', 'tests/path.test.ts'], /require --test-projects/], - [['--test-projects', ' , '], /at least one project/], - [['--scenario', ' , '], /at least one scenario/], - [['--name', '../escape'], /Run names/], - [['--name', 'baseline'], /Named run already exists/], - [['--baseline', 'missing'], /ENOENT/], - [['--baseline', current], /baseline cannot be the current output/], - [['--baseline', path.join(root, 'empty.json')], /no metrics/], - [['--baseline', path.join(root, 'invalid.json')], /JSON/], - ] - for (const [args, error] of cases) { - assert.throws(() => run(['--results-dir', root, ...args], execute), error) - } - assert.equal(calls.length, 0) - assert.equal( - JSON.parse(fs.readFileSync(current, 'utf8')).metrics[0].gzipBytes, - 100, - ) -}) - -test('reports help and argument errors through the CLI entry point', () => { - const help = spawnSync(process.execPath, [scriptPath, '--help'], { - encoding: 'utf8', - }) - 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', - }) - assert.equal(invalid.status, 1) - assert.match(invalid.stderr, /Unknown option/) -}) diff --git a/scripts/benchmarks/bundle-size/timings.mjs b/scripts/benchmarks/bundle-size/timings.mjs deleted file mode 100644 index 15d856f96b..0000000000 --- a/scripts/benchmarks/bundle-size/timings.mjs +++ /dev/null @@ -1,20 +0,0 @@ -// 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 deleted file mode 100644 index 8d895aadc5..0000000000 --- a/scripts/benchmarks/bundle-size/timings.test.mjs +++ /dev/null @@ -1,35 +0,0 @@ -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/scripts/nx/playwright-plugin.md b/scripts/nx/playwright-plugin.md index 665e58be4d..a9f33bb4c8 100644 --- a/scripts/nx/playwright-plugin.md +++ b/scripts/nx/playwright-plugin.md @@ -45,7 +45,7 @@ Supported toolchains: For each `{ toolchain, mode }` entry, the plugin generates: -- `build::` +- `build:e2e---` - `test:e2e---` If `shards > 1`, it also generates: @@ -59,7 +59,7 @@ Finally, it generates: ## 3. Environment variables injected by inferred targets -Each inferred `build::` and `test:e2e---` target sets: +Each inferred `build:e2e:*` and `test:e2e:*` target sets: - `MODE=` - `TOOLCHAIN=` @@ -67,23 +67,25 @@ Each inferred `build::` and `test:e2e---` targ - `E2E_DIST=dist--` - `E2E_DIST_DIR=dist--` +Each inferred `test:e2e:*` target also sets: + +- `E2E_PORT_KEY=--` +- For shard targets: `E2E_PORT_KEY=---shard--of-` + ## 4. Build behavior and webServer command -Each inferred e2e target depends on the inferred `build::` -target. It runs `vite build && tsc --noEmit` or -`rsbuild build && tsc --noEmit`, selecting the toolchain explicitly. Ordinary -package build scripts do not need to know about E2E mocking. +Each inferred e2e target depends on the inferred `build:e2e---` +target, which runs: -The React, Solid, and Vue basic examples preload the same MSW handlers in -Nx prerender builds (through mode metadata) and Playwright application servers -with Node's native option: -`NODE_OPTIONS='--import=@tanstack/router-e2e-utils/mock-api'`. -The handlers return canned posts and users at `https://jsonplaceholder.typicode.com` inside -each Node process, including prerendering. No API listener or fixture port is -needed. Playwright starts only the application server. A cached build uses the -same URL when started by a fresh process with the preload enabled. Ordinary -`pnpm dev`, builds, and standalone servers use the public API without MSW. -Application code uses the public URL in both cases; test setup enables mocking. +```sh +vite build && tsc --noEmit +``` + +with the mode/toolchain env above. + +This command is intentionally fixed (it does not call `pnpm build`). This avoids +accidentally selecting the wrong build path in projects that include multiple +toolchains. The inferred build target uses standard production inputs and explicit mode- specific outputs (`dist--`). Mode env values are passed through @@ -97,7 +99,7 @@ Good: ```ts webServer: { command: `PORT=${PORT} pnpm start`, - wait: appServerReady, + url: baseURL, } ``` @@ -108,7 +110,7 @@ const distDir = process.env.E2E_DIST_DIR ?? 'dist' webServer: { command: `pnpm preview --outDir ${distDir} --port ${PORT}`, - wait: appServerReady, + url: baseURL, } ``` @@ -117,50 +119,63 @@ Avoid: ```ts webServer: { command: `MODE=spa pnpm build && PORT=${PORT} pnpm start`, - wait: appServerReady, + url: baseURL, } ``` -## 5. Let each server bind its own port +## 5. Use `E2E_PORT_KEY` for all server ports -Use port `0` in server commands. The OS chooses a free port while binding the -listening socket. Do not reserve ports, write port files, or restore ports from -Nx outputs. - -Playwright's `webServer.wait` captures the address printed after listening. -It exports named capture groups to subsequent servers and test workers. The -shared `appServerReady` pattern captures `E2E_APP_PORT`; configs read that value -when reloaded in workers to configure `use.baseURL`. +If your setup uses `getTestServerPort`, `getDummyServerPort`, +`e2eStartDummyServer`, or `e2eStopDummyServer`, use +`process.env.E2E_PORT_KEY` first. ```ts -import { appServerReady } from '@tanstack/router-e2e-utils' +import { getTestServerPort } from '@tanstack/router-e2e-utils' +import packageJson from './package.json' with { type: 'json' } -const baseURL = `http://localhost:${process.env.E2E_APP_PORT ?? 0}` - -// Inside defineConfig: -use: { baseURL }, -webServer: { - command: 'pnpm preview --port 0', - wait: appServerReady, - reuseExistingServer: false, -}, +const e2ePortKey = process.env.E2E_PORT_KEY ?? packageJson.name +const PORT = await getTestServerPort(e2ePortKey) ``` -Canned posts/users requests use `https://jsonplaceholder.typicode.com`. Node builds and -servers preload `@tanstack/router-e2e-utils/mock-api` through `NODE_OPTIONS`. -Browser API suites import `apiTest as test` from the E2E utilities. That fixture -uses the official MSW Playwright adapter with the same handlers. Opt in only -where the API is needed: Playwright routing disables the browser HTTP cache. +Dummy server setup/teardown should use the same key: -External-navigation tests use another hostname on the existing app listener, -with a static HTML asset when the test needs a distinct destination document. -No API server, fixture-port environment variable, or build launcher is needed. +```ts +await e2eStartDummyServer(process.env.E2E_PORT_KEY ?? packageJson.name) +await e2eStopDummyServer(process.env.E2E_PORT_KEY ?? packageJson.name) +``` -Custom servers must print their actual `server.address().port`, not the -requested port. SPA servers bind their backend first and use its actual port -for proxying. Playwright owns server shutdown. +## 6. Clean stale port files once per Playwright run -## 6. Run inferred targets +If the project allocates ports through `@tanstack/router-e2e-utils`, clean stale +`port-*.txt` files before resolving the port. + +Important: do this only in the main Playwright config load. Playwright loads the +config more than once, and unconditional cleanup can remap the port after the +web server has already started. + +```ts +import fs from 'node:fs' +import packageJson from './package.json' with { type: 'json' } + +const e2ePortKey = process.env.E2E_PORT_KEY ?? packageJson.name + +if (process.env.TEST_WORKER_INDEX === undefined) { + for (const portFile of [ + `port-${e2ePortKey}.txt`, + `port-${e2ePortKey}_start.txt`, + `port-${e2ePortKey}-external.txt`, + ]) { + fs.rmSync(portFile, { force: true }) + } +} +``` + +Include the `*_start` file only if your test setup allocates a separate +`START_PORT` key. + +Avoid broad cleanup such as `rm -rf port*.txt` in shared shard runs. + +## 7. Run inferred targets Examples: diff --git a/scripts/nx/playwright-plugin.ts b/scripts/nx/playwright-plugin.ts index ce80933064..d02276d269 100644 --- a/scripts/nx/playwright-plugin.ts +++ b/scripts/nx/playwright-plugin.ts @@ -1,12 +1,12 @@ import { dirname } from 'node:path' import { createNodesFromFiles, readJsonFile } from '@nx/devkit' import type { - CreateNodes, - CreateNodesContext, + CreateNodesContextV2, + CreateNodesV2, TargetConfiguration, } from '@nx/devkit' -export const createNodes: CreateNodes = [ +export const createNodesV2: CreateNodesV2 = [ '**/package.json', async (configFiles, options, context) => { return await createNodesFromFiles( @@ -21,7 +21,7 @@ export const createNodes: CreateNodes = [ function createNodesInternal( configFilePath: string, - _context: CreateNodesContext, + _context: CreateNodesContextV2, ) { const projectConfiguration = readJsonFile<{ name?: string @@ -69,6 +69,7 @@ function createNodesInternal( const { targets, targetGroupEntries } = buildShardedTargets( root, + packageName, projectConfiguration.nx.metadata.playwrightShards, ) // Project configuration to be merged into the rest of the Nx configuration @@ -89,15 +90,10 @@ function createNodesInternal( const CI_TARGET_NAME = 'test:e2e' const MODE_TARGET_SEPARATOR = '--' -const TEST_INPUTS: TargetConfiguration['inputs'] = [ - 'default', - 'dependentTaskOutputs', - '^buildProduction', -] +const TEST_INPUTS: TargetConfiguration['inputs'] = ['default', '^production'] const BUILD_INPUTS: TargetConfiguration['inputs'] = [ - 'buildProduction', - 'dependentTaskOutputs', - '^buildProduction', + 'production', + '^production', ] const PLAYWRIGHT_TOOLCHAINS = ['vite', 'rsbuild'] as const @@ -111,32 +107,6 @@ const PLAYWRIGHT_BUILD_COMMANDS: Record = { rsbuild: 'rsbuild build && tsc --noEmit', } -function captureCommandOutput(command: string, outputFile?: string): string { - if (!outputFile) { - return command - } - - if (!/^[a-zA-Z0-9._-]+$/.test(outputFile)) { - throw new Error( - `[Playwright Sharding Plugin] Invalid E2E_BUILD_LOG value: ${outputFile}. ` + - `Expected a filename containing only letters, numbers, dots, dashes, and underscores.`, - ) - } - - const escapedCommand = command.replaceAll("'", "'\\''") - return `bash -o pipefail -c '{ ${escapedCommand}; } 2>&1 | tee ${outputFile}'` -} - -function getTestOutputs( - modeKey: string, - taskKey: string, -): TargetConfiguration['outputs'] { - return [ - `{projectRoot}/test-results/${taskKey}`, - `{projectRoot}/violations.${modeKey}.*.json`, - ] -} - type PlaywrightModeMetadata = { toolchain: PlaywrightToolchain mode: PlaywrightMode @@ -247,6 +217,7 @@ function buildModeTargets( const targetGroup: Array = [] const ciDependsOnTargets: Array<{ target: string + projects: 'self' params: 'forward' }> = [] @@ -260,28 +231,22 @@ function buildModeTargets( const buildTargetName = `build:${modeMetadata.toolchain}:${modeMetadata.mode}${modeMetadata.name ? `:${modeMetadata.name}` : ''}` const shardCount = modeMetadata.shards ?? 1 const distDir = `dist-${modeMetadata.toolchain}-${modeMetadata.mode}${variantPathSuffix}` - const modeKey = `${modeMetadata.toolchain}-${modeMetadata.mode}${variantPathSuffix}` - const modeEnv: Record = { + const modeEnv = { ...modeMetadata.env, MODE: modeMetadata.mode, TOOLCHAIN: modeMetadata.toolchain, E2E_TOOLCHAIN: modeMetadata.toolchain, - E2E_MODE_KEY: modeKey, E2E_DIST: distDir, E2E_DIST_DIR: distDir, } - const buildLog = modeEnv.E2E_BUILD_LOG - const modeTaskKey = `${packageName}-${modeKey}-e2e` + const modePortKey = `${packageName}-${modeMetadata.toolchain}-${modeMetadata.mode}${variantPathSuffix}` const modeDescription = `${modeMetadata.toolchain}/${modeMetadata.mode}${modeMetadata.name ? `/${modeMetadata.name}` : ''}` const modeShardTargets: Array = [] targets[buildTargetName] = { executor: 'nx:run-commands', options: { - command: captureCommandOutput( - PLAYWRIGHT_BUILD_COMMANDS[modeMetadata.toolchain], - buildLog, - ), + command: PLAYWRIGHT_BUILD_COMMANDS[modeMetadata.toolchain], cwd: projectRoot, env: modeEnv, }, @@ -289,10 +254,7 @@ function buildModeTargets( cache: true, inputs: BUILD_INPUTS, dependsOn: ['^build'], - outputs: [ - `{projectRoot}/${distDir}`, - ...(buildLog ? [`{projectRoot}/${buildLog}`] : []), - ], + outputs: [`{projectRoot}/${distDir}`], metadata: { technologies: ['playwright'], description: `Build artifacts for ${modeDescription} e2e tests`, @@ -304,14 +266,15 @@ function buildModeTargets( targets[modeTargetName] = { executor: 'nx:run-commands', options: { - command: `playwright test --project=chromium --output=test-results/${modeTaskKey}`, + command: 'playwright test --project=chromium', cwd: projectRoot, - env: modeEnv, + env: { + ...modeEnv, + E2E_PORT_KEY: modePortKey, + }, }, - parallelism: false, cache: true, inputs: TEST_INPUTS, - outputs: getTestOutputs(modeKey, modeTaskKey), dependsOn: [buildTargetName], metadata: { technologies: ['playwright'], @@ -322,19 +285,20 @@ function buildModeTargets( } else { for (let shardIndex = 1; shardIndex <= shardCount; shardIndex++) { const shardTargetName = `${modeTargetName}${MODE_TARGET_SEPARATOR}shard-${shardIndex}-of-${shardCount}` - const shardTaskKey = `${modeTaskKey}-shard-${shardIndex}-of-${shardCount}` + const shardPortKey = `${modePortKey}-shard-${shardIndex}-of-${shardCount}` targets[shardTargetName] = { executor: 'nx:run-commands', options: { - command: `playwright test --project=chromium --shard=${shardIndex}/${shardCount} --output=test-results/${shardTaskKey}`, + command: `playwright test --project=chromium --shard=${shardIndex}/${shardCount}`, cwd: projectRoot, - env: modeEnv, + env: { + ...modeEnv, + E2E_PORT_KEY: shardPortKey, + }, }, - parallelism: false, cache: true, inputs: TEST_INPUTS, - outputs: getTestOutputs(modeKey, shardTaskKey), dependsOn: [buildTargetName], metadata: { technologies: ['playwright'], @@ -360,6 +324,7 @@ function buildModeTargets( inputs: TEST_INPUTS, dependsOn: modeShardTargets.map((shardTargetName) => ({ target: shardTargetName, + projects: 'self' as const, params: 'forward' as const, })), metadata: { @@ -372,6 +337,7 @@ function buildModeTargets( ciDependsOnTargets.push({ target: modeTargetName, + projects: 'self', params: 'forward', }) } @@ -395,6 +361,7 @@ function buildModeTargets( function buildShardedTargets( projectRoot: string, + packageName: string, shardCount: number, ): { targets: Record @@ -406,14 +373,17 @@ function buildShardedTargets( // Create individual shard targets for (let shardIndex = 1; shardIndex <= shardCount; shardIndex++) { const shardTargetName = `${CI_TARGET_NAME}--shard-${shardIndex}-of-${shardCount}` + const e2ePortKey = `${packageName}-shard-${shardIndex}-of-${shardCount}` targets[shardTargetName] = { executor: 'nx:run-commands', options: { command: `playwright test --project=chromium --shard=${shardIndex}/${shardCount}`, cwd: projectRoot, + env: { + E2E_PORT_KEY: e2ePortKey, + }, }, - parallelism: false, cache: true, inputs: TEST_INPUTS, dependsOn: [`^build`, 'build'], @@ -441,6 +411,7 @@ function buildShardedTargets( inputs: TEST_INPUTS, dependsOn: targetGroup.map((shardTargetName) => ({ target: shardTargetName, + projects: 'self' as const, params: 'forward' as const, })), metadata: { diff --git a/scripts/set-ts-version.js b/scripts/set-ts-version.js index 4a6724c4a9..23e9063a0f 100644 --- a/scripts/set-ts-version.js +++ b/scripts/set-ts-version.js @@ -12,10 +12,7 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url)) const ROOT_PACKAGE_JSON = join(__dirname, '..', 'package.json') const PACKAGES_DIR = join(__dirname, '..', 'packages') -const SUPPORTED_TS_VERSIONS = ['5.6', '5.7', '5.8', '5.9', '6.0', '7.0'] -const API_COMPAT_TS_VERSION = '6.0' -const API_COMPAT_TS_RANGE = '^6.0.2' -const LATEST_TS_RANGE = '^7.0.2' +const SUPPORTED_TS_VERSIONS = ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9'] const LATEST_TS_VERSION = SUPPORTED_TS_VERSIONS[SUPPORTED_TS_VERSIONS.length - 1] @@ -45,7 +42,7 @@ function updatePackageJson(packagePath) { scriptKeys.forEach((key) => { if (key.startsWith('test:types:')) { const script = packageJson.scripts[key] - const match = script.match(/(?:node \S+\/tsc\.js|tsc6|tsc)(.*)/) + const match = script.match(/(?:node \S+\/tsc\.js|tsc)(.*)/) cliArgs[key] = match ? match[1].trim() : '' delete updatedScripts[key] } @@ -68,8 +65,6 @@ function updatePackageJson(packagePath) { if (i === SUPPORTED_TS_VERSIONS.length - 1) { // Use "tsc" directly for the latest version newScripts[scriptKey] = `tsc ${previousLatestArgs}`.trim() - } else if (version === API_COMPAT_TS_VERSION) { - newScripts[scriptKey] = `tsc6 ${cliArgs[scriptKey] || ''}`.trim() } else { const args = cliArgs[scriptKey] || '' newScripts[scriptKey] = @@ -95,11 +90,8 @@ function updateRootPackageJson() { const rootPackageJson = JSON.parse(readFileSync(ROOT_PACKAGE_JSON, 'utf8')) rootPackageJson.devDependencies = rootPackageJson.devDependencies || {} - // TypeScript 7 provides tsc, while TypeScript 6 provides the legacy API. - rootPackageJson.devDependencies['@typescript/native'] = - `npm:typescript@${LATEST_TS_RANGE}` - rootPackageJson.devDependencies['typescript'] = - `npm:@typescript/typescript6@${API_COMPAT_TS_RANGE}` + // Update main TypeScript version + rootPackageJson.devDependencies['typescript'] = `^${LATEST_TS_VERSION}.0` // Remove old TypeScript aliases Object.keys(rootPackageJson.devDependencies).forEach((dep) => { @@ -109,12 +101,10 @@ function updateRootPackageJson() { }) // Add supported TypeScript aliases - SUPPORTED_TS_VERSIONS.slice(0, -1) - .filter((version) => version !== API_COMPAT_TS_VERSION) - .forEach((version) => { - rootPackageJson.devDependencies[`typescript${version.replace('.', '')}`] = - `npm:typescript@${version}` - }) + SUPPORTED_TS_VERSIONS.slice(0, -1).forEach((version) => { + rootPackageJson.devDependencies[`typescript${version.replace('.', '')}`] = + `npm:typescript@${version}` + }) writeFileSync( ROOT_PACKAGE_JSON, diff --git a/scripts/update-example-deps.mjs b/scripts/update-example-deps.mjs index 848d125567..87289a9e2a 100644 --- a/scripts/update-example-deps.mjs +++ b/scripts/update-example-deps.mjs @@ -1,39 +1,19 @@ import fs from 'fs' import path from 'node:path' import { globSync } from 'node:fs' -import { execSync } from 'node:child_process' const rootDir = path.join(import.meta.dirname, '..') +// Build a map of package name -> current version from workspace const packagesDir = path.join(rootDir, 'packages') -const workspacePackageRanges = Object.fromEntries( +const packageMap = Object.fromEntries( globSync('*/package.json', { cwd: packagesDir }).map((p) => { const pkg = JSON.parse(fs.readFileSync(path.join(packagesDir, p), 'utf-8')) - return [pkg.name, `^${pkg.version}`] + return [pkg.name, pkg.version] }), ) -const catalog = JSON.parse( - execSync('pnpm config get catalog --json', { - cwd: rootDir, - encoding: 'utf-8', - }), -) -const catalogDependencies = ['@tanstack/react-query', 'redaxios', 'vitest'] -const catalogPackageRanges = Object.fromEntries( - catalogDependencies.map((name) => { - const range = catalog[name] - if (!range) { - throw new Error(`Missing catalog entry for ${name}`) - } - return [name, range] - }), -) -const exampleDependencyRanges = { - ...workspacePackageRanges, - ...catalogPackageRanges, -} - +// Update all example package.json files const examplesDir = path.join(rootDir, 'examples') const examplePkgPaths = globSync('**/package.json', { cwd: examplesDir, @@ -50,13 +30,10 @@ for (const relPath of examplePkgPaths) { let changed = false for (const depType of ['dependencies', 'devDependencies']) { const deps = pkg[depType] - if (!deps) { - continue - } + if (!deps) continue for (const [name, range] of Object.entries(deps)) { - const expectedRange = exampleDependencyRanges[name] - if (expectedRange && range !== expectedRange) { - deps[name] = expectedRange + if (packageMap[name] && range !== `^${packageMap[name]}`) { + deps[name] = `^${packageMap[name]}` changed = true } } diff --git a/skills/bundle-size-optimization/SKILL.md b/skills/bundle-size-optimization/SKILL.md index 1b6b5ebe3a..d24538be69 100644 --- a/skills/bundle-size-optimization/SKILL.md +++ b/skills/bundle-size-optimization/SKILL.md @@ -7,47 +7,28 @@ description: Use when working in this repository on JS bundle size, gzip regress ## Overview -Optimize measured client bundles, not source text. The source of truth is `@benchmarks/bundle-size:measure`, `benchmarks/bundle-size/results/current.json`, and emitted JS in `benchmarks/bundle-size/dist/`. -Use `benchmark:bundle-size:run` for local iterations. It uses the same measurement script and builds the selected packages through Nx. +Optimize measured client bundles, not source text. The source of truth is `@benchmarks/bundle-size:build`, `benchmarks/bundle-size/results/current.json`, and emitted JS in `benchmarks/bundle-size/dist/`. ## Commands -| Need | Command | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Full benchmark | `pnpm benchmark:bundle-size:run` | -| Save baseline | `pnpm benchmark:bundle-size:run --name baseline --scenario react-router.minimal` | -| Measure and compare | `pnpm benchmark:bundle-size:run --baseline baseline --scenario react-router.minimal` | -| Save a candidate | `pnpm benchmark:bundle-size:run --name candidate --baseline baseline --scenario react-router.minimal` | -| Test, measure, compare | `pnpm benchmark:bundle-size:run --baseline baseline --scenario react-router.minimal --test-projects @tanstack/router-core,@tanstack/react-router -- tests/path.test.ts tests/link.test.tsx` | -| Read result | `pnpm benchmark:bundle-size:query --id react-router.minimal` | -| Compare existing results | `pnpm benchmark:bundle-size:diff --baseline ./baseline.json --id react-router.minimal` | -| History deltas | `git fetch --quiet origin gh-pages && pnpm benchmark:bundle-size:history --id react-router.minimal --top-deltas 20` | -| Collect source attribution | `pnpm benchmark:bundle-size:run --scenario react-router.minimal --analysis` | -| Read source attribution | `pnpm benchmark:bundle-size:analyze --id react-router.minimal` | -| Symbol refs | `pnpm ts:symbol-references -- --project packages/router-core/tsconfig.json --file packages/router-core/src/utils.ts --symbol last` | - -Named runs save metrics and logs in `benchmarks/bundle-size/results/runs//`. Existing named results cannot be overwritten. -Without `--name`, runs replace `results/current.json` and the logs for the steps they run. -`--baseline` accepts a run name or a JSON file path. `--results-dir ` changes the results root for the current and named runs. -Emitted bundles still use `dist/` unless `--dist-dir` specifies another directory. -For named results, pass `--current benchmarks/bundle-size/results/runs//current.json` to the query, diff, or analysis tools. +| Need | Command | +| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Full benchmark | `CI=1 NX_DAEMON=false pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache --skipNxCache >/tmp/bundle-size-build.log 2>&1 && pnpm benchmark:bundle-size:query` | +| One scenario | `CI=1 NX_DAEMON=false pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache --skipNxCache -- --scenario react-router.minimal >/tmp/bundle-size-build.log 2>&1 && pnpm benchmark:bundle-size:query --id react-router.minimal` | +| Read result | `pnpm benchmark:bundle-size:query --id react-router.minimal` | +| Compare results | `pnpm benchmark:bundle-size:diff --baseline /tmp/base-current.json --id react-router.minimal` | +| History deltas | `git fetch --quiet origin gh-pages && pnpm benchmark:bundle-size:history --id react-router.minimal --top-deltas 20` | +| Source attribution | `CI=1 NX_DAEMON=false pnpm nx run @benchmarks/bundle-size:build --outputStyle=stream --skipRemoteCache --skipNxCache -- --scenario react-router.minimal --analysis >/tmp/bundle-size-build.log 2>&1 && pnpm benchmark:bundle-size:analyze --id react-router.minimal` | +| Symbol refs | `pnpm ts:symbol-references -- --project packages/router-core/tsconfig.json --file packages/router-core/src/utils.ts --symbol last` | ## Rules - Run one Nx command at a time. -- Use the runner instead of shell chains for environment variables, redirection, exit codes, log tails, and result queries. -- For agent runs, use `pnpm --silent benchmark:bundle-size:run ...` to omit the package-manager command echo. -- The runner sets `CI=1` and `NX_DAEMON=false`. It saves full output in `tests.log` and `measure.log` beside `current.json`. -- If a step fails, the runner stops and prints at most 40 log lines, limited to 8,000 characters. Read the reported log for more detail. -- Quiet stdout does not indicate an Nx hang. Inspect the reported log for progress before applying the Nx reset/retry guardrail. -- Use `--test-projects` for the packages that changed. Pass unit-test file selectors and flags after `--`. -- The runner does not select tests automatically. Keep type tests, performance benchmarks, and e2e tests separate. -- Keep baseline and candidate scenario selections and measurement flags identical. Use a new `--name` for each retained snapshot. -- Do not add `--skip-package-builds` after package source changes. The default rebuilds through Nx and preserves valid package caches. +- Redirect noisy Nx build output to a log file, then print only `query`, `diff`, or `analyze` output. If the build fails, search/read the log for the error instead of printing the full log. - Track `gzipBytes` first; also inspect `initialGzipBytes`, `rawBytes`, `brotliBytes`, `jsFiles`, and per-file `files`. - Dist paths use `scenarioDir`/`outDir`, not metric ids: `react-router.minimal` maps to `dist/react-router-minimal/`. - For tiny changes, measure after each candidate; gzip can move opposite raw bytes. -- To compare a base commit, measure the same scenario in a separate worktree. Pass its saved `current.json` path to `--baseline`. +- To compare a base commit, run the same scenario in a separate worktree under `/var/folders/6f/2t42ntqs4yv4h6qwzbh5pmcm0000gn/T/opencode` and diff the two `current.json` files. - Use history for prior patterns and baselines, not source attribution. It is commit-level data. - Runtime performance and security may never be sacrificed for bundle size. - Do not stop after the first verified win. Keep iterating through reasonable local, emitted-JS, and algorithmic candidates until measured regressions, readability, or risk rule out the remaining paths. @@ -90,11 +71,11 @@ Before calling an optimization final, prove which exact production hunks should ## Optimization Loop -1. Measure the baseline scenario with `--name baseline`. +1. Measure baseline scenario. 2. Inspect diff, emitted JS, per-file sizes, and analysis sources if needed. 3. Analyze the algorithm before syntax. Identify redundant loops, duplicate branches, repeated scans/slices/lowercasing, allocation-heavy paths, search order, and data-shape choices. 4. Make the smallest behavior-preserving algorithmic edit that removes work or code shape first; use syntax-only edits only after algorithmic candidates are exhausted. -5. Re-measure with `--baseline baseline` and keep only proven wins. +5. Re-measure and keep only proven wins. 6. Run package unit/types, relevant e2e, and `git diff --check`. 7. Run the attribution round, then the post-optimization coverage/perf workflow before finalizing. @@ -147,8 +128,3 @@ 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` diff --git a/tsconfig.json b/tsconfig.json index 7228771323..f3765b8ed3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, - "lib": ["DOM", "DOM.Iterable", "DOM.AsyncIterable", "ES2022"], + "lib": ["DOM", "DOM.Iterable", "ES2022"], "module": "ESNext", "moduleResolution": "Bundler", "noEmit": true,